While I could just hardcode the GUIDs and indexes for the default power schemes in Windows, it seems like the more “correct” solution is to populate and manipulate the registry like Windows does.
And, as I don’t plan on fully implementing all the calls, it might make it easier down the road for someone who might.
On Feb 17, 2025, at 3:51 AM, Stefan Dösinger stefandoesinger@gmail.com wrote:
Am Montag, 17. Februar 2025, 00:45:32 Ostafrikanische Zeit schrieb robert lippmann:
- Default power profiles are stored in the registry under
HKLM\System\CurrentControlSet\Control\Power. The subtree is pretty huge (about a 1.5m .reg file when I exported it.
What's your ultimate goal? I guess you have an application that tries to read and/or change power settings.
If the application is merely reading to e.g. figure out if it is running on a laptop powered by battery you probably don't need most of the registry values,
If you want to make a power management tool work then you are in for a lot of work. Powerprof would have to talk to lower level Linux components to actually apply changes to the hardware settings - that's going to be tricky.