Skip to content

Physical power button does nothing when button-power is set to hibernate #462

Description

@Aurelius-4
  • Linux Mint 22.3, Cinnamon 6.6.7
  • cinnamon-settings-daemon 6.6.4
  • ThinkPad T480
  • Kernels tested: 6.17.0-23 and 6.17.0-35
  • button-power is 'hibernate'
  • Logind receives Power key pressed short
  • csd-media-keys holds handle-power-key as a blocking inhibitor
  • No hibernation attempt follows
  • systemctl hibernate works and resumes successfully
  • PowerKeyIgnoreInhibited=yes cannot override low-level key inhibitors by
    design

cinnamon-power-button-issue-diagnostics.txt

Expected result:
Cinnamon calls logind's Hibernate method and the machine hibernates.

Actual result:
logind records "Power key pressed short", but no Hibernate method call or
hibernation service activation follows.

Additional isolation:

  • The input device emits EV_KEY / KEY_POWER press and release events.
  • CanHibernate returns "yes" for the active desktop user after correcting
    Mint's polkit policy.
  • pkcheck authorizes org.freedesktop.login1.hibernate for the running
    csd-media-keys process.
  • Restarting csd-media-keys does not change the result.
  • Removing XF86PowerOff from the generic shutdown keybinding does not change
    the result.
  • Setting button-power to "nothing" and handling KEY_POWER with a dedicated
    evdev system service successfully invokes systemctl hibernate.

Minimal reproduction:

gsettings set org.cinnamon.settings-daemon.plugins.power button-power hibernate
gsettings get org.cinnamon.settings-daemon.plugins.power button-power
systemd-inhibit --list --no-pager
journalctl -f -u systemd-logind

Briefly press the physical power button. The journal records the press, but nothing else happens.

Recommendation for Mint:

either make Cinnamon reliably execute the selected action, or release its low-level inhibitor when it cannot handle that action.

A local evdev-based workaround succeeds, but it should not be presented as the upstream fix. acpi_listen did not receive this event on the tested system.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions