Comment 8 for bug 108611

Revision history for this message
Valentin Neacsu (valentin.neacsu) wrote :

I've managed to trick Ubuntu 7.10 to activate batttery mode (laptop mode and all the scripts) by doing this

$ gedit battery.sh

--- cut here ---

sudo su -c "echo AC > /var/lib/acpi-support/powerstate"
sudo /etc/acpi/power.sh
sudo su -c "echo BATTERY > /var/lib/acpi-support/powerstate"

--- cut here ---

save & exit

$ chmod +x battery.sh

Now every time I know I'm running on battery and Ubuntu doesn't sense it and so it's draining way too much current I run

$ ./battery.sh

I don't know how clean this is, but this is the best thing I could do.

I'd like to trick acpi-support into thinking I plugged in and out the AC adapter by sending a fake ACPI event, but I currently don't know how to do that.