-
Notifications
You must be signed in to change notification settings - Fork 0
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
Wattage not showing when multiple batteries used #5
Comments
Could you check testing.plasmoid from main Github page? |
Hey! so this does work, but it creates a problem now, when unplugging the external battery to use the internal one, it works fine, but when plugging the battery back, the laptop doesn't recognize the external battery and needs a reboot. When trying this while the testing plasmoid uninstalled, it does work as expected, no need for a reboot to change a battery |
Can you check testing1.plasmoid? When testing in Plasma, make sure to run |
My bad. Try testing2.plasmoid |
How about testing3.plasmoid? |
It's going to be tricky. Everything works well on my side with those changes, but I only have one battery. And as I stated in readme, I used LLMs to make this widget. So there is that. I have one more idea. It's ugly but maybe it works. Try testing4.plasmoid. |
when relaunching plasmashell, it does show accurate readings, and putting in the battery again, it recognizes it, and gives again accurate readings |
I didn't mention that, but to swap the battery, I need to suspend the computer, close the lid, and remove the battery, I cannot swap the battery without suspending it, it will shutdown |
All good then? I will have to consider if I want to add this version to KDE Store though. I wouldn't want to break anything for other devices. If you could also test it with and without external battery, with unplugged and plugged chargers for each configuration, to make sure it works well in all instances. |
well yes and no, if I put the battery again, I will need to relaunch plasmashell in order to get accurate readings, if I don't, I will get values like : 15W or 16W, but in powertop and energy informations on plasma shows me that I consume like 7.5W, like the picture I sent above |
My guess is Plasma has a reading from main battery cached, and with external battery inserted the reading is doubled. To fix it, Claude AI added timer which surely isn't the right way to do it but you can have a go at it with testing5.plasmoid |
ahah, so now, when I remove the battery, it gives the false readings for the internal battery, but putting the battery in it again does show good readings, but something is weird, because when I put the battery in, the computer takes like 1 minute to use the external battery in priority, but within this minute, it still uses the internal battery, which is normal, but it is giving good readings for the internal battery, which shouldn't because just before it was giving false readings. after the minute passes and switches to the external battery, it shows also the good readings.. Sorry if something is wrong in the way i've written this, I don't know how to give a great explanation of what's happening |
I thought timer won't work well here. Version 4 would be the best for now. I still would like to try fixing it properly. |
If I have both batteries : BAT1 power_now : 7725000 Now, if I remove BAT1, which is the external battery : BAT1 directory disappears when external battery is removed |
When I replug the battery, after waiting a minute so that the computer switches to external battery |
You can try version 6 but I don't know if it's going to work. I tried something simpler this time. |
nope, now even after plugging the battery again, it gives me false readings, as well as with only one battery connected |
I'll give it likely the last try with versions 7, 8 and 9. 7 uses timer and for version 8 and 9 I asked Claude to use functions from original Plasma 5 widget that supported 2 batteries well, AFAIK. But at this point, I'm running out of ideas/prompts and I'm afraid I'm lacking knowledge how to fix this. If none of this works, maybe you could use version 4 as it works best. |
yeah I think I'll use the version 4, the version 7 gives me weird readouts, and 8 and 9 are stuck onto reading the values.. |
Good luck and if you find a fix share it here so we could maybe include that in the widget. Unfortunately version 4 doesn't seem to be working on one of my laptops, so at least for now I won't be making it official. |
hey ! I have a Thinkpad T580 which have two batteries, one external, that I can "hotswap", and the other which is internal.
While using the secondary battery, which is used in priority when plugged in, it doesn't show the wattage on the plasmoid. When removing it, it does show the battery wattage for the internal battery.
ls /sys/class/power_supply/
returns :AC BAT0 BAT1 ucsi-source-psy-USBC000:001 ucsi-source-psy-USBC000:002
Kernel : 6.9.10-arch1-1
Plasma : 6.1.3
Using Wayland
ask me whatever you need else !
Thanks!
The text was updated successfully, but these errors were encountered: