[TUTORIAL] Debian Bookworm & Realtek NIC Issues (NIC worked fine before upgrade)

jrdwiz

New Member
Mar 11, 2023
2
5
3

Situation​

Upon upgrading from PVE 7.4 (Debian 11) to PVE 8.0 (Debian 12), the On-Board Realtek NIC stops functioning correctly. The NIC may work upon boot, but connectivity will stop within minutes and the console begins outputting lines similar to the text below —

r8169 0000:01:00.0 enp1s0: rtl_ephyar_cond == 1 (loop: 100, delay: 10).


My Environment​


Manufacturer: Dell Inc.
Product Name: OptiPlex 3060
Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)


Solution​

#Add the non-free repo
nano /ect/apt/sources.list
deb http://ftp.debian.org/debian bookworm-updates main contrib non-free

# Run apt update, install the package, and reboot.
apt update
apt install r8168-dkms -y
reboot now

This worked well for me. Your mileage may vary.

Other Solution - Don't use Realtek NICs.
 
"Other Solution - Don't use Realtek NICs."

:) that made me smile.
But thanks for the tutorial!
Will try and test this, because I have a spare server with 2 Realtek nics in it.
I reserved this server for Proxmox (was an old ESXi server, also Realtek issues but workable).
 
I have the same NIC on a different mini PC (Fujitsu Esprimo G5010) and in addition to using r8168 I also had to add a boot parameter (
r8168.aspm=0) to `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub` and ran `update-grub` and restarted.

Hopefully you won't need it, in case you still have issues it might be worth giving it a try.
 
  • Like
Reactions: LolekUK
Thank you so much for posting the solution, you made my day. I was wondering what was causing this.

For everyone else who is experiencing a 404 or not found issue after updating the sources.list installing this:

Go to https://debian.pkgs.org/ and search r8268 for your distro:
 
  • Like
Reactions: LolekUK
Thank you so much for posting the solution, you made my day. I was wondering what was causing this.

For everyone else who is experiencing a 404 or not found issue after updating the sources.list installing this:

Go to https://debian.pkgs.org/ and search r8268 for your distro:
I am trying this method, but it has a dkms dependency and that package has like 8 other dependencies. I cant connect to the internet, is there an easier way to install with all the dependencies in the .deb immediately?
 
Thanks OP and other for this,
I'm just refreshing/replacing my current pve host, got hold of Dell Micro 3060 (same as OP) with Realtek NIC. Network works, but seems to be capped at 1Mbps.

I've tried both solutions to upgrade NIC driver, installing with non-free repository and manually, but I came across those errors:

non-free

r8168_1.png

So, I have manually downloaded the dkms package and tried to install but fails towards the end throwing an error about the kernel:

r8168_4.png

After reboot, network doesn't work until r8169-dkms is purged.

I have also tried to install the headers with no luck:

r8168_3.png

Thanks
 

Attachments

  • r8168_2.png
    r8168_2.png
    78.2 KB · Views: 36
Last edited:
Thanks OP and other for this,
I'm just refreshing/replacing my current pve host, got hold of Dell Micro 3060 (same as OP) with Realtek NIC. Network works, but seems to be capped at 1Mbps.

I've tried both solutions to upgrade NIC driver, installing with non-free repository and manually, but I came across those errors:

non-free

View attachment 54266

So, I have manually downloaded the dkms package and tried to install but fails towards the end throwing an error about the kernel:

View attachment 54269

After reboot, network doesn't work until r8169-dkms is purged.

I have also tried to install the headers with no luck:

View attachment 54268

Thanks
Ok, I've managed to get headers, once driver was installed it was significantly better - but still not using the full speed.
I've added the grub argument mentioned by @msangi, rebooted and now working at full speed.

Thank you!
 
I'm always trying to avoid workarounds like that. And I rolled back to Proxmox 7.4 anyway, as short after release und upgrade to 8.0, I was not able to find the reason of network speed drop on my RTL8111-based Intel NUC 11 Essential.

So I would like to ask if this issue will be fixed in next version release of Proxmox? I would do a fresh install of Proxmox 8.x then and recover VMs from backup.

Just out of personal interrest, how can this even happen? According to my understanding, this must be a Debian bug. But there are so, so many machines with Realtek NICs and Debian out there, so I wonder why no one noticed before release...

Fun fact: Yes, you have read that corretly: Intel has built in a Realtek NIC in their NUC, even though they would have their own NICs :Do_O
 
[update] had to purge dkms driver and start again, download pve kernel headers again, change repositories, download dkms drivers, update GRUB file and reboot.


ah, not sure what has happened, I went away for a 5 days and had the host turned off by mistake (not sure if any updates/upgrades were applied before it was turned off).

Now the Realtek NIC isn't showing in ip a (to get PVE working I had to connect USB NIC and reconfigure vmrb0 interface to use the USB one).
root@srv-vmh:~# ip a 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host noprefixroute valid_lft forever preferred_lft forever 2: enx9cebe812f219: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master vmbr0 state UP group default qlen 1000 link/ether 9c:eb:e8:12:f2:19 brd ff:ff:ff:ff:ff:ff 3: vmbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 link/ether 9c:eb:e8:12:f2:19 brd ff:ff:ff:ff:ff:ff inet 192.168.1.10/24 scope global vmbr0 valid_lft forever preferred_lft forever inet6 fe80::9eeb:e8ff:fe12:f219/64 scope link valid_lft forever preferred_lft forever 4: veth109i0@if2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master fwbr109i0 state UP group default qlen 1000 link/ether fe:d8:a4:5d:88:0d brd ff:ff:ff:ff:ff:ff link-netnsid 0 5: fwbr109i0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 link/ether 46:ef:af:ab:82:75 brd ff:ff:ff:ff:ff:ff 6: fwpr109p0@fwln109i0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master vmbr0 state UP group default qlen 1000 link/ether e2:81:15:48:b7:68 brd ff:ff:ff:ff:ff:ff 7: fwln109i0@fwpr109p0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master fwbr109i0 state UP group default qlen 1000 link/ether 92:f9:fb:45:61:a3 brd ff:ff:ff:ff:ff:ff 8: veth102i0@if2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master fwbr102i0 state UP group default qlen 1000 link/ether fe:64:3a:f8:1e:be brd ff:ff:ff:ff:ff:ff link-netnsid 1 9: fwbr102i0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 link/ether 12:b2:90:b3:90:00 brd ff:ff:ff:ff:ff:ff 10: fwpr102p0@fwln102i0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master vmbr0 state UP group default qlen 1000 link/ether 62:3d:9d:de:18:1d brd ff:ff:ff:ff:ff:ff 11: fwln102i0@fwpr102p0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master fwbr102i0 state UP group default qlen 1000 link/ether aa:07:87:8e:52:0e brd ff:ff:ff:ff:ff:ff 12: veth103i0@if2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master fwbr103i0 state UP group default qlen 1000 link/ether fe:f2:0b:a7:e7:c1 brd ff:ff:ff:ff:ff:ff link-netnsid 2 13: fwbr103i0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 link/ether 32:21:e7:74:d9:be brd ff:ff:ff:ff:ff:ff 14: fwpr103p0@fwln103i0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master vmbr0 state UP group default qlen 1000 link/ether 36:92:3f:94:4c:8a brd ff:ff:ff:ff:ff:ff 15: fwln103i0@fwpr103p0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master fwbr103i0 state UP group default qlen 1000 link/ether 8e:25:88:4e:4f:f2 brd ff:ff:ff:ff:ff:ff 16: veth101i0@if2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master fwbr101i0 state UP group default qlen 1000 link/ether fe:ae:9f:38:a3:97 brd ff:ff:ff:ff:ff:ff link-netnsid 3 17: fwbr101i0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 link/ether 06:87:25:20:8b:3c brd ff:ff:ff:ff:ff:ff 18: fwpr101p0@fwln101i0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master vmbr0 state UP group default qlen 1000 link/ether 8a:e1:6b:a0:56:9a brd ff:ff:ff:ff:ff:ff 19: fwln101i0@fwpr101p0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master fwbr101i0 state UP group default qlen 1000 link/ether ae:3f:52:07:cb:f0 brd ff:ff:ff:ff:ff:ff 20: tap107i0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master fwbr107i0 state UNKNOWN group default qlen 1000 link/ether 8e:bb:64:1c:98:cf brd ff:ff:ff:ff:ff:ff 21: fwbr107i0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 link/ether ea:0a:04:62:fc:0f brd ff:ff:ff:ff:ff:ff 22: fwpr107p0@fwln107i0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master vmbr0 state UP group default qlen 1000 link/ether b2:9d:82:c9:57:2f brd ff:ff:ff:ff:ff:ff 23: fwln107i0@fwpr107p0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master fwbr107i0 state UP group default qlen 1000 link/ether be:2a:f1:6a:fb:eb brd ff:ff:ff:ff:ff:ff 24: veth105i0@if2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master fwbr105i0 state UP group default qlen 1000 link/ether fe:76:7d:15:34:cc brd ff:ff:ff:ff:ff:ff link-netnsid 4 25: fwbr105i0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 link/ether f2:38:6a:54:46:bd brd ff:ff:ff:ff:ff:ff 26: fwpr105p0@fwln105i0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master vmbr0 state UP group default qlen 1000 link/ether f2:a1:ea:17:f1:44 brd ff:ff:ff:ff:ff:ff 27: fwln105i0@fwpr105p0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master fwbr105i0 state UP group default qlen 1000 link/ether 86:c0:d9:0d:61:be brd ff:ff:ff:ff:ff:ff 28: tap106i0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master vmbr0 state UNKNOWN group default qlen 1000 link/ether b6:76:9b:da:81:9c brd ff:ff:ff:ff:ff:ff

Realtek still shows up in lspci, so I assume something has gone wrong with the driver?
root@srv-vmh:~# lspci 00:00.0 Host bridge: Intel Corporation 8th Gen Core Processor Host Bridge/DRAM Registers (rev 07) 00:02.0 VGA compatible controller: Intel Corporation CoffeeLake-S GT2 [UHD Graphics 630] 00:08.0 System peripheral: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th/8th Gen Core Processor Gaussian Mixture Model 00:12.0 Signal processing controller: Intel Corporation Cannon Lake PCH Thermal Controller (rev 10) 00:14.0 USB controller: Intel Corporation Cannon Lake PCH USB 3.1 xHCI Host Controller (rev 10) 00:14.2 RAM memory: Intel Corporation Cannon Lake PCH Shared SRAM (rev 10) 00:16.0 Communication controller: Intel Corporation Cannon Lake PCH HECI Controller (rev 10) 00:17.0 SATA controller: Intel Corporation Cannon Lake PCH SATA AHCI Controller (rev 10) 00:1c.0 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #5 (rev f0) 00:1d.0 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #9 (rev f0) 00:1f.0 ISA bridge: Intel Corporation H370 Chipset LPC/eSPI Controller (rev 10) 00:1f.3 Audio device: Intel Corporation Cannon Lake PCH cAVS (rev 10) 00:1f.4 SMBus: Intel Corporation Cannon Lake PCH SMBus Controller (rev 10) 00:1f.5 Serial bus controller: Intel Corporation Cannon Lake PCH SPI Controller (rev 10) 01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15) 02:00.0 Non-Volatile memory controller: ADATA Technology Co., Ltd. IM2P33F8ABR1 NVMe SSD (rev 03)

@jrdwiz, are you ok still on the dkms driver?
 
Last edited:
Can you give me more information for this step? thx
It's the whole solution (in a brief and short sentence), which step are you struggling with? Where are you at with your system?

#Add the non-free repo
nano /ect/apt/sources.list
deb http://ftp.debian.org/debian bookworm-updates main contrib non-free

# Run apt update, install the package, and reboot.
apt update
apt install r8168-dkms -y
reboot now

# add grub arguments
(r8168.aspm=0) to `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`
run `update-grub`
restart
 
I'm guessing, after reboot I will loose network again... after another kernel update:

Examining /etc/kernel/postinst.d. run-parts: executing /etc/kernel/postinst.d/dkms 6.2.16-12-pve /boot/vmlinuz-6.2.16-12-pve dkms: autoinstall for kernel 6.2.16-12-pve was skipped since the kernel headers for this kernel do not seem to be installed.
 
Last edited:
I'm guessing, after reboot I will loose network again... after another kernel update:

Examining /etc/kernel/postinst.d. run-parts: executing /etc/kernel/postinst.d/dkms 6.2.16-12-pve /boot/vmlinuz-6.2.16-12-pve dkms: autoinstall for kernel 6.2.16-12-pve was skipped since the kernel headers for this kernel do not seem to be installed.

What is the full output of?: apt list --installed | grep headers
 
What is the full output of?: apt list --installed | grep headers
proxmox-headers-6.2.16-10-pve/stable,now 6.2.16-10 am d64 [installed] proxmox-headers-6.2.16-6-pve/stable,now 6.2.16-7 amd6 4 [installed] pve-headers-6.1.10-1-pve/stable,now 6.1.10-1 amd64 [i nstalled,automatic] pve-headers-6.1/stable,now 7.3-4 all [installed,autom atic]

I haven't restarted the host yet, but as dkms didn't install the driver after kernel update I will have the same problem again I believe.
 
So, as expected, after reboot my Realtek 8168 wasn't showing up in NICs list as dkms driver failed to install after kernel update.
* connected USB NIC and changed virtual interface to use the USB one (so I had internet)
* downloaded kernel headers apt-get install linux-headers-$(uname -r)
* removed dkms driver apt-get purge r8168-dkms
* installed dkms driver onto new kernel apt-get install r8168-dkms
* updated grub update-grub
* reboot, NIC now showing in NIC interfaces, changed virtual interface to use Realtek one
... until next kernel update...
 
proxmox-headers-6.2.16-10-pve/stable,now 6.2.16-10 am d64 [installed] proxmox-headers-6.2.16-6-pve/stable,now 6.2.16-7 amd6 4 [installed] pve-headers-6.1.10-1-pve/stable,now 6.1.10-1 amd64 [i nstalled,automatic] pve-headers-6.1/stable,now 7.3-4 all [installed,autom atic]

I haven't restarted the host yet, but as dkms didn't install the driver after kernel update I will have the same problem again I believe.

You need to install the: proxmox-default-headers meta-metapackage, which should (currently) automatically pull in the: proxmox-headers-6.2 metapackage, to get new headers-versions automatically installed.
 
You need to install the: proxmox-default-headers meta-metapackage, which should (currently) automatically pull in the: proxmox-headers-6.2 metapackage, to get new headers-versions automatically installed.
Thanks for this, I have installed the headers package apt install proxmox-default-headers and hopefully it will work on next kernel update.
 
Thanks for this, I have installed the headers package apt install proxmox-default-headers and hopefully it will work on next kernel update.

You might want to verify, that: proxmox-headers-6.2 is now also installed.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!