SUMMARY The core issue is that there is no way to write a kwin rule to move a window to a specific monitor in a stable way. The Kwin screen IDs change whenever a monitor is unplugged, even briefly or when PC is idle. More background: I have two main Firefox windows, I want one to appear on my second monitor. With wayland, Firefox cannot do that itself, so I write a kwin window rule to set the Firefox. This works fine - however, my primary monitor appears to be unplugged whenever it turns off for power saving (some kind of displayport issue, I think), so my secondary monitor becomes kwin screen 0, and this causes my window rule to force the Firefox window to my primary monitor, which I don't want. STEPS TO REPRODUCE 1. Have a PC with two monitors. 2. Create a kwin window rule, forcing any window to be on screen ID 1. 3. Window moves to the secondary monitor. 4. Unplug primary monitor, then replug. OBSERVED RESULT Window is now forced onto primary monitor. EXPECTED RESULT Window should remain on secondary monitor. SOFTWARE/OS VERSIONS Linux: 6.8.7, Fedora Silverblue (available in About System) KDE Plasma Version: 6.0.4 KDE Frameworks Version: 6.1.0 Qt Version: 6.7.0 ADDITIONAL INFORMATION Ideally, there should be a way to use GUIDs or similar to refer to monitors. Does this exist on a hardware level? Alternatively, is there any way to use a similar mechanism to how windows will remember their monitor automatically when said monitor is unplugged, and apply that mechanism to the screen ID in Kwin window rules?
Facing the same issue, creating a window rule that forces an application on a specific screen is basicly impossible right now on Wayland.
> Ideally, there should be a way to use GUIDs or similar to refer to monitors. Does this exist on a hardware level? Displays technically have a serial number, but unfortunately display manufacturers are very, very far from reliable in implementing it. Some displays have an empty string in it, some displays have a serial string but no serial number, some the reverse, some just have the same serial for all displays of the same model... We can however make up a unique ID that's stored in the display configuration, which would be as reliable as we can make it.