Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Machine shuts down instead of suspend on hardware button
Machine shuts down instead of suspend on hardware button
I've set the power button to suspend to RAM in xfce4-power-manager, but for some reason, sometimes when I press that button, it shuts down instead.
This has started happening after a recent upgrade done a week ago.
Could anyone point me in the right direction to fix this?
This has started happening after a recent upgrade done a week ago.
Could anyone point me in the right direction to fix this?
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 133 times
Re: Machine shuts down instead of suspend on hardware button
So you're running sid then? I am aware that I've probably asked you before but I interact with literally hundreds of posters and my memory isn't that good & I don't have the energy or inclination to trawl through your post history.andoru wrote:This has started happening after a recent upgrade done a week ago.
Have you checked /etc/systemd/logind.conf? The HandlePowerKey= & PowerKeyIgnoreInhibited= options may be relevant. Read the man page for details.
See also
Code: Select all
systemd-inhibit
deadbang
Re: Machine shuts down instead of suspend on hardware button
Yes, I'm on sid, sorry for not mentioning that from the get-go.
And you're quite right, HandlePowerKey was set to shutdown. Changed it to HandlePowerKey=suspend, and will report back if this fixed the issue. Thanks!
Also, #PowerKeyIgnoreInhibited=no, shouldn't that be a 'yes'?
Also, speaking of xfce4-power-manager, I've set it to suspend the PC after some period of inactivity (under System -> Sleep mode), but it seems that setting is also ignored. What's going on with this app? It seems useless as it makes no changes.
And you're quite right, HandlePowerKey was set to shutdown. Changed it to HandlePowerKey=suspend, and will report back if this fixed the issue. Thanks!
Also, #PowerKeyIgnoreInhibited=no, shouldn't that be a 'yes'?
Also, speaking of xfce4-power-manager, I've set it to suspend the PC after some period of inactivity (under System -> Sleep mode), but it seems that setting is also ignored. What's going on with this app? It seems useless as it makes no changes.
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 133 times
Re: Machine shuts down instead of suspend on hardware button
Did you check the systemd-inhibit output? That will show if the logind.conf settings will actually have any effect.
deadbang
Re: Machine shuts down instead of suspend on hardware button
Getting this output:
Not sure if this is how it's supposed to be like.
Code: Select all
$ $ systemd-inhibit
WHO UID USER PID COMM WHAT >
ModemManager 0 root 703 ModemManager sleep >
NetworkManager 0 root 583 NetworkManager sleep >
UPower 0 root 1656 upowerd sleep >
Screen Locker 1000 andoru 1587 light-locker sleep >
xfce4-power-manager 1000 andoru 1624 xfce4-power-man handle-power-key:handle-su>
5 inhibitors listed.
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 133 times
Re: Machine shuts down instead of suspend on hardware button
The output is piped to a pager so either use the arrow keys to see the rest of it or pass the --no-pager (--no-p for short) switch.
deadbang
Re: Machine shuts down instead of suspend on hardware button
Code: Select all
WHO UID USER PID COMM WHAT WHY MODE
ModemManager 0 root 703 ModemManager sleep ModemManager needs to reset devices delay
NetworkManager 0 root 583 NetworkManager sleep NetworkManager needs to turn off networks delay
UPower 0 root 1656 upowerd sleep Pause device polling delay
Screen Locker 1000 andoru 1587 light-locker sleep Lock the screen on suspend/resume delay
xfce4-power-manager 1000 andoru 1624 xfce4-power-man handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch xfce4-power-manager handles these events block
5 inhibitors listed.
Re: Machine shuts down instead of suspend on hardware button
After testing some more, found out that this happens only on the login screen, but not when I'm logged in. I'm using lightdm/lightlocker/lightdm-gtk-greeter and I can't for the life of me figure out how to configure it not to do so. I've tried looking at the conf files (/etc/lightdm) but I can't seem to find any relevant setting for this so I'm guessing it might be a bug, as it did not do this previously.
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 133 times
Re: Machine shuts down instead of suspend on hardware button
The output shows that xfce4-power-manager is controlling the hardware buttons so changing logind.conf will have no effect.
The xfce4-power-manager settings applied by your user would not be used for the login screen so that is to be expected. Perhaps logind.conf will have an affect there, have you tried changing it?andoru wrote:this happens only on the login screen
Xfce has just transitioned to the 4.16 version so you may have to adapt to the new configuration techniques.andoru wrote:it did not do this previously.
deadbang
Re: Machine shuts down instead of suspend on hardware button
Yes, I did change logind.conf, but so far it still does the same thing.