Bug 470019 - Offer to disable discrete GPU when switching from AC power to battery power
Summary: Offer to disable discrete GPU when switching from AC power to battery power
Status: CONFIRMED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_powerdevil (other bugs)
Version First Reported In: 6.2.4
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-19 20:47 UTC by Nate Graham
Modified: 2025-05-09 17:27 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2023-05-19 20:47:31 UTC
I was talking with the Kubuntu Focus people recently, and this came up as an example of a power management add-on they ship with their laptops that has gotten good feedback from customers. In a nutshell, when switching from a plugged-in state to an on-battery state, if the machine has both a discrete GPU and an integrated GPU, and the discrete GPU is powered on, the system displays a dialog asking the user if they'd like to power off the dGPU and use the iGPU only, to save battery power.

Currently their system is a giant scary bash script that shows a dialog using kdialog. Code is here: https://github.com/kfocus/kfocus-source/blob/3e2abcfd46080bbbaa722846a5339c8a129be869/package-main/usr/lib/kfocus/bin/kfocus-pstate-set#L74

Other relevant code: https://github.com/kfocus/kfocus-source/blob/3e2abcfd46080bbbaa722846a5339c8a129be869/package-main/usr/lib/kfocus/bin/kfocus-pstate

It works, but it also seems like the kind of thing that would be broadly useful everywhere, and it might be worth implementing in powerdevil in a more system-integrated way. To minimize the annoyance factor, I'd recommend implementing the UX like this:

- When transitioning from plugged-in to battery power, show a persistent system notification (not a dialog) making the request and offering the user the option to power down the dGPU
- In the notification add an "Always do this" checkbox the user can click on to easily make the system always do it
- In the powerdevil KCM, expose a three-state setting to control the behavior from a central place, like so:

When using battery power: (o) Ask whether to power down dedicated GPU if it's active
                          (o) Always power down the dedicated GPU
                          (o) Do nothing