Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect battery state (in Macbooks?) #330

Closed
colonelpanic8 opened this issue May 13, 2018 · 2 comments
Closed

Incorrect battery state (in Macbooks?) #330

colonelpanic8 opened this issue May 13, 2018 · 2 comments
Labels
bug This issue is a bug that results from taffybar code hard Fixing this issue is likely to be difficult help wanted Help is wanted on this issue important This issue is has high priority unknown cause This issue has an unknown cause and is likely to be somewhat difficult upcoming This issue is on the maintainers radar and is likely to be fixed soon

Comments

@colonelpanic8
Copy link
Member

On my machine, all the battery widgets report their states incorrectly, because there seems to be a bug in firmware/upower that casues the state to be reported incorrectly:

https://bugs.freedesktop.org/show_bug.cgi?id=99518

@colonelpanic8 colonelpanic8 added bug This issue is a bug that results from taffybar code unknown cause This issue has an unknown cause and is likely to be somewhat difficult important This issue is has high priority hard Fixing this issue is likely to be difficult help wanted Help is wanted on this issue labels May 13, 2018
@colonelpanic8
Copy link
Member Author

It looks like this can be fixed by calling the Refresh method on any batteries immediately after a state change:

dbus-send --system --type=method_call --print-reply --dest=org.freedesktop.UPower /org/freedesktop/UPower/devices/battery_BAT0 org.freedesktop.UPower.Device.Refresh

For more see
https://bugs.freedesktop.org/show_bug.cgi?id=79200

@colonelpanic8
Copy link
Member Author

I think the approach that I will take to fixing this is to call refresh automatically on any state change with exponetial backoff and a 10 second max.

@colonelpanic8 colonelpanic8 added the upcoming This issue is on the maintainers radar and is likely to be fixed soon label May 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug that results from taffybar code hard Fixing this issue is likely to be difficult help wanted Help is wanted on this issue important This issue is has high priority unknown cause This issue has an unknown cause and is likely to be somewhat difficult upcoming This issue is on the maintainers radar and is likely to be fixed soon
Projects
None yet
Development

No branches or pull requests

1 participant