User Tools

Site Tools


howto:nostandby

howto Disable Standby when Screen is closed, and improve battery life when just playing music via a2dp

My motivation to do this is use my eeepc as a music player, so i brougth a Nokia BH-501 with support for a2dp, so i want to be able to going in metro an listing music from my eeepc in my bag.

I configured the a2dp with Bluetooth Stereo Headsets in Linux (A2DP support) in my eeepc 1000, previusly i got some problems with the usb modules, i just recompiled the kernel adding and installing modules bluetooth and hci-usb, rfcomm, l2cap.

Now all is working.

I modified the script that watches for the event of close your LID, to do what i want, in my case, turn off screen, turn off wlan, turn off sound, and put the cpufreq to powersave, and the only thing i want to get back when open is screen on, and wlan on.

  1. sudo cp /etc/acpi/lidbtn.sh /etc/acpi/lidbtn.sh.bak
  2. sudo kwrite /etc/acpi/lidbtn.sh and put those lines.

#!/bin/sh

LID_STATE=`cat /proc/acpi/button/lid/LID/state | awk '{print $2 }'` if [ $LID_STATE = “closed” ] ; then

      /etc/acpi/hotkey.sh a b 00000016
      touch /etc/acpi/closed
      /etc/acpi/wlan.sh disconnect
      /etc/acpi/wlan.sh poweroff
      /usr/local/bin/volume_control.sh off
       echo 2 > /proc/acpi/asus/cpufv

fi

if [ -f /etc/acpi/closed ] ; then

      if [ $LID_STATE = "open" ] ; then
              /etc/acpi/hotkey.sh a b 00000016
               rm /etc/acpi/closed
              /etc/acpi/wlan.sh poweron
              /etc/acpi/wlan.sh restore
      fi

fi exit 0

  1. Close your LID.

With this config the discharging rate is 680-700 mAh that means almost 9.5 hours of playing, hope to be helpful.

howto/nostandby.txt · Last modified: 2008/08/22 05:18 by neoecos