LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Lid Close = Sleep (https://www.linuxquestions.org/questions/linux-hardware-18/lid-close-%3D-sleep-665539/)

mangogreg 08-26-2008 10:53 AM

Lid Close = Sleep
 
I've just purchased an Aspire One (Acer) because I needed an inexpensive Linux-based laptop.

OS: Linpus Lite - based on Fedora
(Intel Atom 1.6GHz, 8GB SSD)

The laptop goes into sleep mode when I close the lid. I talked to Acer tech support and they said that this is software controlled, that there is no easy LL GUI resolution - in other words, no selection box to change the default as is available with XP.


I only have basic Linux/Unix command-line experience. Please let me know what adjustments need to be made in order for there to be NO action when the lid is closed. (I'd prefer it if an "action" was brought up via an "event", possibly in the power.conf file.) The following, I believe, provides the appropriate information ("action" and "event" folders are in "/etc/acpi/"):

[root@localhost actions]# ls -a
. .. sleep.lid.sh sleep.sh
[root@localhost actions]# cat sleep.lid.sh
#!/bin/bash
#lid_status=`lshal |grep "button.state.value" | grep true`
/etc/init.d/acpid stop
lid_action="X`cat /home/user/.kde/share/config/kpowersaverc |grep ActionOnLidClose |cut -d"=" -f2`"
case $lid_action in
XSHUTDOWN)
/sbin/shutdown -h now
;;
XSTANDBY)
#echo standby>> /home/user/a
#echo $lid_status>> /home/user/a
# if [ "X$lid_status" != "X" ]; then
/bin/dbus-send --system --print-reply --dest=org.freedesktop.Hal /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Suspend int32:0
# fi
;;
*)
echo noaction
;;
esac
/etc/init.d/acpid start
[root@localhost actions]#

XavierP 08-28-2008 03:58 AM

There should be a power control icon near to your clock - probably looks like a plug if you're on mains power or a battery if on battery power. On KDE (and Gnome, I think) you should be able to right click it and configure the settings. On KPowerSave, at least, you can change it to take no action on lid close.

mangogreg 08-28-2008 03:17 PM

"The laptop goes into sleep mode when I close the lid. I talked to Acer tech support and they said that this is software controlled, that there is no easy LL GUI resolution - in other words, no selection box to change the default as is available with XP."

KDE/Gnome aren't, and can't easily be installed. I've been told to look under "/etc/acpi/events/power.conf" to find the control, but the lidclose command is not there. The command is found under "/etc/acpi/actions/sleep.lid.sh" (as above), and I don't know how to change it appropriately.


All times are GMT -5. The time now is 09:19 AM.