Problem loading driver r8168 from extramodules directory

The vendor of my “to be” nas box decided to torture its customers with a “RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller”.

This specific controller is famous for dropping the network connection every 5 minutes and renegotiate at 100Mbit max.

I’m trying to install the original 8168 driver instead of the 8169 driver which is used by default. I’m aware of the discussion to migrate to r8169 here but I didn’t find a solution to get it running stable with that driver.

I installed the driver using

mhwd -i pci network-r8168

The driver gets installed to

/usr/lib/modules/extramodules-6.6-MANJARO/r8168.ko.xz

which is not recognized by modprobe.

I would have expected some pacman hook to create a symlink or similar. Creating it manually I would expect trouble at the next kernel update.

Am I on the wrong path here or missing something?

Any help about driver loading or even better how to get this controller stable is appreciated.

Sysinfo:

inxi --full --admin --filter --width
System:
  Kernel: 6.6.10-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
    clocksource: tsc available: acpi_pm
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.6-x86_64
    root=UUID=28131e87-9375-48f1-963d-9c906aed1988 rw splash
    udev.log_priority=3
  Console: pty pts/5 DM: SDDM Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Desktop Mobo: ZOTAC model: ZBOX-CI622/CI642/CI662NANO v: XX
    serial: <filter> UEFI: American Megatrends v: B418P104 date: 03/03/2020
CPU:
  Info: model: Intel Core i5-10210U socket: BGA1528 (U3E1) note: check bits: 64
    type: MT MCP arch: Comet/Whiskey Lake note: check gen: core 10 level: v3
    note: check built: 2018 process: Intel 14nm family: 6 model-id: 0x8E (142)
    stepping: 0xC (12) microcode: 0xF8
  Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache:
    L1: 256 KiB desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB desc: 4x256 KiB
    L3: 6 MiB desc: 1x6 MiB
  Speed (MHz): avg: 700 high: 800 min/max: 400/4200 base/boost: 1485/8300
    scaling: driver: intel_pstate governor: powersave volts: 0.6 V
    ext-clock: 100 MHz cores: 1: 800 2: 400 3: 800 4: 400 5: 800 6: 800 7: 800
    8: 800 bogomips: 33615
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: gather_data_sampling mitigation: Microcode
  Type: itlb_multihit status: KVM: Split huge pages
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data mitigation: Clear CPU buffers; SMT vulnerable
  Type: retbleed mitigation: Enhanced IBRS
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Enhanced / Automatic IBRS, IBPB: conditional,
    RSB filling, PBRSB-eIBRS: SW sequence
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel CometLake-U GT2 [UHD Graphics] vendor: ZOTAC driver: i915
    v: kernel arch: Gen-9.5 process: Intel 14nm built: 2016-20 ports:
    active: none off: DP-1 empty: DP-2,HDMI-A-1 bus-ID: 00:02.0
    chip-ID: 8086:9b41 class-ID: 0300
  Display: server: X.org v: 1.21.1.10 with: Xwayland v: 23.2.3
    compositor: kwin_wayland driver: X: loaded: modesetting alternate: fbdev,vesa
    dri: iris gpu: i915 tty: 96x30
  Monitor-1: DP-1 model: ARZOPA serial: <filter> built: 2021 res: 1920x1080
    dpi: 139 gamma: 1.2 size: 350x200mm (13.78x7.87") diag: 403mm (15.9")
    ratio: 16:9 modes: max: 1920x1080 min: 640x480
  API: EGL v: 1.5 hw: drv: intel iris platforms: device: 0 drv: iris
    device: 1 drv: swrast surfaceless: drv: iris inactive: gbm,wayland,x11
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: mesa v: 23.3.3-manjaro1.1
    note: console (EGL sourced) renderer: Mesa Intel UHD Graphics (CML GT2),
    llvmpipe (LLVM 16.0.6 256 bits)
  API: Vulkan v: 1.3.274 layers: N/A device: 0 type: integrated-gpu
    name: Intel UHD Graphics (CML GT2) driver: mesa intel v: 23.3.3-manjaro1.1
    device-ID: 8086:9b41 surfaces: N/A
Audio:
  Device-1: Intel Comet Lake PCH-LP cAVS vendor: ZOTAC driver: snd_hda_intel
    v: kernel alternate: snd_soc_skl,snd_sof_pci_intel_cnl bus-ID: 00:1f.3
    chip-ID: 8086:02c8 class-ID: 0403
  API: ALSA v: k6.6.10-1-MANJARO status: kernel-api with: aoss
    type: oss-emulator tools: alsactl,alsamixer,amixer
  Server-1: JACK v: 1.9.22 status: off tools: N/A
  Server-2: PipeWire v: 1.0.0 status: n/a (root, process) with:
    1: pipewire-pulse status: active 2: wireplumber status: active
    3: pipewire-alsa type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Intel Comet Lake PCH-LP CNVi WiFi driver: iwlwifi v: kernel
    bus-ID: 00:14.3 chip-ID: 8086:02f0 class-ID: 0280
  IF: wlo1 state: down mac: <filter>
  Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    driver: r8168 v: 8.052.01-NAPI modules: r8169 pcie: gen: 1 speed: 2.5 GT/s
    lanes: 1 port: 4000 bus-ID: 01:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp1s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  Device-3: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    driver: r8168 v: 8.052.01-NAPI modules: r8169 pcie: gen: 1 speed: 2.5 GT/s
    lanes: 1 port: 3000 bus-ID: 02:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp2s0 state: down mac: <filter>
  IF-ID-1: docker0 state: down mac: <filter>
  IF-ID-2: kvm-br0 state: up speed: 10000 Mbps duplex: unknown mac: <filter>
  IF-ID-3: vnet0 state: unknown speed: 10000 Mbps duplex: full mac: <filter>
Bluetooth:
  Device-1: Intel Bluetooth 9460/9560 Jefferson Peak (JfP) driver: btusb v: 0.8
    type: USB rev: 2.0 speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-10:6
    chip-ID: 8087:0aaa class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 0 state: up address: see --recommends
Drives:
  Local Storage: total: 1.82 TiB lvm-free: 242.72 GiB used: 944.56 GiB (50.7%)
  ID-1: /dev/sda maj-min: 8:0 vendor: Samsung model: SSD 870 EVO 2TB
    family: based SSDs size: 1.82 TiB block-size: physical: 512 B logical: 512 B
    sata: 3.3 speed: 6.0 Gb/s tech: SSD serial: <filter> fw-rev: 1B6Q
    temp: 44 C scheme: GPT
  SMART: yes state: enabled health: PASSED on: 20d 15h cycles: 48
    written: 3.5 TiB
Partition:
  ID-1: / raw-size: 64 GiB size: 61.94 GiB (96.79%) used: 7.47 GiB (12.1%)
    fs: ext4 block-size: 4096 B dev: /dev/sda2 maj-min: 8:2
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 292 KiB (0.1%) fs: vfat block-size: 512 B dev: /dev/sda1 maj-min: 8:1
  ID-3: /home raw-size: 250 GiB size: 245.02 GiB (98.01%)
    used: 1.05 GiB (0.4%) fs: ext4 block-size: 4096 B dev: /dev/dm-1
    maj-min: 254:1 mapped: vg--nas-lv--home
  ID-4: /var raw-size: 50 GiB size: 48.91 GiB (97.83%)
    used: 12.85 GiB (26.3%) fs: ext4 block-size: 4096 B dev: /dev/dm-0
    maj-min: 254:0 mapped: vg--nas-lv--var
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default) zswap: yes
    compressor: zstd max-pool: 20%
  ID-1: swap-1 type: partition size: 32 GiB used: 0 KiB (0.0%) priority: -2
    dev: /dev/sda3 maj-min: 8:3
Sensors:
  System Temperatures: cpu: 52.0 C pch: 55.0 C mobo: N/A
  Fan Speeds (rpm): N/A
Info:
  Processes: 304 Uptime: 36m wakeups: 0 Memory: total: 32 GiB
  available: 31.12 GiB used: 10.82 GiB (34.8%) igpu: 32 MiB Init: systemd
  v: 255 default: graphical tool: systemctl Compilers: gcc: 13.2.1
  clang: 16.0.6 Packages: pm: pacman pkgs: 1263 libs: 375
  tools: octopi,pamac,yay Shell: Bash (sudo) v: 5.2.21
  running-in: pty pts/5 (SSH) inxi: 3.3.31

PS: inxi output shows the active nic, this is due to a manually loading the driver with full path given to modprobe.

AFAIK - if you have both installed, one of the two drivers has to be blacklisted

1 Like

Thanks for your reply but I already have the r8169 blacklisted.

The driver works fine when I load it manually but it isn’t loaded at boot time.

Whats happening right now is, that after rebooting, there is no network.

My blacklist file looks like this:

[nas ~]# cat /etc/modprobe.d/r8169_blacklist.conf
blacklist r8169

When I try modeprobe with the driver name only:

[nas ~]# modprobe r8168
modprobe: FATAL: Module r8168 not found in directory /lib/modules/6.6.10-1-MANJARO

I can load is with the full path:

[nas ~]# modprobe -v  /usr/lib/modules/extramodules-6.6-MANJARO/r8168.ko.xz
insmod /usr/lib/modules/extramodules-6.6-MANJARO/r8168.ko.xz

At this point network is active.

How can I get this to work at boot time and survive the next kernel update with a new directory?

The only thing I can come up with is:
depmod (or rather: sudo depmod) :man_shrugging:

1 Like

I installed it using mhwd:

mhwd -i pci network-r8168

After that I reached the stage to have a working driver but I had to load it manually as show above.

Invoking

depmod

made it autoload after reboot.

I think I go and file an issue for the arch package.

And how did you come up with that conclusion?

Just two posts above @Nachlese posted the solution.

And how does that make it an arch package?

Good point.
At some stage in the hours investigating the network issues I got mislead. Indeed its a manjaro package.

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.