Hi
I’ve setup 4 dkms for rebuilding DVB modules.
Currently, the compilation didn’t done post kernel update but on next reboot. I have to done a second reboot to have the modules loaded.
How to correct this (Fedora, Redhat, Mint 22.1 and Debian do it post kernel install , before reboot) ?
Thanks.
Fix dkms package to install trigger for kernel-xxx-devel packages, test and submit your changes. It is also possible to create a separate package with this trigger.
Thanks. You’re surely right, but as explained above I’d nevever done this on other distributions.
Can you explain how to made this? Please note kernel-xxx-devel change at each update and I don’t want to modify file(s) each time at updates.
Both Fedora and Debian-based distributions use extensible kernel installation framework where you can add custom scripts to be executed during kernel installation and removal. This makes it trivial to integrate DKMS - just drop a right script into the right directory.
SUSE never needed it - it relied on kABI compatibility between kernel updates so there was no need to rebuild a kernel module against new version. This works well for stable releases but not so well for Tumbleweed where kABI can break at any time. OTOH your question is about longterm kernel. I expect this kernel to maintain kABI between the minor version updates, so you may not really need to run DKMS every time at all, only rebuild modules when major version jumps. Have you checked (before DKMS run) whether weak updates are present in the new kernels?
I am not sure where to start. Are you familiar with creating and building RPM packages?
Not really familiar with RPM packages building. Each time kernel longterm updates, i need to rebuid the 4 dkms, they are kernel dvb modules.
I stay corrected. Weak updates are only done for KMPs, not for arbitrary out-of-tree modules.
I didn’t understand your last message. Dkms rebuilds my modules each time I’ve get new kernel, it’s an automated task. The rebuild process is OK on next reboot (no error and process is done since 10 years on other distros), i need to rebuild it before reboot like the other distros. Without that correction, I need reboot 2 times to get my dvb modules working.
Nobody can help me ?
I build some kmp’s for Wlan as rpm.
They are stored in the updates Directory of the kernel.
When a new kernel is installed, a script is used to copy this ko’ to the weak-upadets Direcrory of the kernel.
So on reboot they will be loaded.
That is what arvidjaar is talking to you.
no need of dkms.
LANG=C zypper se -si r8168
Loading repository data...
Reading installed packages...
S | Name | Type | Version | Arch | Repository
---+-----------------------+---------+--------------------------------------+--------+--------------
i+ | r8168-blacklist-r8169 | package | 8.055.00-lp156.66.1 | x86_64 | Sauerland-OSS
i+ | r8168-kmp-default | package | 8.055.00_k6.4.0_150600.21-lp156.66.1 | x86_64 | Sauerland-OSS
i+ | r8168-ueficert | package | 8.055.00-lp156.66.1 | x86_64 | Sauerland-OSS
For example, the r8168 rpm is build only for the Kernel 6.4.0.21
but running here inn Leap 15.6 on kernel:
LANG=C uname -a
Linux linux64 6.4.0-150600.23.50-default #1 SMP PREEMPT_DYNAMIC Fri May 9 22:09:52 UTC 2025 (dee422c) x86_64 x86_64 x86_64 GNU/Linux
LANG=C ls -al /lib/modules/6.4.0-150600.23.50-default/weak-updates/updates/
total 12
drwxr-xr-x 2 root root 4096 25. Mai 18:17 .
drwxr-xr-x 4 root root 4096 22. Mai 09:11 ..
lrwxrwxrwx 1 root root 57 23. Mai 09:36 8852bu.ko.xz -> /lib/modules/6.4.0-150600.21-default/updates/8852bu.ko.xz
lrwxrwxrwx 1 root root 58 22. Mai 18:35 nvidia-drm.ko -> /lib/modules/6.4.0-150600.21-default/updates/nvidia-drm.ko
lrwxrwxrwx 1 root root 54 22. Mai 18:35 nvidia.ko -> /lib/modules/6.4.0-150600.21-default/updates/nvidia.ko
lrwxrwxrwx 1 root root 62 22. Mai 18:35 nvidia-modeset.ko -> /lib/modules/6.4.0-150600.21-default/updates/nvidia-modeset.ko
lrwxrwxrwx 1 root root 58 22. Mai 18:35 nvidia-uvm.ko -> /lib/modules/6.4.0-150600.21-default/updates/nvidia-uvm.ko
lrwxrwxrwx 1 root root 56 22. Mai 09:11 r8125.ko.xz -> /lib/modules/6.4.0-150600.21-default/updates/r8125.ko.xz
lrwxrwxrwx 1 root root 56 22. Mai 09:11 r8168.ko.xz -> /lib/modules/6.4.0-150600.21-default/updates/r8168.ko.xz
No need of dkms
LANG=C zypper se -s dkms
Loading repository data...
Reading installed packages...
S | Name | Type | Version | Arch | Repository
---+------+------------+------------------+--------+-----------------
| dkms | package | 3.0.11-bp156.1.2 | noarch | OSS
| dkms | srcpackage | 3.0.11-bp156.1.2 | noarch | Quell-Repository
Ah yes this is completly different from my DKMS schema. Can you show me an example of your script ?
I have no script.
I build rpms to the Update directory of the Kernel, see for example line 116 in the spec file:
export INSTALL_MOD_DIR=updates
And this is on my Computer:
It is build with the kernel shipped on the Release of Leap 15.6:
ls -al /lib/modules/6.4.0-150600.21-default/updates/ | grep -i 8852
-rw-r--r-- 1 root root 2014928 22. Mai 13:19 8852bu.ko.xz
On new kernel, it will be linked from the old kernel to the new kernel:
ls -al /lib/modules/6.4.0-150600.23.42-default/weak-updates/updates/ | grep -i 8852
lrwxrwxrwx 1 root root 57 23. Mai 09:36 8852bu.ko.xz -> /lib/modules/6.4.0-150600.21-default/updates/8852bu.ko.xz
and the actual kernel:
ls -al /lib/modules/6.4.0-150600.23.50-default/weak-updates/updates/ | grep -i 8852
lrwxrwxrwx 1 root root 57 23. Mai 09:36 8852bu.ko.xz -> /lib/modules/6.4.0-150600.21-default/updates/8852bu.ko.xz
This is done automatically and after reboot it will work, if no change was in the kernel, but dkms will than also fail.
If you build a newer module as in the kernel, you can use for this module the same name as in the kerenel because the kernel prefers modules in the update tree over modules for example in the Wlan directory.
Otherwise you must blacklist the modules.
My Opensuse in Thumbleweed and yes I must recompile 4 modules from kernel because they are buggy. Dkms works but I need to reboot 2 times to have them functionnal on new kernel. On first reboot dkms is compiling but not loading. I loads a this first first reboot the stock kernel module insteed. To have them functionnal I need to reboot a second time. On Fedora / Mint / Debian / Redhat as example, the Dkms are build before first reboot, so on reboot the compiled modules are directly loaded.
How to get the same trick on Thumbleweed or is it not possible ?
Can you put me to the sources of your modules?
Off topic.
Please can you try to type openSUSE and Tumbleweed?
It really hurts ![]()
Add triggers to your packages that run when new kernel is installed. See NVIDIA driver package as example:
bor@bor-Latitude-E5450:~/tmp$ rpm -q --triggers -p nvidia-driver-G06-kmp-longterm-570.153.02_k6.12.28_1-36.1.x86_64.rpm
...
triggerin scriptlet (using /bin/sh) -- kernel-default-devel
...
make -j$(nproc) -C /usr/src/linux-obj/$arch/$flavor \
modules \
M=/usr/src/kernel-modules/nvidia-570.153.02-$flavor \
SYSSRC=/lib/modules/$kver/source \
SYSOUT=/usr/src/linux-obj/$arch/$flavor || RES=1
cd /usr/src/kernel-modules/nvidia-570.153.02-$flavor
make -j$(nproc) -f Makefile \
nv-linux.o \
SYSSRC=/lib/modules/$kver/source \
SYSOUT=/usr/src/linux-obj/$arch/$flavor || RES=1
...
install -m 755 -d /lib/modules/$kver/updates
install -m 644 /usr/src/kernel-modules/nvidia-570.153.02-$flavor/nvidia*.ko \
/lib/modules/$kver/updates
depmod $kver
...
Unfortunately the SPEC file of NVIDIA driver is not for the faint of hearts.
Hmm … I am not sure why trigger is on the kernel-default-devel instead of kernel-longterm-devel. I suspect it is NVIDIA packaging bug.
The practical problem is dependency. You need driver for the kernel-longterm but to build driver you need kernel-longterm-devel. In practice it probably does not matter - you do not really need kernel-longterm to build drivers and after kernel-longterm is installed, its depmod should pick up modules from the .../updates directory.
I still believe that for SUSE and longterm kernel KMP is more practical.
My 4 sources are here : GitHub - enigma131/budget_ci: Dkms module corrections for some CI inits , GitHub - enigma131/stb0899: Dkms tweaked kernel module for low C/N and signal monitoring , GitHub - enigma131/stb6100: Dkms tweaked kernel module for low C/N - RF level lock and GitHub - enigma131/lnbp21: Dkms module corrections for Diseqc Switches .
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.