[Bug 1194723] New: automatically add dkms module after kernel update
http://bugzilla.opensuse.org/show_bug.cgi?id=1194723 Bug ID: 1194723 Summary: automatically add dkms module after kernel update Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: x86-64 OS: openSUSE Tumbleweed Status: NEW Severity: Normal Priority: P5 - None Component: Kernel Assignee: kernel-bugs@opensuse.org Reporter: m.schenker@posteo.de QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- Hi there, for certain scenarios I sometimes rely on kernel modules added via dkms. Initially installing them is as easy as the following. cd module-folder dkms install . From other distributions I am used that the module gets re-added/rebuild during a kernel update. However after a kernel update and reboot on Tumbleweed I just receive a message like the following one. modprobe: FATAL: Module vendor-reset not found in directory /lib/modules/5.16.0-1-default While the module still seems installed. user@computer:~/vendor-reset> sudo dkms install . Error! DKMS tree already contains: vendor-reset-0.1.1 You cannot add the same module/version combo more than once. It is not available to the updated kernel. There were two request for similar problems. 1. https://bugzilla.opensuse.org/show_bug.cgi?id=931175 Which resulted in a `don't care, won't fix 2. https://bugzilla.opensuse.org/show_bug.cgi?id=1184671 Which was ignored. I have not created kernel modules myself, so if there is something that needs to be done to the modules so they themselfs trigger an update I would be glad for a nudge in the right direction. However if there is something I would need to do in Tumbleweed I would be glad for help as well. I still see it as something that needs fixing since other Distributions, Arch, Ubuntu handle this on their own. Thank you! -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1194723 http://bugzilla.opensuse.org/show_bug.cgi?id=1194723#c13 --- Comment #13 from Schenker <m.schenker@posteo.de> --- Thank you all for taking this issue seriously. For now I can circumvent this issue by running a systemd service that first tries to modprobe the module and rebuilds it for the new kernel if this fails. In the long run a working dkms package would be great and needed, since dkms seems to be gaining in popularity for the general ease of use. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1194723 http://bugzilla.opensuse.org/show_bug.cgi?id=1194723#c14 Michal Suchanek <msuchanek@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo? --- Comment #14 from Michal Suchanek <msuchanek@suse.com> --- So where are we with this? IIRC the dkms service was required on Debian as well - the modules would sometimes not build or build for a different kernel, and would rebuild during boot to be loadable on the booted kernel. It would be nice to build them in advance but even on Debian (the d in dkms stands for Debian IIRC) this is best effort. Adding a posttrans for kernel-binary would cover only some cases. We would need one for kernel-binary-devel as well which is not in s-m-t IIRC. There is also the question what is specifically passed to the kernel.d scripts. Does it get just called once when something with kernels changes, or is it called for each kernel added/removed with some specific arguments that describe the event? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1194723 http://bugzilla.opensuse.org/show_bug.cgi?id=1194723#c15 Martin Wilck <martin.wilck@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.schenker@posteo.de Flags| |needinfo?(m.schenker@posteo | |.de) --- Comment #15 from Martin Wilck <martin.wilck@suse.com> --- (In reply to Michal Suchanek from comment #14)
It would be nice to build them in advance but even on Debian (the d in dkms stands for Debian IIRC) this is best effort.
I think it's _D_ell. They invented it, AFAIR. It pre-dates KMPs.
There is also the question what is specifically passed to the kernel.d scripts.
If we want it to be generic, we should pass all parameters from the kernel scriptlet. But...
Does it get just called once when something with kernels changes, or is it called for each kernel added/removed with some specific arguments that describe the event?
If we just care about dkms, we could take weak_modules2 as example. It's run like this: %post (or %posttrans): weak-modules2 --add-kernel "$kernelrelease"-"$flavor" %postun: weak-modules2 --remove-kernel "$kernelrelease"-"$flavor" These arguments should be sufficient for the DKMS script, too. Or not? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1194723 http://bugzilla.opensuse.org/show_bug.cgi?id=1194723#c20 temir <temir@gmx.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |temir@gmx.de --- Comment #20 from temir <temir@gmx.de> --- Created attachment 865811 --> http://bugzilla.opensuse.org/attachment.cgi?id=865811&action=edit Few manual corrections to dkms files/scripts -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1194723 http://bugzilla.opensuse.org/show_bug.cgi?id=1194723#c21 --- Comment #21 from temir <temir@gmx.de> --- Hello all, previous attached text file includes few fixes for dkms problem: build kernel modules after install of a new kernel. Whether or not the dkms package is considered orphaned by SUSE - it just has to work as planned. A small problem regarding the latest dkms version: it needs the same fixes as listed in the text file. Regards, temir. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1194723 http://bugzilla.opensuse.org/show_bug.cgi?id=1194723#c23 --- Comment #23 from temir <temir@gmx.de> --- Sorry I don't know the OBS and don't want to do anything wrong. Could you do it for me if you have the time and inclination? Many thanks in advance, temir. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1194723 http://bugzilla.opensuse.org/show_bug.cgi?id=1194723#c24 --- Comment #24 from Michal Suchanek <msuchanek@suse.com> --- (In reply to Martin Wilck from comment #15)
If we just care about dkms, we could take weak_modules2 as example. It's run like this:
%post (or %posttrans): weak-modules2 --add-kernel "$kernelrelease"-"$flavor" %postun: weak-modules2 --remove-kernel "$kernelrelease"-"$flavor"
These arguments should be sufficient for the DKMS script, too. Or not?
It's supposed to get uname_r at least. But for DKMS to work we would either need to call these for both kernel binary and development binary packages (which we don't) or set a flag and call the scripts in posttrans, and even then it will not cover the case when people forget the headers and install them separately (which is fragile on Debian as well). -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com