Warning on kmp-Installation: disagrees about version of symbol

I build some Wlan kmps for openSUSE.

But now on Leap 15.5 I get a warning:

depmod: WARNING: //lib/modules/5.14.21-150500.53-default/kernel/drivers/net/wireless/realtek/rtw88/rtw88_
pci.ko.zst disagrees about version of symbol rtw_power_mode_change
depmod: WARNING: //lib/modules/5.14.21-150500.53-default/kernel/drivers/net/wireless/realtek/rtw88/rtw88_
pci.ko.zst disagrees about version of symbol rtw_tx_write_data_h2c_get
depmod: WARNING: //lib/modules/5.14.21-150500.53-default/kernel/drivers/net/wireless/realtek/rtw88/rtw88_
pci.ko.zst disagrees about version of symbol rtw_fw_c2h_cmd_rx_irqsafe
Warning: /lib/modules/5.14.21-150500.53-default is inconsistent

Also these kmp does not link to the new Kernel.
Installing another kmp works without problems:

LANG=C zypper in -f rtl8812AU_8821AU-kmp-default 
Loading repository data...
Reading installed packages...
Forcing installation of 'rtl8812AU_8821AU-kmp-default-20230615_k5.14.21_150500.53-lp155.1.4.x86_64' from repository 'Sauerland-OSS'.
Resolving package dependencies...

The following package is going to be reinstalled:

1 package to reinstall.
Overall download size: 509,6 KiB. Already cached: 0 B. No additional space will be used or freed after
the operation.
Continue? [y/n/v/...? shows all options] (y): 
Retrieving: rtl8812AU_8821AU-kmp-default-20230615_k5.14.21_150500.53-lp155.1.4.x86_64 (Sauerland-OSS)
                                                                                     (1/1), 509,6 KiB    
Retrieving: rtl8812AU_8821AU-kmp-default-20230615_k5.14.21_150500.53-lp155.1.4.x86_64[done (463,6 KiB/s)]

Checking for file conflicts: ......................................................................[done]
(1/1) Installing: rtl8812AU_8821AU-kmp-default-20230615_k5.14.21_150500.53-lp155.1.4.x86_64 .......[done]
Executing %posttrans scripts ......................................................................[done]
ls -al /lib/modules/5.14.21-150500.53-default/updates/
insgesamt 122088
drwxr-xr-x 1 root root      216 22. Jul 14:05 .
drwxr-xr-x 1 root root      512 22. Jul 14:05 ..
-rw-r--r-- 1 root root  5726404 11. Jul 14:47 nvidia-drm.ko
-rw-r--r-- 1 root root 57304268 11. Jul 14:47 nvidia.ko
-rw-r--r-- 1 root root  2434020 11. Jul 14:47 nvidia-modeset.ko
-rw-r--r-- 1 root root   392548 11. Jul 14:47 nvidia-peermem.ko
-rw-r--r-- 1 root root 55619284 11. Jul 14:47 nvidia-uvm.ko
-rw-r--r-- 1 root root  1187052 18. Jul 23:01 r8168.ko.xz
-rw-r--r-- 1 root root   495068 10. Jul 17:21 rtl8812au.ko.xz
drwxr-xr-x 1 root root      612 22. Jul 10:32 RTW88
-rw-r--r-- 1 root root  1846748 18. Jul 23:00 wl.ko.xz

Updated Kernel:

ls -al /lib/modules/5.14.21-150500.55.7-default/weak-updates/updates/
insgesamt 32
drwxr-xr-x 1 root root 206 22. Jul 14:05 .
drwxr-xr-x 1 root root  24 21. Jul 21:34 ..
lrwxrwxrwx 1 root root  60 21. Jul 21:34 nvidia-drm.ko -> /lib/modules/5.14.21-150500.53-default/updates/nvidia-drm.ko
lrwxrwxrwx 1 root root  56 21. Jul 21:34 nvidia.ko -> /lib/modules/5.14.21-150500.53-default/updates/nvidia.ko
lrwxrwxrwx 1 root root  64 21. Jul 21:34 nvidia-modeset.ko -> /lib/modules/5.14.21-150500.53-default/updates/nvidia-modeset.ko
lrwxrwxrwx 1 root root  64 21. Jul 21:34 nvidia-peermem.ko -> /lib/modules/5.14.21-150500.53-default/updates/nvidia-peermem.ko
lrwxrwxrwx 1 root root  60 21. Jul 21:34 nvidia-uvm.ko -> /lib/modules/5.14.21-150500.53-default/updates/nvidia-uvm.ko
lrwxrwxrwx 1 root root  58 21. Jul 21:34 r8168.ko.xz -> /lib/modules/5.14.21-150500.53-default/updates/r8168.ko.xz
lrwxrwxrwx 1 root root  62 22. Jul 14:05 rtl8812au.ko.xz -> /lib/modules/5.14.21-150500.53-default/updates/rtl8812au.ko.xz
lrwxrwxrwx 1 root root  55 21. Jul 21:34 wl.ko.xz -> /lib/modules/5.14.21-150500.53-default/updates/wl.ko.xz

As you can see, the rtl8812au.ko.xz is linked, but not the RTW88 directory.
Here is my OBS:
The broken kmp:

The working kmp:

Maybe someone can help?


Kernel shipped by openSUSE includes drivers for rtw88. You build the same driver under different name. So your driver provides the same symbols as in-tree kernel driver but of course their internal version is different. So now in-tree kernel driver fails to resolve needed symbols (they do not match).

That does not work this way. If you replace in-tree kernel driver you must build updated driver under the same name. Or you must build your driver so that it is using different exported symbols.

It may be possible to configure depmod to exclude specific paths inside of kernel, but I am not sure.

P.S. and this question has absolutely nothing to do with OBS, it belongs to general development section.

Thanks for your explanation, I have changed the name of all modules to the ones of the Kernel and now the warning is gone, modules are linked to the weak-updates directory.

Changed the driver in my laptop from the one of the kernel to the one in the weak-updates directory, rebooted, inserted the mok key and all is working:

/sbin/lspci -nnk | grep -iA3 wireless && modinfo rtw88_8821ce
02:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8821CE 802.11ac PCIe Wireless Network Adapter [10ec:c821]
        Subsystem: Hewlett-Packard Company Device [103c:831a]
        Kernel driver in use: rtw_8821ce
        Kernel modules: rtw88_8821ce
filename:       /lib/modules/5.14.21-150500.55.7-default/weak-updates/updates/RTW88/rtw88_8821ce.ko.xz
license:        Dual BSD/GPL
description:    Realtek 802.11ac wireless 8821ce driver
author:         Realtek Corporation
suserelease:    SLE15-SP5
srcversion:     A538C21C38D40E6A49ED511
alias:          pci:v000010ECd0000C821sv*sd*bc*sc*i*
alias:          pci:v000010ECd0000B821sv*sd*bc*sc*i*
depends:        rtw88_pci,rtw88_8821c
retpoline:      Y
name:           rtw88_8821ce
vermagic:       5.14.21-150500.53-default SMP preempt mod_unload modversions 
sig_id:         PKCS#7
signer:         home:Sauerland OBS Project
sig_key:        75:72:A9:A0:F0:D3:10:BA:9B:82:FF:99:9A:F4:99:29:15:87:15:44
sig_hashalgo:   sha256
signature:      72:51:F6:17:E2:E4:8A:B9:7A:3A:33:1E:5B:59:93:48:4A:3D:B5:06:


1 Like