1. open up a terminal window
2. cd /usr/lib/pm-utils/sleep.d
3. sudo gedit 99-power-state-fix.sh
4. paste this:
#!/bin/bash
/usr/bin/on_ac_power
if [ "$?" -eq 0 ]; then
echo "BATTERY" > /var/lib/acpi-support/powerstate
/etc/acpi/power.sh ac_adapter
else
if [ "$?" -eq 1 ]; then
echo "AC" > /var/lib/acpi-support/powerstate
/etc/acpi/power.sh battery
fi
fi
5. save & close
6. chmod 755 99-power-state-fix.sh
What this does is trick the power.sh file into thinking the power state has changed and forces it to recheck everything and run what's needed for this 'new' power state. It's just an ugly fix for a bigger problem and I'd rather have this fixed.
As a workaround for that bug I have done this:
1. open up a terminal window pm-utils/ sleep.d state-fix. sh
2. cd /usr/lib/
3. sudo gedit 99-power-
4. paste this:
#!/bin/bash on_ac_power acpi-support/ powerstate acpi-support/ powerstate acpi/power. sh battery
/usr/bin/
if [ "$?" -eq 0 ]; then
echo "BATTERY" > /var/lib/
/etc/acpi/power.sh ac_adapter
else
if [ "$?" -eq 1 ]; then
echo "AC" > /var/lib/
/etc/
fi
fi
5. save & close state-fix. sh
6. chmod 755 99-power-
What this does is trick the power.sh file into thinking the power state has changed and forces it to recheck everything and run what's needed for this 'new' power state. It's just an ugly fix for a bigger problem and I'd rather have this fixed.