Bug 463549 - Plasma with PRIME Render Offload wakes up my NVIDIA card when launching a KDE app on integrated GPU
Summary: Plasma with PRIME Render Offload wakes up my NVIDIA card when launching a KDE...
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.26.4
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-28 14:35 UTC by Victorien Tronche
Modified: 2024-05-07 23:59 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Victorien Tronche 2022-12-28 14:35:21 UTC
SUMMARY
Latest NVIDIA Drivers offers a good support of PRIME Render Offload. When not used, the NVIDIA card "turns off" in D3cold power state. State can be checked with cat /sys/class/drm/card1/device/power_state.

In KDE PLASMA, the card wakes up (state D0) when launching or closing somes apps. It's the same for every KDE app (dolphin, discover...). The card status is D0 when launching after a while it comes back to D3cold. Even if the NVIDIA card is not used (nvidia-smi show no process). It's the same when you close an app causing abnormal battery drain. 

I don't know if it's a Kde or a Nvidia bug, but pure QT apps or GTK4 apps behave correctly : the card stays in D3cold state.



STEPS TO REPRODUCE
1. Open a terminal run "watch cat /sys/class/drm/card1/device/power_state"
2. Wait for a while. Your card switch to D3cold
3. Open dolphin
4.  Your card switch to D0
5.   Wait for a while. Your card switch back to D3cold
6. Open dolphin
7.  Your card switch to D0
8.   Wait for a while. Your card switch back to D3cold

I made a video of the bug (too big to be uploaded here):
https://cloud.zadafrik.com/s/AF6rcWAG4ENJsak

EXPECTED RESULT
 The card should stay in D3cold, as it's not used.

SOFTWARE/OS VERSIONS
KDE Plasma Version 5.26.4
KDE Frameworks Version: 5.101.0
Qt Version: 5.15.7

ADDITIONAL INFORMATION
NVIDIA Drivers : 525.60.11
Comment 1 Zamundaaa 2024-05-07 23:59:52 UTC
Afaict this is caused by something (DrKonqi or plasma-integration maybe?) creating an OpenGL context on startup, and the NVidia driver not handling that well - https://github.com/NVIDIA/egl-wayland/issues/89. That seems to be fixed in driver 550, so this issue should be gone as well