Quelle1)
The suspend mode from closing the lid still drains the battery quite quickly. The following hack shuts down rather than suspends when you close the lid.
When you close the lid on your EEE it runs /etc/acpi/lidbtn.sh
The script to shut down the EEE safely and quickly is called /sbin/fastshutdown.sh
So, if you comment out the line in /etc/acpi/lidbtn.sh that suspends on lid close and add a new line that runs this script, your eeepc will shutdown when the lid is closed.
In the console type
sudo kwrite /etc/acpi/lidbtn.sh
You should see
#!/bin/sh LID_STATE=`cat /proc/acpi/button/lid/LID/state | awk '{print $2 }'` if [ $LID_STATE = "closed" ] ; then /etc/acpi/suspend2ram.sh fi exit 0
Add a hash mark before „/etc/acpi/suspend2ram.sh“ (this line is now ignored but is still there in case you want to reverse this hack)
Add a new line „/sbin/fastshutdown.sh“ as below
#!/bin/sh LID_STATE=`cat /proc/acpi/button/lid/LID/state | awk '{print $2 }'` if [ $LID_STATE = "closed" ] ; then # /etc/acpi/suspend2ram.sh /sbin/fastshutdown.sh fi exit 0
Save and exit then close the lid to test.
See also fastshutdown
Because suspend is still a desirable feature, you may still wish to use it when you are plugged in, and only shut down if you are on battery. (unplugging while in suspend WILL NOT cause the machine to shut down)
If you would like eeePC to suspend when you have the ac adapter plugged in and the lid closed, but shut down when using the battery edit /etc/acpi/lidbtn.sh to look like this:
#!/bin/sh LID_STATE=`cat /proc/acpi/button/lid/LID/state | awk '{print $2 }'` PWR_STATE=`cat /proc/acpi/ac_adapter/AC0/state | awk '{print $2 }'` if [ $LID_STATE = "closed" ] ; then if [ $PWR_STATE = "off-line" ] ; then /sbin/fastshutdown.sh ; else /etc/acpi/suspend2ram.sh fi fi exit 0
If you want you can simply leave the line commented out which will allow you to use your EEEPc with the lid closed and an external display (assuming you have a keyboard and mouse plugged in).
Just be careful! Your EEEPc will now do NOTHING when you close the lid!
If you would like eeePC to stay on when you have the ac adapter plugged and the lid closed, but suspend when using the battery edit /etc/acpi/lidbtn.sh to look like this:
#!/bin/sh LID_STATE=`cat /proc/acpi/button/lid/LID/state | awk '{print $2 }'` PWR_STATE=`cat /proc/acpi/ac_adapter/AC0/state | awk '{print $2 }'` if [ $LID_STATE = "closed" ] ; then if [ $PWR_STATE = "off-line" ] ; then /etc/acpi/suspend2ram.sh fi fi exit 0
If you'd rather just shut the screen off to save power use
#!/bin/sh LID_STATE=`cat /proc/acpi/button/lid/LID/state | awk '{print $2 }'` if [ $LID_STATE = "closed" ] ; then # /etc/acpi/suspend2ram.sh su user -c "DISPLAY=:0 xset dpms force suspend" elif [ $LID_STATE = "open" ] ; then su user -c "DISPLAY=:0 xset dpms force on" fi
as your /etc/acpi/lidbtn.sh
If you disabled suspend-on-close with the procedures above, you may wish to suspend in some cases.