SUMMARY The battery health percentage in the battery applet does not show decimals, which is fine, but is not properly rounded so a capacity of, for example 99.9825% (according to `upower -i /org/freedesktop/UPower/devices/battery_BAT0`) shows a battery health of 99% instead of 100%. This is annoying because even fresh new laptops will not show a 100% battery health even though battery is perfectly fine. SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 5.23.90 KDE Frameworks Version: 5.90.0 Qt Version: 5.15.2 Kernel Version: 5.16.0-arch1-1 (64-bit) Graphics Platform: X11 Processors: 8 × 11th Gen Intel® Core™ i5-1135G7 @ 2.40GHz Memory: 15.4 GiB of RAM Graphics Processor: Mesa Intel® Xe Graphics
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1360
Iyán, Can you please post some screenshots? UPower output would be great too. 1. Launch Plasma Engine Explorer (plasmaengineexplorer command), 2. Navigate to the "powermanagement" data engine (first drop-down menu), 3. In the table below open (expand) all data sources that start with "Battery" (including the general "Battery" itself). 4. Resize columns and window such that everything interesting is visible. 5. Take screenshots and post them here. I found an inconsistency in data engine, such that it may send total data in double (floating point) format, while individual batteries are providing already rounded integer values. I wonder how does it look like on your side.
Created attachment 145453 [details] Screenshot showing the battery info
Created attachment 145454 [details] Screenshot second battery This is wrongly reported as 0. It is the battery of the pencil to use with the touchscreen. It started to appear recently (not related with Plasma update, probably it was after a kernel update). In order to show a correct value I have to take the pencil out and put it back in again to the laptop.
Oh, so we are dealing with an issue on an entirely different level here. Backend manages to recognize Wacom device as something-something-has-battery, but can't obtain any useful state from it. By the way, are you sure this is not Plasma related? There was a patch recently that exposed more battery types to the applet IIRC, and your software versions look very fresh. Anyway, thanks for the info. I see now that we should better account for batteries without actual data use case.
No, no, I'm not sure and maybe it was some change in Plasma. When I realized it happened that I also got a kernel update (I think from 5.14 -> 5.15) so maybe I wrongly assumed that. Maybe you are right and it was after some Plasma update. Should I open a different report for that?
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/solid/-/merge_requests/71
Not gonna lie, it took me some time to realize what your original issue really was. But here we go, this patch should take care of it. > Should I open a different report for that? Yes, please. Missing data is a different problem, quite likely even out of KDE's control.
Thank you for your patch! ;) I will open the other issue tomorrow when I have a bit of free time.
Git commit 2f305a7134f27489203c3fd2e9ca81790f35ac3b by Nate Graham, on behalf of ivan tkachenko. Committed on 18/01/2022 at 21:42. Pushed by ngraham into branch 'master'. [upower] Properly round up battery's capacity The same rounding is already used for charge percent just few lines above. Without it, for example, values that are close to 100% (e.g. 99.9825%) were rounded down to 99% instead of up to 100%. FIXED-IN: 5.91 M +1 -1 src/solid/devices/backends/upower/upowerbattery.cpp https://invent.kde.org/frameworks/solid/commit/2f305a7134f27489203c3fd2e9ca81790f35ac3b