SUMMARY After upgrading to an amd gpu my secondary monitor is now active by default. My mouse gets put get correctly put on the primary Monitor, but remembered apps are put on the secondary one. Additionally both sddm and kscreenlocker type on the secondary one (this is especially bad in kscreenlocker because it notices that it is on the wrong screen when i move the mouse and the password get split across the monitors). In tried deleting the kwin output config, but that didn't help. In my testing it only seems to be dependent on the order the monitors are picked up in. If I disconnect the primary physically and then reconnect it, kscreenlocker types on the primary one (but turning it off and on in software has no effect). I'm not sure if this is a bug with kwin, but since this happens in plasma and sddm, but not gdm, so that's my guess. It also happens on a complete clean install. STEPS TO REPRODUCE (maybe) 1. Connect 2 Monitors 2. Disconnect and reconnect one physically 3. lock screen with shortcut 4. kscreenlocker will type on that screen OBSERVED RESULT last connected screen (I think) is active by default EXPECTED RESULT primary Monitor (or the monitor where the mouse is) should be active by default. SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 6.3.3 KDE Frameworks Version: 6.11.0 Qt Version: 6.8.2 Kernel Version: 6.14.0-rc6-1-mainline (64-bit) (But same thing with stable kernel) Graphics Platform: Wayland Processors: 16 × AMD Ryzen 7 5800X 8-Core Processor Memory: 31.3 GiB of RAM Graphics Processor: AMD Radeon Graphics (rx 9070)
On x11 plasma and kscreenlocker behave as expected and select the monitor where the mouse is. On wayland it is like described above SDDM selects the secondary monitor on wayland and x
Hi, I looked into this myself and this is what happens here as far as I can tell: kwin adds outputs in the order the gpu driver gives it --> plasma/sddm/kscreenlocker want to be on all screens so they loop over the screens in that same order --> they create windows (or whatever) in that order --> whatever window was created last, as well as its screen, has the focus that means that the focus in those cases is determined by the order the gpu gives to kwin, which happens to make my primary monitor "primary" on nvidia and my secondary on amd/nouveau (theoretically sddm has code to change focus itself, but that doesn't seem to do anything) changing the append to prepend in DrmBackend::addOutput fixes the issue in my specific case I tried to make a "proper" fix myself, by making the output list the inverse of the OutputOrder, but I didn't manage to get that Information in drm_backend.cpp (probably just because I don't know cpp though) Also kscreenlocker checked where the cursor was for a while, both fixing this and making it still work properly if the cursor was on a different screen, but that broke again in 6.5 (or 6.4.5). I would try to bisect it, but I'm not sure how to bisect plasma with it's many subprojects. Simply downgrading plasma-desktop plasma-workspace and kscreenlocker didn't make a difference.