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

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
andoru
Posts: 272
Joined: 2014-03-14 16:59

Machine shuts down instead of suspend on hardware button

#1 Post by andoru »

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?

User avatar
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

#2 Post by Head_on_a_Stick »

andoru wrote:This has started happening after a recent upgrade done a week ago.
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.

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

andoru
Posts: 272
Joined: 2014-03-14 16:59

Re: Machine shuts down instead of suspend on hardware button

#3 Post by andoru »

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.

User avatar
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

#4 Post by Head_on_a_Stick »

Did you check the systemd-inhibit output? That will show if the logind.conf settings will actually have any effect.
deadbang

andoru
Posts: 272
Joined: 2014-03-14 16:59

Re: Machine shuts down instead of suspend on hardware button

#5 Post by andoru »

Getting this output:

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.
Not sure if this is how it's supposed to be like.

User avatar
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

#6 Post by Head_on_a_Stick »

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

andoru
Posts: 272
Joined: 2014-03-14 16:59

Re: Machine shuts down instead of suspend on hardware button

#7 Post by andoru »

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.

andoru
Posts: 272
Joined: 2014-03-14 16:59

Re: Machine shuts down instead of suspend on hardware button

#8 Post by andoru »

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.

User avatar
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

#9 Post by Head_on_a_Stick »

The output shows that xfce4-power-manager is controlling the hardware buttons so changing logind.conf will have no effect.
andoru wrote:this happens only on the login screen
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:it did not do this previously.
Xfce has just transitioned to the 4.16 version so you may have to adapt to the new configuration techniques.
deadbang

andoru
Posts: 272
Joined: 2014-03-14 16:59

Re: Machine shuts down instead of suspend on hardware button

#10 Post by andoru »

Yes, I did change logind.conf, but so far it still does the same thing.

Post Reply