r/kde • u/stigmodding • 33m ago
Workaround found A tool to migrate kwin across GPUs without logging out
Hi everyone!
My experience on multi GPU setups like most gaming laptops has always been that kwin and plasmashell stay stuck on the integrated graphics despite the HDMI port being hard wired to the dGPU, even when I keep the integrated screen completely off.
The problem with this is that when you fire up a game on the dGPU it still needs to copy the frame to the iGPU for compositing (kwin) and draw stuff like the start menu (plasmashell) and then all the way back to the dGPU for transmitting over HDMI.
Now, migrating plasmashell is just a matter of restarting it with a different env var, and this tool does it, but kwin was impossible until 6.8 as far as I can tell, at least not without logging out (which closes all your apps) and logging back in.
6.8 introduced a live migration feature that is meant to make the system tolerant to eGPUs being unplugged, but it doesn't expose a setting to trigger it.
So what my plugin does is expose this setting and automating the migration based on what monitors are in use.
Hope it can be useful for someone else!


