Bug 84345

Summary: Display device not updated on battery removal
Product: upower Reporter: Evangelos Foutras <evangelos>
Component: generalAssignee: Richard Hughes <richard>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Changes in the output of 'upower -d' on battery removal

Description Evangelos Foutras 2014-09-26 02:17:10 UTC
Created attachment 106887 [details]
Changes in the output of 'upower -d' on battery removal

After removing the battery from my laptop the battery device is correctly removed but DisplayDevice is not updated to reflect the new state.

Looking at the code, it seems that up_daemon_update_display_battery() should be called on battery removal to update the display device. I've tested under GDB and this function is called multiple times on battery insertion but not at all on removal.

(I've attached the difference in the output of 'upower -d' after removing the battery, which shows that DisplayDevice remains unchanged.)
Comment 1 Evangelos Foutras 2014-10-02 13:20:07 UTC
Posted a tentative fix for this on the mailing list:

http://lists.freedesktop.org/archives/devkit-devel/2014-October/001626.html
Comment 2 Richard Hughes 2014-10-08 18:35:26 UTC
Pushed to master, thanks.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.