SUMMARY *** NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols. See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports Discrete GPU is not turning off when using on-demand mode in Wayland session. *** STEPS TO REPRODUCE 1. Open a Wayland session 2. Check compositor is enabled and discrete GPU is on-demand mode. 3. Connect an external monitor that uses discrete GPU, observe the card is turned on ( cat runtime_status) 4. Disable the monitor using display configuration widget OBSERVED RESULT Discrete GPU is still turned on and high power consumption To check this I use: cat /sys/bus/pci/devices/0000:01:00.0/power/runtime_status EXPECTED RESULT In about 30 seconds discrete GPU should be turned off NOTES: a. Same steps on X11 works as expected. b. If the monitor is physically disconnected (at step 4) then it works as expected. c. Interestingly, after step 4 if I go to compositor settings and change any setting and apply then GPU turns off as expected. SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: Kubuntu (available in About System) KDE Plasma Version: 5.27.6 KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION
A minor correction: "Check compositor is enabled" in step 2 is not needed to reproduce the bug.
> Interestingly, after step 4 if I go to compositor settings and change any setting and apply then GPU turns off as expected That is indeed very interesting. What kind of GPU do you have?
.
(In reply to Zamundaaa from comment #3) > . Sorry for the late response, I have an Nvidia A2000 mobile GPU.
With the NVidia card in my laptop `cat runtime_status` just says "unsupported", so I can't really test this myself. I assume though that this problem is caused by KWin keeping some buffers around even once an output isn't used anymore, which require the dedicated GPU memory to stay powered on. When you change compositor settings, all buffers are deleted, OpenGL resources are reset and only things that are really needed are created again.
Hi, I have the same symptoms (but a little worse). If I use my notebook without an external monitor in wayland, the dGPU will turn on/off as needed, but once I plug in an external monitor (used both the DP and HDMI connectors on the notebook) and the compositor uses the external display, it will never power down the dGPU even if everything is unplugged and the notebook is on battery. On X11 the dGPU will power down when unplugged and on battery. The DP & HDMI ports on this notebook is connected to the dGPU. Internal display is on iGPU. I suspect that once the compositor uses a display port it keeps a handle open to it, which inhibits the dGPU powering down at all. My system: Plasma Wayland 5.27.10 (Fedora 39 KDE) kernel 6.6.8 (was the same on 6.5 series) CPU/iGPU: AMD 4800H (renoir) dGPU: AMD RX5600m 6GB Notebook: MSI Alpha A4DEK Using PPD for power management.
(In reply to Nickolas Grigoriadis from comment #6) > Hi, I have the same symptoms (but a little worse). > > If I use my notebook without an external monitor in wayland, the dGPU will > turn on/off as needed, but once I plug in an external monitor (used both the > DP and HDMI connectors on the notebook) and the compositor uses the external > display, it will never power down the dGPU even if everything is unplugged > and the notebook is on battery. > > On X11 the dGPU will power down when unplugged and on battery. > > The DP & HDMI ports on this notebook is connected to the dGPU. Internal > display is on iGPU. > > I suspect that once the compositor uses a display port it keeps a handle > open to it, which inhibits the dGPU powering down at all. > > My system: > Plasma Wayland 5.27.10 (Fedora 39 KDE) > kernel 6.6.8 (was the same on 6.5 series) > CPU/iGPU: AMD 4800H (renoir) > dGPU: AMD RX5600m 6GB > Notebook: MSI Alpha A4DEK > Using PPD for power management. Does it turn it off if you go to compositor settings and change any setting? (In my case it was turning it off about 30 seconds after changing a compositor setting)
(In reply to ilkerk from comment #7) > (In reply to Nickolas Grigoriadis from comment #6) > > Hi, I have the same symptoms (but a little worse). > > > > If I use my notebook without an external monitor in wayland, the dGPU will > > turn on/off as needed, but once I plug in an external monitor (used both the > > DP and HDMI connectors on the notebook) and the compositor uses the external > > display, it will never power down the dGPU even if everything is unplugged > > and the notebook is on battery. > > > > On X11 the dGPU will power down when unplugged and on battery. > > > > The DP & HDMI ports on this notebook is connected to the dGPU. Internal > > display is on iGPU. > > > > I suspect that once the compositor uses a display port it keeps a handle > > open to it, which inhibits the dGPU powering down at all. > > > > My system: > > Plasma Wayland 5.27.10 (Fedora 39 KDE) > > kernel 6.6.8 (was the same on 6.5 series) > > CPU/iGPU: AMD 4800H (renoir) > > dGPU: AMD RX5600m 6GB > > Notebook: MSI Alpha A4DEK > > Using PPD for power management. > > Does it turn it off if you go to compositor settings and change any setting? > (In my case it was turning it off about 30 seconds after changing a > compositor setting) I never tried before, I just tried it now, and unfortunately it never turned the dGPU off. If I log out of my session and re-login, then it will turn the dGPU off.
(In reply to Nickolas Grigoriadis from comment #6) > Hi, I have the same symptoms (but a little worse). > > If I use my notebook without an external monitor in wayland, the dGPU will > turn on/off as needed, but once I plug in an external monitor (used both the > DP and HDMI connectors on the notebook) and the compositor uses the external > display, it will never power down the dGPU even if everything is unplugged > and the notebook is on battery. > > On X11 the dGPU will power down when unplugged and on battery. > > The DP & HDMI ports on this notebook is connected to the dGPU. Internal > display is on iGPU. > > I suspect that once the compositor uses a display port it keeps a handle > open to it, which inhibits the dGPU powering down at all. > > My system: > Plasma Wayland 5.27.10 (Fedora 39 KDE) > kernel 6.6.8 (was the same on 6.5 series) > CPU/iGPU: AMD 4800H (renoir) > dGPU: AMD RX5600m 6GB > Notebook: MSI Alpha A4DEK > Using PPD for power management. Just an update that with KDE Plasma Wayland 6.0 (using Fedora 40 KDE edition) this bug completely disappeared for me.
Great, thanks for following up!