SUMMARY Since Plasma 6.7, KWin's new GpuManager (MR !8913 / !8926) unconditionally enumerates and opens ALL render nodes via scanForRenderDevices(), creating EGL displays, GBM devices, and Vulkan contexts on every GPU — including the discrete GPU on hybrid laptops. This happens regardless of the KWIN_DRM_DEVICES environment variable, which previously was sufficient to keep KWin from touching the dGPU entirely. The result is that the dGPU (NVIDIA in my case) can never fully power off, as KWin holds open file descriptors and driver contexts on it for the entire session. This causes unnecessary battery drain on laptops. STEPS TO REPRODUCE 1. Have a hybrid laptop (Intel iGPU + NVIDIA dGPU) 2. Set KWIN_DRM_DEVICES="/dev/dri/by-path/pci-0000:00:02.0-card" (Intel only) 3. Log into a Plasma Wayland session 4. Run: nvidia-smi OBSERVED BEHAVIOR nvidia-smi shows kwin_wayland using 11 MiB on the NVIDIA GPU with a persistent C+G context. The NVIDIA GPU cannot fully suspend because KWin holds open render device handles via GpuManager. KWin's supportInformation confirms rendering is on Intel: OpenGL vendor string: Intel OpenGL renderer string: Mesa Intel(R) Graphics (ADL GT2) Yet GpuManager::scanForRenderDevices() still opened renderD129 (NVIDIA), created an EglDisplay and VulkanDevice on it, and keeps them alive. EXPECTED BEHAVIOR GpuManager should respect KWIN_DRM_DEVICES and skip render nodes belonging to GPUs excluded from display use, OR provide a separate environment variable (e.g. KWIN_RENDER_DEVICES) to control which render nodes are probed. Before Plasma 6.7, KWin did not touch the NVIDIA GPU at all when KWIN_DRM_DEVICES was set to the Intel iGPU, allowing the dGPU to remain fully powered off. RELEVANT CODE - GpuManager::scanForRenderDevices() in src/core/gpumanager.cpp unconditionally calls m_udev->listRenderNodes() and opens every result - RenderDevice::open() creates DrmDevice + EglDisplay + VulkanDevice on every opened render node SYSTEM INFORMATION - Plasma 6.7 - KWin (Wayland) - Intel ADL GT2 iGPU (card1 / renderD128) - NVIDIA GeForce RTX 3070 Ti Laptop GPU (card0 / renderD129) - NVIDIA driver 610.43.02 - Kernel 7.0.12 - Arch Linux ADDITIONAL INFORMATION Introduced by MR !8913 (GpuManager) and MR !8926 (multi-GPU copy swapchain), both merged March 2026. PS: I had used AI for assisting me in diagnosis.
The file descriptors, EGLDisplay and VkDevice do not keep the GPU active. nvidia-smi does though... If you want to check the power state, you can use cat /sys/class/drm/card0/device/power_state. In my testing, the GPU does turn off just fine.
(In reply to Zamundaaa from comment #1) > The file descriptors, EGLDisplay and VkDevice do not keep the GPU active. > nvidia-smi does though... > > If you want to check the power state, you can use cat > /sys/class/drm/card0/device/power_state. In my testing, the GPU does turn > off just fine. Thanks for the clarification, Xaver! You are right — I checked the power state and it does go to D3cold. The D0 state was just because nvidia-smi was waking it up. However, could we reconsider this as a feature request? My specific use case is that I want KWin to completely ignore my NVIDIA GPU. Before Plasma 6.7, setting KWIN_DRM_DEVICES was enough to keep KWin entirely away from the dGPU, which was perfect for my setup (using external tools to manage the GPU, or keeping it completely isolated for other tasks). Now, even though it sleeps, KWin still wakes the dGPU at login and attaches to it. Would it be possible to add a way to completely hide a GPU from KWin like we could before? Perhaps a new environment variable or having it fully respect the existing KWIN_DRM_DEVICES?
KWIN_DRM_DEVICES can't work for render nodes, since we'd need to first open the KMS node in order to find out if we need a specific render node. > Now, even though it sleeps, KWin still wakes the dGPU at login and attaches to That is a driver bug, not something I intend to work around. > Would it be possible to add a way to completely hide a GPU from KWin like we could before? I'd much rather not. What problems is this actually causing for you?
> > Would it be possible to add a way to completely hide a GPU from KWin like we could before? > I'd much rather not. What problems is this actually causing for you? I came here because I can name one: When I try to start a game (run through proton/wine) it has a habit of selecting the wrong GPU. I have two dGPUs: RTX 3060, Intel Arc a310. Even though my primary one is the RTX 3060 (it is set that way via UEFI Settings, KWIN_DRM_DEVICES override (not working), first pcie slot, connected to all my monitors while a310 is connected to nothing) it does not reliably get selected. It doesn't help that kwin_wayland PID is the same when tying to both gpus (renderD128 is the intel arc a310), because that way killing the process does not help. ``` $ sudo fuser -v /dev/dri/* BEN. PID ZUGR. BEFEHL /dev/dri/card0: root 1 F.... systemd root 1045 F.... systemd-logind vinvel 17996 F.... kwin_wayland vinvel 18057 F.... Xwayland /dev/dri/renderD128: vinvel 17996 F.... kwin_wayland vinvel 18350 F.... brave vinvel 18394 F.... brave /dev/dri/renderD129: vinvel 13961 F.... bridge-gui vinvel 14570 F.... drkonqi-coredum vinvel 17996 F.... kwin_wayland vinvel 18011 F.... plasmashell vinvel 18056 F.... plasma-keyboard vinvel 18057 F.... Xwayland vinvel 18394 F.... brave vinvel 20353 F.... thunderbird vinvel 21152 F.... keepassxc ``` The only reliable workaround I currently found was to unbind the intel gpu which is... inconvenient to say the least. Trying to set Environment variables for the specific games that were affeced (VR-Chat (VR-Mode) and Star Citizen) did also not help. Might just be user error, but still, I could benefit of being able to specify which gpu to use.
The GPU games use and the render nodes KWin opens are pretty much completely unrelated to each other. KWin can't force games to (not) use specific GPUs. You can use the MESA_VK_DEVICE_SELECT env var to force games to run on specific GPUs. That should work on any Vulkan app, with any GPU vendor (as long as you have Mesa installed ofc).
(In reply to Zamundaaa from comment #5) > The GPU games use and the render nodes KWin opens are pretty much completely > unrelated to each other. KWin can't force games to (not) use specific GPUs. > > You can use the MESA_VK_DEVICE_SELECT env var to force games to run on > specific GPUs. That should work on any Vulkan app, with any GPU vendor (as > long as you have Mesa installed ofc). Turns out it was user error, oops... Instead of doing MESA_VK_DEVICE_SELECT=vendorID:deviceID, I did MESA_VK_DEVICE_SELECT=/dev/cardX Thanks, I suppose 😅
(In reply to Zamundaaa from comment #3) > > Would it be possible to add a way to completely hide a GPU from KWin like we could before? > I'd much rather not. What problems is this actually causing for you? Two things mainly: 1. The dGPU wakes up at every login — fans spin up briefly and it draws extra power on battery before going back to sleep. Even if it's short, it didn't happen before 6.7 and feels like a regression on laptops. 2. Before 6.7, setting KWIN_DRM_DEVICES meant KWin would completely stay away from the dGPU. That was the expected behavior. Now that contract is broken — KWIN_DRM_DEVICES no longer fully isolates the dGPU from KWin, which is surprising for users who had this working fine for a long time.
(In reply to Pranay Pawar from comment #7) > (In reply to Zamundaaa from comment #3) > > > Would it be possible to add a way to completely hide a GPU from KWin like we could before? > > I'd much rather not. What problems is this actually causing for you? > > Two things mainly: > > 1. The dGPU wakes up at every login — fans spin up briefly and it draws > extra power on battery before going back to sleep. Even if it's short, it > didn't happen before 6.7 and feels like a regression on laptops. > > 2. Before 6.7, setting KWIN_DRM_DEVICES meant KWin would completely stay > away from the dGPU. That was the expected behavior. Now that contract is > broken — KWIN_DRM_DEVICES no longer fully isolates the dGPU from KWin, which > is surprising for users who had this working fine for a long time. Also I found a workaround by setting __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json in .config/systemd/user/plasma-kwin_wayland.service.d/override.conf specifically for the kwin_wayland process (via a systemd service override). This prevents the NVIDIA EGL ICD from loading and kwin_wayland no longer shows up in nvidia-smi at all. But this is a workaround I didn't need prior to 6.7 — KWIN_DRM_DEVICES="/dev/dri/card1" in .config/environment.d/kwin.conf alone was sufficient to keep KWin from touching the dGPU in any way.
(In reply to Pranay Pawar from comment #8) > (In reply to Pranay Pawar from comment #7) > > (In reply to Zamundaaa from comment #3) > > > > Would it be possible to add a way to completely hide a GPU from KWin like we could before? > > > I'd much rather not. What problems is this actually causing for you? > > > > Two things mainly: > > > > 1. The dGPU wakes up at every login — fans spin up briefly and it draws > > extra power on battery before going back to sleep. Even if it's short, it > > didn't happen before 6.7 and feels like a regression on laptops. > > > > 2. Before 6.7, setting KWIN_DRM_DEVICES meant KWin would completely stay > > away from the dGPU. That was the expected behavior. Now that contract is > > broken — KWIN_DRM_DEVICES no longer fully isolates the dGPU from KWin, which > > is surprising for users who had this working fine for a long time. > > Also I found a workaround by setting > __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json in > .config/systemd/user/plasma-kwin_wayland.service.d/override.conf > specifically for the kwin_wayland process (via a systemd service override). > This prevents the NVIDIA EGL ICD from loading and kwin_wayland no longer > shows up in nvidia-smi at all. > > But this is a workaround I didn't need prior to 6.7 — > KWIN_DRM_DEVICES="/dev/dri/card1" in .config/environment.d/kwin.conf alone > was sufficient to keep KWin from touching the dGPU in any way. adding KWIN_DISABLE_VULKAN=1 and removing all other env vars has fixed the issue (nvidia-smi showing kwin) reference: 1. https://www.reddit.com/r/kde/comments/1ubr1j6/kwin_decided_to_use_my_dgpu_after_update/ 2. https://bugs.kde.org/show_bug.cgi?id=521814
> The dGPU wakes up at every login As I already wrote, that's a driver bug, not something we can fix. > that contract is broken There is no contract.
(In reply to Zamundaaa from comment #10) > > The dGPU wakes up at every login > As I already wrote, that's a driver bug, not something we can fix. > > > that contract is broken > There is no contract. Thanks for clarification & support, this does look like driver issue. also close as duplicate of https://bugs.kde.org/show_bug.cgi?id=521814
(In reply to Zamundaaa from comment #1) > The file descriptors, EGLDisplay and VkDevice do not keep the GPU active. > nvidia-smi does though... > > If you want to check the power state, you can use cat > /sys/class/drm/card0/device/power_state. In my testing, the GPU does turn > off just fine. Unfortunately this appears to prevent my discrete (Nvidia) card from being turned off (power state D3cold; D3hot seems to be the lowest it goes now). The kwin_wayland process is the only process holding on to it. This still has a significant impact on my laptop's battery life under normal usage. There are a few workarounds floating about, but it would certainly be nice to have a clean bit of configuration to help. If there is a driver bug, as you state, I'd like to report it there. However, I would need to know what precisely the bug is.
I'm having the same problem on my Lenovo Ideapad Pro 5 running OpenSUSE Tumbleweed. It has Nvidia GTX 1650 dGPU, and using Nvidia's closed drivers it has always nicely entered D3cold power state with KDE (until I run a program using the dGPU). After latest KDE update, the dGPU stays in D0 state (when read from /sys/bus/pci/devices/0000\:01\:00.0/power_state), which increases idle power consumption. I haven't tried to disable-Vulkan workaround yet, but will. However, I agree with Tom in that it would be nice to get the behaviour back to normal.
> If there is a driver bug, as you state, I'd like to report it there. However, I would need to know what precisely the bug is. The GPU waking up when render nodes are opened and when devices are listed with Vulkan is a driver bug, but it definitely goes to sleep properly afterwards. What driver version are you on? IIRC I tested with 595 when implementing the changes, but it might've been 610 already.
(In reply to Zamundaaa from comment #14) > What driver version are you on? IIRC I tested with 595 when implementing the > changes, but it might've been 610 already. In my case, I'm running 580.159.03 (the closed driver), since D3cold does not work with the open driver for Turing-generation GPUs like GTX 1650 (and this is verified in the Nvidia docs, Turing GSPs don't support D3cold, and disabling the GSP is not possible with the open drivers).
Confirming this on my desktop PC: AMD iGPU (Granite Ridge) as primary + NVIDIA RTX 5080 as a secondary/offload GPU, Wayland session. > __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json in > .config/systemd/user/plasma-kwin_wayland.service.d/override.conf The workaround worked for me. After a relogin, kwin_wayland no longer grabs the render node of my NVIDIA GPU. PRIME render offload still works. KWIN_DISABLE_VULKAN=1 did not fix it for me, only the EGL vendor override did. > I'd much rather not. What problems is this actually causing for you? The problem it caused for me: I use the dGPU both for VFIO passthrough to a VM and for PRIME render offload. Since the update to kwin 6.7 the VM would no longer start, because the GPU couldn't be unbound from the host while kwin_wayland was still holding it. Downgrading to kwin 6.6.5 was the only other thing that fixed it for me.
I can confirm the problem. I have laptop with hybrid Intel/Nvidia graphics. Prior to Plasma 6.7 I was able to keep my Nvidia GPU in suspended/D3cold state most of the time by applying D3 power management as per wiki (https://wiki.archlinux.org/title/PRIME#PCI-Express_Runtime_D3_(RTD3)_Power_Management). But after updating to 6.7 Nvidia always stays in active/D0 state. KWIN_DISABLE_VULKAN=1 solves the problem, but shouldn't kwin try to use integrated GPU by default? The command to check power status: cat /sys/bus/pci/devices/0000:01:00.0/power/runtime_status && cat /sys/bus/pci/devices/0000:01:00.0/power_state Arch Linux w/ Plasma 6.7.2 and Nvidia closed source driver 580.173.02
I have the same issue with amd+nvidia hybrid laptop. Normally i like to keep dgpu turned off using `supergfxctl -m Integrated`, but after 6.7 update dgpu turns on by itself on startup. Kernel: Linux 7.1.2-1-cachyos-bore-lto DE: Plasma 6.7.2 WM: KWin (Wayland) CPU: AMD Ryzen 5 4600H (12) @ 4.01 GHz GPU 1: AMD Radeon Vega Mobile Series [Integrated] GPU 2: NVIDIA GeForce GTX 1650 Mobile [Discrete] (propietery driver 610.43.02 )
(In reply to Matti Rintala from comment #15) > In my case, I'm running 580.159.03 (the closed driver), since D3cold does > not work with the open driver for Turing-generation GPUs like GTX 1650 (and > this is verified in the Nvidia docs, Turing GSPs don't support D3cold, and > disabling the GSP is not possible with the open drivers). I don't see anything in the release notes, but it may be down to the configuration of the distro. According to https://us.download.nvidia.com/XFree86/Linux-x86_64/580.142/README/dynamicpowermanagement.html, Nvidia only enables power management by default in Ampere (aka 3000 series) and newer. *** This bug has been marked as a duplicate of bug 521814 ***