Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm using archlinux. It never auto-suspend before a recent system upgrade(maybe I updated the kernel?).

I think it is related to laptop-mode or acpid, so I stop them:

/etc/rc.d/laptop-mode stop
/etc/rc.d/acpid stop

I also edit /etc/laptop-mode/laptop-mode.conf:

ENABLE_LAPTOP_MODE_TOOLS=0

Then I edit /etc/acpi/actions/lm_lid.sh, commented out the last line:

# /usr/sbin/laptop_mode auto

But all of above don't work. Following lines were found in /var/log/kernel.log(unrelated lines omitted):

Oct 23 15:29:20 localhost kernel: [18617.549098] PM: Syncing filesystems ... done.
Oct 23 15:29:20 localhost kernel: [18618.001898] PM: Preparing system for mem sleep
Oct 23 15:29:30 localhost kernel: [18618.039565] Freezing user space processes ... (elapsed 0.01 seconds) done.
Oct 23 15:29:30 localhost kernel: [18618.052596] Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
Oct 23 15:29:30 localhost kernel: [18618.065999] PM: Entering mem sleep
Oct 23 15:29:30 localhost kernel: [18618.066167] Suspending console(s) (use no_console_suspend to debug)
Oct 23 15:29:30 localhost kernel: [18618.097917] sd 0:0:0:0: [sda] Synchronizing SCSI cache
Oct 23 15:29:30 localhost kernel: [18618.098103] sd 0:0:0:0: [sda] Stopping disk
Oct 23 15:29:30 localhost kernel: [18618.270537] snd_hda_intel 0000:00:14.2: power state changed by ACPI to D3hot
Oct 23 15:29:30 localhost kernel: [18619.274374] PM: suspend of devices complete after 1196.192 msecs
Oct 23 15:29:30 localhost kernel: [18619.274691] PM: late suspend of devices complete after 0.313 msecs
Oct 23 15:29:30 localhost kernel: [18619.440877] ohci_hcd 0000:00:14.5: wake-up capability enabled by ACPI
Oct 23 15:29:30 localhost kernel: [18619.642144] ACPI: Waking up from system sleep state S3
Oct 23 15:29:30 localhost kernel: [18620.049424] PM: noirq resume of devices complete after 333.503 msecs
Oct 23 15:29:30 localhost kernel: [18620.049852] PM: early resume of devices complete after 0.334 msecs
Oct 23 15:29:30 localhost kernel: [18622.418605] PM: resume of devices complete after 2371.906 msecs
Oct 23 15:29:30 localhost kernel: [18622.419018] PM: Finishing wakeup.
Oct 23 15:29:30 localhost kernel: [18622.419019] Restarting tasks ... done.
Oct 23 15:29:30 localhost kernel: [18622.464752] video LNXVIDEO:01: Restoring backlight state

I think this is not caused by pm-susend, because /var/log/pm-suspend.log don't log anything.

I don't want my laptop go to sleep when I close the lid. How to do it?

Kernel version: 3.6.2-1-ARCH

share|improve this question
1  
I was just about to ask this myself when your question popped up in "Questions that may already have your answer." It did. Thanks. –  cjm Nov 11 '12 at 1:04

1 Answer 1

up vote 37 down vote accepted

Edit /etc/systemd/logind.conf and make sure you have,

HandleLidSwitch=ignore

which will make it ignore the lid being closed. (You may need to also undo the other changes you've made).

Full details over at the archlinux Wiki.

The man page for logind.conf also has the relevant information,

   HandlePowerKey=, HandleSuspendKey=, HandleHibernateKey=,
   HandleLidSwitch=
       Controls whether logind shall handle the system power and sleep
       keys and the lid switch to trigger actions such as system power-off
       or suspend. Can be one of ignore, poweroff, reboot, halt, kexec,
       suspend, hibernate, hybrid-sleep and lock. If ignore logind will
       never handle these keys. If lock all running sessions will be
       screen locked. Otherwise the specified action will be taken in the
       respective event. Only input devices with the power-switch udev tag
       will be watched for key/lid switch events.  HandlePowerKey=
       defaults to poweroff.  HandleSuspendKey= and HandleLidSwitch=
       default to suspend.  HandleHibernateKey= defaults to hibernate.
share|improve this answer
2  
Thanks, It works! –  heiz Oct 23 '12 at 8:43
2  
After changing HandleLidSwitch, how do I reload logind.conf on the fly? Nevermind, it's systemctl stop systemd-logind && systemctl start systemd-logind. –  Ehtesh Choudhury Jul 4 '13 at 7:08
3  
Or maybe systemctl restart systemd-logind, or even just systemctl reload systemd-logind? not sure it's enough, thus, looking forward for a reply before trying to close my lid (long computation in progress... (: ). Also, isn't there an userspace tool that can manage such acpi features? –  cedbeu Aug 1 '13 at 12:29
2  
it's definitely not on the wiki anymore, and I don't see a logind.conf article (short of the small section on that page). –  Ehtesh Choudhury Dec 9 '13 at 21:26
1  
The related topic is moved to Power management on Arch Wiki. –  day Apr 1 at 20:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.