Description of problem: Setting HandleHibernateKey=ignore in the [Login] section of /etc/systemd/logind.conf does not prevent hibernation when (accidentally) hitting the suspend key (combination). Version-Release number of selected component (if applicable): systemd-233-4.fc26.x86_64 How reproducible: Set HandleHibernateKey=ignore in logind.conf Actual results: Jul 05 20:02:21 fuchur systemd-logind[1181]: Hibernate key pressed. Jul 05 20:02:22 fuchur /usr/libexec/gdm-wayland-session[1423]: gnome-session-binary[1464]: DEBUG(+): GsmSystemd: received logind signal: PrepareForSleep Jul 05 20:02:22 fuchur /usr/libexec/gdm-wayland-session[1423]: gnome-session-binary[1464]: DEBUG(+): GsmSystemd: ignoring PrepareForSleep signal Jul 05 20:02:22 fuchur NetworkManager[1273]: <info> [1499277742.0855] manager: sleep requested (sleeping: no enabled: yes) J ... Expected results: Pressing the hibernate key should be ignored Additional info: I have one laptop where I need to press Fn+F12 to get the 'plain' F12, if I hit this combination on my other laptop because of muscle memory I end up being stuck in broken hibernation process which requires me to manually force a restart with Ctrl+Alt+Del.
(In reply to Volker Sobek from comment #0) > Description of problem: > > Setting > > HandleHibernateKey=ignore > > in the [Login] section of /etc/systemd/logind.conf does not prevent > hibernation when (accidentally) hitting the suspend key (combination). I meant to write 'hibernation key' not 'suspend key' of course.
I forgot to mention I also masked the hibernate.target, but that also doesn't prevent hibernation: # systemctl status hibernate.target ● hibernate.target Loaded: masked (/dev/null; bad) Active: inactive (dead)
Do you use GNOME? If yes, GNOME settings are used before logind settings. Try tweaking power options in your desktop environment first.
(In reply to Jan Synacek from comment #3) Yes, I use the default GNOME desktop on fedora. The only thing relevant seems to be org.gnome.settings-daemon.plugins.power power-button-action 'suspend', I didn't find anything related to hibernation. Besides, even systemd ignores masking the hibernate.target: # systemctl mask hibernate.target # systemctl hibernate starts hibernating the system (and gets stuck somewhere).
HandleHibernateKey= is documented as "Controls how logind shall handle ...". It's a low-level setting that only matters when there is no desktop environment active that takes over power management. The "big" ones (Gnome, KDE) do that. I agree that it'd nice to make this all easier to manage instead of those settings being split between different entities, but that's outside of the scope of a bug report. > Besides, even systemd ignores masking the hibernate.target: > starts hibernating the system (and gets stuck somewhere). Indeed. That's a separate bug, but an unpleasant one.
https://github.com/systemd/systemd/pull/8700
This message is a reminder that Fedora 26 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 26. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '26'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 26 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.