Warning / Question for Desktop users

TL;DR: On Rocky Linux 9.8, I ran dnf install dkms to install a DisplayLink driver. DKMS required the kernel-devel-matched package. DNF selected the newest available version (5.14.0-687.58.1), which also required DNF to install a newer kernel-core and kernel-devel. However, these dependencies did not require the corresponding kernel-modules package.

After a reboot, the system started with this newer kernel. The Wi-Fi adapter, touchpad, and correct display resolution were unavailable. Booting the previous kernel restored normal operation.

I confirmed that the newer kernel did not have the corresponding kernel-modules-5.14.0-687.58.1.el9_8.x86_64 package. I installed the missing package and verified that the Wi-Fi driver was present.

My question: Is it expected behavior for DKMS or other such dependencies to install a newer kernel without the full set of kernel modules? Should the package dependencies or boot selection process prevent this situation? I figure this may be something in the design because Rocky AFAIK is intended for server use, but in my experience, it is also a great desktop system.

Unfortunately, the dkms package is not managed or maintained by the Rocky team as it’s in the EPEL repository, so it would seem that they have not included kernel-modules as a required dependency hence your problem.

Yeah, the thing that’s particularly interesting about this situation is that the only real solution I see is some sort of super obvious warning flag built into DNF that says Warning: You are about to install a kernel without its modules, this could break your system if it depends on any non-core modules or something like this. But the thing that’s particularly interesting to me is that the kernel was installed and then also set as the boot kernel, without said modules. Because in my case what happened is that I hadnt actually rebooted until after the DKMS / EVDI stuff, and then that “silently” loaded the newer kernel without the modules, so it appeared at first that DKMS broke the system, but that was the true root cause.

I can’t really fault DKMS because lets look at another angle: If this were a server that only needed the barebones modules, forcing install of the entire kernel modules may be undesirable. However, in my case, not installing or giving specific “red letters” warning was undesirable.

Just another fun Linux adventure :smiley:

I just tried on mine by doing dnf install dkms, and this is how mine looks:

root@rocky9:~# dnf install dkms
=================================================================================================================================================================
 Package                           Architecture        Version                              Repository                                                      Size
=================================================================================================================================================================
Installing:
 dkms                              noarch              3.4.4-1.el9                          epel                                                           122 k
 kernel                            x86_64              5.14.0-687.58.1.el9_8                Rocky_Linux_9_RL9-BaseOS                  1.0 M
 kernel-core                       x86_64              5.14.0-687.58.1.el9_8                Rocky_Linux_9_RL9-BaseOS                   17 M
 kernel-devel                      x86_64              5.14.0-687.58.1.el9_8                Rocky_Linux_9_RL9-AppStream                18 M
 kernel-modules                    x86_64              5.14.0-687.58.1.el9_8                Rocky_Linux_9_RL9-BaseOS                   40 M
 kernel-modules-core               x86_64              5.14.0-687.58.1.el9_8                Rocky_Linux_9_RL9-BaseOS                   31 M
Installing dependencies:
 kernel-devel-matched              x86_64              5.14.0-687.58.1.el9_8                Rocky_Linux_9_RL9-AppStream               1.0 M

from the above output, seems to install the kernel-modules packages without problems. So not sure why it didn’t work for you.

Your dnf install dkms did include a new version of kernel-core.
To me that would be the “red flag” that there are updates to (kernel and) who knows what.
I would not expect the install dkms to pull all updates, so I would run dnf up before reboot.