Skip to content

feat: add support for monitoring power usage via intel RAPL#1

Open
rochacbruno wants to merge 1 commit intoDaniel-42-z:mainfrom
rochacbruno:intel-support
Open

feat: add support for monitoring power usage via intel RAPL#1
rochacbruno wants to merge 1 commit intoDaniel-42-z:mainfrom
rochacbruno:intel-support

Conversation

@rochacbruno
Copy link

I notice that plugin was showing battery consumption

When running on a desktop PC or plugged on power it was showing 0.0W

Added support for power comsumption via intel

falback to the current usage

requires aditional permision to work.

@Daniel-42-z
Copy link
Owner

Daniel-42-z commented Oct 5, 2025

I probably won't merge these changes at this state into my plugin since RAPL serves a different purpose. I just did some research and it seems like RAPL only monitors the power consumption of the core components like processor, GPU, and memory, and even on laptops it doesn't monitor the power consumption of the display, which makes up a large portion of total power consumption on modern laptops (especially OLED ones) with efficient processors.

My plugin is intended for monitoring battery consumption on laptops, which means that it shows the rate of change of the amount of power in the battery, and is intended to be used so that when you don't have a power source, you can closely monitor how fast the battery depletes on your laptop, and when charging, you can estimate how fast it will charge to full, and any anomalies in the wattage would be a signal that something is using a lot of resources, and you should terminate it or not depending on whether you need that extra battery life. If you'd like this plugin to serve a dual purpose, I'd prefer to add a settings menu where you can choose an option between "monitor battery consumption (laptops)" or to "monitor power consumption of processor and core components (desktops)", and run different parts of the script periodically based on the user choice. If you decide to make your own plugin separate from mine, I'll rename mine "battery power consumption" to remove the ambiguity.

@rochacbruno
Copy link
Author

Makes sense, the naming PowerUsage made me assume you wanted a general purpose power usage monitor.

I can work on adding the setting option and conditional on the script if you are good with it,
or we can go with having separate plugins, what do you prefer?

I am thinking that it would be nice to have the RAPL data + BAT data available when clicking the widget, so one plugin could serve both purposes, all configurable on the settings.

@Daniel-42-z
Copy link
Owner

Daniel-42-z commented Oct 6, 2025

I am thinking that it would be nice to have the RAPL data + BAT data available when clicking the widget, so one plugin could serve both purposes, all configurable on the settings.

This can be a good idea, maybe if "show detailed info" is on the popup should also show their difference under "power consumption by non-core components".

Also I'm quite new to qt development and I basically vibe coded the 2 plugins that I have right now, but now I think that vibe alone isn't going to let me make more complex plugins, do you know if there are documentation for the classes used in DMS plugins, and are there good resources to learn qml in general? Also is there a way to setup proper autocomplete for the classes used for DMS on neovim? My LSP just says everything fails to import, and if I can see autocomplete info I can write things quite efficiently.

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.

2 participants