Comments (7)
On my T460s the widget works perfectly fine if the laptop is running on the first battery. When switching to the second battery, the indicator still checks the first battery and reports 0.0 W. It would be great if the power consumption on all available batteries could be summed up before displaying.
And thanks a lot for this super simple, but very helpful widget!
from plasma-power-monitor.
Solved this on my ThinkPad by editing the main.qml file to display the sum of BAT0 and BAT1. Not the best way but... it just works. (you can easily change the BATx numbers if it differs for you).
Edited file: main.zip
It should be enough to replace the main.qml file in ~/.local/share/plasma/plasmoids/org.kde.powerMonitor/contents/ui/
and run killall plasmashell; kstart5 plasmashell
to refresh the widget files.
from plasma-power-monitor.
@Tarballwalf @martinalex000 @j4nm4c - sorry for the delayed response! Was unable to find time due to college/job : D
@Tarballwalf & @martinalex000 - could you please share me the output of the following commands:
ls /sys/class/power_supply
cat /sys/class/power_supply/BAT[num]/present
for each battery[num]
present in laptop
Additionally, @Tarballwalf could you also share me the output of this command:
cat /sys/class/power_supply/BAT[num]/power_now
Currently, in code, I did ensure to check if the power_now
file exists and use that to fetch the power usage, so I'm not sure why it doesn't show anything in your case (by "doesn't show the wattage at all", did you mean it shows "0.0 W"?)
One of the main hurdles of developing this widget has been that my laptop was the only device I had for reference, coding and testing and therefore I could not take into account laptops with dual batteries or different files provided by kernel for reporting battery power consumption (like power_now). So, thanks a lot for reporting these issues here!
from plasma-power-monitor.
Regarding the second question,
The plugin works, but only when BAT0 is actively in use. If BAT1 is used, it will just report as 0.
from plasma-power-monitor.
Thanks @Tarballwalf !
I have released v0.2 and it should be able to support dual batteries. I have not been able to test them as I don't have a laptop with dual batteries. Would request you to try out the new version and let me know if you face any regressions or if the widget still doesn't work!
from plasma-power-monitor.
Everything works fine for me
(this is my setup):
ls /sys/class/power_supply/ | grep BAT
BAT0
BAT1
cat /sys/class/power_supply/BAT*/power_now
0
9454000
from plasma-power-monitor.
Thank you for confirming @j4nm4c ! Closing this issue in that case.
from plasma-power-monitor.
Related Issues (12)
- Feature request: show 'AC' when on AC HOT 3
- Plasma 6 Support HOT 2
- Add font size change support
- Widget causes constant UI restart HOT 3
- Don't show decimal if tenths place is 0
- Show a special icon if computer is plugged in but not charging
- Will you accept a PR adding FreeBSD support??
- When my laptop is fully charged,0.0W appeared HOT 3
- Widget floods the journalctl every <poll interval> with 'plasmashell[2882]: XMLHttpRequest: Using GET on a local file is dangerous and will be disabled by default in a future Qt version.Set QML_XHR_ALLOW_FILE_READ to 1 if you wish to continue using this feature.' HOT 1
- Power Consumption in desktops HOT 1
- Shows "NaN W"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plasma-power-monitor.