evidence · 6.1 KiB

README.md

Committed at docs/evidence/interaction-jank/keyboard/README.md. This is what grounds the requirements that cite it.

Open raw source

On-screen keyboard show, type, hold/reverse and hide on the installed board: budget missed

Evidence class: board, injected native touch. A persistent uinput touchscreen sent one report every 8.14 ms, the measured real-finger rate. There was no real-glass interaction and no camera recording. The board ran system /nix/store/8xkkpma4fvgw4fi6pl8qaz7d9d75kcdi-nixos-system-nixos-26.11.20260919.20b1ddd on 2026-10-22, with DSI-1 in landscape (1232x568, transform 270) and max_render_time 12. One CPU was online. The installed keyboard is 240 px tall (SWAY_K230_KEYBOARD_HEIGHT=240), with a 56 px grip band above it.

The instrumentation is the installed compositor’s own benchmark. While armed (swaymsg card_shell benchmark injected … benchmark-stop), sway logs the following for every output frame:

Its per-input latency rows cover card gestures only (card_shell_motion records an input only when the card shell is active). They are therefore absent here, and this report does not claim input-to-present latency for keyboard motion.

Workload

keyboard-cycles.py first opens an owned Foot window (k230.kbd.trial, running cat >/dev/null, so typed keys go nowhere). It then repeats eight cycles:

  1. Show: two contacts in the bottom 72 px, 40 ms and 200 px apart, swiped up 250 px over 400 ms, followed by an 800 ms settle.
  2. Type: three key taps, then a 400 ms pause.
  3. Hold and reverse: a grip drag 150 px down over 400 ms, held still for 300 ms, then dragged back up over 300 ms, followed by an 800 ms settle.
  4. Hide: a grip drag 260 px down over 350 ms, followed by a 1 s settle.

Afterwards the script closes the window and saves the shell and shell-keyboard journals. The command, run as root under the exclusive board lock, was:

flock -n /tmp/k230-board.lock "$PY" keyboard-cycles.py RUN_DIR "$SYSTEM" 8 --bench

The functional probe (probe1, one cycle, no benchmark) captured:

Replay either run with:

python3 analyze.py.txt bench1

analyze.py splits frames into windows by gesture. A window runs from one gesture’s first contact to the next gesture’s first contact. Within it, “contact” means a finger was down and “settle” covers the motion after release.

Results

bench1 ran 03:45:03–03:45:57Z and bench2 ran 03:46:52–03:47:46Z. Every frame was presented (592 and 588 rows), and the trial window was closed after each run.

Phase (bench1 / bench2)Presented interval medianp95Intervals over 33.334 msRender wall median / p95
Show, contact76.7 / 76.6 ms172.5 / 172.4 ms22/22, 24/2435.3 / 51.4, 33.3 / 51.2 ms
Show, settle57.5 / 57.5 ms76.7 / 95.8 ms63/66, 68/7141.8 / 55.3, 38.7 / 52.9 ms
Hold and reverse, contact38.3 / 38.3 ms57.5 / 57.5 ms162/171, 159/16523.0 / 29.8, 23.4 / 30.8 ms
Hold and reverse, settle38.3 / 38.3 ms57.5 / 57.5 ms32/35, 35/3624.6 / 33.0, 24.4 / 41.5 ms
Hide, contact38.3 / 38.3 ms38.3 / 38.3 ms63/63, 63/6321.1 / 28.8, 21.6 / 27.9 ms

Every moving phase misses the card frame budget (presented interval p95 33.334 ms or less, the frozen budget in card-shell frame budget).

Show and hide durations:

The typing rows are not a tracking measure: the window includes idle time between taps. Typing renders were short (median 2.3 ms), and key-tap acknowledgement was not timed separately.

What the frames cost

The benchmark’s own rows also go to the journal (about three per frame), so these runs carry that observer cost.

Limits

Owned board files (/var/lib/k230/kbd-jank) were removed. The trial window closed itself in every run.