Bug 1468003 - Setting HandleHibernateKey=ignore in logind.conf does not prevent hibernation
Summary: Setting HandleHibernateKey=ignore in logind.conf does not prevent hibernation
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 26
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-05 18:43 UTC by Volker Sobek
Modified: 2018-05-29 11:59 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2018-05-29 11:59:46 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Volker Sobek 2017-07-05 18:43:31 UTC
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.

Comment 1 Volker Sobek 2017-07-05 18:46:20 UTC
(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.

Comment 2 Volker Sobek 2017-07-06 14:22:28 UTC
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)

Comment 3 Jan Synacek 2017-07-07 08:03:36 UTC
Do you use GNOME? If yes, GNOME settings are used before logind settings. Try tweaking power options in your desktop environment first.

Comment 4 Volker Sobek 2017-07-07 09:35:53 UTC
(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).

Comment 5 Zbigniew Jędrzejewski-Szmek 2018-04-10 10:18:18 UTC
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.

Comment 6 Zbigniew Jędrzejewski-Szmek 2018-04-10 12:20:12 UTC
https://github.com/systemd/systemd/pull/8700

Comment 7 Fedora End Of Life 2018-05-03 08:17:24 UTC
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.

Comment 8 Fedora End Of Life 2018-05-29 11:59:46 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.