Skip to content

LordOS — a free, fast and secure GNU/Linux distribution based on Debian, with its own desktop environment: display server and Wayland compositor in C, a React UI engine on QuickJS, and private native apps.

LordBench: pointer-to-screen latency in the desktop test (a synthetic 125 Hz pointer in lord-server on an eventfd, applied once per frame like a real mouse, each event timed to the presentation of the first frame showing it), lordos-sysreport bench (LordBench from a terminal, installed in /usr/lib/lordos/bin next to its helpers); the 0.5 ms compositor slice removed (measured alone it made no difference: the earlier numbers had given the slice to the load too), the desktop-under-load numbers re-measured with the compositor weight only (Pi 5 without monitor: 31-33 % -> 7-8 % late, pointer 32 -> 22 ms); docs, CHANGELOG, paper (en/es/pt), FAQ

Federico Pereiraf1b5e33511e1
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8fc7499..91b2ffc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -82,8 +82,21 @@ of the matching [GitHub release](https://github.com/lordbasex/LordOS/releases),
HEVC 4K 57 fps; H.264 encoder 75 fps. Quick takes 34 s, Full 339 s.
- **Desktop impact measured** on the Pi 5 with a 1920×1080 60 Hz monitor and GPU composition: alone 59.4 fps, frame
build 10.9 ms median and 13.0 ms p99, 1.0 % late; under the low-priority all-core load 24.0 fps, 20.1/29.3 ms,
- 96.5 % late. A stability problem found by LordBench; its cause and a first fix are under Fixed ("The desktop
- under load"). On VM 116 (headless, with a remote viewer)
+ 96.5 % late. A stability problem found by LordBench; its cause and the fix are under Fixed ("The desktop under
+ load").
+ - **Pointer to screen** (desktop test): a synthetic pointer in lord-server (`bench/lbinput.c`) plays a 125 Hz mouse
+ that moves the scene's window: each event is stamped when it is made and announced on an eventfd the main loop
+ polls like an input device, the main loop applies the newest position once per frame as it does with a real
+ mouse, and each event's latency ends when the first frame showing it is presented (`bench/lbframes.c`). Median
+ and 99th percentile alone and under load (`comp.in50/in99`, `desk.in50/in99`); the verdict warns above three
+ refresh periods. It measures lord-server's part, not the mouse's; the positions only move LordBench's own window.
+ VM 116 without a monitor: 14.6/25.2 ms alone, 15.1/30.9 ms under load. Pi 5 without a monitor: about 16/27 ms
+ alone, 22/52 ms under load.
+ - **`lordos-sysreport bench [--quick | --full] [--json]`**: LordBench from a terminal, over SSH or in CI, through
+ lord-server's own code (`bench/lbrun.c`): the same guards, helpers and result file, which System Information then
+ shows. `lordos-sysreport` is now installed in `/usr/lib/lordos/bin` with `/usr/bin/lordos-sysreport` and
+ `lordos-fetch` as links (`tools/iso/mkdeb.sh`), because the helpers are only started from next to their own
+ binary. A quick run took 39 s on VM 116. On VM 116 (headless, with a remote viewer)
59.6 fps alone, p99 13.3 ms; p99 22.9 ms and 12.5 % late under load.
- **Boot measured:** the Pi 5 reaches the login screen on its monitor 5.99 s after the kernel starts (systemd: 2.1 s
kernel + 4.2 s userspace).
@@ -91,10 +104,11 @@ of the matching [GitHub release](https://github.com/lordbasex/LordOS/releases),
device, so LordBench's stop on throttling can't fire there (the under-voltage alarm is read); the sustained curve
and the temperature are the evidence instead.
- **Tests:** `tests/lordbench_test.c` (records, workloads, fake sysfs trees of an x86 laptop and a Pi 5, boot
- history, the frame recorder, the video records, the boot test state file) and `tests/sysinfo_perf_test.mjs` (40
- checks, with the desktop verdict and the video category).
- - **Not built yet:** input latency, hardware video decoding, the layout/paint/shaping workloads, the helper-sandbox
- self-test inside `lord-bench`, the x86 PC reference and `lordos-sysreport bench`.
+ history, the frame recorder and its pointer latency, the synthetic pointer's thread and eventfd, the video
+ records, the boot test state file; 973 checks) and `tests/sysinfo_perf_test.mjs` (43 checks, with the desktop
+ verdict, the pointer latency notes and the video category).
+ - **Not built yet:** hardware video decoding, the layout/paint/shaping workloads, the helper-sandbox self-test
+ inside `lord-bench` and the x86 PC reference.
- **Flatpak and Flathub design review, kept for the future** (`docs/FLATPAK.md`, no code; the maintainer decided on
2026-10-27 not to implement Flatpak for now, to keep the system stable, and it is not planned for any release): a
launcher-owned scope per Flatpak app so the
@@ -107,17 +121,16 @@ of the matching [GitHub release](https://github.com/lordbasex/LordOS/releases),
- **The desktop under load** (found by LordBench's desktop test; `docs/BENCHMARK.md`, "The desktop under load"): the
compositor's cgroup (`server`) had the same `cpu.weight` as every app scope, and nice values don't count between
cgroups, so an app keeping every core busy took half of the compositor's CPU even at nice 19. On a Raspberry Pi 5
- the compositor's main thread waited 299 ms per second for a CPU under load (17 ms alone). Now:
- - lord-sessiond gives the session's `server` leaf `cpu.weight` 1000 (apps and helpers keep 100), in the root-owned
- subtree it already manages (`CG_SERVER_CPU_WEIGHT`, `sec/cgroup.c`);
- - the compositor's main thread and paint threads ask for a 0.5 ms time slice (`par_short_slice`, `par.c`; EEVDF's
- custom slice, Linux 6.12+, unprivileged, not inherited by what they start).
-
- LordBench's desktop test under load, without a monitor: on the Pi 5 34.6 → 47.6 frames per second, p50 20.7 →
- 14.0 ms, late frames 61 % → 23 %; on VM 116 8.6–17.5 % → 4.5–6.9 % late. Nothing changes without load. Checked on
- VM 116 that a new session gets the weight and that only those threads get the slice. Not yet measured with the
- Pi's monitor and GPU composition. What remains (the Pi kernel's 4 ms scheduler tick, a real-time priority for
- the compositor) is described there and not built.
+ the compositor's main thread waited 299 ms per second for a CPU under load (17 ms alone). Now lord-sessiond gives
+ the session's `server` leaf `cpu.weight` 1000 (apps and helpers keep 100), in the root-owned subtree it already
+ manages (`CG_SERVER_CPU_WEIGHT`, `sec/cgroup.c`). LordBench's desktop test under load on the Pi 5 without its
+ monitor, two runs each: 43–45 → 56–57 frames per second, late frames 31–33 % → 7–8 %, pointer to screen 32–33 →
+ 22 ms median and 67–75 → 52–53 ms for the slowest 1 %; nothing changes without load. Checked on VM 116 that a new
+ session gets the weight. Not yet measured with the Pi's monitor and GPU composition. A 0.5 ms scheduler time slice
+ for the compositor's threads was also tried (it was in the previous commit) and removed: measured alone, it made no
+ difference; its first numbers had been inflated because the test tool also gave the slice to the load. What
+ remains (the Pi kernel's 4 ms scheduler tick, a real-time priority for the compositor) is described there and not
+ built.
- **LordBench on the Raspberry Pi 5 measured no GPU:** inside `lord-bench`'s sandbox Mesa's loader could not identify
the V3D render node ("failed to retrieve device information") and every GPU measurement was skipped. The sandbox
now also allows reading `/sys/firmware/devicetree` and `/dev/dri` (read-only; the GPU is still reached only
diff --git a/apps/sysinfo/perf.js b/apps/sysinfo/perf.js
index 8553258..896a57b 100644
--- a/apps/sysinfo/perf.js
+++ b/apps/sysinfo/perf.js
@@ -17,11 +17,12 @@ export const CATEGORIES = [
// the desktop run (mode 'desktop'): the compositor alone, then with every core loaded at the lowest priority
export const DESKTOP_CATEGORIES = [
- { id: 'compositor', ids: ['comp.fps', 'comp.p50', 'comp.p99', 'comp.missed'] },
- { id: 'desktop', ids: ['desk.fps', 'desk.p50', 'desk.p99', 'desk.missed', 'desk.work'] },
+ { id: 'compositor', ids: ['comp.fps', 'comp.p50', 'comp.p99', 'comp.missed', 'comp.in50', 'comp.in99'] },
+ { id: 'desktop', ids: ['desk.fps', 'desk.p50', 'desk.p99', 'desk.missed', 'desk.in50', 'desk.in99', 'desk.work'] },
];
export const MISSED_WARN = 5; // % of frames shown late before the verdict warns
export const MISSED_FAIL = 25;
+export const INPUT_WARN_FRAMES = 3; // pointer-to-screen p99 above this many refresh periods warns
export { REFERENCES };
@@ -100,6 +101,12 @@ export function desktopVerdict(res) {
else notes.push({ id: `${phase}Fits`, vars });
if (missed && missed.value > MISSED_FAIL) { notes.push({ id: `${phase}MissedMany`, vars }); worse('fail'); }
else if (missed && missed.value > MISSED_WARN) { notes.push({ id: `${phase}Missed`, vars }); worse('warn'); }
+ const in50 = r[`${phase}.in50`], in99 = r[`${phase}.in99`];
+ if (in50 && in99) { // the synthetic pointer (bench/lbinput.h)
+ const ivars = { in50: in50.value, in99: in99.value };
+ if (in99.value > budget * INPUT_WARN_FRAMES) { notes.push({ id: `${phase}InputSlow`, vars: ivars }); worse('warn'); }
+ else notes.push({ id: `${phase}InputOk`, vars: ivars });
+ }
}
return { state, notes };
}
diff --git a/apps/sysinfo/performance.jsx b/apps/sysinfo/performance.jsx
index 899895d..afc5a5a 100644
--- a/apps/sysinfo/performance.jsx
+++ b/apps/sysinfo/performance.jsx
@@ -228,7 +228,7 @@ function Result({ res, report }) {
{desktop ? (
<GroupBox title={tr('sysinfo.perf.verdicts')} footer={tr('sysinfo.perf.deskFooter', { budget: formatNumber((res.frames && res.frames.budgetMs) || 0, 1) })}>
<Verdict label={tr('sysinfo.perf.v.desktop')} state={dv.state} states="deskState"
- detail={dv.notes.map((n) => tr(`sysinfo.perf.dnote.${n.id}`, { p99: formatNumber(n.vars.p99, 1), budget: formatNumber(n.vars.budget, 1), pct: formatNumber(n.vars.pct, 1) })).join(' ') || tr('sysinfo.perf.dnote.none')} />
+ detail={dv.notes.map((n) => tr(`sysinfo.perf.dnote.${n.id}`, Object.fromEntries(Object.entries(n.vars).map(([k, v]) => [k, formatNumber(v, 1)])))).join(' ') || tr('sysinfo.perf.dnote.none')} />
<Verdict label={tr('sysinfo.perf.v.stability')} state={stab.state}
detail={stab.notes.length ? stab.notes.map((n) => tr(`sysinfo.perf.note.${n.id}`, n.vars)).join(' ') : tr('sysinfo.perf.note.none')} />
</GroupBox>
diff --git a/assets/locales/en/sysinfo.json b/assets/locales/en/sysinfo.json
index 4724d02..a4f3bb2 100644
--- a/assets/locales/en/sysinfo.json
+++ b/assets/locales/en/sysinfo.json
@@ -279,7 +279,7 @@
"perf.conditions": "Conditions",
"perf.conditionsFooter": "What affects the numbers, recorded with every result. Results are compared only with the same LordBench version.",
"perf.critical": "critical at {v} °C",
- "perf.deskFooter": "How long the compositor takes to build each frame, against the refresh period of the display in use ({budget} ms). It passes when the 99th percentile fits that period and few frames come late.",
+ "perf.deskFooter": "How long the compositor takes to build each frame, against the refresh period of the display in use ({budget} ms), and how long a pointer move takes to reach the screen (a simulated mouse, 125 reports a second, moves the window; the mouse's own delay is not included). It passes when the 99th percentile fits that period and few frames come late.",
"perf.deskKeepStill": "A test window moves around the screen by itself, first alone and then with every core busy at the lowest priority. Leave the mouse and keyboard alone until it ends.",
"perf.deskState.fail": "Problems",
"perf.deskState.pass": "Smooth",
@@ -308,10 +308,14 @@
"perf.disk.usb": "USB drive",
"perf.disk.virtual": "Virtual disk",
"perf.dnote.compFits": "Alone, 99 % of the frames were built in {p99} ms or less, within the {budget} ms period.",
+ "perf.dnote.compInputOk": "Alone, a pointer move reached the screen in {in50} ms (median), {in99} ms for the slowest 1 %.",
+ "perf.dnote.compInputSlow": "Alone, the slowest 1 % of pointer moves took {in99} ms to reach the screen, more than three frames.",
"perf.dnote.compMissed": "Alone, {pct} % of the frames came late.",
"perf.dnote.compMissedMany": "Alone, {pct} % of the frames came late: the desktop stutters.",
"perf.dnote.compOver": "Alone, the slowest 1 % of the frames took {p99} ms, more than the {budget} ms period.",
"perf.dnote.deskFits": "Under load, 99 % of the frames were built in {p99} ms or less, within the period.",
+ "perf.dnote.deskInputOk": "Under load, a pointer move reached the screen in {in50} ms (median), {in99} ms for the slowest 1 %.",
+ "perf.dnote.deskInputSlow": "Under load, the slowest 1 % of pointer moves took {in99} ms to reach the screen, more than three frames: the pointer drags behind.",
"perf.dnote.deskMissed": "Under load, {pct} % of the frames came late.",
"perf.dnote.deskMissedMany": "Under load, {pct} % of the frames came late: the desktop stutters while something else works.",
"perf.dnote.deskOver": "Under load, the slowest 1 % of the frames took {p99} ms, more than the {budget} ms period.",
@@ -327,6 +331,8 @@
"perf.liveNo": "installed",
"perf.liveYes": "live session from the USB stick",
"perf.m.comp_fps": "Frames shown",
+ "perf.m.comp_in50": "Pointer to screen, median",
+ "perf.m.comp_in99": "Pointer to screen, slowest 1 %",
"perf.m.comp_missed": "Frames late",
"perf.m.comp_p50": "Time to build a frame, median",
"perf.m.comp_p99": "Time to build a frame, slowest 1 %",
@@ -339,6 +345,8 @@
"perf.m.cpu_xz_1": "Package decompression, one core",
"perf.m.cpu_xz_n": "Package decompression, all cores",
"perf.m.desk_fps": "Frames shown",
+ "perf.m.desk_in50": "Pointer to screen, median",
+ "perf.m.desk_in99": "Pointer to screen, slowest 1 %",
"perf.m.desk_missed": "Frames late",
"perf.m.desk_p50": "Time to build a frame, median",
"perf.m.desk_p99": "Time to build a frame, slowest 1 %",
diff --git a/assets/locales/es/sysinfo.json b/assets/locales/es/sysinfo.json
index 1b70882..bbb0a48 100644
--- a/assets/locales/es/sysinfo.json
+++ b/assets/locales/es/sysinfo.json
@@ -279,7 +279,7 @@
"perf.conditions": "Condiciones",
"perf.conditionsFooter": "Lo que afecta a los números, registrado con cada resultado. Solo se comparan resultados de la misma versión de LordBench.",
"perf.critical": "crítica a {v} °C",
- "perf.deskFooter": "Cuánto tarda el compositor en armar cada cuadro, frente al período de refresco de la pantalla en uso ({budget} ms). Aprueba cuando el percentil 99 entra en ese período y llegan pocos cuadros tarde.",
+ "perf.deskFooter": "Cuánto tarda el compositor en armar cada cuadro, frente al período de refresco de la pantalla en uso ({budget} ms), y cuánto tarda un movimiento del puntero en llegar a la pantalla (un mouse simulado, de 125 reportes por segundo, mueve la ventana; no incluye la demora del mouse en sí). Aprueba cuando el percentil 99 entra en ese período y llegan pocos cuadros tarde.",
"perf.deskKeepStill": "Una ventana de prueba se mueve sola por la pantalla, primero sola y después con todos los núcleos ocupados a la prioridad más baja. No uses el mouse ni el teclado hasta que termine.",
"perf.deskState.fail": "Con problemas",
"perf.deskState.pass": "Fluido",
@@ -308,10 +308,14 @@
"perf.disk.usb": "Unidad USB",
"perf.disk.virtual": "Disco virtual",
"perf.dnote.compFits": "Solo, el 99 % de los cuadros se armó en {p99} ms o menos, dentro del período de {budget} ms.",
+ "perf.dnote.compInputOk": "Solo, un movimiento del puntero llegó a la pantalla en {in50} ms (mediana) y en {in99} ms el 1 % más lento.",
+ "perf.dnote.compInputSlow": "Solo, el 1 % más lento de los movimientos del puntero tardó {in99} ms en llegar a la pantalla, más de tres cuadros.",
"perf.dnote.compMissed": "Solo, el {pct} % de los cuadros llegó tarde.",
"perf.dnote.compMissedMany": "Solo, el {pct} % de los cuadros llegó tarde: el escritorio se traba.",
"perf.dnote.compOver": "Solo, el 1 % más lento de los cuadros tardó {p99} ms, más que el período de {budget} ms.",
"perf.dnote.deskFits": "Con carga, el 99 % de los cuadros se armó en {p99} ms o menos, dentro del período.",
+ "perf.dnote.deskInputOk": "Con carga, un movimiento del puntero llegó a la pantalla en {in50} ms (mediana) y en {in99} ms el 1 % más lento.",
+ "perf.dnote.deskInputSlow": "Con carga, el 1 % más lento de los movimientos del puntero tardó {in99} ms en llegar a la pantalla, más de tres cuadros: el puntero se arrastra.",
"perf.dnote.deskMissed": "Con carga, el {pct} % de los cuadros llegó tarde.",
"perf.dnote.deskMissedMany": "Con carga, el {pct} % de los cuadros llegó tarde: el escritorio se traba mientras otra cosa trabaja.",
"perf.dnote.deskOver": "Con carga, el 1 % más lento de los cuadros tardó {p99} ms, más que el período de {budget} ms.",
@@ -327,6 +331,8 @@
"perf.liveNo": "instalado",
"perf.liveYes": "sesión live desde el pendrive",
"perf.m.comp_fps": "Cuadros mostrados",
+ "perf.m.comp_in50": "Del puntero a la pantalla, mediana",
+ "perf.m.comp_in99": "Del puntero a la pantalla, el 1 % más lento",
"perf.m.comp_missed": "Cuadros tarde",
"perf.m.comp_p50": "Tiempo para armar un cuadro, mediana",
"perf.m.comp_p99": "Tiempo para armar un cuadro, el 1 % más lento",
@@ -339,6 +345,8 @@
"perf.m.cpu_xz_1": "Descompresión de paquetes, un núcleo",
"perf.m.cpu_xz_n": "Descompresión de paquetes, todos los núcleos",
"perf.m.desk_fps": "Cuadros mostrados",
+ "perf.m.desk_in50": "Del puntero a la pantalla, mediana",
+ "perf.m.desk_in99": "Del puntero a la pantalla, el 1 % más lento",
"perf.m.desk_missed": "Cuadros tarde",
"perf.m.desk_p50": "Tiempo para armar un cuadro, mediana",
"perf.m.desk_p99": "Tiempo para armar un cuadro, el 1 % más lento",
diff --git a/assets/locales/pt/sysinfo.json b/assets/locales/pt/sysinfo.json
index 15d7bad..d6f0268 100644
--- a/assets/locales/pt/sysinfo.json
+++ b/assets/locales/pt/sysinfo.json
@@ -279,7 +279,7 @@
"perf.conditions": "Condições",
"perf.conditionsFooter": "O que afeta os números, registrado com cada resultado. Só se comparam resultados da mesma versão do LordBench.",
"perf.critical": "crítica a {v} °C",
- "perf.deskFooter": "Quanto o compositor demora para montar cada quadro, frente ao período de atualização da tela em uso ({budget} ms). Passa quando o percentil 99 cabe nesse período e poucos quadros chegam atrasados.",
+ "perf.deskFooter": "Quanto o compositor demora para montar cada quadro, frente ao período de atualização da tela em uso ({budget} ms), e quanto um movimento do ponteiro demora para chegar à tela (um mouse simulado, de 125 relatórios por segundo, move a janela; não inclui o atraso do próprio mouse). Passa quando o percentil 99 cabe nesse período e poucos quadros chegam atrasados.",
"perf.deskKeepStill": "Uma janela de teste se move sozinha pela tela, primeiro sozinha e depois com todos os núcleos ocupados na prioridade mais baixa. Não use o mouse nem o teclado até terminar.",
"perf.deskState.fail": "Com problemas",
"perf.deskState.pass": "Fluido",
@@ -308,10 +308,14 @@
"perf.disk.usb": "Unidade USB",
"perf.disk.virtual": "Disco virtual",
"perf.dnote.compFits": "Sozinho, 99 % dos quadros foram montados em {p99} ms ou menos, dentro do período de {budget} ms.",
+ "perf.dnote.compInputOk": "Sozinho, um movimento do ponteiro chegou à tela em {in50} ms (mediana) e em {in99} ms o 1 % mais lento.",
+ "perf.dnote.compInputSlow": "Sozinho, o 1 % mais lento dos movimentos do ponteiro levou {in99} ms para chegar à tela, mais de três quadros.",
"perf.dnote.compMissed": "Sozinho, {pct} % dos quadros chegaram atrasados.",
"perf.dnote.compMissedMany": "Sozinho, {pct} % dos quadros chegaram atrasados: a área de trabalho trava.",
"perf.dnote.compOver": "Sozinho, o 1 % mais lento dos quadros levou {p99} ms, mais que o período de {budget} ms.",
"perf.dnote.deskFits": "Com carga, 99 % dos quadros foram montados em {p99} ms ou menos, dentro do período.",
+ "perf.dnote.deskInputOk": "Com carga, um movimento do ponteiro chegou à tela em {in50} ms (mediana) e em {in99} ms o 1 % mais lento.",
+ "perf.dnote.deskInputSlow": "Com carga, o 1 % mais lento dos movimentos do ponteiro levou {in99} ms para chegar à tela, mais de três quadros: o ponteiro se arrasta.",
"perf.dnote.deskMissed": "Com carga, {pct} % dos quadros chegaram atrasados.",
"perf.dnote.deskMissedMany": "Com carga, {pct} % dos quadros chegaram atrasados: a área de trabalho trava enquanto outra coisa trabalha.",
"perf.dnote.deskOver": "Com carga, o 1 % mais lento dos quadros levou {p99} ms, mais que o período de {budget} ms.",
@@ -327,6 +331,8 @@
"perf.liveNo": "instalado",
"perf.liveYes": "sessão live a partir do pendrive",
"perf.m.comp_fps": "Quadros mostrados",
+ "perf.m.comp_in50": "Do ponteiro à tela, mediana",
+ "perf.m.comp_in99": "Do ponteiro à tela, o 1 % mais lento",
"perf.m.comp_missed": "Quadros atrasados",
"perf.m.comp_p50": "Tempo para montar um quadro, mediana",
"perf.m.comp_p99": "Tempo para montar um quadro, o 1 % mais lento",
@@ -339,6 +345,8 @@
"perf.m.cpu_xz_1": "Descompressão de pacotes, um núcleo",
"perf.m.cpu_xz_n": "Descompressão de pacotes, todos os núcleos",
"perf.m.desk_fps": "Quadros mostrados",
+ "perf.m.desk_in50": "Do ponteiro à tela, mediana",
+ "perf.m.desk_in99": "Do ponteiro à tela, o 1 % mais lento",
"perf.m.desk_missed": "Quadros atrasados",
"perf.m.desk_p50": "Tempo para montar um quadro, mediana",
"perf.m.desk_p99": "Tempo para montar um quadro, o 1 % mais lento",
diff --git a/docs/BENCHMARK.md b/docs/BENCHMARK.md
index 4be71ac..a899452 100644
--- a/docs/BENCHMARK.md
+++ b/docs/BENCHMARK.md
@@ -258,8 +258,18 @@ development package.
intervals between shown frames longer than 1.5 refresh periods; the load phase also gives the work the load
got done. The verdict compares the 99th percentile with the refresh period actually in use and warns above 5 %
late frames (problems above 25 %). Without a monitor the compositor draws only while someone watches (the
- remote desktop), so a headless session gives "skipped: too few frames" unless a viewer is connected. Input
- latency is not measured yet.
+ remote desktop), so a headless session gives "skipped: too few frames" unless a viewer is connected.
+- **Pointer to screen** (in both phases of the desktop test): the scene's window is moved by a **synthetic pointer**
+ (`bench/lbinput.c`), a thread of lord-server that plays a 125 Hz mouse: each event is stamped with the monotonic
+ clock when it is made, goes into a ring and is announced on an eventfd the main loop polls like an input device;
+ the main loop takes the newest position once per frame, as it does with a real mouse's motion, and moves the
+ window through the drag's path. Each event's latency ends at the presentation of the first frame that shows it or
+ a later position (`lbf_input`, `lbf_built`, `lbf_presented` in `bench/lbframes.c`); the results are the median and
+ the 99th percentile (`comp.in50/in99`, `desk.in50/in99`), and the verdict warns when the 99th percentile passes
+ three refresh periods. It measures lord-server's part (waking up, the frame, the flip), not the mouse, USB or the
+ kernel's; the positions only move LordBench's own window. Without the thread the scene moves by the clock and the
+ latency is "failed". On VM 116 without a monitor: 14.6 ms median and 25.2 ms p99 alone, 15.1 and 30.9 ms under
+ load; on the Pi 5 (no monitor): about 15.7 and 27 ms alone, 22 and 52 ms under load ("The desktop under load").
- **Boot time test** (Performance → Boot time, administrators): N boots in a row (3, 5 or 10). The closed admin
action `boot-test <n>` writes `/var/lib/lordos/boot-test` in a fixed format (`bench/boottest.c`) and the session
restarts as usual (its confirmation included). At each boot's first frame lord-sessiond records the boot with its
@@ -340,40 +350,39 @@ would do the same. Measured from `/proc/<pid>/task/*/schedstat` during the test
monitor, CPU composition): the compositor's main thread waited for a CPU 17 ms per second alone and **299 ms per
second** under the load (1.05 ms each time it woke up), and its three paint threads waited longer than they ran.
-**Changes.**
-
-- lord-sessiond gives the `server` leaf `cpu.weight` 1000 when it creates a session (`CG_SERVER_CPU_WEIGHT`,
- `sec/cgroup.c`); app scopes and helpers keep 100. Root writes it in the root-owned subtree it already manages; no
- new request or interface.
-- The compositor's main thread and its paint threads ask for a 0.5 ms time slice (`par_short_slice`, `par.c`:
- `sched_setattr` with EEVDF's custom slice, Linux 6.12+, unprivileged, ignored by older kernels), so they get the
- CPU back sooner when they wake up beside busy threads. `SCHED_FLAG_RESET_ON_FORK`: checked on both kernels that
- the processes and threads they start get the default slice again.
-
-**Measured**, LordBench's desktop test under load, the same structure as a real session (the compositor and the
-load in sibling cgroups; on the Pi with user scopes, since the installed session can't be changed without root):
-
-| Machine | Compositor | Frames shown | Build p50 | Build p99 | Late |
-|---|---|---|---|---|---|
-| Pi 5, no monitor (CPU composition) | before (weight 100) | 34.6 fps | 20.7 ms | 40.8 ms | 61 % |
-| | weight 1000 | 42.2 fps | 16.5 ms | 34.3 ms | 35 % |
-| | weight 1000 and 0.5 ms slice | 47.6 fps | 14.0 ms | 31.4 ms | 23–24 % |
-| VM 116 (8 vCPU) | before | 52–58 fps | 6.6–13.0 ms | 16.6–24.6 ms | 8.6–17.5 % |
-| | weight 1000 and 0.5 ms slice | 58.9–59.5 fps | 6.2–6.3 ms | 15.5–17.8 ms | 4.5–6.9 % |
-
-The load still got its work done (3.0–3.7 GFLOP/s on the Pi in every row). Without load nothing changes (59–60 fps).
-A weight of 10000 or a 0.1 ms slice did not do better than 1000 and 0.5 ms. Also tried and dropped: turning the
-paint threads off when the frame waits for them under load (its own measurement showed the threads still saved
-time, so it never acted). On VM 116 a session started by the new lord-sessiond has `cpu.weight` 1000 on `server`
-and the 0.5 ms slice on the main thread and its 7 paint threads only. **Not yet measured with the monitor and GPU
-composition on the Pi**, where the 24 fps above came from; that needs the new package installed.
-
-**What remains.** Under load the main thread still waits about 0.9 ms each time it wakes up, whatever the weight:
-when a thread of the load gets a CPU it keeps it until the next scheduler tick, which is 4 ms on the LordOS Pi kernel
-(`CONFIG_HZ=250`), and the shared memory makes each frame about 20 % slower to build. Two further steps, not built:
-the Pi kernel at `CONFIG_HZ=1000` (`tools/rpi/build-kernel.sh`, a rebuild), and a real-time priority for the
-compositor's main thread (`SCHED_RR`, as other desktops do through rtkit) granted by lord-sessiond with a CPU-time
-limit, which is a new privilege and needs the maintainer's approval first.
+**Change.** lord-sessiond gives the `server` leaf `cpu.weight` 1000 when it creates a session
+(`CG_SERVER_CPU_WEIGHT`, `sec/cgroup.c`); app scopes and helpers keep 100. Root writes it in the root-owned subtree
+it already manages; no new request or interface. Checked on VM 116: a session started by the new lord-sessiond has
+`cpu.weight` 1000 on `server` and 100 on its scopes.
+
+**Measured** with the final LordBench of this version (the scene moved by the synthetic pointer, so the pointer
+latency is measured too), under load, on the Pi 5 without its monitor (CPU composition), two runs each. The
+installed session can't be changed without root, so the test ran in a second session laid out the same way: the
+compositor and the load in sibling cgroups (user scopes), the weight set on the compositor's.
+
+| Compositor's weight | Frames shown | Build p50 | Build p99 | Late | Pointer to screen p50 | p99 |
+|---|---|---|---|---|---|---|
+| 100 (before) | 43.3–45.3 fps | 19.6–19.8 ms | 39.6–45.9 ms | 30.7–33.0 % | 31.8–33.3 ms | 66.8–75.3 ms |
+| 1000 | 56.4–56.9 fps | 12.4–12.6 ms | 28.6–33.4 ms | 7.3–8.3 % | 22.1–22.2 ms | 51.5–53.4 ms |
+
+Alone nothing changes (59.6–60 fps, about 0.2 % late, pointer to screen 15.5–15.8 ms median). The load still got
+2.7–3.4 GFLOP/s done. With the earlier scene (moved by the clock instead of the synthetic pointer) the same change
+took the Pi from 61 % to 35 % late frames, and VM 116 (8 vCPU) from 8.6–17.5 % to 5.6–9.0 % (p99 16.6–24.6 →
+16.4–17.5 ms). **Not yet measured with the monitor and GPU composition on the Pi**, where the 24 fps above came from;
+that needs the new package installed.
+
+**Tried and dropped.** A 0.5 ms time slice for the compositor's threads (EEVDF's custom slice, `sched_setattr`):
+it looked like a gain at first, but the tool that set it from outside also gave it to the load; set only on the
+compositor's threads, as lord-server would, it made no difference (8–10 % late with weight 1000, 28–33 % with 100).
+And turning the paint threads off when the frame waits for them under load: their own measurement showed they still
+saved time, so it never acted.
+
+**What remains.** Under load the main thread still waits about 0.9 ms each time it wakes up: when a thread of the
+load gets a CPU it keeps it until the next scheduler tick, 4 ms on the LordOS Pi kernel (`CONFIG_HZ=250`), and the
+shared memory makes each frame about 20 % slower to build. Two further steps, not built: the Pi kernel at
+`CONFIG_HZ=1000` (`tools/rpi/build-kernel.sh`, a rebuild), and a real-time priority for the compositor's main thread
+(`SCHED_RR`, as other desktops do through rtkit) granted by lord-sessiond with a CPU-time limit, which is a new
+privilege and needs the maintainer's approval first.
Boot: the Pi 5 reaches the login screen on its monitor 5.99 s after the kernel starts (lord-sessiond's record;
systemd-analyze gives 2.1 s kernel + 4.2 s userspace). Boots where the monitor was connected late took 61 and
@@ -387,10 +396,18 @@ screenshot predates the video and desktop parts):
![System Information → Performance](sysinfo-performance.png)
-Not built yet: input latency in the desktop-impact mode; hardware video decoding (no test machine has VA-API, and
-the Pi 5's HEVC decoder needs FFmpeg's `v4l2request`); the layout, paint and shaping CPU workloads; repeating the
-helper-sandbox self-test inside `lord-bench` (`sec.helper-sandbox`); detecting the Pi's firmware throttling
-during a run on kernels that don't expose it; the x86 PC reference; and `lordos-sysreport bench`.
+**`lordos-sysreport bench [--quick | --full] [--json]`** (`sysreport/cli.c`): LordBench from a terminal, over SSH or
+in CI, through lord-server's own code (`bench/lbrun.c`, the same guards, helpers and result file as the app, which
+then shows it). It is installed as `/usr/lib/lordos/bin/lordos-sysreport` with `/usr/bin/lordos-sysreport` and
+`lordos-fetch` as links, because `lbrun` only starts the `lord-bench` and `lord-media` next to its own binary
+(`/proc/self/exe`; a group- or world-writable helper is refused, so a build tree made with umask 002 needs `chmod
+g-w`). Without a session the helpers get no cgroup scope, and the desktop test needs a session. One line per
+measurement (or the JSON with `--json`); exit 0 when the run finished. On VM 116 a quick run took 39 s.
+
+Not built yet: hardware video decoding (no test machine has VA-API, and the Pi 5's HEVC decoder needs FFmpeg's
+`v4l2request`); the layout, paint and shaping CPU workloads; repeating the helper-sandbox self-test inside
+`lord-bench` (`sec.helper-sandbox`); detecting the Pi's firmware throttling during a run on kernels that don't
+expose it; and the x86 PC reference.
## 0.8.7 — Community hardware reports
diff --git a/docs/PAPER-VALIDATION.md b/docs/PAPER-VALIDATION.md
index cab9412..bcc1178 100644
--- a/docs/PAPER-VALIDATION.md
+++ b/docs/PAPER-VALIDATION.md
@@ -106,7 +106,7 @@ memory from a process's RSS (§7.1) and points to versioned results (§11.5, `do
| 7.2 | — | New in 0.8.5: remote desktop CPU reference (`REMOTE.md`, "Measurements (0.8.5, CPU reference)") | Added in the 0.8.5 edition (§7.2) |
| 7.3 | GPU benefits on real cards not measured | — | **Untested** |
| 7.4 | Pi 5: build 1 min 02 s, tests 23/0/0, NEON 2.0–2.3×, idle 36 MB, fan behaviour | Measured once on the Pi | Measured |
-| 7.4 | — | New, 0.8.6 in development: with a 1920×1080 60 Hz monitor, login screen 5.99 s after the kernel starts; desktop 59.4 fps alone (p99 13.0 ms, 1 % late) and 24 fps under a low-priority all-core load (96.5 % late); 3 minutes sustained at 5.9 GFLOP/s, 55.6 °C; software video decoding per codec. LordBench on the Pi (`BENCHMARK.md`, "Built so far") | Measured with LordBench (one run each); the load result led to a fix (compositor CPU weight and slice, 61 % → 23 % late without the monitor), to re-measure on the monitor |
+| 7.4 | — | New, 0.8.6 in development: with a 1920×1080 60 Hz monitor, login screen 5.99 s after the kernel starts; desktop 59.4 fps alone (p99 13.0 ms, 1 % late) and 24 fps under a low-priority all-core load (96.5 % late); 3 minutes sustained at 5.9 GFLOP/s, 55.6 °C; software video decoding per codec. LordBench on the Pi (`BENCHMARK.md`, "Built so far") | Measured with LordBench (one run each); the load result led to a fix (compositor CPU weight: 31–33 % → 7–8 % late without the monitor), to re-measure on the monitor |
| 7.5 | No measurements on real PCs | — | **Untested** |
## §10–§11 Limits and verification
@@ -142,7 +142,7 @@ State in the 0.8.5 edition (`web/content/paper/paper.en.md`, checked 2026-10-26)
| Gap | Covers | Plan |
|---|---|---|
| A denied connection, tried on the user's machine | §6.6 effective | An app with network access and a temporary rule (Checks) |
-| Repeatable performance numbers | §7 | LordBench (0.8.6, in development: CPU, memory, GPU offscreen, storage, sustained load, software video decoding and encoders, the desktop's frame times alone and under load, the boot time per version and the N-boot test are built, with VM 116 and the Pi 5 as references, `BENCHMARK.md` "Built so far"; idle memory and CPU, input latency, hardware video decoding and app start are not) |
+| Repeatable performance numbers | §7 | LordBench (0.8.6, in development: CPU, memory, GPU offscreen, storage, sustained load, software video decoding and encoders, the desktop's frame times and pointer-to-screen latency alone and under load, the boot time per version, the N-boot test and `lordos-sysreport bench` are built, with VM 116 and the Pi 5 as references, `BENCHMARK.md` "Built so far"; idle memory and CPU, hardware video decoding and app start are not) |
| Rendering, 3D and video on every GPU | §3.2, §7.2–7.3 | The visual test bench below |
| Every key, the mouse, touchpads, gamepads, and the Wayland protocols | §3.3–§3.4 | The visual test bench below |
| Real hardware | §10.2 | Reports from System Information (0.8.7) |
diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md
index e997413..8ae96b5 100644
--- a/docs/ROADMAP.md
+++ b/docs/ROADMAP.md
@@ -708,9 +708,9 @@ the maintainer on 2026-10-27, item below).
the thermal, throttle and battery guards, the boot history and System Information → Performance are built
(`BENCHMARK.md`, "Built so far"), and so are the video workloads (software decoding, the remote desktop's
encoders), the desktop-impact mode (the compositor's frame times alone and under a low-priority load), the N-boot
- test and the Pi 5 reference. Left: input latency, hardware video decoding, the x86 PC reference,
- `lordos-sysreport bench`, and the rest of what it found on the Pi 5 (the desktop fell to 24 fps under load; a first
- fix, the compositor's CPU weight and time slice, is built, `BENCHMARK.md` "The desktop under load").
+ test, the pointer-to-screen latency, `lordos-sysreport bench` and the Pi 5 reference. Left: hardware video
+ decoding, the x86 PC reference, and the rest of what it found on the Pi 5 (the desktop fell to 24 fps under load;
+ the compositor's CPU weight fixes most of it, `BENCHMARK.md` "The desktop under load").
- [ ] **Community hardware reports (0.8.7)** — `BENCHMARK.md`. Share on GitHub with the
`hardware-report` template (the user submits it, LordOS sends nothing), schema validation and
labels in a workflow, and a tested-hardware catalogue on lordos.org that the Compatibility panel
diff --git a/docs/WINDOWS.md b/docs/WINDOWS.md
index dc7173f..24789cc 100644
--- a/docs/WINDOWS.md
+++ b/docs/WINDOWS.md
@@ -240,7 +240,10 @@ window side in `sdk/windows.js`.
- **A scripted move (0.8.6, LordBench):** `wm.scriptMove(id, { rx, ry, periodMs })` asks lord-server to move
the window along a figure of eight through this same path (`lord.wm.script`, `grab_script_begin` in
`ui/grab.c`: the window painted once into a layer, one step per frame from the main loop, no button held
- and no JS per frame); pointer input or `wm.stopScript()` stops it. Only System Information's desktop
+ and no JS per frame). The positions come from LordBench's synthetic pointer (`bench/lbinput.c`, a 125 Hz
+ thread on an eventfd the main loop polls like a device; taken once per frame like a real mouse's motion), so
+ the test also measures pointer-to-screen latency; without that thread the path follows the clock. Pointer
+ input or `wm.stopScript()` stops it. Only System Information's desktop
scene uses it (`apps/sysinfo/scene.jsx`), to measure the compositor ([BENCHMARK.md](BENCHMARK.md)).
- **On release** (`__lordWm('end')`) the SDK reads the pointer once more and snaps; the size from
before the first snap is kept in `w.restore`. Dragging a snapped window away gives it that size
diff --git a/server/mk/lordbench.mk b/server/mk/lordbench.mk
index 4f8d0e7..76133a7 100644
--- a/server/mk/lordbench.mk
+++ b/server/mk/lordbench.mk
@@ -3,10 +3,11 @@
# sustained load), and lord-server's side (lbrun.c: conditions, the quiet wait, thermal and throttle
# guards, the result file; lord.sysinfo.bench in ui/js_hw.c). The helper links libc, QuickJS (one of
# its workloads) and, with GPU=1, Mesa (GBM, EGL, GLESv2); nothing else.
-LB_SRV_SRC := src/bench/lbrun.c src/bench/lbcond.c src/bench/lbproto.c src/bench/bench.c src/bench/lbframes.c src/bench/lbvideo.c
+LB_SRV_SRC := src/bench/lbrun.c src/bench/lbcond.c src/bench/lbproto.c src/bench/bench.c src/bench/lbframes.c src/bench/lbvideo.c src/bench/lbinput.c
LB_SRV_OBJ := $(LB_SRV_SRC:src/%.c=build/obj/%.o)
$(LB_SRV_OBJ): $(wildcard src/bench/*.h) src/media/proto.h build/gen/lord_version.h
-build/obj/main.o: src/bench/lbframes.h
+build/obj/main.o: src/bench/lbframes.h src/bench/lbinput.h
+build/obj/ui/grab.o: src/bench/lbinput.h
build/lord-server: $(LB_SRV_OBJ)
build/obj/ui/js_hw.o: src/bench/lbrun.h
@@ -30,11 +31,11 @@ build/lord-bench: $(LB_SRC) $(LB_GL_SRC) build/obj/ui/stb.o $(QJS_OBJ) build/gen
# the workloads (short), the record checks, the thermal guard on fake sysfs trees and the boot history
test: build/lordbench-test
build/lordbench-test: tests/lordbench_test.c src/bench/lbwork.c src/bench/lbproto.c src/bench/lbcond.c src/bench/lbrun.c src/bench/bench.c \
- src/bench/lbframes.c src/bench/lbvideo.c src/bench/boottest.c src/media/proto.c src/pkg/crypto.c src/pkg/xz.c src/hw/jbuf.c src/sec/json.c build/obj/ui/stb.o $(QJS_OBJ) build/gen/lb_corpus.h \
+ src/bench/lbframes.c src/bench/lbinput.c src/bench/lbvideo.c src/bench/boottest.c src/media/proto.c src/pkg/crypto.c src/pkg/xz.c src/hw/jbuf.c src/sec/json.c build/obj/ui/stb.o $(QJS_OBJ) build/gen/lb_corpus.h \
build/gen/lord_version.h $(wildcard src/bench/*.h)
@mkdir -p build
$(CC) $(CPPFLAGS) $(CFLAGS) $(WARN) -std=c11 -o $@ tests/lordbench_test.c src/bench/lbwork.c src/bench/lbproto.c src/bench/lbcond.c \
- src/bench/lbrun.c src/bench/bench.c src/bench/lbframes.c src/bench/lbvideo.c src/bench/boottest.c src/media/proto.c src/pkg/crypto.c src/pkg/xz.c src/hw/jbuf.c src/sec/json.c build/obj/ui/stb.o $(QJS_OBJ) -lm -lpthread
+ src/bench/lbrun.c src/bench/bench.c src/bench/lbframes.c src/bench/lbinput.c src/bench/lbvideo.c src/bench/boottest.c src/media/proto.c src/pkg/crypto.c src/pkg/xz.c src/hw/jbuf.c src/sec/json.c build/obj/ui/stb.o $(QJS_OBJ) -lm -lpthread
./$@ || { rm -f $@; exit 1; }
# from a terminal, without a session: build/lordbench-cli quick|full [sustained_s] (needs build/lord-bench, and build/lord-media
# for the video measurements; desktop mode needs a session: without one its frame results are skipped)
diff --git a/server/mk/sysreport.mk b/server/mk/sysreport.mk
index 1d9ef05..f937029 100644
--- a/server/mk/sysreport.mk
+++ b/server/mk/sysreport.mk
@@ -1,14 +1,17 @@
# System Information (0.8.5, src/sysreport, docs/BENCHMARK.md): the collector, shared by the
# `lordos-sysreport` and `lordos-fetch` commands (one binary; build/lordos-fetch is a link) and
-# (later) lord.sysinfo. Read-only, no root, libc only.
+# (later) lord.sysinfo. Read-only, no root, libc only; `bench` starts the sandboxed lord-bench next to it.
SYSREPORT_SRC := src/sysreport/sysreport.c src/sysreport/fetch.c src/sysreport/smbios.c src/sysreport/facts.c src/sysreport/sysreport_out.c src/sysreport/ids.c src/hw/edid.c src/hw/jbuf.c src/sec/json.c
SYSREPORT_HDR := $(wildcard src/sysreport/*.h) src/hw/edid.h src/hw/jbuf.h src/sec/json.h
all: build/lordos-sysreport build/lordos-fetch
build/lordos-fetch: build/lordos-sysreport
ln -sf lordos-sysreport $@
-build/lordos-sysreport: src/sysreport/cli.c $(SYSREPORT_SRC) $(SYSREPORT_HDR) build/gen/lord_version.h
+# `lordos-sysreport bench` links LordBench's lord-server side (mk/lordbench.mk), libc only too
+SYSREPORT_BENCH_SRC := src/bench/lbrun.c src/bench/lbcond.c src/bench/lbproto.c src/bench/bench.c src/bench/lbframes.c \
+ src/bench/lbvideo.c src/bench/boottest.c src/media/proto.c
+build/lordos-sysreport: src/sysreport/cli.c $(SYSREPORT_SRC) $(SYSREPORT_HDR) $(SYSREPORT_BENCH_SRC) $(wildcard src/bench/*.h) build/gen/lord_version.h
@mkdir -p build
- $(CC) $(CPPFLAGS) -Ibuild/gen $(CFLAGS) $(WARN) -std=c11 -o $@ src/sysreport/cli.c $(SYSREPORT_SRC)
+ $(CC) $(CPPFLAGS) -Ibuild/gen $(CFLAGS) $(WARN) -std=c11 -o $@ src/sysreport/cli.c $(SYSREPORT_SRC) $(SYSREPORT_BENCH_SRC) -lm -lpthread
# five fake machines full of serials, UUIDs, MACs and names that must not reach a report;
# `build/sysreport-test fixture <dir> amd|intel|nvidia|rpi5|vm` writes one for `--root`
test: build/sysreport-test
diff --git a/server/src/bench/lbframes.c b/server/src/bench/lbframes.c
index 405fcaf..15cc93a 100644
--- a/server/src/bench/lbframes.c
+++ b/server/src/bench/lbframes.c
@@ -7,6 +7,8 @@
#include <string.h>
#define MAXF 8192 /* about two minutes at 60 Hz; later frames are not kept */
+#define MAXI 16384 /* two minutes of the synthetic pointer's events */
+#define BATCH 64 /* events waiting for one frame (8 ms each: half a second) */
static atomic_int on;
static pthread_mutex_t mu = PTHREAD_MUTEX_INITIALIZER;
@@ -14,6 +16,10 @@ static double work[MAXF];
static uint64_t shown[MAXF];
static int nwork, nshown;
static uint32_t period;
+static double lat[MAXI]; /* ms */
+static int nlat;
+static uint64_t applied[BATCH], inframe[BATCH]; /* events applied, not yet in a frame; in the frame being shown */
+static int napplied, ninframe;
void lbf_frame(double work_ms) {
if (!atomic_load_explicit(&on, memory_order_relaxed)) return;
@@ -27,12 +33,33 @@ void lbf_presented(uint64_t ns, uint32_t period_ns) {
pthread_mutex_lock(&mu);
if (nshown < MAXF && (!nshown || ns > shown[nshown - 1])) shown[nshown++] = ns;
if (period_ns) period = period_ns;
+ for (int i = 0; i < ninframe; i++)
+ if (nlat < MAXI && ns >= inframe[i]) lat[nlat++] = (double)(ns - inframe[i]) / 1e6;
+ ninframe = 0;
+ pthread_mutex_unlock(&mu);
+}
+
+void lbf_input(uint64_t ev_ns) {
+ if (!atomic_load_explicit(&on, memory_order_relaxed)) return;
+ pthread_mutex_lock(&mu);
+ if (napplied == BATCH) { memmove(applied, applied + 1, sizeof applied - sizeof *applied); napplied--; }
+ applied[napplied++] = ev_ns;
+ pthread_mutex_unlock(&mu);
+}
+
+void lbf_built(int main_drawn) {
+ if (!main_drawn || !atomic_load_explicit(&on, memory_order_relaxed)) return;
+ pthread_mutex_lock(&mu);
+ /* a frame built while the previous one is still waiting for its flip never happens on the main display
+ * (main.c waits for the flip); if it did, both groups end at this frame's presentation */
+ for (int i = 0; i < napplied && ninframe < BATCH; i++) inframe[ninframe++] = applied[i];
+ napplied = 0;
pthread_mutex_unlock(&mu);
}
void lbf_begin(void) {
pthread_mutex_lock(&mu);
- nwork = nshown = 0;
+ nwork = nshown = nlat = napplied = ninframe = 0;
period = 0;
atomic_store(&on, 1);
pthread_mutex_unlock(&mu);
@@ -49,11 +76,12 @@ static double pct(const double *v, int n, double p) {
int lbf_end(LbFrameStats *st) {
memset(st, 0, sizeof *st);
- static double w[MAXF];
+ static double w[MAXF], l[MAXI];
pthread_mutex_lock(&mu);
atomic_store(&on, 0);
- int nw = nwork, ns = nshown;
+ int nw = nwork, ns = nshown, nl = nlat;
memcpy(w, work, (size_t)nw * sizeof *w);
+ memcpy(l, lat, (size_t)nl * sizeof *l);
double budget = (period ? period : 16666667u) / 1e6;
st->budget_ms = budget;
st->frames = nw;
@@ -76,5 +104,9 @@ int lbf_end(LbFrameStats *st) {
st->work_p50 = pct(w, nw, 50);
st->work_p99 = pct(w, nw, 99);
st->work_max = nw ? w[nw - 1] : 0;
+ qsort(l, (size_t)nl, sizeof *l, cmp_d);
+ st->inputs = nl;
+ st->in_p50 = pct(l, nl, 50);
+ st->in_p99 = pct(l, nl, 99);
return ns >= 2 ? 0 : -1;
}
diff --git a/server/src/bench/lbframes.h b/server/src/bench/lbframes.h
index 285edb1..2f16d02 100644
--- a/server/src/bench/lbframes.h
+++ b/server/src/bench/lbframes.h
@@ -17,11 +17,18 @@ typedef struct {
double budget_ms; /* the main display's refresh period */
double missed_pct; /* intervals between shown frames longer than 1.5 periods, % of them */
double gap_max; /* the longest interval, ms */
+ int inputs; /* synthetic pointer events shown (bench/lbinput.h) */
+ double in_p50, in_p99; /* ms from such an event to the presentation of the first frame showing it */
} LbFrameStats;
/* main.c */
void lbf_frame(double work_ms);
void lbf_presented(uint64_t ns, uint32_t period_ns);
+/* the synthetic pointer: an event (stamped ev_ns) was applied to the scene, before the next frame is built
+ * (lbinput.c); then main.c says, after building a frame, whether the main display got it: the events
+ * applied so far are in that frame and their latency ends at its presentation */
+void lbf_input(uint64_t ev_ns);
+void lbf_built(int main_drawn);
/* lbrun.c: begin clears and starts; end stops and fills st (0, or -1 with fewer than 2 shown frames) */
void lbf_begin(void);
diff --git a/server/src/bench/lbinput.c b/server/src/bench/lbinput.c
new file mode 100644
index 0000000..0ffec63
--- /dev/null
+++ b/server/src/bench/lbinput.c
@@ -0,0 +1,104 @@
+/* lbinput.c — see lbinput.h. One producer (the thread), one consumer (the main loop): a lock-free ring. */
+#include "lbinput.h"
+#include "lbframes.h"
+
+#include <errno.h>
+#include <math.h>
+#include <pthread.h>
+#include <stdatomic.h>
+#include <stdint.h>
+#include <sys/eventfd.h>
+#include <time.h>
+#include <unistd.h>
+
+#define RING 256 /* 2 s of events; a main loop that far behind drops the oldest */
+
+typedef struct { uint64_t ns; float dx, dy; } Ev;
+
+static Ev ring[RING];
+static atomic_uint head, tail; /* head: next to write (thread); tail: next to read (main loop) */
+static atomic_int stop_req;
+static int efd = -1, running;
+static pthread_t th;
+static float p_rx, p_ry, p_period;
+
+static uint64_t mono_ns(void) {
+ struct timespec t;
+ clock_gettime(CLOCK_MONOTONIC, &t);
+ return (uint64_t)t.tv_sec * 1000000000ull + (uint64_t)t.tv_nsec;
+}
+
+void lbi_path(float rx, float ry, float period_ms, double t_ms, float *dx, float *dy) {
+ double k = 2 * M_PI * t_ms / period_ms;
+ *dx = (float)(rx * sin(k));
+ *dy = (float)(ry * sin(2 * k) / 2);
+}
+
+static void *producer(void *arg) {
+ (void)arg;
+ uint64_t t0 = mono_ns(), period = 1000000000ull / LBI_HZ;
+ struct timespec next;
+ clock_gettime(CLOCK_MONOTONIC, &next);
+ while (!atomic_load(&stop_req)) {
+ next.tv_nsec += (long)period;
+ if (next.tv_nsec >= 1000000000L) { next.tv_nsec -= 1000000000L; next.tv_sec++; }
+ while (clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, &next, NULL) == EINTR) {}
+ if (atomic_load(&stop_req)) break;
+ uint64_t now = mono_ns();
+ unsigned h = atomic_load_explicit(&head, memory_order_relaxed);
+ if (h - atomic_load_explicit(&tail, memory_order_acquire) >= RING) continue; /* full: this one is lost */
+ Ev *e = &ring[h % RING];
+ e->ns = now; /* stamped when it exists, as the kernel stamps a device's event */
+ lbi_path(p_rx, p_ry, p_period, (double)(now - t0) / 1e6, &e->dx, &e->dy);
+ atomic_store_explicit(&head, h + 1, memory_order_release);
+ uint64_t one = 1;
+ if (write(efd, &one, sizeof one) < 0) {}
+ }
+ return NULL;
+}
+
+int lbi_start(float rx, float ry, float period_ms) {
+ lbi_stop();
+ if (!(rx >= 0 && ry >= 0 && period_ms >= 500)) return -1;
+ efd = eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC);
+ if (efd < 0) return -1;
+ p_rx = rx;
+ p_ry = ry;
+ p_period = period_ms;
+ atomic_store(&head, 0);
+ atomic_store(&tail, 0);
+ atomic_store(&stop_req, 0);
+ if (pthread_create(&th, NULL, producer, NULL)) { close(efd); efd = -1; return -1; }
+ running = 1;
+ return 0;
+}
+
+void lbi_stop(void) {
+ if (!running) return;
+ atomic_store(&stop_req, 1);
+ pthread_join(th, NULL); /* it sleeps at most one period (8 ms) */
+ running = 0;
+ close(efd);
+ efd = -1;
+}
+
+int lbi_fd(void) { return running ? efd : -1; }
+
+void lbi_drain(void) {
+ uint64_t n;
+ if (efd >= 0 && read(efd, &n, sizeof n) < 0) {}
+}
+
+int lbi_take(float *dx, float *dy) {
+ if (!running) return 0;
+ unsigned t = atomic_load_explicit(&tail, memory_order_relaxed), h = atomic_load_explicit(&head, memory_order_acquire);
+ if (t == h) return 0;
+ for (; t != h; t++) {
+ const Ev *e = &ring[t % RING];
+ lbf_input(e->ns);
+ *dx = e->dx;
+ *dy = e->dy;
+ }
+ atomic_store_explicit(&tail, t, memory_order_release);
+ return 1;
+}
diff --git a/server/src/bench/lbinput.h b/server/src/bench/lbinput.h
new file mode 100644
index 0000000..402623b
--- /dev/null
+++ b/server/src/bench/lbinput.h
@@ -0,0 +1,28 @@
+/* lbinput.h — LordBench's synthetic pointer, for the input latency of the desktop test (docs/BENCHMARK.md,
+ * "Desktop impact").
+ *
+ * While the scene's window moves (grab_script_begin, ui/grab.c), a thread of lord-server plays a mouse: 125
+ * events a second along the scene's figure of eight, each one stamped with CLOCK_MONOTONIC when it is made,
+ * put in a ring and announced on an eventfd that the main loop polls like an input device. The main loop
+ * takes the newest position once per frame (as it does with a real mouse's motion, main.c) and moves the
+ * window to it; each event's latency is the time until the first frame showing it, or a later position,
+ * was presented (bench/lbframes.c). It measures lord-server's part (waking up, the frame, the flip), not the
+ * device's. The positions only ever move LordBench's own window: nothing reaches the theme's JS, an app or
+ * the real pointer. */
+#ifndef LORD_BENCH_LBINPUT_H
+#define LORD_BENCH_LBINPUT_H
+
+#define LBI_HZ 125 /* a common mouse's report rate */
+
+int lbi_start(float rx, float ry, float period_ms); /* 0 if the thread runs; restarts a running one */
+void lbi_stop(void);
+int lbi_fd(void); /* the eventfd while running, -1 otherwise */
+void lbi_drain(void); /* main loop: lbi_fd() is readable */
+/* main loop, once per frame: the newest position (offsets from where the window started) of the events
+ * since the last call, each one handed to lbf_input(); 0 when none came */
+int lbi_take(float *dx, float *dy);
+
+/* the path, also used by grab.c without the thread: x = rx sin(k), y = ry sin(2k) / 2, k = 2π t / period */
+void lbi_path(float rx, float ry, float period_ms, double t_ms, float *dx, float *dy);
+
+#endif
diff --git a/server/src/bench/lbproto.c b/server/src/bench/lbproto.c
index faececb..a05984c 100644
--- a/server/src/bench/lbproto.c
+++ b/server/src/bench/lbproto.c
@@ -22,16 +22,19 @@ static const struct { const char *name, *unit; } meas[LB_COUNT] = {
[LB_VENC_H264] = { "video.enc.h264", "fps" }, [LB_VENC_VP8] = { "video.enc.vp8", "fps" },
[LB_COMP_FPS] = { "comp.fps", "fps" }, [LB_COMP_P50] = { "comp.p50", "ms" },
[LB_COMP_P99] = { "comp.p99", "ms" }, [LB_COMP_MISSED] = { "comp.missed", "%" },
+ [LB_COMP_IN50] = { "comp.in50", "ms" }, [LB_COMP_IN99] = { "comp.in99", "ms" },
[LB_DESK_FPS] = { "desk.fps", "fps" }, [LB_DESK_P50] = { "desk.p50", "ms" },
[LB_DESK_P99] = { "desk.p99", "ms" }, [LB_DESK_MISSED] = { "desk.missed", "%" },
+ [LB_DESK_IN50] = { "desk.in50", "ms" }, [LB_DESK_IN99] = { "desk.in99", "ms" },
[LB_DESK_WORK] = { "desk.work", "GFLOP/s" },
};
const char *lb_name(int id) { return id >= 0 && id < LB_COUNT ? meas[id].name : NULL; }
const char *lb_unit(int id) { return id >= 0 && id < LB_COUNT ? meas[id].unit : NULL; }
int lb_lower_better(int id) {
- return id == LB_MEM_LAT || id == LB_COMP_P50 || id == LB_COMP_P99 || id == LB_COMP_MISSED || id == LB_DESK_P50 ||
- id == LB_DESK_P99 || id == LB_DESK_MISSED;
+ return id == LB_MEM_LAT || id == LB_COMP_P50 || id == LB_COMP_P99 || id == LB_COMP_MISSED || id == LB_COMP_IN50 ||
+ id == LB_COMP_IN99 || id == LB_DESK_P50 || id == LB_DESK_P99 || id == LB_DESK_MISSED || id == LB_DESK_IN50 ||
+ id == LB_DESK_IN99;
}
int lb_msg_valid(const LbMsg *m) {
diff --git a/server/src/bench/lbproto.h b/server/src/bench/lbproto.h
index 8327383..b7a53be 100644
--- a/server/src/bench/lbproto.h
+++ b/server/src/bench/lbproto.h
@@ -65,10 +65,14 @@ enum {
LB_COMP_P50, /* ms to build a frame, median */
LB_COMP_P99, /* ms to build a frame, 99th percentile */
LB_COMP_MISSED, /* intervals longer than 1.5 refresh periods, % */
+ LB_COMP_IN50, /* ms from a synthetic pointer event to the frame showing it, median (lbinput.h) */
+ LB_COMP_IN99, /* the same, 99th percentile */
LB_DESK_FPS, /* the same scene with an all-core load at the lowest priority */
LB_DESK_P50,
LB_DESK_P99,
LB_DESK_MISSED,
+ LB_DESK_IN50,
+ LB_DESK_IN99,
LB_DESK_WORK, /* what the load got done meanwhile, GFLOP/s */
LB_COUNT
};
diff --git a/server/src/bench/lbrun.c b/server/src/bench/lbrun.c
index ab56372..89286e0 100644
--- a/server/src/bench/lbrun.c
+++ b/server/src/bench/lbrun.c
@@ -326,17 +326,22 @@ static void put_skip(Res *r, int id, int why) {
static void set_step(int id) { pthread_mutex_lock(&mu); step = id; pthread_mutex_unlock(&mu); }
-/* the compositor's frames as four results from `first` (fps, p50, p99, missed); -1 with too few frames */
+/* the compositor's frames as six results from `first` (fps, p50, p99, missed, input latency p50 and p99);
+ * -1 with too few frames */
static int put_frames(Res *r, int first) {
LbFrameStats fs;
if (lbf_end(&fs) || fs.shown < 30) {
- for (int i = 0; i < 4; i++) put_skip(r, first + i, LB_SKIP_NOFRAMES);
+ for (int i = 0; i < 6; i++) put_skip(r, first + i, LB_SKIP_NOFRAMES);
return -1;
}
put_result(r, first, fs.fps, 0);
put_result(r, first + 1, fs.work_p50, 0);
put_result(r, first + 2, fs.work_p99, 0);
put_result(r, first + 3, fs.missed_pct, 0);
+ if (fs.inputs >= 30) { /* the synthetic pointer moved the scene (bench/lbinput.h) */
+ put_result(r, first + 4, fs.in_p50, 0);
+ put_result(r, first + 5, fs.in_p99, 0);
+ } else for (int i = 4; i < 6; i++) put_skip(r, first + i, LB_SKIP_FAILED);
pthread_mutex_lock(&mu);
r->budget_ms = fs.budget_ms;
if (fs.gap_max > r->gap_max) r->gap_max = fs.gap_max;
diff --git a/server/src/main.c b/server/src/main.c
index eae1547..960c4fc 100644
--- a/server/src/main.c
+++ b/server/src/main.c
@@ -17,6 +17,7 @@
*/
#include "admin.h"
#include "keylag.h"
+#include "bench/lbinput.h"
#include "net/net.h"
#include "disk/disk.h"
#include "backup/backup.h"
@@ -1441,6 +1442,7 @@ static void render_frame(Server *s) {
}
} else if (c->on) { out_free(c); c->on = 0; c->pend = (Box){ 0, 0, 0, 0 }; }
}
+ lbf_built(s->headless || main_shown); /* LordBench: the synthetic pointer's events are in this frame */
s->frames++;
/* The pool only while frames are heavy: it costs CPU to wake (a light frame painted on one thread
* spends less), so it turns on when painting takes more than 70 % of a frame at the target rate (the
@@ -1885,6 +1887,8 @@ int main(int argc, char **argv) {
if (pbase >= 0) pfd[n++] = (struct pollfd){ portal_fd(), (short)(POLLIN | (portal_wants_write() ? POLLOUT : 0)), 0 };
int lgbase = logs_fd() >= 0 ? n : -1; /* app Registros: consultas e inotify */
if (lgbase >= 0) pfd[n++] = (struct pollfd){ logs_fd(), POLLIN, 0 };
+ int lbibase = lbi_fd() >= 0 ? n : -1; /* LordBench's synthetic pointer, like a device */
+ if (lbibase >= 0) pfd[n++] = (struct pollfd){ lbi_fd(), POLLIN, 0 };
int mbase = n, nm = mirror_pollfds(pfd + n, 12);
n += nm;
int brkbase = n, nbrk = brokersrv_pollfds(pfd + n, 32); /* apps .lpk aisladas (broker) */
@@ -1941,6 +1945,7 @@ int main(int argc, char **argv) {
if (pbase >= 0 && pfd[pbase].revents) portal_dispatch();
if (bkbase >= 0 && pfd[bkbase].revents) backup_dispatch(js_backup_event);
if (lgbase >= 0 && pfd[lgbase].revents) logs_dispatch(js_logs_event);
+ if (lbibase >= 0 && pfd[lbibase].revents) lbi_drain(); /* taken once per frame by grab_script_tick */
if (nm) mirror_dispatch(pfd + mbase, nm);
if (nbrk) brokersrv_dispatch(pfd + brkbase, nbrk);
if (nabr) brokersrv_audio_dispatch(pfd + abr, nabr);
diff --git a/server/src/par.c b/server/src/par.c
index be0ded9..2f4b74a 100644
--- a/server/src/par.c
+++ b/server/src/par.c
@@ -7,9 +7,6 @@
#include <pthread.h>
#include <sched.h>
#include <stdatomic.h>
-#include <stdint.h>
-#include <string.h>
-#include <sys/syscall.h>
#include <unistd.h>
#define PAR_MAX 8
@@ -43,7 +40,6 @@ static void run_pieces(void) {
static void *worker(void *arg) {
(void)arg;
- par_short_slice();
unsigned long seen = 0;
for (;;) {
pthread_mutex_lock(&mu);
@@ -62,7 +58,6 @@ void par_init(int threads) {
threads = !sched_getaffinity(0, sizeof set, &set) ? CPU_COUNT(&set) : (int)sysconf(_SC_NPROCESSORS_ONLN);
}
if (threads > PAR_MAX) threads = PAR_MAX;
- par_short_slice(); /* the caller: the compositor's main thread */
for (int i = 1; i < threads; i++) {
pthread_t t;
pthread_attr_t at;
@@ -99,20 +94,3 @@ void par_rows(int j0, int j1, ParFn fn, void *ctx) {
pthread_mutex_unlock(&mu);
atomic_flag_clear(&busy);
}
-
-/* struct sched_attr (linux/sched/types.h), declared here: glibc has no wrapper before 2.41 */
-struct par_sched_attr { uint32_t size, policy; uint64_t flags; int32_t nice; uint32_t priority;
- uint64_t runtime, deadline, period; uint32_t util_min, util_max; };
-
-void par_short_slice(void) {
-#ifdef SYS_sched_setattr
- struct par_sched_attr a;
- memset(&a, 0, sizeof a);
- a.size = sizeof a;
- a.policy = SCHED_OTHER;
- a.flags = 0x01; /* SCHED_FLAG_RESET_ON_FORK: children start with the default */
- a.nice = (int32_t)nice(0); /* keep this thread's nice value */
- a.runtime = 500000; /* ns; the kernel allows 0.1–100 ms */
- syscall(SYS_sched_setattr, 0, &a, 0);
-#endif
-}
diff --git a/server/src/par.h b/server/src/par.h
index ad199c5..947871e 100644
--- a/server/src/par.h
+++ b/server/src/par.h
@@ -14,9 +14,4 @@ void par_init(int threads); /* 0: the CPUs this process may use, at most
int par_threads(void); /* threads that take pieces, the caller included (1: serial) */
void par_rows(int j0, int j1, ParFn fn, void *ctx);
-/* Asks the kernel for a short time slice (0.5 ms, EEVDF's custom slice, Linux 6.12+) for the calling
- * thread, so it gets the CPU back sooner when it wakes up beside busy threads; not inherited by children
- * (SCHED_FLAG_RESET_ON_FORK). Best effort: older kernels ignore it. Used by the compositor's threads. */
-void par_short_slice(void);
-
#endif
diff --git a/server/src/sysreport/cli.c b/server/src/sysreport/cli.c
index f968993..96ef7e9 100644
--- a/server/src/sysreport/cli.c
+++ b/server/src/sysreport/cli.c
@@ -3,17 +3,27 @@
* the app's, so one can be made on a machine without a session (a headless Pi, a VM over SSH, CI).
*
* lordos-sysreport report [--json | --markdown]
+ * lordos-sysreport bench [--quick | --full] [--json]
* lordos-fetch [--share] [--color=auto|always|never] (also: lordos-sysreport fetch …)
*
* lordos-fetch is a link to this binary. --root <dir> reads a fake tree instead of this machine
- * (tests and fixtures only). */
+ * (tests and fixtures only).
+ *
+ * bench runs LordBench through lord-server's own code (bench/lbrun.c): the same sandboxed lord-bench
+ * and lord-media, which must be next to this binary (it is installed in the LordOS folder; /usr/bin has
+ * links), the same guards and the same result file as System Information → Performance. Without a session
+ * the helper gets no cgroup scope and the desktop test can't run. */
#include "sysreport.h"
#include "fetch.h"
#include "lord_version.h"
+#include "../bench/lbrun.h"
+#include "../sec/json.h"
+#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <time.h>
#include <unistd.h>
static int usage(int fetch) {
@@ -23,20 +33,94 @@ static int usage(int fetch) {
" host names, for a screenshot you will post.\n");
else
fprintf(stderr, "usage: lordos-sysreport report [--json | --markdown]\n"
+ " lordos-sysreport bench [--quick | --full] [--json]\n"
" lordos-sysreport fetch [--share] [--color=auto|always|never]\n"
" report prints this computer's hardware and what the system made of it (no serial\n"
- " numbers, addresses, host or user names). Markdown by default.\n");
+ " numbers, addresses, host or user names). Markdown by default.\n"
+ " bench measures it with LordBench, as System Information → Performance does: --quick\n"
+ " (default, about half a minute) or --full (adds storage and 3 minutes of sustained load,\n"
+ " 4 to 6 minutes). The result is also saved for the app. Nothing is sent anywhere.\n");
return 2;
}
+static volatile sig_atomic_t interrupted;
+static void on_signal(int sig) { (void)sig; interrupted = 1; }
+
+/* One line per measurement and per skipped one, from the result JSON lbrun built. */
+static void bench_print(const char *json) {
+ JDoc d;
+ char err[96];
+ if (json_parse(json, strlen(json), &d, err, sizeof err)) { puts(json); return; }
+ const JVal *r = json_get(d.root, "result");
+ const char *status = json_str(r, "status"), *stop = json_str(r, "stopReason");
+ printf("LordBench %d, %s test: %s in %.0f s (LordOS %s, %s, %.0f threads)\n", (int)json_num(r, "lordbench", 0),
+ json_str(r, "mode") ? json_str(r, "mode") : "?", status ? status : "?", json_num(r, "seconds", 0),
+ json_str(r, "lordos") ? json_str(r, "lordos") : "?", json_str(r, "arch") ? json_str(r, "arch") : "?", json_num(r, "threads", 0));
+ if (stop && stop[0]) printf("stopped: %s\n", stop);
+ const JVal *res = json_get(r, "results");
+ for (const JVal *m = res && res->type == J_OBJ ? res->kid : NULL; m; m = m->next) {
+ const char *unit = json_str(m, "unit");
+ printf(" %-18s %10.4g %-8s ±%.3g\n", m->key, json_num(m, "value", 0), unit ? unit : "", json_num(m, "spread", 0));
+ }
+ const JVal *sk = json_get(r, "skipped");
+ int only_full = 0, said = 0;
+ for (const JVal *m = sk && sk->type == J_OBJ ? sk->kid : NULL; m; m = m->next) {
+ if (m->type == J_STR && !strcmp(m->str, "mode")) { only_full++; continue; } /* not part of this test */
+ if (!said++) printf("skipped:\n");
+ printf(" %-18s %s\n", m->key, m->type == J_STR ? m->str : "");
+ }
+ if (only_full) printf("(%d more with --full)\n", only_full);
+ json_free(&d);
+}
+
+static int bench(int full, int json) {
+ struct sigaction sa = { 0 };
+ sa.sa_handler = on_signal;
+ sigaction(SIGINT, &sa, NULL);
+ sigaction(SIGTERM, &sa, NULL);
+ if (lbrun_start(full ? "full" : "quick", 0, "{\"cli\":true}")) {
+ fprintf(stderr, "lordos-sysreport: LordBench did not start: another run is going on, or the lord-bench next to this program is missing or writable by others\n");
+ return 1;
+ }
+ char last[96] = "";
+ for (;;) {
+ struct timespec ts = { 0, 250 * 1000 * 1000 };
+ nanosleep(&ts, NULL);
+ if (interrupted) { lbrun_cancel(); interrupted = 0; }
+ char *p = lbrun_poll();
+ if (!p) return 1;
+ if (!strstr(p, "\"state\":\"waiting\"") && !strstr(p, "\"state\":\"running\"")) {
+ if (json) puts(p);
+ else bench_print(p);
+ int ok = strstr(p, "\"status\":\"done\"") != NULL;
+ free(p);
+ return ok ? 0 : 1;
+ }
+ const char *st = strstr(p, "\"step\":\"");
+ if (st && isatty(2)) { /* progress on the terminal only */
+ st += 8;
+ const char *e = strchr(st, '"');
+ int n = e ? (int)(e - st) : 0;
+ if (n > 0 && n < (int)sizeof last && (strncmp(last, st, (size_t)n) || last[n])) {
+ snprintf(last, sizeof last, "%.*s", n, st);
+ fprintf(stderr, " %s…\n", last);
+ }
+ }
+ free(p);
+ }
+}
+
int main(int argc, char **argv) {
const char *root = "", *mode = "markdown", *color = "auto";
const char *base = strrchr(argv[0], '/');
base = base ? base + 1 : argv[0];
- int fetch = !strcmp(base, "lordos-fetch"), report = 0, share = 0;
+ int fetch = !strcmp(base, "lordos-fetch"), report = 0, share = 0, bnch = 0, full = 0, json = 0;
for (int i = 1; i < argc; i++) {
- if (!fetch && !report && !strcmp(argv[i], "report")) report = 1;
- else if (!fetch && !report && !strcmp(argv[i], "fetch")) fetch = 1;
+ if (!fetch && !report && !bnch && !strcmp(argv[i], "report")) report = 1;
+ else if (!fetch && !report && !bnch && !strcmp(argv[i], "fetch")) fetch = 1;
+ else if (!fetch && !report && !bnch && !strcmp(argv[i], "bench")) bnch = 1;
+ else if (bnch && (!strcmp(argv[i], "--quick") || !strcmp(argv[i], "--full"))) full = argv[i][2] == 'f';
+ else if (bnch && !strcmp(argv[i], "--json")) json = 1;
else if (report && !strcmp(argv[i], "--json")) mode = "json";
else if (report && !strcmp(argv[i], "--markdown")) mode = "markdown";
else if (fetch && !strcmp(argv[i], "--share")) share = 1;
@@ -45,6 +129,7 @@ int main(int argc, char **argv) {
else if (!strcmp(argv[i], "--root") && i + 1 < argc) root = argv[++i];
else return usage(fetch);
}
+ if (bnch) return root[0] ? usage(0) : bench(full, json);
if (!report && !fetch) return usage(0);
SysReport *r = malloc(sizeof *r);
diff --git a/server/src/ui/grab.c b/server/src/ui/grab.c
index 00cb07b..abbd004 100644
--- a/server/src/ui/grab.c
+++ b/server/src/ui/grab.c
@@ -1,6 +1,7 @@
/* grab.c — window dragging in C: move and resize without JS per frame (grab.h). */
#include "grab.h"
#include "../cursor.h"
+#include "../bench/lbinput.h"
#include <math.h>
#include <string.h>
@@ -37,9 +38,15 @@ int grab_cursor(void) { return g.edges ? cursor_for_edges(g.edges) : CUR_MOVE; }
static float dim_or(Dim d, float fallback) { return d.unit == UNIT_PX ? d.v : fallback; }
-/* LordBench's scripted move (grab_script_begin): the node follows a fixed path, one step per frame */
+/* LordBench's scripted move (grab_script_begin): the node follows the synthetic pointer (bench/lbinput.h), or
+ * without it the same path by the clock, one step per frame */
static struct { int on; double t0; float rx, ry, period; } sc;
+static void script_off(void) {
+ sc.on = 0;
+ lbi_stop();
+}
+
static int setup(int node, int edges, const GrabLimits *lim) {
Node *n = node_get(node);
if (!n || !n->s.absolute) return -1;
@@ -63,7 +70,7 @@ static int setup(int node, int edges, const GrabLimits *lim) {
int grab_begin(int node, int edges, const GrabLimits *lim) {
if (!ptr_buttons) return -1;
- sc.on = 0;
+ script_off();
return setup(node, edges, lim);
}
@@ -75,19 +82,25 @@ int grab_script_begin(int node, const GrabLimits *lim, float rx, float ry, float
sc.rx = rx;
sc.ry = ry;
sc.period = period_ms;
+ lbi_start(rx, ry, period_ms); /* if it fails, the clock drives it (no input latency) */
ui.dirty = 1;
return 0;
}
int grab_scripted(void) { return sc.on && g.active; }
-/* a figure of eight that starts and ends where the window was: x = rx sin(k), y = ry sin(2k) / 2 */
+/* a figure of eight that starts and ends where the window was (lbi_path) */
void grab_script_tick(double now_ms) {
if (!sc.on) return;
- if (!g.active) { sc.on = 0; return; }
+ if (!g.active) { script_off(); return; }
+ float dx, dy;
+ if (lbi_fd() >= 0) { /* the synthetic pointer's newest position, if one came */
+ if (lbi_take(&dx, &dy)) grab_motion(g.px0 + dx, g.py0 + dy);
+ return;
+ }
if (sc.t0 < 0) sc.t0 = now_ms;
- double k = 2 * M_PI * (now_ms - sc.t0) / sc.period;
- grab_motion(g.px0 + (float)(sc.rx * sin(k)), g.py0 + (float)(sc.ry * sin(2 * k) / 2));
+ lbi_path(sc.rx, sc.ry, sc.period, now_ms - sc.t0, &dx, &dy);
+ grab_motion(g.px0 + dx, g.py0 + dy);
}
static float clampf(float v, float lo, float hi) { return v < lo ? lo : v > hi ? hi : v; }
@@ -150,7 +163,7 @@ int grab_finish(int *node, int *edges, float *dx, float *dy, float *dw, float *d
}
void grab_cancel(void) {
- sc.on = 0;
+ script_off();
if (!g.active) return;
g.active = 0;
paint_layer_end();
diff --git a/server/tests/lordbench_test.c b/server/tests/lordbench_test.c
index b3d7af8..725bc2c 100644
--- a/server/tests/lordbench_test.c
+++ b/server/tests/lordbench_test.c
@@ -9,6 +9,7 @@
#include "../src/bench/lbcond.h"
#include "../src/bench/lbrun.h"
#include "../src/bench/lbframes.h"
+#include "../src/bench/lbinput.h"
#include "../src/bench/lbvideo.h"
#include "../src/bench/boottest.h"
#include "../src/media/proto.h"
@@ -18,7 +19,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <poll.h>
#include <sys/stat.h>
+#include <time.h>
#include <unistd.h>
static int fails, oks;
@@ -117,6 +120,63 @@ int main(void) {
lbf_presented(200, 0);
CHECK(lbf_end(&fs) == 0 && fs.shown == 2, "out-of-order times dropped");
+ /* ---- input latency: events applied before a frame end at that frame's presentation ---- */
+ lbf_input(1000); /* not recording: ignored */
+ lbf_begin();
+ lbf_presented(10000000, 16666667);
+ lbf_input(11000000); /* two events, then a frame the main display gets */
+ lbf_input(19000000);
+ lbf_built(1);
+ lbf_input(20000000); /* applied after that frame was built: the next one */
+ lbf_presented(26666667, 16666667); /* 15.67 and 7.67 ms */
+ lbf_built(0); /* a frame only another display got: still waiting */
+ lbf_presented(43333334, 16666667); /* nothing in it */
+ lbf_built(1);
+ lbf_presented(60000000, 16666667); /* 40 ms */
+ CHECK(lbf_end(&fs) == 0 && fs.inputs == 3, "input events %d", fs.inputs);
+ CHECK(fabs(fs.in_p50 - 15.666667) < 0.001 && fabs(fs.in_p99 - 40) < 0.001, "input p50 %f p99 %f", fs.in_p50, fs.in_p99);
+ lbf_begin();
+ for (int i = 0; i < 200; i++) lbf_input(1000 + (uint64_t)i); /* more than one frame can hold: the newest kept */
+ lbf_built(1);
+ lbf_presented(5000, 0);
+ lbf_presented(6000, 0);
+ CHECK(lbf_end(&fs) == 0 && fs.inputs == 64 && fabs(fs.in_p99 - (5000 - 1136) / 1e6) < 1e-9, "a full batch keeps the newest %d %f", fs.inputs, fs.in_p99);
+ lbf_begin();
+ lbf_input(9000);
+ lbf_built(1);
+ lbf_presented(5000, 0); /* a presentation stamped before the event: not a latency */
+ lbf_presented(6000, 0);
+ CHECK(lbf_end(&fs) == 0 && fs.inputs == 0, "no negative latency");
+
+ /* ---- the synthetic pointer: its path, and the thread's events through the eventfd ---- */
+ float dx, dy;
+ lbi_path(200, 100, 4000, 1000, &dx, &dy); /* a quarter turn: x = rx, y = ry sin(π) / 2 = 0 */
+ CHECK(fabs(dx - 200) < 0.01 && fabs(dy) < 0.01, "path at a quarter %f %f", dx, dy);
+ lbi_path(200, 100, 4000, 500, &dx, &dy); /* an eighth: x = rx sin(π/4), y = ry / 2 */
+ CHECK(fabs(dx - 141.42) < 0.01 && fabs(dy - 50) < 0.01, "path at an eighth %f %f", dx, dy);
+ CHECK(lbi_start(10, 10, 100) == -1 && lbi_fd() == -1, "a period under 500 ms is refused");
+ CHECK(lbi_take(&dx, &dy) == 0, "nothing to take while stopped");
+ lbf_begin();
+ CHECK(lbi_start(200, 100, 2000) == 0 && lbi_fd() >= 0, "the synthetic pointer starts");
+ int took = 0, wakes = 0;
+ for (int i = 0; i < 12; i++) { /* about 12 frames of 16 ms */
+ struct pollfd pf = { lbi_fd(), POLLIN, 0 };
+ if (poll(&pf, 1, 100) == 1) { wakes++; lbi_drain(); }
+ struct timespec ts = { 0, 16000000 };
+ nanosleep(&ts, NULL);
+ if (lbi_take(&dx, &dy)) took++;
+ lbf_built(1);
+ struct timespec now;
+ clock_gettime(CLOCK_MONOTONIC, &now);
+ lbf_presented((uint64_t)now.tv_sec * 1000000000ull + (uint64_t)now.tv_nsec, 16666667);
+ }
+ lbi_stop();
+ CHECK(lbi_fd() == -1 && lbi_take(&dx, &dy) == 0, "the synthetic pointer stops");
+ CHECK(wakes >= 10 && took >= 10, "it wakes the loop like a device (%d wakes, %d frames with events)", wakes, took);
+ CHECK(lbf_end(&fs) == 0 && fs.inputs >= 15 && fs.inputs <= 30, "about 125 events a second: %d in ~0.2 s", fs.inputs);
+ CHECK(fs.in_p50 > 0 && fs.in_p99 < 100, "latencies %f %f", fs.in_p50, fs.in_p99);
+ CHECK(fabs(dx) <= 200.01 && fabs(dy) <= 50.01, "positions on the path %f %f", dx, dy);
+
/* ---- workloads, short ---- */
double v;
CHECK((v = lb_sha256(1, 0.1)) > 1, "sha256 %f", v);
diff --git a/server/tests/sysinfo_perf_test.mjs b/server/tests/sysinfo_perf_test.mjs
index b9ca7ef..0a4d871 100644
--- a/server/tests/sysinfo_perf_test.mjs
+++ b/server/tests/sysinfo_perf_test.mjs
@@ -78,6 +78,10 @@ dv = desktopVerdict(desk({ 'comp.p99': v(4), 'comp.missed': v(0), 'desk.p99': v(
eq('p99 over the budget under load', [dv.state, dv.notes.map((x) => x.id)], ['warn', ['compFits', 'deskOver']]);
dv = desktopVerdict(desk({ 'comp.p99': v(4), 'comp.missed': v(8), 'desk.p99': v(5), 'desk.missed': v(40) }));
eq('late frames', [dv.state, dv.notes.map((x) => x.id)], ['fail', ['compFits', 'compMissed', 'deskFits', 'deskMissedMany']]);
+dv = desktopVerdict(desk({ 'comp.p99': v(4), 'comp.missed': v(0), 'comp.in50': v(20), 'comp.in99': v(30), 'desk.p99': v(9), 'desk.missed': v(1), 'desk.in50': v(35), 'desk.in99': v(60) }));
+eq('pointer latency: within three frames alone, over under load', [dv.state, dv.notes.map((x) => x.id)], ['warn', ['compFits', 'compInputOk', 'deskFits', 'deskInputSlow']]);
+eq('pointer latency notes carry their numbers', dv.notes[3].vars, { in50: 35, in99: 60 });
+eq('no pointer latency without both numbers', desktopVerdict(desk({ 'comp.p99': v(4), 'comp.in99': v(90) })).notes.map((x) => x.id), ['compFits']);
eq('a 144 Hz budget is tighter', desktopVerdict(desk({ 'comp.p99': v(9), 'comp.missed': v(0) }, 1000 / 144)).state, 'warn');
eq('every desktop id is a server measurement', DESKTOP_CATEGORIES.flatMap((c) => c.ids).every((id) => /^(comp|desk)\./.test(id)), true);
eq('video is a peak category', CATEGORIES.some((c) => c.id === 'video' && c.ids.length === 8), true);
diff --git a/tools/iso/mkdeb.sh b/tools/iso/mkdeb.sh
index 616a40e..90f5172 100755
--- a/tools/iso/mkdeb.sh
+++ b/tools/iso/mkdeb.sh
@@ -8,8 +8,10 @@
# /usr/lib/lordos/bin/lord-netd system networking (root; launched and watched by lord-sessiond)
# /usr/lib/lordos/bin/lord-fand fan control by temperature (root, own service, enabled)
# /usr/lib/lordos/bin/lord-server each session's server (looks for ../themes and ../assets)
-# /usr/bin/lordos-sysreport System Information's report as a command (user; docs/BENCHMARK.md)
-# /usr/bin/lordos-fetch the crown and a summary of the computer (a link to lordos-sysreport)
+# /usr/bin/lordos-sysreport System Information's report and LordBench as a command (user;
+# docs/BENCHMARK.md): a link to /usr/lib/lordos/bin/lordos-sysreport,
+# which starts the lord-bench and lord-media next to it
+# /usr/bin/lordos-fetch the crown and a summary of the computer (a link to the same binary)
# /usr/bin/lordos-testbench the visual test bench (a Wayland client; docs/PAPER-VALIDATION.md), and
# /usr/share/applications/lordos-testbench.desktop its launcher entry
# /usr/lib/lordos/themes/<theme>/ theme.json, theme.bundle.js and their resources (greeter: the
@@ -70,11 +72,13 @@ if [ "${DEB_ARCH:-}" = arm64 ] && [ "$(dpkg --print-architecture)" != arm64 ]; t
fi
# the LordOS Imager's first-run file applier (Raspberry Pi image, rpi/firstboot; docs/IMAGER.md)
install -m 755 server/build/lordos-firstrun "$L/bin/lordos-firstrun"
-# System Information's report for a terminal, SSH or CI; lord-server never runs it
+# System Information's report and LordBench for a terminal, SSH or CI; lord-server never runs it. In the
+# LordOS folder because `bench` only starts the lord-bench next to its own binary (/proc/self/exe)
install -d "$PKG/usr/bin"
-install -m 755 server/build/lordos-sysreport "$PKG/usr/bin/lordos-sysreport"
-"$STRIP" --strip-unneeded "$PKG/usr/bin/lordos-sysreport" 2>/dev/null || true
-ln -s lordos-sysreport "$PKG/usr/bin/lordos-fetch"
+install -m 755 server/build/lordos-sysreport "$L/bin/lordos-sysreport"
+"$STRIP" --strip-unneeded "$L/bin/lordos-sysreport" 2>/dev/null || true
+ln -s ../lib/lordos/bin/lordos-sysreport "$PKG/usr/bin/lordos-sysreport"
+ln -s ../lib/lordos/bin/lordos-sysreport "$PKG/usr/bin/lordos-fetch"
# the visual test bench: a plain Wayland client, launched like any Linux app
[ -x server/build/lordos-testbench ] && {
install -m 755 server/build/lordos-testbench "$PKG/usr/bin/lordos-testbench"
diff --git a/web/content/faq/faq.json b/web/content/faq/faq.json
index e3c4603..cdc5063 100644
--- a/web/content/faq/faq.json
+++ b/web/content/faq/faq.json
@@ -703,9 +703,9 @@
"pt": "Posso medir quão rápido o LordOS roda no meu computador?"
},
"a": {
- "en": "Coming in 0.8.6 (in development; the latest release is 0.8.5-beta): System Information gets a Performance tab with LordBench, a quick and a full test of the processor, memory, graphics, video decoding, disk and sustained load, run in an isolated helper that stops near the temperature limit. Results are shown against reference machines measured the same way, with the conditions of each run, never as one score, and nothing is sent anywhere. A separate desktop test measures whether the desktop stays smooth while the computer is busy, and a boot test restarts it several times and keeps the median time to the login screen (a Raspberry Pi 5 with a monitor reaches it in about 6 seconds).",
- "es": "Llega en la 0.8.6 (en desarrollo; la última versión es la 0.8.5-beta): Información del sistema suma una pestaña Rendimiento con LordBench, una prueba rápida y una completa del procesador, la memoria, los gráficos, la decodificación de video, el disco y la carga sostenida, que corre en un ayudante aislado y se detiene cerca del límite de temperatura. Los resultados se muestran frente a máquinas de referencia medidas de la misma forma, con las condiciones de cada prueba, nunca como un único puntaje, y no se envía nada a ningún lado. Una prueba aparte mide si el escritorio sigue fluido mientras la computadora está ocupada, y una prueba de arranque la reinicia varias veces y se queda con la mediana del tiempo hasta la pantalla de inicio de sesión (una Raspberry Pi 5 con monitor llega en unos 6 segundos).",
- "pt": "Chega na 0.8.6 (em desenvolvimento; a última versão é a 0.8.5-beta): Informações do sistema ganha uma aba Desempenho com o LordBench, um teste rápido e um completo do processador, da memória, dos gráficos, da decodificação de vídeo, do disco e da carga contínua, executado num auxiliar isolado que para perto do limite de temperatura. Os resultados aparecem frente a máquinas de referência medidas da mesma forma, com as condições de cada teste, nunca como uma única pontuação, e nada é enviado a lugar nenhum. Um teste à parte mede se o desktop continua fluido enquanto o computador está ocupado, e um teste de boot o reinicia várias vezes e fica com a mediana do tempo até a tela de login (um Raspberry Pi 5 com monitor chega em cerca de 6 segundos)."
+ "en": "Coming in 0.8.6 (in development; the latest release is 0.8.5-beta): System Information gets a Performance tab with LordBench, a quick and a full test of the processor, memory, graphics, video decoding, disk and sustained load, run in an isolated helper that stops near the temperature limit. Results are shown against reference machines measured the same way, with the conditions of each run, never as one score, and nothing is sent anywhere. A separate desktop test measures whether the desktop stays smooth, and how fast the pointer reaches the screen, while the computer is busy, and a boot test restarts it several times and keeps the median time to the login screen (a Raspberry Pi 5 with a monitor reaches it in about 6 seconds).",
+ "es": "Llega en la 0.8.6 (en desarrollo; la última versión es la 0.8.5-beta): Información del sistema suma una pestaña Rendimiento con LordBench, una prueba rápida y una completa del procesador, la memoria, los gráficos, la decodificación de video, el disco y la carga sostenida, que corre en un ayudante aislado y se detiene cerca del límite de temperatura. Los resultados se muestran frente a máquinas de referencia medidas de la misma forma, con las condiciones de cada prueba, nunca como un único puntaje, y no se envía nada a ningún lado. Una prueba aparte mide si el escritorio sigue fluido, y cuánto tarda el puntero en llegar a la pantalla, mientras la computadora está ocupada, y una prueba de arranque la reinicia varias veces y se queda con la mediana del tiempo hasta la pantalla de inicio de sesión (una Raspberry Pi 5 con monitor llega en unos 6 segundos).",
+ "pt": "Chega na 0.8.6 (em desenvolvimento; a última versão é a 0.8.5-beta): Informações do sistema ganha uma aba Desempenho com o LordBench, um teste rápido e um completo do processador, da memória, dos gráficos, da decodificação de vídeo, do disco e da carga contínua, executado num auxiliar isolado que para perto do limite de temperatura. Os resultados aparecem frente a máquinas de referência medidas da mesma forma, com as condições de cada teste, nunca como uma única pontuação, e nada é enviado a lugar nenhum. Um teste à parte mede se o desktop continua fluido, e quanto o ponteiro demora para chegar à tela, enquanto o computador está ocupado, e um teste de boot o reinicia várias vezes e fica com a mediana do tempo até a tela de login (um Raspberry Pi 5 com monitor chega em cerca de 6 segundos)."
}
}
]
diff --git a/web/content/paper/paper.en.md b/web/content/paper/paper.en.md
index ee39f29..418a90e 100644
--- a/web/content/paper/paper.en.md
+++ b/web/content/paper/paper.en.md
@@ -484,11 +484,11 @@ The Raspberry Pi 5 is the only supported board. Results on a real board (16 GB,
**Fans.** On the Pi 5 in a test case, `lord-fand` kept the fan off at 50–53 °C during a 4-thread load (the aluminium case acts as a heatsink), drove it to 55 % (4,500 RPM) and full speed (7,400 RPM) with test curves, and restored the kernel's own settings after `SIGTERM` and `kill -9` (`docs/FANS.md`).
-**Monitor and image.** Since 0.8.4.1 the Raspberry Pi 5 image shows the desktop on an HDMI monitor at the first boot (the display driver line in `config.txt` now comes after the firmware's auto-detection lines, and LordOS waits up to 30 s for the driver), sets the clock from the network, and ships Chromium and Firefox ESR. Since 0.8.4 the LordOS Pi kernel (`6.18.57-lordos.3-rpi-2712`) also destroys the connections of a blocked app. **Measured on a monitor (LordBench, 0.8.6 in development):** the 0.8.5 image booted with a 1920×1080 60 Hz monitor on either HDMI port reaches the login screen 5.99 s after the kernel starts (systemd: 2.1 s kernel, 4.2 s userspace). With GPU composition (V3D) a window moved by the compositor keeps 59.4 frames per second, with a frame built in 10.9 ms (median) and 13.0 ms (99th percentile) and 1.0 % of frames late; under an all-core load at the lowest priority it falls to 24 frames per second with 96.5 % late, a problem LordBench found: the compositor's cgroup weighed the same as the load's, so the load's low priority did not count. Giving the compositor ten times the CPU weight of an app and a shorter time slice raised the same test, run without the monitor, from 35 to 48 frames per second (61 % → 23 % late); the measurement with the monitor is pending. In a 3-minute all-core load with the fan the board kept 5.9 GFLOP/s at 55.6 °C at most, and it decodes 1080p video in software at 258 (H.264), 246 (HEVC), 204 (VP9) and 159 (AV1) frames per second.
+**Monitor and image.** Since 0.8.4.1 the Raspberry Pi 5 image shows the desktop on an HDMI monitor at the first boot (the display driver line in `config.txt` now comes after the firmware's auto-detection lines, and LordOS waits up to 30 s for the driver), sets the clock from the network, and ships Chromium and Firefox ESR. Since 0.8.4 the LordOS Pi kernel (`6.18.57-lordos.3-rpi-2712`) also destroys the connections of a blocked app. **Measured on a monitor (LordBench, 0.8.6 in development):** the 0.8.5 image booted with a 1920×1080 60 Hz monitor on either HDMI port reaches the login screen 5.99 s after the kernel starts (systemd: 2.1 s kernel, 4.2 s userspace). With GPU composition (V3D) a window moved by the compositor keeps 59.4 frames per second, with a frame built in 10.9 ms (median) and 13.0 ms (99th percentile) and 1.0 % of frames late; under an all-core load at the lowest priority it falls to 24 frames per second with 96.5 % late, a problem LordBench found: the compositor's cgroup weighed the same as the load's, so the load's low priority did not count. Giving the compositor ten times the CPU weight of an app raised the same test, run without the monitor, from 43–45 to 56–57 frames per second (31–33 % → 7–8 % late) and brought a pointer move to the screen in 22 ms instead of 32 ms (median); the measurement with the monitor is pending. In a 3-minute all-core load with the fan the board kept 5.9 GFLOP/s at 55.6 °C at most, and it decodes 1080p video in software at 258 (H.264), 246 (HEVC), 204 (VP9) and 159 (AV1) frames per second.
### 7.5 Modern PCs
-There are no measurements on real PCs in the repository yet. The ISO is tested on virtual machines (UEFI and BIOS); testing on a real AMD machine from the live USB is planned. LordBench (0.8.6) is designed to measure memory and CPU at idle, boot time, frame times, video and app start in a repeatable way, and community hardware reports (0.8.7) to collect them from real machines (`docs/BENCHMARK.md`). In development for 0.8.6 (unreleased; the latest release is 0.8.5-beta), its first part is built: a sandboxed `lord-bench` helper that measures the CPU, memory, the GPU offscreen, storage and a sustained load, stops near the temperature limit or when the processor throttles, and records the conditions of each run, shown in System Information → Performance as "×N" of reference machines; it also measures software video decoding and the remote desktop's encoders, the desktop's frame times alone and under a low-priority load, and boot time over several restarts. The references are a virtual machine and a Raspberry Pi 5 (§7.4); input latency, hardware video decoding and a real PC reference are not built yet.
+There are no measurements on real PCs in the repository yet. The ISO is tested on virtual machines (UEFI and BIOS); testing on a real AMD machine from the live USB is planned. LordBench (0.8.6) is designed to measure memory and CPU at idle, boot time, frame times, video and app start in a repeatable way, and community hardware reports (0.8.7) to collect them from real machines (`docs/BENCHMARK.md`). In development for 0.8.6 (unreleased; the latest release is 0.8.5-beta), its first part is built: a sandboxed `lord-bench` helper that measures the CPU, memory, the GPU offscreen, storage and a sustained load, stops near the temperature limit or when the processor throttles, and records the conditions of each run, shown in System Information → Performance as "×N" of reference machines; it also measures software video decoding and the remote desktop's encoders, the desktop's frame times and the time from a pointer move to the screen, alone and under a low-priority load, and boot time over several restarts; it also runs from a terminal (`lordos-sysreport bench`). The references are a virtual machine and a Raspberry Pi 5 (§7.4); hardware video decoding and a real PC reference are not built yet.
### Source files
diff --git a/web/content/paper/paper.es.md b/web/content/paper/paper.es.md
index 96d4f5b..805388b 100644
--- a/web/content/paper/paper.es.md
+++ b/web/content/paper/paper.es.md
@@ -484,11 +484,11 @@ La Raspberry Pi 5 es la única placa soportada. Resultados en una placa real (16
**Ventiladores.** En la Pi 5 dentro de un gabinete de prueba, `lord-fand` mantuvo el ventilador apagado a 50–53 °C durante una carga de 4 hilos (el gabinete de aluminio funciona como disipador), lo llevó al 55 % (4.500 RPM) y a velocidad máxima (7.400 RPM) con curvas de prueba, y restauró la configuración propia del kernel después de `SIGTERM` y de `kill -9` (`docs/FANS.md`).
-**Monitor e imagen.** Desde la 0.8.4.1 la imagen para Raspberry Pi 5 muestra el escritorio en un monitor HDMI en el primer arranque (la línea del driver de pantalla en `config.txt` ahora va después de las líneas de autodetección del firmware, y LordOS espera hasta 30 s al driver), pone la hora desde la red y trae Chromium y Firefox ESR. Desde la 0.8.4 el kernel de LordOS para la Pi (`6.18.57-lordos.3-rpi-2712`) además destruye las conexiones de una app bloqueada. **Medido con monitor (LordBench, 0.8.6 en desarrollo):** la imagen 0.8.5 arrancada con un monitor de 1920×1080 a 60 Hz en cualquiera de los dos puertos HDMI llega a la pantalla de inicio de sesión 5,99 s después de que arranca el kernel (systemd: 2,1 s de kernel y 4,2 s del resto). Con composición por GPU (V3D), una ventana movida por el compositor se mantiene en 59,4 cuadros por segundo, con un cuadro armado en 10,9 ms (mediana) y 13,0 ms (percentil 99) y el 1,0 % de cuadros tarde; con una carga en todos los núcleos a la menor prioridad baja a 24 cuadros por segundo con el 96,5 % tarde, un problema que encontró LordBench: el cgroup del compositor pesaba lo mismo que el de la carga, así que la baja prioridad de la carga no contaba. Darle al compositor diez veces el peso de CPU de una app y una porción de tiempo más corta subió la misma prueba, sin el monitor, de 35 a 48 cuadros por segundo (61 % → 23 % tarde); falta la medición con el monitor. En 3 minutos de carga en todos los núcleos con el ventilador la placa mantuvo 5,9 GFLOP/s con 55,6 °C como máximo, y decodifica video 1080p por software a 258 (H.264), 246 (HEVC), 204 (VP9) y 159 (AV1) cuadros por segundo.
+**Monitor e imagen.** Desde la 0.8.4.1 la imagen para Raspberry Pi 5 muestra el escritorio en un monitor HDMI en el primer arranque (la línea del driver de pantalla en `config.txt` ahora va después de las líneas de autodetección del firmware, y LordOS espera hasta 30 s al driver), pone la hora desde la red y trae Chromium y Firefox ESR. Desde la 0.8.4 el kernel de LordOS para la Pi (`6.18.57-lordos.3-rpi-2712`) además destruye las conexiones de una app bloqueada. **Medido con monitor (LordBench, 0.8.6 en desarrollo):** la imagen 0.8.5 arrancada con un monitor de 1920×1080 a 60 Hz en cualquiera de los dos puertos HDMI llega a la pantalla de inicio de sesión 5,99 s después de que arranca el kernel (systemd: 2,1 s de kernel y 4,2 s del resto). Con composición por GPU (V3D), una ventana movida por el compositor se mantiene en 59,4 cuadros por segundo, con un cuadro armado en 10,9 ms (mediana) y 13,0 ms (percentil 99) y el 1,0 % de cuadros tarde; con una carga en todos los núcleos a la menor prioridad baja a 24 cuadros por segundo con el 96,5 % tarde, un problema que encontró LordBench: el cgroup del compositor pesaba lo mismo que el de la carga, así que la baja prioridad de la carga no contaba. Darle al compositor diez veces el peso de CPU de una app subió la misma prueba, sin el monitor, de 43–45 a 56–57 cuadros por segundo (31–33 % → 7–8 % tarde) y llevó un movimiento del puntero a la pantalla en 22 ms en vez de 32 ms (mediana); falta la medición con el monitor. En 3 minutos de carga en todos los núcleos con el ventilador la placa mantuvo 5,9 GFLOP/s con 55,6 °C como máximo, y decodifica video 1080p por software a 258 (H.264), 246 (HEVC), 204 (VP9) y 159 (AV1) cuadros por segundo.
### 7.5 PC modernas
-Todavía no hay mediciones en PC reales en el repositorio. La ISO se prueba en máquinas virtuales (UEFI y BIOS); está planeado probarla en una máquina AMD real desde el USB live. LordBench (0.8.6) está diseñado para medir de forma repetible la memoria y la CPU en reposo, el tiempo de arranque, los tiempos de cuadro, el video y el inicio de apps, y los informes de hardware de la comunidad (0.8.7), para recolectar esas mediciones de máquinas reales (`docs/BENCHMARK.md`). En desarrollo para la 0.8.6 (sin publicar; la última versión es la 0.8.5-beta), su primera parte ya está construida: un ayudante aislado, `lord-bench`, que mide la CPU, la memoria, la GPU fuera de pantalla, el almacenamiento y una carga sostenida, se detiene cerca del límite de temperatura o cuando el procesador baja la velocidad, y registra las condiciones de cada prueba, que Información del sistema → Rendimiento muestra como «×N» de máquinas de referencia; también mide la decodificación de video por software y los codificadores del escritorio remoto, los tiempos de cuadro del escritorio solo y bajo una carga de baja prioridad, y el tiempo de arranque en varios reinicios. Las referencias son una máquina virtual y una Raspberry Pi 5 (§7.4); la latencia de entrada, la decodificación de video por hardware y una referencia de PC real todavía no están construidas.
+Todavía no hay mediciones en PC reales en el repositorio. La ISO se prueba en máquinas virtuales (UEFI y BIOS); está planeado probarla en una máquina AMD real desde el USB live. LordBench (0.8.6) está diseñado para medir de forma repetible la memoria y la CPU en reposo, el tiempo de arranque, los tiempos de cuadro, el video y el inicio de apps, y los informes de hardware de la comunidad (0.8.7), para recolectar esas mediciones de máquinas reales (`docs/BENCHMARK.md`). En desarrollo para la 0.8.6 (sin publicar; la última versión es la 0.8.5-beta), su primera parte ya está construida: un ayudante aislado, `lord-bench`, que mide la CPU, la memoria, la GPU fuera de pantalla, el almacenamiento y una carga sostenida, se detiene cerca del límite de temperatura o cuando el procesador baja la velocidad, y registra las condiciones de cada prueba, que Información del sistema → Rendimiento muestra como «×N» de máquinas de referencia; también mide la decodificación de video por software y los codificadores del escritorio remoto, los tiempos de cuadro del escritorio y el tiempo de un movimiento del puntero hasta la pantalla, solo y bajo una carga de baja prioridad, y el tiempo de arranque en varios reinicios; también corre desde una terminal (`lordos-sysreport bench`). Las referencias son una máquina virtual y una Raspberry Pi 5 (§7.4); la decodificación de video por hardware y una referencia de PC real todavía no están construidas.
### Archivos fuente
diff --git a/web/content/paper/paper.pt.md b/web/content/paper/paper.pt.md
index 77d358c..9ca1dd6 100644
--- a/web/content/paper/paper.pt.md
+++ b/web/content/paper/paper.pt.md
@@ -484,11 +484,11 @@ O Raspberry Pi 5 é a única placa suportada. Resultados numa placa real (16 GB,
**Ventoinhas.** No Pi 5 num gabinete de teste, o `lord-fand` manteve a ventoinha desligada a 50–53 °C durante uma carga de 4 threads (o gabinete de alumínio funciona como dissipador), a levou a 55 % (4.500 RPM) e à velocidade máxima (7.400 RPM) com curvas de teste e restaurou as configurações do próprio kernel depois de `SIGTERM` e `kill -9` (`docs/FANS.md`).
-**Monitor e imagem.** Desde a 0.8.4.1 a imagem do Raspberry Pi 5 mostra o desktop num monitor HDMI no primeiro boot (a linha do driver de vídeo no `config.txt` agora vem depois das linhas de autodetecção do firmware, e o LordOS espera até 30 s pelo driver), acerta o relógio pela rede e traz Chromium e Firefox ESR. Desde a 0.8.4 o kernel do LordOS para o Pi (`6.18.57-lordos.3-rpi-2712`) também destrói as conexões de um app bloqueado. **Medido com monitor (LordBench, 0.8.6 em desenvolvimento):** a imagem 0.8.5 inicializada com um monitor de 1920×1080 a 60 Hz em qualquer uma das duas portas HDMI chega à tela de login 5,99 s depois que o kernel inicia (systemd: 2,1 s de kernel e 4,2 s do resto). Com composição na GPU (V3D), uma janela movida pelo compositor se mantém em 59,4 quadros por segundo, com um quadro montado em 10,9 ms (mediana) e 13,0 ms (percentil 99) e 1,0 % dos quadros atrasados; com uma carga em todos os núcleos na menor prioridade cai para 24 quadros por segundo com 96,5 % atrasados, um problema que o LordBench encontrou: o cgroup do compositor pesava o mesmo que o da carga, então a baixa prioridade da carga não contava. Dar ao compositor dez vezes o peso de CPU de um app e uma fatia de tempo mais curta elevou o mesmo teste, sem o monitor, de 35 para 48 quadros por segundo (61 % → 23 % atrasados); falta a medição com o monitor. Em 3 minutos de carga em todos os núcleos com o ventilador a placa manteve 5,9 GFLOP/s com 55,6 °C no máximo, e decodifica vídeo 1080p por software a 258 (H.264), 246 (HEVC), 204 (VP9) e 159 (AV1) quadros por segundo.
+**Monitor e imagem.** Desde a 0.8.4.1 a imagem do Raspberry Pi 5 mostra o desktop num monitor HDMI no primeiro boot (a linha do driver de vídeo no `config.txt` agora vem depois das linhas de autodetecção do firmware, e o LordOS espera até 30 s pelo driver), acerta o relógio pela rede e traz Chromium e Firefox ESR. Desde a 0.8.4 o kernel do LordOS para o Pi (`6.18.57-lordos.3-rpi-2712`) também destrói as conexões de um app bloqueado. **Medido com monitor (LordBench, 0.8.6 em desenvolvimento):** a imagem 0.8.5 inicializada com um monitor de 1920×1080 a 60 Hz em qualquer uma das duas portas HDMI chega à tela de login 5,99 s depois que o kernel inicia (systemd: 2,1 s de kernel e 4,2 s do resto). Com composição na GPU (V3D), uma janela movida pelo compositor se mantém em 59,4 quadros por segundo, com um quadro montado em 10,9 ms (mediana) e 13,0 ms (percentil 99) e 1,0 % dos quadros atrasados; com uma carga em todos os núcleos na menor prioridade cai para 24 quadros por segundo com 96,5 % atrasados, um problema que o LordBench encontrou: o cgroup do compositor pesava o mesmo que o da carga, então a baixa prioridade da carga não contava. Dar ao compositor dez vezes o peso de CPU de um app elevou o mesmo teste, sem o monitor, de 43–45 para 56–57 quadros por segundo (31–33 % → 7–8 % atrasados) e levou um movimento do ponteiro à tela em 22 ms em vez de 32 ms (mediana); falta a medição com o monitor. Em 3 minutos de carga em todos os núcleos com o ventilador a placa manteve 5,9 GFLOP/s com 55,6 °C no máximo, e decodifica vídeo 1080p por software a 258 (H.264), 246 (HEVC), 204 (VP9) e 159 (AV1) quadros por segundo.
### 7.5 PCs modernos
-Ainda não há medições em PCs reais no repositório. A ISO é testada em máquinas virtuais (UEFI e BIOS); está planejado testá-la numa máquina AMD real a partir do pendrive live. O LordBench (0.8.6) foi projetado para medir de forma repetível memória e CPU em repouso, tempo de boot, tempos de quadro, vídeo e abertura de apps, e os relatórios de hardware da comunidade (0.8.7), para coletar essas medições de máquinas reais (`docs/BENCHMARK.md`). Em desenvolvimento para a 0.8.6 (não publicada; a última versão é a 0.8.5-beta), sua primeira parte já está construída: um auxiliar isolado, `lord-bench`, que mede a CPU, a memória, a GPU fora da tela, o armazenamento e uma carga contínua, para perto do limite de temperatura ou quando o processador reduz a velocidade, e registra as condições de cada teste, que Informações do Sistema → Desempenho mostra como «×N» de máquinas de referência; também mede a decodificação de vídeo por software e os codificadores da área de trabalho remota, os tempos de quadro do desktop sozinho e sob uma carga de baixa prioridade, e o tempo de boot em várias reinicializações. As referências são uma máquina virtual e um Raspberry Pi 5 (§7.4); a latência de entrada, a decodificação de vídeo por hardware e uma referência de PC real ainda não estão construídas.
+Ainda não há medições em PCs reais no repositório. A ISO é testada em máquinas virtuais (UEFI e BIOS); está planejado testá-la numa máquina AMD real a partir do pendrive live. O LordBench (0.8.6) foi projetado para medir de forma repetível memória e CPU em repouso, tempo de boot, tempos de quadro, vídeo e abertura de apps, e os relatórios de hardware da comunidade (0.8.7), para coletar essas medições de máquinas reais (`docs/BENCHMARK.md`). Em desenvolvimento para a 0.8.6 (não publicada; a última versão é a 0.8.5-beta), sua primeira parte já está construída: um auxiliar isolado, `lord-bench`, que mede a CPU, a memória, a GPU fora da tela, o armazenamento e uma carga contínua, para perto do limite de temperatura ou quando o processador reduz a velocidade, e registra as condições de cada teste, que Informações do Sistema → Desempenho mostra como «×N» de máquinas de referência; também mede a decodificação de vídeo por software e os codificadores da área de trabalho remota, os tempos de quadro do desktop e o tempo de um movimento do ponteiro até a tela, sozinho e sob uma carga de baixa prioridade, e o tempo de boot em várias reinicializações; também roda a partir de um terminal (`lordos-sysreport bench`). As referências são uma máquina virtual e um Raspberry Pi 5 (§7.4); a decodificação de vídeo por hardware e uma referência de PC real ainda não estão construídas.
### Arquivos-fonte