Good driver for Realtek r8169 on x86_64

This is not a bug with DietPi but a request for some help on getting the right driver in place.

Setup:

  • DietPi version | 8.13.2 beta
  • Distro version | bullseye
  • Kernel version | Linux HomeAssistant 5.10.0-21-amd64 #1 SMP Debian 5.10.162-1 (2023-01-21) x86_64 GNU/Linux
  • System: Giada i56V (mini PC based on Intel i3-4010u)
  • Hard Drive: Kingston SSD

Additional Information

  • System is based on a Giada i56v mini pc, with an Intel i3-4010u CPU, a Realtek r8169-type network card, a Kingston SSD, a Conbee II stick
  • Software is based on a virgin DietPi install with Home Assistant & Supervisor on top

The issue lies in the fact that the system doesn’t go towards the maximum C-state when possible

This appears to be linked to a driver issue for the r8169 and on PCIe port 4:

root@HomeAssistant:~# lspci -vv | awk '/ASPM/{print $0}' RS= | grep --color -P '(^[a-z0-9:.]+|ASPM )'
00:1c.0 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 1 (rev e4) (prog-if 00 [Normal decode])
                LnkCap: Port #1, Speed 5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <1us, L1 <4us
                LnkCtl: ASPM L0s L1 Enabled; RCB 64 bytes, Disabled- CommClk-
00:1c.2 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 3 (rev e4) (prog-if 00 [Normal decode])
                LnkCap: Port #3, Speed 5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <512ns, L1 <16us
                LnkCtl: ASPM L0s L1 Enabled; RCB 64 bytes, Disabled- CommClk+
00:1c.3 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 4 (rev e4) (prog-if 00 [Normal decode])
                LnkCap: Port #4, Speed 5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <512ns, L1 <16us
                LnkCtl: **ASPM Disabled;** RCB 64 bytes, Disabled- CommClk+
02:00.0 Network controller: Qualcomm Atheros AR9485 Wireless Network Adapter (rev 01)
                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <4us, L1 <64us
                LnkCtl: ASPM L0s L1 Enabled; RCB 64 bytes, Disabled- CommClk+
pcilib: sysfs_read_vpd: read failed: Input/output error
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 07)
                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s unlimited, L1 <64us
                LnkCtl: **ASPM Disabled;** RCB 64 bytes, Disabled- CommClk+

Does anyone have some guidance as to how to address this?
THere appears to be an ‘ElRepo’ modded driver but I am not sure that’ll work on DietPi…

Thanks in advance!

Usually all Debian driver for amd64/x86 should work same way on DietPi.

You can install and build the drivers in debian pretty readily

Debian – Details of package r8168-dkms in stretch

This package provides the dkms source code for the r8168 kernel modules. Kernel source or headers are required to compile these modules.

If update updates the kernel, dkms should automatically rebuild the kernel module for the new kernel before reboot keeping it updated and in working order

might need to add non-free to the apt lists to get it to update the dkms driver update

I think they have a binary already built, might try that as well
Debian – Details of package firmware-realtek in stretch