Bug 1194951
| Summary: | systemd-logind: HandlePowerKey=suspend, PowerKeyIgnoreInhibited=yes does nothing | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | markzzzsmith |
| Component: | systemd | Assignee: | Kernel Maintainer List <kernel-maint> |
| Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 21 | CC: | gansalmon, itamar, johannbg, jonathan, jsynacek, kernel-maint, lnykryn, madhu.chinakonda, mchehab, msekleta, s, systemd-maint, vpavlin, zbyszek |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-06-25 03:45:37 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
markzzzsmith
2015-02-21 01:40:44 UTC
Sorry about initially nominating this as a kernel component. It seems that the new bug component window isn't matching on everything, as trying to list 'systemd' didn't find matches. Most likely your DE takes possession of the keys and inhibits logind's low-level hookup. Try "systemd-inhibit --list" to see which keys are inhibited by what. Hi Lennart,
Thanks very much for getting back to me.
Here's the output of 'systemd-inhibit --list' on the system I care about it working on :
--
[mark@opy ~]$ systemd-inhibit --list
Who: xfce4-power-manager (UID 1000/mark, PID 2016/xfce4-power-man)
What: handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch
Why: xfce4-power-manager handles these events
Mode: block
Who: NetworkManager (UID 0/root, PID 1119/NetworkManager)
What: sleep
Why: NetworkManager needs to turn off networks
Mode: delay
2 inhibitors listed.
[mark@opy ~]$
--
So it looks like XFCE power manager is handling the Power key, preventing this from working. That sort of issue occurred to me, and it seemed from the description of the logind that the PowerKeyIgnoreInhibited=yes option would ensure that logind still handled the event.
Around the time I was configuring this on my Desktop (the one I most want to use this functionality on) I also configured it on a couple of laptops I have, and they seemed to work for a while, although then they stopped too. All of them are running XFCE.
Perhaps a bug has crept into the PowerKeyIgnoreInhibited option? It was a bit surprising that logind was reporting receiving PowerKey events but then not seeming to perform any actions related to them.
If I recall correctly, I think I might have tried to use the logind method because the XFCE suspend/hibernate didn't work at the time, and doing at a lower systemd level was more intuitive, because it made it independent of any DE etc. that might be running.
I've just tried enabling the XFCE Powermanager to process Power button events on one of my laptops, and it has seemed to work. I'll try the same method on this Desktop after I've posted this message.
Hi, I've just confirmed that setting the Power button in XFCE PowerManager to the suspend action also works on my desktop. Thinking about it, I'd probably say there is also functionality bug in XFCE PowerManager. If there is not an event/action assigned to a button, then it probably shouldn't be inhibiting that button. Thanks, Mark. Just realised some of my terminology is wrong, s/inibit/handle/ where appropriate. As a minor note, I've remembered another reason why I wanted to use logind for this instead of XFCE power manager. When the screen saver is running, it seems to catch the push of the power button, and therefore doesn't pass it to XFCE power manager, so my system doesn't suspend. The problem I'm trying to solve is to be able to just walk it my study because, for example I'm leaving to go out, and push the Power button to suspend my desktop, without having to switch the screen(s) on, unlock the screen etc. I lodged a bug about this against xfce4-power-manager: https://bugzilla.xfce.org/show_bug.cgi?id=11992 From that bug, there is a way to stop xfce4-power-manager from handling the Power button, xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/logind-handle-power-key -n -t bool -s true and then stop/start xfce4-power-manager (xfce4-power-manager -q; xfce4-power-manager) logind then hybrid suspends my system, even with the screen saver operating. xfce4-power-manager still seems to receive the power button event, so the Power button event should be set to none. I've also suggested an xfce4-power-manager option of 'Ignore' for buttons, which would cause xfce4-power-manager to not handle the corresponding button (i.e., a GUI equivalent of the above xfconf-query command), where as 'Do Nothing' would still have xfce4-power-manager handle the button but do nothing with it. "so the Power button event should be set to none." make that "Do Nothing". I'm closing this because I don't think logind is doing anything incorrectly anymore. I think I misunderstood what ignore inhibit locks did, and xfce4-power-managers behaviour of handling PowerKey events even with the "Do Nothing" action assigned confused me further. The xfce4-power-manager people are working making improvements in button handling, and I think possibly exposing via the UI what logind's actions for the buttons are. Thanks very much for the help. |