SUMMARY In a multi-monitor setup, if one monitor takes longer to wake up than the other, kscreenlocker switches the focus from the password entry field to the new monitor during typing. This prevents me from inputting my password immediately after the primary monitor wakes up. STEPS TO REPRODUCE 1. Get two monitors, one of which wakes from sleep slower than the other 2. Wait for them to lock and fall asleep 3. Shake the mouse or whatever else to begin the wakeup, start typing in the password field OBSERVED RESULT Input focus switches to the secondary slower monitor as soon as it wakes up. EXPECTED RESULT Focus remains on the password field on the primary monitor that I'm typing into. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Linux 6.1.10 (available in About System) KDE Plasma Version: 5.26.5 KDE Frameworks Version: 5.102.0 Qt Version: 5.15.8 ADDITIONAL INFORMATION An alternative solution would be an option to restrict the password entry for the lock screen to a specific monitor, so that the secondary monitor does not interfere.
> An alternative solution would be an option to restrict the password entry for the lock screen > to a specific monitor, so that the secondary monitor does not interfere. Yep, see Bug 409226.
The current code is supposed to always put focus on the screen with cursor, but an upstream bug in Qt is preventing this. https://bugreports.qt.io/browse/QTBUG-133204
I think there might be some additional Qt bug here -- QCursor::pos is not correctly updated after the screen configuration changes.
Git commit 305d88e050ffe4018544e6d4b7c5c6730ca5c0d4 by Yifan Zhu. Committed on 25/03/2025 at 16:03. Pushed by fanzhuyifan into branch 'master'. lockscreen: only show UI on screen with mouse Otherwise one appears on every screen, which is awkward. However, forcing it to be on a particular screen is undesirable, since if that screen is turned off but not unplugged, it may still be sending a signal to the OS and show up as a valid screen to show things on. To alleviate that concern, always show the UI on the screen with pointer. Test plan: - use multiscreen setup and lock screen - move mouse across screens, verify that only screen with pointer shows controls - type some password without pressing enter, and repeat previous point Related: bug 409226 M +4 -1 desktoppackage/contents/lockscreen/LockScreenUi.qml https://invent.kde.org/plasma/plasma-desktop/-/commit/305d88e050ffe4018544e6d4b7c5c6730ca5c0d4