Keyboard input dead on the focused window after a long idle lock, workspace switch restores it
What's wrong?
After a long idle, I unlock and no window on the workspace takes keyboard input.
The window still looks focused. It keeps its focus border, the bar still names it, and hyprctl activewindow still reports it. But nothing I type reaches any client. Compositor keybinds still work, so the keyboard is fine.
Any workspace or window switch brings input back. SUPER+2 then SUPER+1 fixes it instantly. So does SUPER+left/right.
It doesn't happen on a short lock.
Steps to reproduce
- Focus a terminal on workspace 1 and leave the machine alone.
- Let the screensaver (150s) and then the lock (300s) kick in.
- Leave it locked at least 10 minutes.
- Wake the display and unlock.
- Try to type. Nothing lands.
- Press
SUPER+2, thenSUPER+1. Typing works again.
What I'd expect
After unlocking, the window Hyprland reports as active should hold keyboard focus. No manual workspace switch needed.
System details
- Omarchy
4.0.1-1, Hyprland0.56.2-1, quickshell0.3.1-1, kernel7.1.8-arch1-3 - Intel i9-9900K, NVIDIA RTX 4070,
nvidia-open-dkmsandnvidia-utils610.57.04-1 - Single monitor, LG UltraGear on
HDMI-A-1, [email protected], scale 2 - Terminal is
foot. Stock idle config:{ "screensaver": 150, "lock": 300 } - No suspend involved. Machine was up 3 days straight across all of this.
What the socket shows
I caught one with a capture running. Lock at 12:43:10, unlock at 12:56:23, so 13m13s. From .socket2.sock:
12:56:14 monitorremoved>>HDMI-A-1
12:56:14 focusedmon>>FALLBACK,4
12:56:14 monitoradded>>FALLBACK
12:56:14 activewindow>>, <-- focus cleared
12:56:17 monitoradded>>HDMI-A-1
12:56:17 focusedmon>>HDMI-A-1,1
12:56:17 monitorremoved>>FALLBACK
<-- no activewindow event, focus never comes back
12:56:23 (unlocked)
12:56:30 activewindow>>foot,... <-- only after I switched windows by hand
The monitor drops out. Everything migrates to FALLBACK and Hyprland clears focus. The real monitor is back 3 seconds later. Focus is never restored. There's no activewindow event between 12:56:17 and my manual switch at 12:56:30.
This hyprctl dump is from 12:56:24, one second after the unlock, before I touched anything:
--- activewindow ---
{ "address": "0x5570ff79c070", "class": "foot", "workspace": { "id": 1, "name": "1" },
"mapped": true, "visible": true, "acceptsInput": true, "focusHistoryID": 0, ... }
--- activeworkspace ---
{"id":1,"name":"1","lastwindow":"0x5570ff79c070"}
--- layers (overlay) ---
[{"mon":"HDMI-A-1","overlay":[]}]
So hyprctl names a window with focusHistoryID: 0 and acceptsInput: true. The event stream says focus was cleared and never restored. That mismatch is the visible bug: the window keeps its border, the bar keeps its name, and no client gets a key. The overlay level is empty, so no stray layer is holding input.
The workspace disagrees too. The stream emits workspace>>6 at 12:56:17, the dump at 12:56:24 reports workspace 1.
How often
On wake from a long lock, omarchy-shell logs a full loss of outputs while still locked:
2026-08-30T12:56:14 kernel: nvidia-modeset: WARNING: GPU:0: HDMI FRL link training failed.
2026-08-30T12:56:14 omarchy-shell: INFO qt.qpa.wayland: There are no outputs - creating placeholder screen
2026-08-30T12:56:18 omarchy-shell: WARN quickshell.hyprland.ipc: Got removal for monitor "FALLBACK" which was not previously tracked.
2026-08-30T12:56:23 omarchy-shell: DEBUG qml: omarchy lock ... unlocked
There are 15 of these clusters this boot. 14 land seconds before an unlock. The odd one out is a wake I didn't unlock.
| Lock duration | Output dropped before unlock? |
|---|---|
| 5s, 8s, 14s, 19s, 1m48s | No (5/5) |
| 9m06s, 9m51s, 11m, 13m13s, 14m30s, 19m16s, 19m50s, 1h01m, 1h38m, 2h14m, 2h38m, 4h32m, 16h49m, 39h20m | Yes (14/14) |
Every lock over 9 minutes dropped the output. None of the five under 2 minutes did. I've got nothing between 2 and 9 minutes, so I don't know where the line sits.
One caveat on that table. It tracks output loss, read from the journal afterwards. It isn't a record of input dying. I only saw dead input on the times I came back and tried to type. The 13m13s row is the one with the trace above.
13 of the 15 clusters land on the same second as the FRL link training failed warning. Two don't, so that warning travels with these wakes but isn't required.
I couldn't force it on a short timescale. 80 seconds of hl.dsp.dpms({ action = "disable" }) never dropped the output, and focus was fine after. I haven't tried a longer forced one.
Upstream
Hyprland discussion #15554 is the same thing on a sole monitor. Same FALLBACK round trip, same activewindow>>,, same workspace switch to recover. It was closed with a Lua workaround after this reply:
I don't think we enforce focus on monitor addition to not disrupt current state. With lua I think the workaround is totally reasonable
Reading that, I don't expect a fix upstream. Omarchy's idle lock is what puts the display into the state that leads to the round trip, so this felt like the right place to raise it.
One thing worth flagging: focus is already gone at 12:56:14, before I authenticate. The unlock isn't losing it. It hands back a session that already has nothing focused. Whether the lock matters at all, I haven't tested.
Possibly related, same FALLBACK and output loss pattern: #7811 (similar dead keyboard input after lid-open resume), #7380 (shell crashes on FALLBACK removal at wake, mine survives), #8580 and #8946 (monitors dropping HPD after DPMS off).
Happy to help
Could I put a PR together for this? I was thinking a monitor.added handler that re-asserts focus when a FALLBACK migration just happened, along the lines of the Lua workaround above. Happy to go another way if you'd rather 🤔
Reproduced on a VM running Hyprland 0.56.2 with Omarchy's quattro config, no NVIDIA involved. Disabling the only monitor and bringing it back with hyprctl reload gives the same socket sequence as your trace: activewindow>>, as everything moves to FALLBACK, then no activewindow event once the monitor returns. Keys typed with wtype never reach the focused foot, and a workspace switch brings input back. With the Omarchy lock up across the round trip it matches your dump exactly: after unlocking, hyprctl activewindow names foot with focusHistoryID: 0, and the keys still go nowhere.
So the lock is not required, and the GPU's part is only that it drops the link. Any trip of the only monitor through FALLBACK leaves keyboard focus empty, and nothing on quattro puts it back.
Your #9209 is the open fix and closes this issue, so it is reviewed as its own item rather than here. One measurement for that review, from the same VM: focusing the returned workspace's last_window directly, one timer turn after monitor.added, restores input both locked and unlocked, without hopping through another workspace.
Checked by Claude Opus 5.5, with Codex at medium effort as a second opinion; Codex read Hyprland 0.56.2's source and agreed with the mechanism, though its independence from the first review is not guaranteed. This now waits on the maintainer, through #9209.
Same symptom here, but with no monitor fallback at all, so #9209 does not cover it.
Environment
- Omarchy
4.5.0-3, Hyprland0.56.2-4, quickshell0.3.2.r7.g2b4501a-1 - Single Intel i915 output
DP-1(3840x2160, scale 1.6), no suspend, uptime 5 days - Workspace 1 is in Omarchy's floating-workspace mode
- Koi Screensaver, io.github.ejuro.koi-screensaver
Timeline
17:31:55 idle: idle-monitor: active
17:32:02 owed: policy pause=1 reason=dpms-off
17:32:08 omarchy: locked
17:32:16 omarchy: PAM password auth succeeded -> unlocked
... typing into the focused window does nothing
No monitorremoved/monitoradded, no FALLBACK in the Hyprland log (0 occurrences for the whole boot), and no i915/DRM link events in the kernel log. The display was only DPMS-blanked; the output never left. Panel and cursor were back before the password prompt was answered, so this is not the 17:32 wake path either.
Mechanism
Hyprland 0.56.2, unlock path: CSessionLockManager calls g_pInputManager->refocus() (src/managers/SessionLockManager.cpp:84 / :236), which is mouseMoveUnified(0, /*refocus=*/true), i.e. "re-run a pointer move at the current cursor position".
In mouseMoveUnified (src/managers/input/InputManager.cpp) keyboard focus is only reassigned when a client window is under the pointer:
if (pFoundWindow) {
...
if (g_pSeatManager->m_state.keyboardFocus == nullptr)
Desktop::focusState()->rawWindowFocus(pFoundWindow, FOCUS_REASON, foundSurface);
}
If the pointer is over a layer surface with KEYBOARD_INTERACTIVITY_NONE - omarchy-background (full screen, WlrLayer.Background), omarchy-bar, omarchy-dock, omarchy-notifications - the else branch skips focus-on-layer for NONE, and since the session-lock surface (exclusive keyboard interactivity) is already destroyed, seat keyboard focus stays nullptr.
focusState()->window() is untouched, so the window keeps its focus border, the bar keeps naming it, and hyprctl activewindow still reports it - while no client receives keys. That matches the "looks focused but types nowhere" observation exactly.
It then cannot heal on its own, because the workspace is in Omarchy's floating mode, where default/hypr/workspace-modes.lua sets input:follow_mouse = 0. With follow_mouse=0 the pointer-move path returns before any refocus, so moving the cursor over the window does not restore input. Only a click, or a workspace/window keybind, assigns focus - which is why "click another window, click back" and SUPER+2 then SUPER+1 both work.
So this is the same user-visible symptom as the issue, but a different trigger: not the sole output round-tripping through FALLBACK, just the cursor not being over a client window at the moment the lock is released.
Reproduction
- Focus a window on a floating workspace.
- Move the pointer to empty desktop, or onto the bar/dock.
- Lock, unlock without moving the pointer, type -> nothing.
- Move the pointer onto the window -> still nothing. Click -> typing works.
- Repeat with the pointer left on the window before locking -> typing works immediately after unlock.
Fix direction
CInputManager::refocusLastWindow() already contains exactly the missing fallback: if no keyboard-focusable surface is under the pointer and focusState()->window() is visible on that monitor, it calls full window focus on the last focused window. The session-lock unlock path calls plain refocus() instead.
Minimal upstream fix: either call refocusLastWindow(monitor) on unlock, or after refocus() check g_pSeatManager->m_state.keyboardFocus == nullptr and focus focusState()->window().
If the fix ends up living in monitor-focus.lua, it needs a pointer-independent post-unlock refocus as well, otherwise only the FALLBACK occurrences are handled and this variant stays.
@salmun-nister I reproduced your no-FALLBACK case on an Omarchy ISO worker running current quattro (b20d7876f5ec6a45d18b9e4383dc4b6d9e8492ab) and Hyprland 0.57.2, with one virtual output. Neither NVIDIA nor a long idle is needed for this variant.
A foot window ran cat into a file so keyboard delivery could be checked directly. On a floating workspace, locking and unlocking with the pointer over the desktop lost input in both runs, while hyprctl activewindow still named foot. Leaving the pointer over foot instead preserved input. Moving the pointer onto the window after the failure did not recover input with follow_mouse=0; explicitly focusing that same window did. Each lock/unlock run checked that the session lock became secure and was released after authentication. A socket trace from an additional run contained no monitor-added, monitor-removed or FALLBACK event. The layer dump placed the pointer over the desktop background; its source declares no keyboard interactivity. With mouse-follow enabled, moving onto the window restored typing; enabling the setting without moving did not. No screensaver was started.
The source matches that distinction: Hyprland's unlock handler calls refocus(), which re-evaluates the surface under the pointer. The input path can restore keyboard focus for a client window, but has no corresponding fallback when the pointer is over a layer that does not accept keyboard input. Floating mode then prevents ordinary pointer motion from repairing it. This source path also exists in 0.56.2.
#9209 only reacts to monitor events, so it cannot fix this occurrence. The correction needs to restore application focus after the compositor releases the lock, while preserving legitimate keyboard focus on interactive layers. A blanket delayed focus dispatch from Omarchy would not distinguish those cases. No patch was pushed; this remains open for the maintainer to decide how to carry the compositor correction or an Omarchy workaround.
Checked by Codex High, with second opinions from Opus 5.5 High and muse-wonder via pi (thinking high). Both agreed with the mechanism; independence is not guaranteed because they received the same diagnosis and logs.