One feature that I had missed was, that hibernation was no longer working. Or, to be more exact, hibernation was working, but resume was not. Investigating the issue, I found that dracut's "resume" module was not included in the initramfs, which in turn lead to initramfs not even trying to resume.
The dracut mechanism has some logic to actually find out if suspend and resume is configured, and when it decides it is not, it will just skip adding the "useless" resume module.
Unfortunately, the check is faulty IMHO. It checks, if the resume device is configured in the kernel, and if it is, it adds the module to dracut. The problem is, that this kernel config is written by the resume code in the initrd... so during installation this is not the case, and as a result the module is not added to initrd, which leads to the config not being set on next reboot...
The trivial fix is to call dracut once with the option to include the resume module:
dracut -a resume -f
After a reboot, the kernel config will be set and in the future the resume module will always be included in the initrd.
For an even saver setup, adding
add_dracutmodules+=" resume "
to /etc/dracut.conf.d/99-local.conf might be even better.
Of course I wanted to report a bug about the issue, then found out that there are plenty already:
- openSUSE: https://bugzilla.opensuse.org/1192506
- upstream dracut: https://github.com/dracutdevs/dracut/issues/924
- Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=1795422
- RedHat actually fixed it for RHEL9 by just removing the crazy "only include it if it has been included before"-logic: https://github.com/redhat-plumbers/dracut-rhel9/pull/12
No comments:
Post a Comment