SUMMARY Whenever my monitors go into power save / sleep mode, or when I reboot, the order of my screens for the purposes of Window Rules is reshuffled. This does not involve adding or removing monitors from the system, though it is possible that some of the monitors stop being detected by the system while in power save mode. This makes using an app that *must* be on the primary screen to work properly a pain in the butt, as I have to change my window rules every time. Further, as display numbers don't seem to be shown in Display and Monitor Settings, determining which screen is which is a matter of trial and error. STEPS TO REPRODUCE 1. Have three monitors connected (In my case, 1x MSI MPG 341CX QD-OLED, and 2x Dell G2724D) 2. Either put the screens to sleep *or* reboot the computer. 3. Screen Numbers are now randomized. OBSERVED RESULT Screen Index for window rules has been randomized, and windows rules need changed to assign windows to the correct screens. EXPECTED RESULT Screen Indexes remain consistent so long as the same display setup remains in use. *Ideally*, this would follow the Screen Priorities setting, to allow users control over these indexes, and allow them to remain somewhat consistent between types of setups even as screen are connected and disconnected. Alternatively, a window rule option that allows setting screen by some sort of monitor ID / serial number specific to the monitor hardware (and doing nothing if said monitor is not connected) would be extremely useful, allowing very fine control over the windows in specific setups. SOFTWARE/OS VERSIONS Operating System: Ultramarine Linux 41 KDE Plasma Version: 6.2.5 KDE Frameworks Version: 6.10.0 Qt Version: 6.8.2 Kernel Version: 6.13.2-cachyos1.fc41.x86_64 (64-bit) Graphics Platform: Wayland Processors: 24 × AMD Ryzen 9 3900X 12-Core Processor Memory: 31.3 GiB of RAM Graphics Processor: AMD Radeon RX 6800 ADDITIONAL INFORMATION
*** Bug 491230 has been marked as a duplicate of this bug. ***
I also have this issue. The rules when choosing a screen, you pick a screen number. This aligns with the output numbers that you can see with the command: kscreen-doctor -o The problem is that output numbers are assigned to each monitor in the order they are seen as connected. This is not a constant and can result in monitors not having the same output number between standby/resume and as the OP reported boot and screen standby. The only way I've found to manipulate this is to only have the primary monitor on for boot and turn my second monitor on after. Presumably for more, you turn them on in the order you want. Rules needs a better way to identify screens.
Basically what this means is session restore with multiple displays is an abomination. When I reboot, all windows open on primary display, and those that should have opened on other displays open in duplicate. If session is exited without closing the duplicate(s), then on next open they are opened in triplicate, and if repeated, in quad, etc. I always keep app fcl (File Commander http://silk.apana.org.au/fc2development.php) open (virtually) filling virtual desktop 4 on the (upper) right display, with primary being either left or lower left, depending whether I'm using 2 or 3 displays. It religiously gets reopened on the primary in at least 2 copies.