I’ve got a Lenovo USB-C hybrid dock, which obviously comes with a Realtek r8152 network chip. Out of the box, tumbleweed does not support the dock, I need the evdi driver and a the r8152 driver. The latter is available with
[git clone GitHub - wget/realtek-r8152-linux: A kernel module for Realtek RTL8152/RTL8153 Based USB Ethernet Adapters - Meant to be used in distributions only - For upstream bugs, please report them to your distribution maintainer or to Realtek.](git clone GitHub - wget/realtek-r8152-linux: A kernel module for Realtek RTL8152/RTL8153 Based USB Ethernet Adapters - Meant to be used in distributions only - For upstream bugs, please report them to your distribution maintainer or to Realtek.)
Works like a charm:
make -j2
then
sudo depmod -a
then
sudo make install
make -C /lib/modules/6.11.3-2-default/build M=/home/AW/Downloads/realtek-r8152/realtek-r8152-linux INSTALL_MOD_DIR=kernel/drivers/net/usb modules_install
make[1]: Verzeichnis „/usr/src/linux-6.11.3-2-obj/x86_64/default“ wird betreten
INSTALL /usr/lib/modules/6.11.3-2-default/kernel/drivers/net/usb/r8152.ko
DEPMOD /usr/lib/modules/6.11.3-2-default
Warning: modules_install: missing 'System.map' file. Skipping depmod.
make[1]: Verzeichnis „/usr/src/linux-6.11.3-2-obj/x86_64/default“ wird verlassen
modprobe r8152
Quick test:
hwinfo --netcard
33: USB 00.0: 0200 Ethernet controller
[Created at usb.122]
Unique ID: TdZS.SW7EWJRoTxC
Parent ID: 7bWa.8jK6xb13aDA
SysFS ID: /devices/pci0000:00/0000:00:0d.0/usb2/2-3/2-3.3/2-3.3:1.0
SysFS BusID: 2-3.3:1.0
Hardware Class: network
Model: "Lenovo ThinkPad Lan"
Hotplug: USB
Vendor: usb 0x17ef "Lenovo"
Device: usb 0xa359 "ThinkPad Lan"
Revision: "31.03"
Serial ID: "301F5A52C"
Driver: "r8152"
Driver Modules: "r8152"
Device File: enp0s13f0u3u3
HW Address: 00:50:b6:f5:a5:2c
Permanent HW Address: 00:50:b6:f5:a5:2c
Link detected: yes
Module Alias: "usb:v17EFpA359d3103dc00dsc00dp00icFFiscFFip00in00"
Driver Info #0:
Driver Status: r8152 is active
Driver Activation Cmd: "modprobe r8152"
Config Status: cfg=new, avail=yes, need=no, active=unknown
Attached to: #54 (Hub)
But unfortunately dkms fails:
dkms build -m realtek-r8152 -v 2.18.1
dkms build -m realtek-r8152 -v 2.18.1
Sign command: /lib/modules/6.11.5-1-default/build/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub
Deprecated feature: REMAKE_INITRD (/var/lib/dkms/realtek-r8152/2.18.1/source/dkms.conf)
Building module:
Cleaning build area...
Building module(s).....
Error! Build of r8152.ko failed for: 6.11.5-1-default (x86_64)
Make sure the name of the generated module is correct and at the root of the
build directory, or consult make.log in the build directory
/var/lib/dkms/realtek-r8152/2.18.1/build for more information.
And this log says:
DKMS make.log for realtek-r8152-2.18.1 for kernel 6.11.5-1-default (x86_64)
Sa 26. Okt 19:18:02 CEST 2024
make: Verzeichnis „/var/lib/dkms/realtek-r8152/2.18.1/build“ wird betreten
make -C /lib/modules/6.11.5-1-default/build M=/var/lib/dkms/realtek-r8152/2.18.1/build modules
make[1]: Verzeichnis „/usr/src/linux-6.11.5-1-obj/x86_64/default“ wird betreten
CC [M] /var/lib/dkms/realtek-r8152/2.18.1/build/r8152.o
MODPOST /var/lib/dkms/realtek-r8152/2.18.1/build/Module.symvers
CC [M] /var/lib/dkms/realtek-r8152/2.18.1/build/r8152.mod.o
LD [M] /var/lib/dkms/realtek-r8152/2.18.1/build/r8152.ko
BTF [M] /var/lib/dkms/realtek-r8152/2.18.1/build/r8152.ko
Skipping BTF generation for /var/lib/dkms/realtek-r8152/2.18.1/build/r8152.ko due to unavailability of vmlinux
make[1]: Verzeichnis „/usr/src/linux-6.11.5-1-obj/x86_64/default“ wird verlassen
make: Verzeichnis „/var/lib/dkms/realtek-r8152/2.18.1/build“ wird verlassen
But the driver has been built, I see the files r8152.c , .ko , .mod , .mod.c , mod.o , o.
I’m a user, maybe I’m doing something really stupid, or I’m missing something – ?
Here comes the dkms.conf file I wrote:
PACKAGE_NAME="realtek-r8152"
PACKAGE_VERSION="2.18.1"
MAKE="'make' -C ./ modules"
CLEAN="'make' clean"
DEST_MODULE_LOCATION=/extra
BUILT_MODULE_NAME[0]="r8152"
BUILT_MODULE_LOCATION[0]="src"
AUTOINSTALL="yes"
REMAKE_INITRD=no
So, before I’m going on to waste my time: any ideas?