FS#79441 - [linux] Add "kernel-modules-hook" as optional dependency or integrate

Attached to Project: Arch Linux
Opened by Klaus Frank (agowa338) - Tuesday, 22 August 2023, 13:35 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:23 GMT
Task Type Feature Request
Category Packages: Core
Status Closed
Assigned To Jan Alexander Steffens (heftig)
Levente Polyak (anthraxx)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

Details

Description: The package "kernel-modules-hook" allows to keep the kernel and module loading functional after kernel updates by using hooks that copy modules. Because this is currently a very often reported problem with Arch Linux, (and it's fixed by just installing that module), I'd like to request adding it as an optional dependency. Once it is an optional dependency people will see it on the package page as one as well as be informed by pacman and pacstrap about it.


Additional info:
* https://archlinux.org/packages/extra/any/kernel-modules-hook/

Steps to reproduce:
* Install kernel update
* Try to do anything that requires loading a module, like plugging in a USB-Stick with a filesystem that hasn't been attached to since boot, or dock/undock a notebook.
This task depends upon

Closed by  Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:23 GMT
Reason for closing:  Moved
Additional comments about closing:  https://gitlab.archlinux.org/archlinux/p ackaging/packages/linux/issues/13
Comment by Klaus Frank (agowa338) - Tuesday, 22 August 2023, 13:45 GMT
Also, see https://bugs.archlinux.org/task/16702
But as this is not the same request I opted for a separate ticket. As a full versioned kernel install would also address having rollback or selectability within the bootloader, which this doesn't.
However merging kernel-modules-hook would allow to keep the currently running kernel unimpacted by the update, I.E. avoid all of the issues and allow to avoid the need to reboot as well as potential crashes when docking/undocking a notebook.
Comment by Michel Koss (MichelKoss1) - Tuesday, 22 August 2023, 20:21 GMT
Optional dependency of which package? You didn't say :)
Comment by Toolybird (Toolybird) - Tuesday, 22 August 2023, 21:34 GMT
I don't get it. If you install an upgraded kernel, you *must* reboot. If you're not ready to reboot, don't install an upgraded kernel! It's that simple. e.g.

$ sudo pacman -Syu --ignore linux

Yeah yeah, partial upgrades.. blah blah...it doesn't really apply to kernels.

This thing smells like a dirty hack. It is not mentioned in the Wiki (which is a bad sign). See also  FS#76486  where upstream is apparently unresponsive.

Comment by Michel Koss (MichelKoss1) - Tuesday, 22 August 2023, 22:00 GMT
Well, this "hack" solves the longstanding issue and does it well therefore was accepted in Arch repos. The fact original developer isn't merging feature request that has serious flaws[1] doesn't change much.

BTW: the continuous[2] advices for rebooting to fix various problems sound a bit like windows cliche.

[1] https://github.com/saber-nyan/kernel-modules-hook/pull/20#issuecomment-1569665493

[2] https://bugs.archlinux.org/task/77789#comment216067

Comment by Toolybird (Toolybird) - Tuesday, 22 August 2023, 22:09 GMT
> to fix various problems sound a bit like windows cliche

Well, I gotta say, this is 1 area where Windows gets it totally right. Ever noticed how Windows only applies important updates at reboot or shutdown? Imagine how many problems would be solved if Arch (or Linux distros in general) did the same thing. Food for thought...
Comment by Jerome Poulin (ticpu) - Wednesday, 23 August 2023, 19:02 GMT
Shutdown or reboot isn't a place to make the user wait, especially for big upgrades like those that generate initramfs'es, unpack tons of small files and build drivers. It is unexpected and unknown wait time negatively affecting the user's experience when you have to boot/reboot in a hurry. Having the kernel update already applied and ready for next boot is the correct thing to do as it is only loaded during boot unlike other programs and libraries.
Comment by Klaus Frank (agowa338) - Thursday, 24 August 2023, 05:45 GMT
We don't have to make the user wait, at least not if we don't delete the kernel modules for the currently running kernel until after the reboot. Or what I'd propose just keep it until the next kernel update.
I.E. when installing a kernel it keeps both the directory for the newly installed kernel and the currently running one (e.g. as reported by uname) in "/usr/lib/modules/".

We could do that either using a slightly modified version of kernel-modules-hook that does also the deletion part, or just keep all of them around until (manual) clenup (cleanup could also be a self-deleting systemd unit that triggers on next startup)...

Loading...