You are not logged in.

#1 2014-05-07 14:42:49

darthpenguin
Member
Registered: 2011-09-16
Posts: 113

systemd not suspending system hen laptop lid is closed.

Hi all,

I noticed today that my laptop will not suspend when I closed the lid while I'm at the login screen (display manager). I see the same issue whether I'm using lightdm or slim. I went into XFCE power settings and disabled handling 'lid close' to see if systemd will handle the suspend. As I suspected, systemd is not suspending the system.

My logind.conf look like this;
[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#HandlePowerKey=poweroff
#HandleSuspendKey=ignore
#HandleHibernateKey=ignore
HandleLidSwitch=suspend
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RemoveIPC=yes

So I'm not sure what preventing the suspend. I checked the wiki which said that systemd suspend is having issues with Nvidia drivers but I have no Nvidia chipset in this laptop.

Any ideas?

Offline

#2 2014-05-07 15:30:38

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,804

Re: systemd not suspending system hen laptop lid is closed.

Anything interesting at the end of your journal after you close and re-open the lid?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2014-05-08 09:46:00

themo
Member
Registered: 2011-06-05
Posts: 15

Re: systemd not suspending system hen laptop lid is closed.

Hi,

are you using the nvidia binary blob?

look at https://bbs.archlinux.org/viewtopic.php?id=176883

The "fix" is to use the nouveau-driver

edit: whoops sorry didn't read the last paragraph

Last edited by themo (2014-05-08 09:48:30)

Offline

#4 2014-05-09 19:44:29

darthpenguin
Member
Registered: 2011-09-16
Posts: 113

Re: systemd not suspending system hen laptop lid is closed.

Anything interesting at the end of your journal after you close and re-open the lid?

Sorry, I'm not completely sure how to access the journal and I'm not sure I would be able to identify anything weird as I'm not familiar with that. How can I check? I'll post the output here.

Also, I re-installed systemd then rebooted. I then disabled my display manager and did not login to XFCE (just to keep XFCE and it's power manager out of the equation). So I'm logged into the system with just the bash. From here the system will not suspend if I close the lid (but the screen will blank). However, the system will suspend if I press the suspend key (fn+F4 on my Lenovo). This is the same behaviour I see when I close the lid at the login screen (slim). System suspends properly when I'm logged into XFCE. So I figure this is defiantly an issue with systemd not detecting the lid close properly while XFCE's power manager is working just fine.

Not sure how best to troubleshoot this. It is really not a big deal, a workaround is to login before closing the lid or to just use fn+F4 to suspend. Maybe this is a bug that will be fixed in the next version of systemd or the next kernel. But if anyone has any suggestions or is seeing a similar issue I would like to know.

Thanks all. smile

Offline

#5 2014-05-11 00:33:12

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: systemd not suspending system hen laptop lid is closed.

I also am unable to suspend with the Lid switch, but 'systemctl suspend' works fine. I've got the Intel video drivers, and it seems that most of the other threads and bugs that have been posted deal with the Nvidia drivers. Here are the relevant logs from journalctl around the time of the attempted lid closing. You can see the Lid event is recognized by systemd (and acpid), but then some devices don't suspend. Perhaps these are the issues?

May 10 17:01:58 scotty kernel: pci_pm_suspend(): e1000_suspend+0x0/0x20 [e1000e] returns -2
May 10 17:01:58 scotty kernel: dpm_run_callback(): pci_pm_suspend+0x0/0x160 returns -2
May 10 17:01:58 scotty kernel: PM: Device 0000:00:19.0 failed to suspend async: error -2
May 10 17:01:58 scotty kernel: sd 0:0:0:0: [sda] Stopping disk
May 10 17:01:58 scotty kernel: PM: Some devices failed to suspend, or early wake event detected

OP, if this isn't what you are seeing, my apologies and I'll move this to a new thread. The easiest way to see your logs when you suspend is to run 'sudo journalctl -f' in a terminal and then close the lid. ^C after you reopen the lid and then inspect the logs.

TL;DR - system doesn't suspend with lid closure but 'systemctl suspend' works fine.

Scott

Offline

#6 2014-05-11 01:15:01

darthpenguin
Member
Registered: 2011-09-16
Posts: 113

Re: systemd not suspending system hen laptop lid is closed.

Yes, I'm sure this is the same issue. 'systemctl suspend' does work but lid switch does not work. I too am running an Intel chipset/video. I checked journalctl -f and closed the lid but I did not see any 'PM' or 'Suspend' messages like the previous poster (0.o). Still, these issues might be related if not the same.

Offline

#7 2014-05-11 02:31:04

bergersau
Member
Registered: 2012-01-19
Posts: 52

Re: systemd not suspending system hen laptop lid is closed.

I'm seeing the same behaviour.

journalctl extract:

May 11 12:12:58 archbook sudo[27524]: dan : TTY=pts/0 ; PWD=/home/dan ; USER=root ; COMMAND=/usr/bin/journalctl -f
May 11 12:12:58 archbook sudo[27524]: pam_unix(sudo:session): session opened for user root by dan(uid=0)
May 11 12:13:29 archbook systemd-logind[680]: Lid closed.
May 11 12:13:44 archbook systemd-logind[680]: Lid opened.
 
 [dan@archbook etc]$ cat /etc/systemd/logind.conf
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
# See logind.conf(5) for details

[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#HandlePowerKey=poweroff
HandleSuspendKey=hibernate
HandleHibernateKey=hibernate
HandleLidSwitch=hybrid-sleep
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#IdleAction=ignore
#IdleActionSec=30min
  

This command does work.

 # systemctl suspend 

However I have a workaround in that I can suspend on lid close by setting xfce powermanager to suspend on 'lid close' event.

Offline

#8 2014-05-12 01:33:16

tekstryder
Member
Registered: 2013-02-14
Posts: 133

Re: systemd not suspending system hen laptop lid is closed.

darthpenguin wrote:

Yes, I'm sure this is the same issue. 'systemctl suspend' does work but lid switch does not work. I too am running an Intel chipset/video. I checked journalctl -f and closed the lid but I did not see any 'PM' or 'Suspend' messages like the previous poster (0.o). Still, these issues might be related if not the same.

Just another 'me-too'. I don't have a DE, nor do I use pm-utils. I rely entirely on systemd for power management

I can suspend via function keys, and by issuing 'systemctl suspend'. A cursory look at the journal points to the Intel driver:

May 11 21:23:39 yggdrasil systemd-logind[361]: Lid closed.
May 11 21:23:47 yggdrasil systemd-logind[361]: Lid opened.
May 11 21:23:47 yggdrasil kernel: i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
May 11 21:23:47 yggdrasil kernel: pci 0000:00:1e.0: PCI bridge to [bus 0e]
May 11 21:23:47 yggdrasil kernel: pci 0000:00:00.0: no hotplug settings from platform
May 11 21:23:47 yggdrasil kernel: pci 0000:00:00.0: using default PCI settings
May 11 21:23:47 yggdrasil kernel: i915 0000:00:02.0: no hotplug settings from platform
May 11 21:23:47 yggdrasil kernel: i915 0000:00:02.0: using default PCI settings
May 11 21:23:47 yggdrasil kernel: mei_me 0000:00:16.0: no hotplug settings from platform
May 11 21:23:47 yggdrasil kernel: mei_me 0000:00:16.0: using default PCI settings
May 11 21:23:47 yggdrasil kernel: e1000e 0000:00:19.0: no hotplug settings from platform
May 11 21:23:47 yggdrasil kernel: e1000e 0000:00:19.0: using default PCI settings
May 11 21:23:47 yggdrasil kernel: ehci-pci 0000:00:1a.0: no hotplug settings from platform
May 11 21:23:47 yggdrasil kernel: ehci-pci 0000:00:1a.0: using default PCI settings
May 11 21:23:47 yggdrasil kernel: snd_hda_intel 0000:00:1b.0: no hotplug settings from platform
May 11 21:23:47 yggdrasil kernel: pcieport 0000:00:1c.0: no hotplug settings from platform
May 11 21:23:47 yggdrasil kernel: pcieport 0000:00:1c.4: no hotplug settings from platform
May 11 21:23:47 yggdrasil kernel: iwlwifi 0000:02:00.0: no hotplug settings from platform
May 11 21:23:47 yggdrasil kernel: ehci-pci 0000:00:1d.0: no hotplug settings from platform
May 11 21:23:47 yggdrasil kernel: ehci-pci 0000:00:1d.0: using default PCI settings
May 11 21:23:47 yggdrasil kernel: pci 0000:00:1e.0: no hotplug settings from platform
May 11 21:23:47 yggdrasil kernel: pci 0000:00:1e.0: using default PCI settings
May 11 21:23:47 yggdrasil kernel: lpc_ich 0000:00:1f.0: no hotplug settings from platform
May 11 21:23:47 yggdrasil kernel: lpc_ich 0000:00:1f.0: using default PCI settings
May 11 21:23:47 yggdrasil kernel: ahci 0000:00:1f.2: no hotplug settings from platform
May 11 21:23:47 yggdrasil kernel: ahci 0000:00:1f.2: using default PCI settings
May 11 21:23:47 yggdrasil kernel: i801_smbus 0000:00:1f.3: no hotplug settings from platform
May 11 21:23:47 yggdrasil kernel: i801_smbus 0000:00:1f.3: using default PCI settings
May 11 21:23:47 yggdrasil kernel: intel ips 0000:00:1f.6: no hotplug settings from platform
May 11 21:23:47 yggdrasil kernel: intel ips 0000:00:1f.6: using default PCI settings

Also, subsequent to triggering of a suspend/resume cycle via one of the functioning methods, the lid switch also triggers a suspend properly.

Offline

#9 2014-05-12 02:42:13

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,606

Re: systemd not suspending system hen laptop lid is closed.

Are any of you running an external monitor?

Online

#10 2014-05-12 06:13:43

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: systemd not suspending system hen laptop lid is closed.

Scimmia wrote:

Are any of you running an external monitor?

No. I do attach one sometimes but the suspend problem happens regardless.

Thanks,
Scott

Offline

#11 2014-05-12 15:03:33

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,804

Re: systemd not suspending system hen laptop lid is closed.

I am not certain you all share the same root cause.  For example, I see no correlation between firecate53's journal (which shows something interesting) with bergersau's, which does not show anything interesting.
I suggest comparing your systems to see if you've the same power management packages installed .

Last edited by ewaller (2014-05-12 15:04:12)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#12 2014-05-12 17:16:07

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: systemd not suspending system hen laptop lid is closed.

After revisiting this, I discovered that the e1000e module was what was preventing the laptop from suspending. Now I have _no_ idea why this would only affect the lid close suspend and not a manual suspend! But, for now I added 'e1000e' to my modules blacklist (I rarely ever use a wired connection). This happened once before with a particular kernel version last year, and it got fixed shortly thereafter.

Scott

Offline

#13 2014-05-20 17:48:02

wwn
Member
Registered: 2013-03-25
Posts: 70

Re: systemd not suspending system hen laptop lid is closed.

The issue seems to be reintroduced with the last updates. I had the issue at the time when this thread was started. Some days ago lid close triggered the suspend well and now it's broken again.

Offline

#14 2014-05-28 14:34:57

cryptopsii
Member
Registered: 2014-01-06
Posts: 10

Re: systemd not suspending system hen laptop lid is closed.

Same issue here:
-Intel chipset \ graphic driver.

-systemctl suspend work
-fn+F4 works

My journalctl -f is not really verbose I get:

systemd-logind[305]:lid closed.
systemd-logind[305]:lid opened.

Tried a few things with /etc/systemd/logind.conf but no luck.

Would it be possible to write a quick and easy workaround for this since the open / close lid action are detected
and systemctl suspend work (a script in /usr/lib/systemd/system-sleep/)?

Offline

#15 2014-05-28 21:18:23

cryptopsii
Member
Registered: 2014-01-06
Posts: 10

Re: systemd not suspending system hen laptop lid is closed.

Ok, so I guess this is the same problem as this thread
https://bbs.archlinux.org/viewtopic.php?id=179216
so we can either recompile the kernel with the patch or wait until it's out.

Offline

Board footer

Powered by FluxBB