LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Standby on laptop when lid closed (http://www.linuxquestions.org/questions/linux-newbie-8/standby-on-laptop-when-lid-closed-519706/)

LDJ 01-16-2007 02:11 AM

Standby on laptop when lid closed
 
For some reason my Laptop continues to run when i close the lid, rather than going into standby as it does in "the other OS" ;)
ACPI is installed, and i have gone into KLaptop and enabled the standby option from the list of power saving checklists, but it doesn't do anything.

Is there anything i have to configure to enable this feature on my Inspiron 6400 laptop (running a version of slackware)? Ive read you need to compile it into the kernel, but if the options are there then surely that is already the case?


Thanks

LDJ 01-16-2007 01:59 PM

Is recompiling the Kernel likely to make any difference?

pixellany 01-16-2007 03:31 PM

Quote:

Originally Posted by LDJ
Is recompiling the Kernel likely to make any difference?

Clever way to "bump" your thread... Note that you don't need to do this here. "zero-replies" get automatically bumped AND a list goes out to members who request it.

I have the same issue on my laptop (Kubuntu), so I'll watch this with interest.

win32sux 01-16-2007 03:49 PM

Quote:

Originally Posted by LDJ
Is recompiling the Kernel likely to make any difference?

not really... unless it's a config issue which can be fixed by re-configuring or a bug which can be fixed by upgrading to a higher version... but if you're using a stock 2.6 slackware kernel then ACPI is enabled without a doubt...

anyhow, i don't think what you are experiencing is a kernel issue... i think it's more an ACPI configuration issue... specifically, the ACPI event for lid close is apparently not running the necessary suspend/hibernate commands or something like that...

some questions:

---> what version of slackware are you running??

---> what kernel version??

---> is acpid running??

---> does suspend/hibernate work *at all* (regardless of the lid issue)??

this sort of thing is configured in /etc/acpi/ but i've only created scripts there to run on resume from suspend/hibernate and when switching from AC to battery (and vice versa) and stuff... i haven't had to make a lid close script as the pointy-clicky Gnome thing for power management worked fine for me as far as what action i wanted to be taken when the lid was closed...

BTW, i'm on a Dell E1405 with Ubuntu 6.10...

LDJ 01-16-2007 04:34 PM

Quote:

Originally Posted by win32sux

some questions:

---> what version of slackware are you running??

---> what kernel version??

---> is acpid running??

---> does suspend/hibernate work *at all* (regardless of the lid issue)??

.


Thanks for the response.
Im running: Backtrack 2.0 with a 2.6.18rc5 kernel. acpid is indeed running when i just checked...but suspend/standby/hibernate do not function at all when selected.

JimBass 01-16-2007 06:08 PM

Try what is suggested in this thread to check if acpi sleep is available, and if it is, a script to activate sleep when the lis is closed.

Code:

ACPI sleep

ACPI sleep worked straight of the bat. Just login as root and type

    $ echo mem > /sys/power/state

Your laptop should go through the suspend cycle and the sleep light should come on. To resume, press the Fn key and the laptop shoud resume where you left it.

You can automate this whole operation, so that when you close the lid, the laptop should go to sleep automatically. Here's how.

ACPI sleep on lid close script

Add the following in your /etc/acpi/actions directory as lm_lid.sh and make sure that /etc/acpi/scripts/lm_lid points to it. This script was originally taken from Superk.org

  #!/bin/bash
  test -f /usr/sbin/laptop_mode || exit 0
  # lid button pressed/released event handler
  /usr/sbin/laptop_mode auto
  #!/bin/bash
  test -f /usr/sbin/laptop_mode || exit 0
  grep -q closed /proc/acpi/button/lid/*/state
  if [ $? = 0 ]
  then
        chvt 12
        echo mem > /sys/power/state
  else
        sleep 2
        chvt 7

This was all stolen from http://thinkwiki.org/wiki/Installing...d_close_script


All times are GMT -5. The time now is 11:17 PM.