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:
  rtl8812AU_8821AU-kmp-default-20230615_k5.14.21_150500.53-lp155.1.4

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?

Stephan

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:
                72:9A:3E:E5:82:C3:86:7C:B6:93:7A:39:1B:59:04:96:67:39:7D:B1:
                2A:AF:C0:BD:FE:92:DA:C4:B4:56:5B:12:D1:7C:34:19:4F:B7:01:67:
                11:55:FB:75:DF:CF:3F:A8:B3:DD:14:3A:D3:89:7E:40:C5:30:BC:02:
                90:30:19:89:9A:E6:A0:59:40:5D:CD:2D:94:07:F2:AB:3C:4A:B1:50:
                04:F3:B5:10:34:2E:3A:66:E0:49:15:57:F0:F6:48:6D:8C:2A:52:44:
                04:45:1E:A4:02:AB:6E:89:C9:C9:B2:31:72:F1:B5:AE:10:2F:23:C2:
                9B:1D:BD:F0:63:BE:DF:56:8E:4F:80:2B:09:C3:3F:83:DF:B4:06:EF:
                B6:C7:E4:B8:F1:52:93:08:C9:1A:D7:F3:6F:29:DC:19:B0:08:65:14:
                0C:0B:0C:26:67:B1:D1:66:F9:7D:0F:35:C7:F7:2E:7C:7D:30:12:48:
                68:EB:E3:49:FA:1A:CA:B6:06:0A:85:31:F5:D8:5F:72:A7:8B:FE:95:
                FF:60:0F:3D:BB:A5:17:3A:BA:B8:98:98:9E:0E:88:7F:48:92:7A:81:
                B9:C9:A2:6A:B8:3E:BF:4D:8A:83:F2:7E:4A:47:C0:D7

Solved.

1 Like