Repository navigation
Drop key auto-repeat in the lock screen password field - #7806
Conversation
There was a problem hiding this comment.
Pull request overview
Prevents lock-screen password flooding by ignoring auto-repeat events except Backspace and Delete.
Changes:
- Filters repeated password-field key events.
- Adds a Quickshell fixture and shell test for the repeat policy.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
shell/plugins/lock/LockView.qml |
Filters unwanted auto-repeat events. |
test/shell.d/lock-autorepeat-test.sh |
Runs the lock repeat-policy test. |
test/shell.d/fixtures/lock-autorepeat/shell.qml |
Verifies dropped and retained keys. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Found this same problem on my HP Probook 14 yesterday. Ditched my own proposed fix in favor of this one, I had not bothered to allow for backspace, etc.. Merged and tested on my hp with devlink. |
|
Confirmed the underlying failure and this fix on another slow dual-DisplayPort setup:
With both outputs DPMS-off at the lock screen, one physical Space press woke them but left about seven dots in the password field. A temporary lock-service harness recorded repeated Applying this PR's One optional UX extension: many lock screens treat the first key after DPMS blank as wake-only. I locally tested a small state handoff where Scope correction (2026-08-28): The auto-repeat evidence above establishes the password-field flooding mechanism only. It does not establish why the physical displays can briefly show the lock prompt and then go black again. On this same machine, that display symptom persisted after the input filter was applied. The lock plugin independently starts a hardcoded 5-second blank timer on wake, and slow DisplayPort link training may consume most or all of that window; this is being tested separately against #7399. Please treat the input filter in this PR as an independent, still-confirmed fix. |
|
Reviewed and reproduced; nothing found that needs changing. Reproduction, on a disposable Omarchy worker (stock ISO desktop, Hyprland, the shell linked to the tree under test), with this branch merged onto current
On this branch, typing eight characters and then holding Backspace emptied the field, so repeat-to-clear still works. Tests on the worker: the lock shell tests ( Second opinion: Codex Medium reviewed the diff and the merge with current Related: #9211 and #11858 also change this This now waits on the maintainer. |
|
Full data is on #7805 — posting here so the measurements are visible from the PR. Independent hardware to the report: Dell XPS 15 9530 (i915) → USB-C dock → VG3448 at One mechanism detail I'd suggest adding to the description, since it's the premise the 0.0ms pressed autoRepeat=false textLen 0→1 25ms is Qt's client-side repeat rate exactly, so the repeats are generated by On the leftover "1 is not 0": #11858 and #9211 both swallow the wake key and both are |
Upstream omacom#7158 and omacom#7806 added probe classification, attempt pacing and backoff, the reach timeout, the sleep watcher, the unavailable state and auto-repeat dropping in the password field. The harness now drives them: - on a real lock, the fprintd-list stub answers unknown, yes, no and a two-reader answer, and new PAM fixtures stand in for the reader: one that only sends an error message (nologin), one that prompts and waits, one that never answers. Probe and attempt streaks build to the unavailable report, a prompt clears it, user input shortens the probe backoff, and stalling the event loop past the watcher interval plays a suspend with an attempt in flight. - crafted attempt state covers the fast-error window, the resume grace, retry nudges and restarts, as the upstream service fixture does. - real held keys on the lock surface: a held letter types once, held Backspace and Delete keep erasing. - helper commands run through a queue, so a fixture swap or stub flip is never dropped while the previous one is reaped. Requirement-level witnesses for SW-REQ-261004-V813, -296X and -VVN2 sit next to their assertions; the structurally impossible violation rows are dispositioned defensive, citing new spec-conformance reviews.
Fixes #7805.
Waking a DPMS-blanked lock screen with a keypress can stall the compositor for seconds while slow displays modeset (Apple Studio Display: 2–4 s). The wake key's release only reaches the lock surface after the stall, and since Wayland key repeat is client-side, the password
TextInputtypes the held character at the repeat rate for the whole stall — leaving the field pre-filled with dozens of masked dots. Enter then fails and the user has to clear and retype (details and journal evidence in the issue).A held key has no legitimate role in typing a password, so the field now drops auto-repeat key events. Backspace and Delete keep repeating, so holding Backspace to clear the field still works. Escape and Ctrl+U continue to clear in one stroke.
Verified on the affected machine: locking, letting the screen blank, and briefly tapping a letter key reproduces the flood deterministically without this change, and waking with Shift leaves the field empty — confirming the pile is client-side repeat of the wake key.
Tests: new
test/shell.d/lock-autorepeat-test.shcovers the repeat policy via a LockView fixture (character/Return/Escape repeats dropped, Backspace/Delete kept)../test/allrun against a live compositor: all lock tests pass; the only failing files (config, runtime-smoke, snapper, unowned-system-paths) fail identically on unmodifiedquattroon this machine, so they are pre-existing and unrelated.