Comment 32 for bug 467825

Revision history for this message
Mikael Hjelm (j-m-hjelm) wrote :

Did an quick and dirty experiment and edited the source file myself and built the upower package and preliminary results are promising.
The gnome power manager now reacts after a while, i think the poll rate is 30s, when i unplug the AC power. Will run this for a while to see that it is not just a coincidence.

This is the line i edited.

diff src/linux/up-device-supply.c src/linux/up-device-supply.c~
549c549
< /* supply->priv->enable_poll = (state != UP_DEVICE_STATE_FULLY_CHARGED); */
---
> supply->priv->enable_poll = (state != UP_DEVICE_STATE_FULLY_CHARGED);

I commented out the whole line, it is perhaps not the grandest solution but it seems to work. I have not found any function to call to see if the computer has AC power so i cannot implement that.