eliapasquali / power-profile-switcher

Gnome extension to automatically switch between power profiles based on power supply.
https://extensions.gnome.org/extension/5575/power-profile-switcher/
GNU General Public License v3.0
51 stars 10 forks source link

[BUG]: Profile switching forced continuously #18

Open TheBoncy opened 1 year ago

TheBoncy commented 1 year ago

I set it up to use performance when plugged in and balanced when on battery but when i manually set it to power saving while on battery it kept putting be back to balanced

eliapasquali commented 1 year ago

Can you give more information about this? upower -d output when plugged in and when on battery should be enough

dmy3k commented 1 year ago

I think this behavior is expected in current implementation.

Extension is receiving events from upower with discharge info (e.g remaining battery percentage) and tries to enforce configured power profile (balanced in your case), overwriting manually set power profile (power-save in your case).

To accommodate your use-case, we need to capture whether power profile was set by user and keep it until power supply state is changed.

@eliapasquali does it make sense to have that feature? I might have time to prep PR for that in the coming weeks

eliapasquali commented 1 year ago

That's right @dmy3k . This issue is related to #3, i need to implement an option to pause the automatic switch, a manual mode.

frederik-elwert commented 1 year ago

I actually like that there is no UI for the extension (except for the settings), something that would be needed for a pause switch, I guess? So I’m wondering if it would actually make sense to have a heuristic for this as suggested by @dmy3k: When the user changes the mode manually, keep it until the power state changes (or the battery threshold is crossed).