You are not logged in.

#1 2016-02-13 20:55:05

kjozsa
Member
Registered: 2008-06-05
Posts: 163

[Solved] Suspend on lid close doesn't work

Fresh arch installation on a new HP ZBook Studio G3. Suspending via `systemctl suspend` works fine as well as pressing Fn+F1 (shortcut for suspend on this notebook). Closing the lid does not cause the laptop to go suspend though and all I see from `journalctl -f -u systemd-logind` is:

Feb 13 21:51:49 manta systemd-logind[546]: Lid closed.
Feb 13 21:51:54 manta systemd-logind[546]: Lid opened.

I tried to fiddle with my logind.conf, currently it looks like this:

# cat /etc/systemd/logind.conf | grep -v ^#

[Login]
HandleSuspendKey=suspend
HandleLidSwitch=suspend
HandleLidSwitchDocked=suspend
SuspendKeyIgnoreInhibited=yes
LidSwitchIgnoreInhibited=yes
UserTasksMax=16384

What do I miss from this setup to get suspend on lid close?

EDIT:

gsettings set org.gnome.settings-daemon.plugins.xrandr default-monitors-setup do-nothing

was the missing setting from my setup - hope it helps someone.

Last edited by kjozsa (2016-02-14 17:27:05)

Offline

#2 2016-02-14 14:10:15

diiis
Member
Registered: 2012-06-06
Posts: 33

Re: [Solved] Suspend on lid close doesn't work

Have you tried restarting systemd-logind after making changes to logind.conf? Though suspending should work out of the box. Any settings from your DE that might interfere with logind's behavior?

Last edited by diiis (2016-02-14 14:10:39)

Offline

#3 2016-02-14 14:12:16

kjozsa
Member
Registered: 2008-06-05
Posts: 163

Re: [Solved] Suspend on lid close doesn't work

I did a complete reboot after setting up logind.conf. I'm running Gnome but I could not even find any accessible setting of it which should change/alter the lid close operation.

Offline

#4 2016-02-14 14:29:04

elkoraco
Member
Registered: 2013-02-18
Posts: 140

Re: [Solved] Suspend on lid close doesn't work

kjozsa wrote:

I'm running Gnome but I could not even find any accessible setting of it which should change/alter the lid close operation.

Not even in gnome-tweak-tool?

Offline

#5 2016-02-14 14:38:47

elkoraco
Member
Registered: 2013-02-18
Posts: 140

Re: [Solved] Suspend on lid close doesn't work

Install dconf-editor, open it and navigate to org -> gnome -> settings-daemon -> plugins -> power

What options do you have there?

Offline

#6 2016-02-14 14:39:12

kjozsa
Member
Registered: 2008-06-05
Posts: 163

Re: [Solved] Suspend on lid close doesn't work

"Don't suspend on lid close" is turned off there. Should be ok like this, shouldn't it? And changing the setting back and forth appearently makes no difference.

Last edited by kjozsa (2016-02-14 14:40:05)

Offline

#7 2016-02-14 14:42:50

kjozsa
Member
Registered: 2008-06-05
Posts: 163

Re: [Solved] Suspend on lid close doesn't work

dconf.png

Offline

#8 2016-02-14 15:01:21

elkoraco
Member
Registered: 2013-02-18
Posts: 140

Re: [Solved] Suspend on lid close doesn't work

Feb 13 21:51:49 manta systemd-logind[546]: Lid closed.
Feb 13 21:51:54 manta systemd-logind[546]: Lid opened.

Is this all that the journal is recording? Mine says it's opening a seat for my user and so on. Perhaps we can work something out if you paste the entire input.

Offline

#9 2016-02-14 15:06:31

kjozsa
Member
Registered: 2008-06-05
Posts: 163

Re: [Solved] Suspend on lid close doesn't work

No, I have no other output from systemd-logind upon a lid close/open.

Experimenting with gnome-tweak-tools though, if I de-check the `active` checkbox shown on the screenshot above, lid close suspends correctly!

I assume Gnome is really interfering with an otherwise correct systemd behaviour here. I'm only unsure why the *IgnoreInhibited settings in logind why not prevent Gnome doing so... For this reason, I'm hesitating to mark this thread solved, as I'd really prefer to have Gnome's power management working besides the lid close -> suspend functionality..

Offline

#10 2016-02-14 15:25:39

elkoraco
Member
Registered: 2013-02-18
Posts: 140

Re: [Solved] Suspend on lid close doesn't work

What's your journal output when you successfully suspend?
If you remove the relevant lines from logind.conf and leave the gnome power manager running, does the computer then suspend on lid close?

Offline

#11 2016-02-14 15:40:03

diiis
Member
Registered: 2012-06-06
Posts: 33

Re: [Solved] Suspend on lid close doesn't work

Have you tried this? He seems to have had a similar problem.

mrapide wrote:

Solved! Thanks to grawity on #archlinux. gsettings set org.gnome.settings-daemon.plugins.xrandr default-monitors-setup do-nothing did the trick for me.

https://bbs.archlinux.org/viewtopic.php … 4#p1382794

Offline

#12 2016-02-14 17:26:23

kjozsa
Member
Registered: 2008-06-05
Posts: 163

Re: [Solved] Suspend on lid close doesn't work

diiis wrote:

Have you tried this? He seems to have had a similar problem.

mrapide wrote:

Solved! Thanks to grawity on #archlinux. gsettings set org.gnome.settings-daemon.plugins.xrandr default-monitors-setup do-nothing did the trick for me.

https://bbs.archlinux.org/viewtopic.php … 4#p1382794

You are right, I had the same problem.

gsettings set org.gnome.settings-daemon.plugins.xrandr default-monitors-setup do-nothing

is the solution for this one. Thanks a lot!

Last edited by kjozsa (2016-02-14 17:28:52)

Offline

Board footer

Powered by FluxBB