evidence · 7.0 KiB

README.md

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

Open raw source

Drawer scroll: CPU profile, fixes and re-measurement

Evidence class: board, injected native touch. All captures were taken on 2026-10-22 on the board’s DSI panel in landscape: 1232x568 logical pixels, 52.19 Hz (19.16 ms per refresh), max_render_time 12, one online CPU, 19 apps installed. A persistent uinput touchscreen drove the drawer, sending one report every 8.14 ms. There was no real glass and no camera.

The workload is the committed drawer-scroll.py. It alternates flicks, slow drags and reversals, with sleep pacing. Builds are named by store prefix (nixos-system-nixos-26.11.20260919.20b1ddd):

BuildContentsHow it ran
8xkkpma4baseline (master 582dcc60)installed
c702z5mztext-measure cache, whole-pixel grid blit, band repaint, one touch-move per contactswitch-to-configuration test
z1basiwias above, plus drawer motion drawn on the frame callback, cached sheet and band-only surface damageswitch-to-configuration test

CPU flamegraphs

Captured with tools/board-profile.py. The tool records 30 s of perf record -e cpu-clock -F 199 --call-graph dwarf,65528 on the main processes of shell-ui and shell, while the workload runs. Stacks resolve from _start through Rust, pango, cairo and pixman. Each directory holds flamegraph.svg (open the file directly to zoom), folded.txt, summary.json and capture.log. The capture log has the PIDs and start times; no unit restarted.

ProfileBuildSampled CPU, client / swayHottest client frames
before8xkkpma48,794 / 2,930 msbits_image_fetch_bilinear_no_repeat_8888 27.5% self (grid blit at a fractional offset); theme_ui::chooser_layout about 35% inclusive (pango re-shaping on every draw)
after1c702z5mz4,045 / 4,015 mssheet gradient fill (combine_over_u) and grid OVER blit, each about 30% of client samples
after2z1basiwi2,121 / 3,925 msgrid OVER blit 34% self; full-frame buffer copy 11%; chrome text laid out under the band clip about 10%

In after2, sway is the larger consumer. Its main costs are k230_turn_copy_rect (29% of its samples), rvv_composite_over_8888_0565 (28%) and k230_rgb565_blit (16%). In that capture, curl (251 ms) was a child process of the shell.

Unprofiled timing

Each run used the same workload with no sampler attached. Columns:

RunBuildRender median / p95 / maxPresented fps (distinct)Presented interval median / p95Commits per presented frameCallback → commit medianshell-ui / shell CPU
run3 (baseline)8xkkpma439.5 / 53.4 / 75.8 ms8.298 / 115 ms1.1257 ms17.6 / 6.0 s
after1c702z5mz9.0 / 15.7 / 18.2 ms16.534 / 62 ms2.0419 ms8.9 / 8.4 s
after2z1basiwi6.3 / 9.0 / 24.8 ms20.138 / 39 ms1.008 ms4.4 / 8.2 s
after3z1basiwi6.3 / 8.3 / 10.0 ms19.938 / 39 ms1.008 ms4.3 / 8.1 s

Why presentation stays at two refreshes

On z1basiwi, presented frames arrive every 38.3 ms, which is two panel refreshes. Two diagnostics located the limit.

So the drawer client now renders in about 6 ms and is no longer what limits the frame rate. The compositor’s repaint caps drawer scroll at about 26 fps, and with the gesture pauses about 20 fps was measured. The ~20 ms render target is met on this workload. Presentation still misses the 33.334 ms card tracking budget (38.3 ms intervals). Raising it needs compositor-side work, which this change leaves out.

Grim checks

Each run’s workload took drawer-open, mid-scroll and after-close captures on the board. They are not committed. The z1basiwi mid-scroll capture shows the search chrome intact and the grid scrolled, with no seams at the band edges. The drawer closed normally after every run.

Limits

Promotion to the boot default

On 2026-10-22 at 05:42Z, z1basiwi replaced 8xkkpma4 as the persistent system. The kernel, initrd and DTBs are identical between the two builds. promote.py ran as root under the board lock. It:

An SSH-initiated reboot then booted z1basiwi as /run/booted-system, with shell and shell-ui active and no failed units. See the receipt, boot ID 98601ab7….

A 30 s drawer-scroll run on that ordinary boot (run-boot) measured:

Its mid-scroll grim capture was clean. Rollback: write the copies under /var/lib/k230/drawer-promote-20261022/promotion/rollback/ back to /boot, then run nix-env --profile /nix/var/nix/profiles/system --set with the previous system.