You are not logged in.
Hi all,
I installed arch earlier this week on my Dell Latitude E6410, and installed gnome as my DE. For reasons that I can't figure out, when I close the laptop lid, the laptop stays on and the screen active instead of going into suspend.
Here is some info to hopefully help troubleshoot:
- successful suspend when I enter "systemctl suspend"
- successful suspend when I press the suspend key (Fn-F1)
- opening the laptop lid will wake the laptop up
- When I entered "watch /proc/acpi/button/lid/LID/state" and closed the lid and re-opened it, the state went from open to closed and back to open, so the system is detecting the lid status properly
Here is a copy of my /etc/systemd/logind.conf:
[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
HandlePowerKey=poweroff
HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
HandleLidSwitch=suspend
PowerKeyIgnoreInhibited=yes
SuspendKeyIgnoreInhibited=yes
#HibernateKeyIgnoreInhibited=no
LidSwitchIgnoreInhibited=yes
#IdleAction=ignore
#IdleActionSec=30min
Thanks in advance for any assistance!
Offline
Go to the Gnome settings, then to the Power settings, and enable suspend when lid is closed.
Offline
Thanks for your reply. When I check the power settings, however, there is nothing listed about the laptop lid. The only options I have under Suspend and Power Off are Automatic Suspend off or on, and what to do when the battery is critical.
When I check the Power tweaks in gnome-tweak-tool, I can change the option of the power action button. Below it, it says When Laptop Lid is Closed but there aren't any options to change. It's like the setting doesn't even exist. In fact, here is the output of gsettings list-keys org.gnome.settings-daemon.plugins.power:
active
button-hibernate
button-power
button-sleep
button-suspend
critical-battery-action
idle-brightness
idle-dim
notify-perhaps-recall
percentage-action
percentage-critical
percentage-low
priority
sleep-inactive-ac-timeout
sleep-inactive-ac-type
sleep-inactive-battery-timeout
sleep-inactive-battery-type
time-action
time-critical
time-low
use-time-for-policy
Am I overlooking something? It shouldn't be this difficult to configure the laptop lid switch. I have installed Arch on two other laptops, and the lid switch suspend worked right out of the box.
Offline
I think these two settings in your logind.conf would be the problem
PowerKeyIgnoreInhibited=yes
SuspendKeyIgnoreInhibited=yes
This is the contents of my logind.conf (I haven't needed to edit it so it's completely default.)
[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#HandlePowerKey=poweroff
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
#HandleLidSwitch=suspend
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#IdleAction=ignore
#IdleActionSec=30min
Last edited by Chazza (2014-02-09 19:46:08)
Offline
Like yours, my logind.conf originally had everything commented out. Suspend by closing the lid never worked out of the box, which is why I started messing with the logind.conf file.
I have edited it and rebooted, still no suspend when I close the lid. Here is my updated logind.conf:
[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
HandlePowerKey=poweroff
HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
HandleLidSwitch=suspend
#PowerKeyIgnoreInhibited=yes
#SuspendKeyIgnoreInhibited=yes
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#IdleAction=ignore
#IdleActionSec=30min
Offline
Do you have acpid installed perhaps? That could be conflicting with systemd's power management. If nothing works it may be worth reinstalling packages like systemd, gnome-session and gnome-settings-daemon and seeing if that has an effect. If none of that works then I'm out of ideas. I hope you manage to find a solution.
Offline
I do not have acpid installed. I did try reinstalling systemd, gnome-session and gnome-settings-daemon and rebooted. Still no change, unfortunately.
Thank you Chazza and korn36 for your replies. I'm really at a loss as to what the problem could be. Do you think that it's not a gnome-related issue, but something else? Should I move this post to another forum?
Offline
Does systemd-logind report the lid switch in the journal?
sudo journalctl -b -u systemd-logind
This is an extract of my log:
...
Feb ## ##:##:## ~~~~ systemd-logind[337]: Operation finished.
Feb ## ##:##:## ~~~~ systemd-logind[337]: Lid closed.
Feb ## ##:##:## ~~~~ systemd-logind[337]: Suspending...
Feb ## ##:##:## ~~~~ systemd-logind[337]: Lid opened.
Feb ## ##:##:## ~~~~ systemd-logind[337]: Operation finished.
...
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Online
Here is my output, progandy:
Feb 10 20:09:51 teatime systemd[1]: Starting Login Service...
Feb 10 20:09:51 teatime systemd[1]: Started Login Service.
Feb 10 20:09:51 teatime systemd-logind[213]: New seat seat0.
Feb 10 20:09:51 teatime systemd-logind[213]: Watching system buttons on /dev/input/event1 (Lid Switch)
Feb 10 20:09:51 teatime systemd-logind[213]: Watching system buttons on /dev/input/event2 (Power Button)
Feb 10 20:09:51 teatime systemd-logind[213]: Watching system buttons on /dev/input/event3 (Sleep Button)
Feb 10 20:09:51 teatime systemd-logind[213]: Watching system buttons on /dev/input/event4 (Power Button)
Feb 10 20:09:52 teatime systemd-logind[213]: Watching system buttons on /dev/input/event18 (Video Bus)
Feb 10 20:09:54 teatime systemd-logind[213]: New session c1 of user gdm.
Feb 10 20:09:54 teatime systemd-logind[213]: Linked /tmp/.X11-unix/X0 to /run/user/120/X11-display.
Feb 10 20:10:01 teatime systemd-logind[213]: New session 2 of user darryl.
Feb 10 20:10:01 teatime systemd-logind[213]: Linked /tmp/.X11-unix/X0 to /run/user/1000/X11-display.
Feb 10 20:10:01 teatime systemd-logind[213]: Removed session c1.
Feb 10 20:10:37 teatime systemd-logind[213]: Lid closed.
Offline
- successful suspend when I enter "systemctl suspend"
- successful suspend when I press the suspend key (Fn-F1)
- opening the laptop lid will wake the laptop up
- When I entered "watch /proc/acpi/button/lid/LID/state" and closed the lid and re-opened it, the state went from open to closed and back to open, so the system is detecting the lid status properly
I have the same issue since this week, only that previously it worked as designed. Seems to be a regression in systemd, which was upgraded at the beginning of this week.
[2014-03-16 17:33] [PACMAN] upgraded systemd (210-3 -> 211-1)
Offline
Bug report opened:
https://bugs.archlinux.org/task/39530
Offline
Hey Guys,
I had this problem as well on my machine.
I am running Gnome and this is what solved it for me.
pacman -S gnome-power-manager
And then having the following /etc/systemd/logind.conf
[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
HandlePowerKey=ignore
HandleSuspendKey=ignore
HandleHibernateKey=ignore
HandleLidSwitch=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#IdleAction=ignore
#IdleActionSec=30min
kyr0
Offline
Well..
The bug report was closed because "This is documented in release notes. Your external screen inhibits suspend."
Indeed, I have found this in the documentation :
Note that the lid switch is ignored if the system is inserted in a docking station, or if more than one display is connected.
But I still have this issue, even though I have no external screen connected neither a dock. Is there any way we can check if there is something making our system think there is an external monitor/dock connected?
Cheers,
Last edited by cafe (2014-03-20 18:28:27)
Offline
You can use xrandr to show connected and disconnected monitors as seen by xorg-server.
Also try to boot into the commandline without starting gnome and check if the laptop suspends correctly, to determine if gnome has an influence on this issue.
Have you tried to set LidSwitchIgnoreInhibited=yes ? EDIT: Yes you have...
Last edited by teateawhy (2014-03-20 19:23:50)
Offline
The OP fixed found a fix for the issue but posted it in a seperate thread. See post 3 of this thread: https://bbs.archlinux.org/viewtopic.php?id=177070
Offline
The solution proposed by #mrapide on that post didn't work for me.
I've checked xrandr to see if there was something wrong with my display configuration, but nothing shocked me...
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 16384 x 16384
VGA-0 disconnected (normal left inverted right x axis y axis)
LVDS-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 345mm x 194mm
1920x1080 59.9*+
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
DP-4 disconnected (normal left inverted right x axis y axis)
DP-5 disconnected (normal left inverted right x axis y axis)
DP-6 disconnected (normal left inverted right x axis y axis)
My /etc/systemd/logind.conf is as follows :
[Login]
(...)
HandlePowerKey=poweroff
HandleSuspendKey=hibernate
#HandleHibernateKey=ignore
HandleLidSwitch=hibernate
(...)
#LidSwitchIgnoreInhibited=yes
(...)
Downgrading systemd and systemd-sysvcompat to 210-3 (and thus removing libsystemd) solved my issue.
I'm now able to hibernate/suspend my computer when closing the lid.
Offline
The solution proposed by #mrapide on that post didn't work for me.
My /etc/systemd/logind.conf is as follows :
[Login] (...) HandlePowerKey=poweroff HandleSuspendKey=hibernate #HandleHibernateKey=ignore HandleLidSwitch=hibernate (...) #LidSwitchIgnoreInhibited=yes (...)
Downgrading systemd and systemd-sysvcompat to 210-3 (and thus removing libsystemd) solved my issue.
I'm now able to hibernate/suspend my computer when closing the lid.
Same thing here. On two different laptops, systemd 211 broke suspend on lid close. Systemd 210 works fine. I have a pretty bare bones install - openbox and polkit, but no DE or acpid.
Journalctl reports the lid closed event but nothing else happens - no suspend.
Offline
So it really is a bug then?
Offline
So it really is a bug then?
Perhaps there is some other configuration change that I am missing.... But what I can say is that systemd on my systems fails to suspend on lid close despite a properly configured logind.conf. And this happens even when there is no external monitor attached.
Thus I requested that the bug be reopened.
The solution provided in the other thread - https://bbs.archlinux.org/viewtopic.php?id=177070 - does not work for me.
When I run...
gsettings set org.gnome.settings-daemon.plugins.xrandr default-monitors-setup do-nothing
I get a complaint that the schema doesn't exist.
The proposed fix, however, makes me wonder if there is some issue in the interaction between systemd and xrandr that makes systemd believe there is an external monitor attached even when there is none.
Offline
Here's some more info about this issue :
A bug was filed by Stephen Martin on this matter. Bug 76267 - Laptop not suspending when lid is closed.
Apparently, there is a current limitation with the nvidia binary driver that doesn't allow systemd to know exactly how many monitors are connected or if the laptop is docked. L. Poettering replied :
The (nvida) binary driver does not implement the DRM interfaces in /sys. This means we cannot detect how many displays are connected and then we decide not to handle the lid switch since we cannot be sure about whether the device is in "docking" mode, or not...
A "fix" is to use nouveau...
But other than that we could add a logind.conf option which overrides automatic display detection and makes the system suspend regardless of it...
So, I guess there will be a solution in the near future using a logind.conf option. We'll just have to wait to see.
Offline
I am having the same problem with gnome 3.10.2 with closing the lid.
In Gnome Power is nothing about closing the lid.
In GnomeTweakTool -> Power -> When Laptop Lid is Closed - a don`t have any options to set.
I think my problem is because of the nvidia proprietary drivers.
If using command:
systemctl suspend
it suspend, the lock screen apears and i think is working like it should.
I have found a fix for this problem (at least this is working for me) :
1) Install acpi and acpid
sudo pacman -S acpi acpid
2) Create a startup deamon:
sudo systemctl enable acpid.service
3) Open the file "/etc/acpi/handler.sh" and under the section "button/lid)" type:
systemctl suspend
4) It should look like this:
button/lid)
case "$3" in
close)
logger 'LID closed'
systemctl suspend
;;
open)
logger 'LID opened'
;;
*)
logger "ACPI action undefined: $3"
;;
esac
Save and reboot. Then try to close the lid and see if it works.
After systemctl suspend i inserted :
gnome-screensaver-command --lock
to lock the screen after open the lid but did not work. Any ideas?
Compaq CQ61-125EQ - Arch x86_64 - GNOME3
Core 2 duo T6400 - 4GB RAM - NVIDIA G103 M - 120GB SSD
Offline
Here's some more info about this issue :
A bug was filed by Stephen Martin on this matter. Bug 76267 - Laptop not suspending when lid is closed.
Apparently, there is a current limitation with the nvidia binary driver that doesn't allow systemd to know exactly how many monitors are connected or if the laptop is docked. L. Poettering replied :
Lennart Poettering wrote:The (nvida) binary driver does not implement the DRM interfaces in /sys. This means we cannot detect how many displays are connected and then we decide not to handle the lid switch since we cannot be sure about whether the device is in "docking" mode, or not...
A "fix" is to use nouveau...
But other than that we could add a logind.conf option which overrides automatic display detection and makes the system suspend regardless of it...
So, I guess there will be a solution in the near future using a logind.conf option. We'll just have to wait to see.
I can confirm that installing the nouveau-driver fixes the problem, just FYI
Last edited by themo (2014-03-31 11:28:26)
Offline
Seems this is definitely an issue for Nvidia users on the proprietary drivers, as Nvidia doesn't report the proper information for systemd to know whether or not there's an external monitor connected or the laptop is in a docking station. This is new behavior in systemd 212, and you can find more details at this Freedesktop bug report.
Sounds like they're leaning toward reversing the preference (dock/external display users will need to opt out of suspending with lid close) in future versions since non-dock/monitor users >> dock/monitor users.
Offline
It seems like a reasonable thing to do since docking is not that common these days.. If it wasn't for the company I work, I don't think I would ever buy one myself.. Although I have to admit that it is a nice practical thing to have..
Offline
This is fixed in systemd git since end of May https://bugs.freedesktop.org/show_bug.cgi?id=76267, and it's fixed for me on systemd in Arch official repositories now.
Life is very short, and there's no time for fussing and fighting, my friends.
Offline