unable to install r8168-dkms for Realtek NIC

Today i updated PVE to 8.2.4 and the network card works well now. I am able to get 920+ mbit/s on both streams, up and down.
i'm fresh install and updated PVE, network card works but sometime disconnect if vm run, i think its still bug in realtek nic r8168
 
New release, 8.054.00-1, this adds support for Linux 6.9 in case you need it.

GitHub release: https://github.com/nathanhi/r8168/releases/tag/pve8/8.054.00-1-bpo12
.deb binary: https://github.com/nathanhi/r8168/releases/download/pve8/8.054.00-1-bpo12/r8168-dkms_8.054.00-1-bpo12_all.deb
Changes to official Debian package: https://github.com/nathanhi/r8168/compare/debian/8.054.00-1...pve8/8.054.00-1-bpo12

The baseline tag debian/8.054.00-1 with commit b0ed4f57df8902099c831a98a291faf74766b484 is straight from Debians Salsa: https://salsa.debian.org/debian/r8168/-/commits/debian/8.054.00-1?ref_type=tags and reflects the latest release from trixie (https://packages.debian.org/trixie/r8168-dkms).
 
  • Like
Reactions: ArionWolf
New release, 8.054.00-1, this adds support for Linux 6.9 in case you need it.

GitHub release: https://github.com/nathanhi/r8168/releases/tag/pve8/8.054.00-1-bpo12
.deb binary: https://github.com/nathanhi/r8168/releases/download/pve8/8.054.00-1-bpo12/r8168-dkms_8.054.00-1-bpo12_all.deb
Changes to official Debian package: https://github.com/nathanhi/r8168/compare/debian/8.054.00-1...pve8/8.054.00-1-bpo12

The baseline tag debian/8.054.00-1 with commit b0ed4f57df8902099c831a98a291faf74766b484 is straight from Debians Salsa: https://salsa.debian.org/debian/r8168/-/commits/debian/8.054.00-1?ref_type=tags and reflects the latest release from trixie (https://packages.debian.org/trixie/r8168-dkms).
Thank you.

I have been testing proxmox for the past 8 months and didn't have any issues until I updated to 8.3.2 last week. Tried several solutions some seemed to work only to get the same issue 2 days later and I couldn't manage to install r1868-dkms in any way until I finally found this. It still hasn't been a lot of time since I installed this but no problems so far
 
New release, 8.054.00-1, this adds support for Linux 6.9 in case you need it.

GitHub release: https://github.com/nathanhi/r8168/releases/tag/pve8/8.054.00-1-bpo12
.deb binary: https://github.com/nathanhi/r8168/releases/download/pve8/8.054.00-1-bpo12/r8168-dkms_8.054.00-1-bpo12_all.deb
Changes to official Debian package: https://github.com/nathanhi/r8168/compare/debian/8.054.00-1...pve8/8.054.00-1-bpo12

The baseline tag debian/8.054.00-1 with commit b0ed4f57df8902099c831a98a291faf74766b484 is straight from Debians Salsa: https://salsa.debian.org/debian/r8168/-/commits/debian/8.054.00-1?ref_type=tags and reflects the latest release from trixie (https://packages.debian.org/trixie/r8168-dkms).
Thanks for updating the package. I still encounter a problem, after running your package and restarting my proxmox server (v.8.3.2) no network flow is passing: I cannot ping from my server to any equipment on my network
 
I did some digging and it seems that the r8168-dkms package in Debian testing is slightly newer, and fixed for the newer kernels. Unfortunately, it's not in bookworm-backports, probably because it is in the non-free repo.

On my system, I was about to reboot with a pinned 6.2 kernel, and decided to gamble a bit by installing this updated version through dpkg. It does claim a dependency on dkms >= 3.0.11, where we have 3.0.10 on bookworm/stable, but this does not seem to be a real requirement.
Here's what I did:
- wget the package from one of the mirrors (https://packages.debian.org/trixie/r8168-dkms)
- dpkg --force-depends -i r8168-dkms_8.052.01-1_all.deb
- proxmox-boot-tool kernel unpin
- reboot

Early to tell yet, but so far so good, running a 6.5 kernel, with a working network (at least, as well as I expect from Realtek :rolleyes:). Very much in the realm of "do this at your own risk" with my method, so if you can tolerate the older kernel, podmox's instructions above are certainly the cleaner method.

EDIT: minor changes, forgot I can't use markdown here
EDIT2: missed more of the markdown
Thank you! after few weeks using an USB NIC because on 6.8.12-5-pve my Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller don't work at all, I was able to get mine working again with a most updated version:
-wget http://ftp.us.debian.org/debian/pool/non-free/r/r8168/r8168-dkms_8.054.00-1_all.deb
-dpkg --force-depends -i r8168-dkms_8.054.00-1_all.deb
-reboot

Code:
~# lspci -nnk | grep -A2 Ether
03:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 2b)
        Subsystem: Realtek Semiconductor Co., Ltd. RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet Controller [10ec:0123]
        Kernel driver in use: r8168
        Kernel modules: r8168


Code:
~# ethtool -i enp3s0
driver: r8168
version: 8.054.00-NAPI
firmware-version:
expansion-rom-version:
bus-info: 0000:03:00.0
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: yes
supports-priv-flags: no
 
New release, 8.054.00-1, this adds support for Linux 6.9 in case you need it.

GitHub release: https://github.com/nathanhi/r8168/releases/tag/pve8/8.054.00-1-bpo12
.deb binary: https://github.com/nathanhi/r8168/releases/download/pve8/8.054.00-1-bpo12/r8168-dkms_8.054.00-1-bpo12_all.deb
Changes to official Debian package: https://github.com/nathanhi/r8168/compare/debian/8.054.00-1...pve8/8.054.00-1-bpo12

The baseline tag debian/8.054.00-1 with commit b0ed4f57df8902099c831a98a291faf74766b484 is straight from Debians Salsa: https://salsa.debian.org/debian/r8168/-/commits/debian/8.054.00-1?ref_type=tags and reflects the latest release from trixie (https://packages.debian.org/trixie/r8168-dkms).
Can you tell me whether ASPM is working properly with this driver for Realtek cards? Existing r8169 doesn’t seem to.
 
Can you tell me whether ASPM is working properly with this driver for Realtek cards? Existing r8169 doesn’t seem to.
ASPM seems to be working:

Code:
# lspci -s 06:00.1 -vvv | grep -i aspm
                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit L
atency L0s unlimited, L1 <64us
                        ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp+
                LnkCtl: ASPM L0s Enabled; RCB 64 bytes, Disabled- CommClk+
                L1SubCap: PCI-PM_L1.2+ PCI-PM_L1.1+ ASPM_L1.2+ ASPM_L1.1+ L1_
PM_Substates+
                L1SubCtl1: PCI-PM_L1.2- PCI-PM_L1.1- ASPM_L1.2- ASPM_L1.1-
 
ASPM seems to be working:

Code:
# lspci -s 06:00.1 -vvv | grep -i aspm
                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit L
atency L0s unlimited, L1 <64us
                        ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp+
                LnkCtl: ASPM L0s Enabled; RCB 64 bytes, Disabled- CommClk+
                L1SubCap: PCI-PM_L1.2+ PCI-PM_L1.1+ ASPM_L1.2+ ASPM_L1.1+ L1_
PM_Substates+
                L1SubCtl1: PCI-PM_L1.2- PCI-PM_L1.1- ASPM_L1.2- ASPM_L1.1-
Thanks for your reply. Sadly that pretty much mirrors the response I also get from the R8169 driver, that one however doesn’t seem to have proper working ASPM.
Guess I will need to install this driver and see what my C-States do.

wget the driver and dpkg -force the build should still work?
 
ASPM seems to be working:

Code:
# lspci -s 06:00.1 -vvv | grep -i aspm
                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit L
atency L0s unlimited, L1 <64us
                        ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp+
                LnkCtl: ASPM L0s Enabled; RCB 64 bytes, Disabled- CommClk+
                L1SubCap: PCI-PM_L1.2+ PCI-PM_L1.1+ ASPM_L1.2+ ASPM_L1.1+ L1_
PM_Substates+
                L1SubCtl1: PCI-PM_L1.2- PCI-PM_L1.1- ASPM_L1.2- ASPM_L1.1-
I can install the driver with this way, however after rebooting Proxmox is no longer getting an IP. Did I miss a step?

Nevermind, figured it out. SecureBoot needs to be disabled.
 
Last edited: