Repository navigation
Description
What happened
Resuming from suspend with the session already locked sometimes brings up the
Omarchy lock screen with its password field already populated — a short run of
characters I did not type. Authentication then fails on the first attempt,
because the real password is appended to whatever is already in the buffer.
What I expected
The password field to be empty on every wake, as it is on a fresh lock.
Steps to reproduce
- Lock the session (
omarchy system lock, or let it idle-lock). - Suspend, and leave the machine suspended for a while.
- Resume and look at the password field before typing.
It is intermittent, not every wake.
The Omarchy part
resetAuthenticationState() in shell/plugins/lock/Service.qml:116 clears
enteredPassword. It is called from exactly three places:
beginLock()(:134)finishUnlock()(:155)- the unlock branch of
onLockStateChanged(:259)
All three are lock/unlock transitions. Nothing resets the buffer across a
suspend/resume boundary, so a lock screen that was already up before suspend
keeps whatever the input layer delivered while it was down.
The plugin has no PrepareForSleep handler, but it is not unaware of resume
elsewhere — idleBlankTimer (:418) explicitly compensates for a countdown
frozen by suspend by checking wall-clock drift:
// A countdown frozen by suspend fires right after resume, which would
// blank the freshly woken unlock screen under the user. Wall-clock time
// exposes the gap: take a fresh run-up instead of blanking.
if (Date.now() - armedAt > interval + 2000) {The same resume boundary that gets special handling for blanking gets none for
authentication state.
There is a mild credential angle too: if a partly-typed real password is in the
field when the machine suspends, it survives the suspend and is still there on
wake, rather than being discarded.
What I have not established
- The source of the characters is unconfirmed. My guess is the built-in
i8042 keyboard (AT Translated Set 2 keyboard) flushing latched scancodes
when S3 re-powers the controller. A Logi Bolt receiver (046D:C548) that also
exposes a keyboard interface is not ruled out. I have not captured
libinput debug-eventsacross a resume to name the device. - Whether a reset on resume is sufficient. If the characters are delivered
shortly after resume rather than buffered from before it, a reset fired on
the resume signal could race them and clear too early. Ordering would need
checking before settling on a fix.
So the report I am confident in is the narrow one: the auth buffer is never
cleared at the suspend/resume boundary. Whether that fully explains the symptom
is a separate question.
Relevant local context
This machine is pinned to S3 (MemorySleepMode=deep) as a workaround for
#7788. S3 powers down USB and the i8042 controller where s2idle did not, and
the phantom characters appeared after that change — so anyone trying to
reproduce this on s2idle may not see it.
Workaround
Esc or Ctrl+U clears the field (LockView.qml:177 Keys.onPressed).
System details
- Omarchy 4.0.0-1, Hyprland 0.56.2-1, quickshell-git 0.3.0.r20.g28771c7-2
- Kernel 7.1.8-arch1-3
- ASUS Zenbook UX8402ZE (Zenbook Pro 14 Duo)
- Intel Core i9-12900H (Alder Lake), Iris Xe i915 + NVIDIA RTX 3050 Ti Mobile
/sys/power/mem_sleep=s2idle [deep]pacman -Qkk omarchy: 1628 total files, 0 altered files- No lock plugin override in
~/.config/omarchy/
Related: #7788 (the S3 workaround this appeared downstream of), #6925 (a
different failure in the same auth-state area, closed not-planned).
Filed by Claude Opus 5 via Claude Code.
Activity
berndb commentedon Aug 22, 2026
Possibly related: #7805 / PR #7806 — same symptom (password field pre-filled with masked dots on wake, first auth attempt fails), but reproduced without any suspend involved, on a desktop that merely DPMS-blanks the lock screen.
The mechanism there turned out to be the wake keypress itself: the key is delivered to the password field (
key_press_enables_dpmspasses it through), the DPMS wake modeset stalls the compositor for seconds on slow-to-wake displays, so the key's release arrives late — and since Wayland key repeat is client-side, theTextInputtypes the held character at the repeat rate for the whole stall. Deterministic there: lock, wait for the blank, tap one letter key briefly → a pile of dots. Waking with Shift leaves the field empty.That suggests a cheap differential test for your intermittent case, since the masking hides whether the buffer holds one repeated character or genuinely distinct ones: after resume, wake with Shift (or the mouse) instead of a character key.
libinput debug-eventsacross a resume.The two fixes are complementary either way: auto-repeat filtering does nothing against discrete replayed scancodes (they carry no repeat flag), and a reset at the resume boundary does nothing for the no-suspend blank/wake path. Your narrow finding — that
resetAuthenticationState()is never called across suspend/resume — looks valid independent of which source fills the buffer, including the credential angle of a half-typed password surviving suspend.brightwalker25 commentedon Aug 27, 2026
Ok thanks for the clarification
jmmon commentedon Sep 29, 2026
Confirmed on s2idle, and it is purely a buffer-preservation bug — no phantom input
Reproduced on a Dell XPS 15 9530, Omarchy
4.0.0.r1832.g23dab9e-1, Hyprland0.56.2, quickshell 0.3.1, kernel
7.2.5-3-omarchy, external ViewSonic VG3448on DisplayPort.
/sys/power/mem_sleep=s2idle(not the deep/S3 pin from#7788).
Method: left 3 Space characters in the field as a marker, suspended 157.6s, and
compared field length across the boundary using a wall-clock heartbeat in the
plugin (suspend freezes the QML event loop, so the first tick after resume
reports the gap).
lock-requesteddoes not appear between the marker and the resume, andneither does a view teardown — so
beginLock()/resetAuthenticationState()never ran. The buffer crossed the suspend boundary untouched. That is the
narrow claim in this issue, reproduced.
The phantom characters did not appear on s2idle
Field was exactly 3 after resume, not 3+N. No keys were injected by the resume.
This machine does have the
AT Translated Set 2 keyboardyou suspected, buton
s2idlethe controller is not powered down, so there is nothing to flush.So the two halves of this report separate cleanly on this hardware:
actual defect
that S3 is what makes it appear
Implications for a fix
Since the characters are not being injected here, a reset fired on the resume
signal has nothing to race on
s2idle— but on an S3 machine it still might,and this run cannot speak to that. Ordering still needs checking before
settling on the fix, as you said.
One guard already exists and behaved correctly, worth keeping: the blank timer
fired 1ms after resume with
elapsedMs=170750and took a fresh run-up ratherthan blanking the freshly woken screen.
Separate observation: omarchy-sleep-lock.service failed
Retried 5 times during the suspend. Unrelated to the buffer, but it is erroring
on this machine.
Side note: this repro needs a fallback monitor rule
Locking with the external display in External-Only mode and then unplugging it
leaves the built-in panel black — the lock surface has nowhere to draw:
Worth knowing for anyone trying to reproduce this on a laptop: after the resume
there is no visible lock screen to inspect.
brightwalker25 commentedon Sep 29, 2026
@jmmon Thank you for taking the time to reproduce this so thoroughly. It is very helpful to know that the buffer survives suspend on s2idle as well, and that the phantom characters did not appear there. That supports the idea that they come from S3 on my machine and are a separate problem. Thank you also for the notes on
omarchy-sleep-lock.serviceand the fallback monitor rule.