Skip to content

Ignore incorrectly reported batteries and ignore unhandled power_supp…#186

Closed
ghost wants to merge 2 commits intolmt-upstreamfrom
unknown repository
Closed

Ignore incorrectly reported batteries and ignore unhandled power_supp…#186
ghost wants to merge 2 commits intolmt-upstreamfrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Apr 6, 2022

…ly types

Sorry, misinterpreted the Github interface. I’m tired. This PR fixes Bug #183 also for unpatched kernels and will also ignore any unhandled power_supply types. This should prevent issues like this in the future. Of course USB chargers could be handled, if their drivers report a charging state in the future. But even in that case there should be at least one battery found before we assume a mobile device.

Anyway,
Closes: #183

@ghost ghost force-pushed the ignore_fake_batteries branch from 03c6858 to 9ddcb2e Compare April 6, 2022 19:46
@ghost
Copy link
Copy Markdown
Author

ghost commented Apr 8, 2022

With the new commit we check correctly for the scope of the battery. Non-system batteries should be ignored, because they may belong to wireless mice or keyboards and basically anything with its own battery, if those devices report their charging status to the kernel.

I’ve tested it and it works as expected. Please merge this bug fix. :)

@rickysarraf rickysarraf self-assigned this Apr 12, 2022
Repository owner closed this by deleting the head repository Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ON_AC on desktop PCs - unset when iPhone gets USB attached

2 participants