[PATCH] Patch to solve issues with some hardware that causes battery to never update
Mikael Hjelm
j_m_hjelm at hotmail.com
Sun Jul 10 13:34:02 PDT 2011
Ok something cut the end comment, reformatted.
diff --git a/src/linux/up-device-supply.c b/src/linux/up-device-supply.cindex 600fc27..1967a90 100644--- a/src/linux/up-device-supply.c+++ b/src/linux/up-device-supply.c@@ -544,8 +544,13 @@ up_device_supply_refresh_battery (UpDeviceSupply *supply) } /* only disable the polling if the kernel tells us we're fully charged,- not if we've guessed the state to be fully charged */- supply->priv->enable_poll = (state != UP_DEVICE_STATE_FULLY_CHARGED);+ not if we've guessed the state to be fully charged. This function + has been disabled since some battery hardware/drivers are very + late to report discharging and does not interrupt on state change+ */+ /*supply->priv->enable_poll = (state != UP_DEVICE_STATE_FULLY_CHARGED);+ */+ /* reset unknown counter */ if (state != UP_DEVICE_STATE_UNKNOWN) {
From: j_m_hjelm at hotmail.com
To: devkit-devel at lists.freedesktop.org
Subject: [PATCH] Patch to solve issues with some hardware that causes battery to never update
Date: Sun, 10 Jul 2011 22:24:52 +0200
I have tested this on a Aspire one which is heavily affected by hardware issues.For further info on the issues it solves please see https://bugs.launchpad.net/ubuntu/+source/upower/+bug/467825
Best Regards/Mikael Hjelm
/upower$ git diff diff --git a/src/linux/up-device-supply.c b/src/linux/up-device-supply.cindex 600fc27..b6aaf9a 100644--- a/src/linux/up-device-supply.c+++ b/src/linux/up-device-supply.c@@ -544,8 +544,12 @@ up_device_supply_refresh_battery (UpDeviceSupply *supply) } /* only disable the polling if the kernel tells us we're fully charged,- not if we've guessed the state to be fully charged */- supply->priv->enable_poll = (state != UP_DEVICE_STATE_FULLY_CHARGED);+ not if we've guessed the state to be fully charged. This function + has been disabled since some battery hardware/drivers are very + late to report discharging and does not interrupt on state change+ */+ /*supply->priv->enable_poll = (state != UP_DEVICE_STATE_FULLY_CHARGED);+ /* reset unknown counter */ if (state != UP_DEVICE_STATE_UNKNOWN) {
_______________________________________________
devkit-devel mailing list
devkit-devel at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/devkit-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/devkit-devel/attachments/20110710/577a2142/attachment.htm>
More information about the devkit-devel
mailing list