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.

System Information's Raspberry Pi power and throttling rows read the firmware the way LordBench does, through a shared reader (hw/rpifw.c, also used by bench/lbcond.c): rpi_volt's under-voltage alarm (the only flag the LordOS 6.18 kernel exposes) and get_throttled where an older kernel has it, strictly parsed; what the kernel doesn't show is left out (no Throttling row on the LordOS kernel), sticky bits read as the last few seconds when rpi_volt clears them; underVoltageAlarm in the report; piStatus in the app (en/es/pt); fake-sysfs tests; BENCHMARK, ROADMAP, PAPER-VALIDATION, CHANGELOG, paper (en/es/pt), FAQ

Federico Pereiraead5a7daaf6c
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c262f2c..f4edaf8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -156,7 +156,7 @@ of the matching [GitHub release](https://github.com/lordbasex/LordOS/releases),
`in0_lcrit_alarm` (0444), "under-voltage in the last 2 s"; the capped, throttled and soft-limit bits are not
exposed without the mailbox, which LordBench never opens. So lord-server now: reads the alarm strictly (`0` or
`1`); still reads `get_throttled` where an older kernel has it, strictly (1-8 hex digits, optional `0x`,
- `lb_rpi_parse_throttled`, masked to bits 0-3 "now" and 16-19 "has occurred"; anything else is unknown instead of
+ `rpifw_parse_throttled`, masked to bits 0-3 "now" and 16-19 "has occurred"; anything else is unknown instead of
being half-parsed); knows a Pi from that hwmon, that file or the device tree's `raspberrypi,` compatible; and on a
Pi counts the hottest zone at or above 80 °C as the firmware's limit (Raspberry Pi documents progressive Arm
throttling from 80 °C; the Pi 5's thermal zone has no passive trip, so before this the guard waited for 100 °C).
@@ -191,6 +191,36 @@ of the matching [GitHub release](https://github.com/lordbasex/LordOS/releases),
### Fixed
+- **System Information's Raspberry Pi power and throttling rows** (2026-10-29; `server/src/hw/rpifw.c`,
+ `sysreport/sysreport.c`, `apps/sysinfo`; tested on fake sysfs trees and VM 116, **not yet on a real Pi**): the
+ collector looked only for the firmware's `get_throttled` (`soc@107c000000:firmware` on the Pi 5), which the
+ `rpi-6.18.y` kernel LordOS ships doesn't have, so on a Pi 5 with LordOS the Power and Throttling rows were always
+ empty (and the Markdown report said nothing). System Information now reads the firmware the same way LordBench's
+ guards do, from one shared reader, **`hw/rpifw.c`** (`rpifw_read`, `rpifw_parse_throttled`; linked into
+ lord-server, `lordos-sysreport` and both tests; `bench/lbcond.c` uses it instead of its own copy): the `rpi_volt`
+ hwmon's `in0_lcrit_alarm`, exactly `0` or `1` (with an optional newline; anything else is unknown), and
+ `get_throttled` where an older kernel has it (directly under a `/sys/devices/platform` node or its
+ `<node>:firmware` child), strictly parsed (1-8 hex digits, optional `0x`, one optional newline, masked to the
+ eight known bits). World-readable sysfs only: no mailbox, no `vcgencmd`, no exec. What the kernel shows is
+ reported and what it doesn't is left out:
+ - **The LordOS kernel (rpi_volt only):** the Power row says "No under-voltage in the last few seconds" or
+ "Under-voltage in the last few seconds: use the official power supply" (the hwmon asks the firmware every 2 s and
+ clears the sticky bits, so it can't tell "since boot"); there is **no Throttling row** (the kernel doesn't expose
+ the capped, throttled and soft-limit bits), never a false "never slowed down".
+ - **An older kernel with `get_throttled` and no `rpi_volt`:** the rows as before, "now" and "since boot", and the
+ soft temperature limit now counts as slowed down too.
+ - **Both:** the sticky bits only cover the last 2 s window (`rpi_volt` clears them), so the rows say "in the last
+ few seconds" instead of "since boot".
+ - **Neither, or a value that doesn't parse:** model and revision only.
+ The report's JSON `raspberryPi` gains `underVoltageAlarm` (`true`, `false` or `null`; `throttled` stays the raw
+ bits or `null`); the Markdown report says "no under-voltage in the last 2 s (rpi_volt); throttling not reported by
+ this kernel" on the LordOS kernel, and the now/since-boot/last-2-s wording with the raw bits on older ones. The
+ rows' choice is `piStatus` in `apps/sysinfo/model.js`. Four new strings (en, es, pt). Tests:
+ `tests/sysreport_test.c` (the Pi 5 fixture now has the LordOS kernel's `rpi_volt` and an empty
+ `soc@107c000000:firmware`; thirteen small trees: that kernel with the alarm clear, set, `yes`, `01` and missing; an
+ older Pi 4 and Pi 5 kernel with `get_throttled` set, clear and "now"; both sources; a malformed value and a second
+ line; a Pi with neither; a machine that isn't a Pi with both files; 790 checks) and
+ `tests/sysinfo_model_test.mjs` (`piStatus`, 68 checks). `build/lordbench-test` still passes (1,198 checks).
- **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
diff --git a/apps/sysinfo/index.jsx b/apps/sysinfo/index.jsx
index 9033b5f..545b93a 100644
--- a/apps/sysinfo/index.jsx
+++ b/apps/sysinfo/index.jsx
@@ -12,7 +12,7 @@ import { useMemo, useState } from 'react';
import { evaluate as evaluateChecks, evaluateProbe, evaluateBench, PENDING as PENDING_CHECKS, PROBE_CHECKS } from './checks.js';
import Performance from './performance.jsx';
import { Scene } from './scene.jsx';
-import { cardLayers, sessionLayers, compatibility, hardwareSections, throttleFlags, machineName, compositionReason, reportFileName, reportJson, parseMemoryLines } from './model.js';
+import { cardLayers, sessionLayers, compatibility, hardwareSections, piStatus, machineName, compositionReason, reportFileName, reportJson, parseMemoryLines } from './model.js';
// The app's icon: a chip on the brand gradient.
export function Icon({ size: s }) {
@@ -244,13 +244,13 @@ function Section({ id, r }) {
</GroupBox>);
case 'raspberryPi': {
const pi = r.raspberryPi;
- const f = throttleFlags(pi.throttled);
+ const st = piStatus(pi);
return (
<GroupBox>
<Row label={tr('sysinfo.f.model')} value={pi.model} />
<Row label={tr('sysinfo.f.revision')} value={pi.revision} />
- <Row label={tr('sysinfo.f.power')} value={!f ? '' : f.underVoltageNow ? tr('sysinfo.pi.underVoltageNow') : f.underVoltage ? tr('sysinfo.pi.underVoltageSeen') : tr('sysinfo.pi.powerOk')} />
- <Row label={tr('sysinfo.f.throttling')} value={!f ? '' : f.throttledNow || f.cappedNow ? tr('sysinfo.pi.throttledNow') : f.throttled || f.capped ? tr('sysinfo.pi.throttledSeen') : tr('sysinfo.pi.throttleOk')} />
+ {st.power && <Row label={tr('sysinfo.f.power')} value={tr(`sysinfo.pi.${st.power}`)} />}
+ {st.throttling && <Row label={tr('sysinfo.f.throttling')} value={tr(`sysinfo.pi.${st.throttling}`)} />}
</GroupBox>);
}
case 'software': return (
diff --git a/apps/sysinfo/model.js b/apps/sysinfo/model.js
index f093654..74ddfa1 100644
--- a/apps/sysinfo/model.js
+++ b/apps/sysinfo/model.js
@@ -127,6 +127,29 @@ export function throttleFlags(v) {
};
}
+// The Raspberry Pi section's power and throttling rows, as locale keys under sysinfo.pi (null: the kernel
+// doesn't tell, so the row is left out). `throttled` is get_throttled (older kernels only); `underVoltageAlarm`
+// rpi_volt's alarm, the only one the LordOS kernel has. rpi_volt clears the sticky bits every 2 s, so with it
+// they mean "in the last few seconds", never "since boot".
+export function piStatus(pi) {
+ if (!pi) return { power: null, throttling: null };
+ const f = throttleFlags(pi.throttled);
+ const alarm = typeof pi.underVoltageAlarm === 'boolean' ? pi.underVoltageAlarm : null;
+ const recent = alarm !== null;
+ let power = null;
+ let throttling = null;
+ if (f) {
+ power = f.underVoltageNow ? 'underVoltageNow' : f.underVoltage ? (recent ? 'underVoltageRecent' : 'underVoltageSeen')
+ : recent ? 'powerOkRecent' : 'powerOk';
+ throttling = f.throttledNow || f.cappedNow || f.softLimitNow ? 'throttledNow'
+ : f.throttled || f.capped || f.softLimit ? (recent ? 'throttledRecent' : 'throttledSeen')
+ : recent ? 'throttleOkRecent' : 'throttleOk';
+ } else if (recent) {
+ power = alarm ? 'underVoltageRecent' : 'powerOkRecent';
+ }
+ return { power, throttling };
+}
+
// A machine's one-line name: vendor and product, the device tree model, or the hypervisor.
export function machineName(r) {
const m = (r && r.machine) || {};
diff --git a/assets/locales/en/sysinfo.json b/assets/locales/en/sysinfo.json
index b8c4bac..0084bd2 100644
--- a/assets/locales/en/sysinfo.json
+++ b/assets/locales/en/sysinfo.json
@@ -464,10 +464,14 @@
"perf.why.timeout": "it took too long",
"perf.worse": "{pct} % worse",
"pi.powerOk": "No under-voltage since boot",
+ "pi.powerOkRecent": "No under-voltage in the last few seconds",
"pi.throttleOk": "Never slowed down since boot",
+ "pi.throttleOkRecent": "Not slowed down in the last few seconds",
"pi.throttledNow": "Slowed down now (heat or power)",
+ "pi.throttledRecent": "Slowed down in the last few seconds (heat or power)",
"pi.throttledSeen": "Slowed down at some point since boot",
"pi.underVoltageNow": "Under-voltage now: use the official power supply",
+ "pi.underVoltageRecent": "Under-voltage in the last few seconds: use the official power supply",
"pi.underVoltageSeen": "Under-voltage happened since boot",
"power.ac": "Power adapter",
"power.battery": "Battery",
diff --git a/assets/locales/es/sysinfo.json b/assets/locales/es/sysinfo.json
index 8a54dfe..a4c1ecf 100644
--- a/assets/locales/es/sysinfo.json
+++ b/assets/locales/es/sysinfo.json
@@ -464,10 +464,14 @@
"perf.why.timeout": "tardó demasiado",
"perf.worse": "{pct} % peor",
"pi.powerOk": "Sin bajo voltaje desde el arranque",
+ "pi.powerOkRecent": "Sin bajo voltaje en los últimos segundos",
"pi.throttleOk": "Nunca se limitó desde el arranque",
+ "pi.throttleOkRecent": "No se limitó en los últimos segundos",
"pi.throttledNow": "Limitada ahora (calor o alimentación)",
+ "pi.throttledRecent": "Se limitó en los últimos segundos (calor o alimentación)",
"pi.throttledSeen": "Se limitó en algún momento desde el arranque",
"pi.underVoltageNow": "Bajo voltaje ahora: usá la fuente oficial",
+ "pi.underVoltageRecent": "Bajo voltaje en los últimos segundos: usá la fuente oficial",
"pi.underVoltageSeen": "Hubo bajo voltaje desde el arranque",
"power.ac": "Adaptador de corriente",
"power.battery": "Batería",
diff --git a/assets/locales/pt/sysinfo.json b/assets/locales/pt/sysinfo.json
index 2d064fe..f0d029a 100644
--- a/assets/locales/pt/sysinfo.json
+++ b/assets/locales/pt/sysinfo.json
@@ -464,10 +464,14 @@
"perf.why.timeout": "demorou demais",
"perf.worse": "{pct} % pior",
"pi.powerOk": "Sem subtensão desde a inicialização",
+ "pi.powerOkRecent": "Sem subtensão nos últimos segundos",
"pi.throttleOk": "Nunca foi limitada desde a inicialização",
+ "pi.throttleOkRecent": "Não foi limitada nos últimos segundos",
"pi.throttledNow": "Limitada agora (calor ou alimentação)",
+ "pi.throttledRecent": "Foi limitada nos últimos segundos (calor ou alimentação)",
"pi.throttledSeen": "Foi limitada em algum momento desde a inicialização",
"pi.underVoltageNow": "Subtensão agora: use a fonte oficial",
+ "pi.underVoltageRecent": "Subtensão nos últimos segundos: use a fonte oficial",
"pi.underVoltageSeen": "Houve subtensão desde a inicialização",
"power.ac": "Adaptador de energia",
"power.battery": "Bateria",
diff --git a/docs/BENCHMARK.md b/docs/BENCHMARK.md
index a7d2dc3..937021a 100644
--- a/docs/BENCHMARK.md
+++ b/docs/BENCHMARK.md
@@ -61,7 +61,8 @@ microcode), memory (total, swap, zram; per module through the read-only admin ac
`hw-memory-modules`), graphics, displays (monitor name and size from the EDID, mode, refresh,
scale, card, scanout), storage (interface and link speed, size, SMART health), USB and
Thunderbolt, PCI with drivers and missing firmware, audio, network, Bluetooth, power, thermal and
-fans, cameras and input, Raspberry Pi (revision, bootloader, throttling and under-voltage flags,
+fans, cameras and input, Raspberry Pi (revision, bootloader, the firmware's under-voltage alarm and, where the
+kernel exposes them, its throttling flags,
fan header, kernel revision), software (Debian, kernel, the kernel options LordOS depends on, the
LordOS services and their state, the code manifest).
@@ -349,7 +350,7 @@ development package.
So lord-server reads, world-readable and without exec or root: `rpi_volt`'s `in0_lcrit_alarm` (exactly `0`
or `1`, anything else is unknown); `get_throttled` where a kernel has it (directly under a
`/sys/devices/platform` node or its `<node>:firmware` child; 1-8 hex digits with an optional `0x` and a
- newline, nothing else, `lb_rpi_parse_throttled`; masked to the eight known bits: 0 under-voltage now, 1 ARM
+ newline, nothing else, `rpifw_parse_throttled`; masked to the eight known bits: 0 under-voltage now, 1 ARM
frequency capped now, 2 throttled now, 3 soft temperature limit now, 16-19 the same "has occurred"); and
whether the machine is a Pi at all (that hwmon, that file, or a `raspberrypi,` entry in the device tree's
root `compatible`). On a Pi, the hottest zone at or above **80 °C** counts as the firmware's limit
@@ -374,6 +375,18 @@ development package.
firmware" row listing what happened, or what was watched when nothing did. Machines that are not a Pi get no
`piFirmware` and behave as before. Not verified on a real Pi yet: that the alarm reads `1` during an actual
under-voltage, and how fast the Pi 5 reaches 80 °C without a cooler in the peak tests.
+
+ The reader is shared (`hw/rpifw.c`, `rpifw_read`: lord-server, `lordos-sysreport` and the tests link it), and
+ System Information's Raspberry Pi section uses it too (2026-10-29; before, it looked only for `get_throttled`, so on
+ the Pi 5 with the LordOS kernel its Power and Throttling rows were always empty). It shows what the kernel shows
+ and leaves out the rest: with only `rpi_volt` (the LordOS kernel), a Power row for the last few seconds ("No
+ under-voltage in the last few seconds" or "Under-voltage in the last few seconds: use the official power supply")
+ and no Throttling row; with only `get_throttled` (an older kernel), Power and Throttling "now" and "since boot";
+ with both, the sticky bits cover only the last 2 s window, so the rows say so; with neither, model and revision
+ only. The report's `raspberryPi` has `throttled` (the raw bits or `null`) and `underVoltageAlarm` (`true`,
+ `false` or `null`). Tested on fake sysfs trees (`tests/sysreport_test.c`: the LordOS kernel with the alarm clear,
+ set, malformed and missing; older Pi 4 and Pi 5 kernels with `get_throttled`; both; neither; a machine that isn't
+ a Pi), not yet on a real Pi.
- **Helper-sandbox self-test** (`sec.helper-sandbox`, repeated inside `lord-bench`, `sandbox_tries` in
`bench/lbmain.c`): right after `sandbox_apply_helper` and before any work, in every mode, `lord-bench` tries six
things that must fail: the Sandbox Probe's helper tries (`app/probe.c`) with its own versions of the data-folder
diff --git a/docs/PAPER-VALIDATION.md b/docs/PAPER-VALIDATION.md
index 7d45a09..a95339f 100644
--- a/docs/PAPER-VALIDATION.md
+++ b/docs/PAPER-VALIDATION.md
@@ -109,6 +109,7 @@ memory from a process's RSS (§7.1) and points to versioned results (§11.5, `do
| 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 two fixes (compositor CPU weight: 31–33 % → 7–8 % late without the monitor; with the real-time priority, measured on the monitor: 24 → 28.9–30.5 fps, still 94–98 % late, the frame's build time under load still to explain) |
| 7.5 | No measurements on real PCs | — | **Untested** |
| 7.5 | — | New, 0.8.6 in development: LordBench's interface workloads on VM 116 (layout and paint 37.0/39.9 fps, shaping 619/3,595 runs/s; compared only within the same LordOS version) and the helper-sandbox self-test (six tries, all refused on VM 116: seccomp `EPERM`, Landlock `EACCES`) (`BENCHMARK.md`, "Built so far") | Measured with LordBench (one Full and four Quick runs); not yet on the Pi 5 |
+| 7.5 | — | New, 0.8.6 in development: on a Raspberry Pi LordBench watches the firmware's under-voltage alarm (the only flag the LordOS kernel exposes), `get_throttled` on older kernels and 80 °C as the firmware's limit (a peak test stops as throttled); System Information's Raspberry Pi section reads the same through `hw/rpifw.c` and leaves out what the kernel doesn't show (`BENCHMARK.md`, "The Raspberry Pi firmware's throttling") | Tested on fake sysfs trees (`tests/lordbench_test.c`, `tests/sysreport_test.c`) on VM 116; not yet on a real Pi |
## §10–§11 Limits and verification
diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md
index f000388..b804f75 100644
--- a/docs/ROADMAP.md
+++ b/docs/ROADMAP.md
@@ -562,7 +562,11 @@ LordBench and a desktop that stays smooth under load. Each item is described in
- [ ] The interface workloads measured on the Pi 5 (its reference lists them as not measured).
- [ ] The x86 PC reference (a modest PC still to be chosen; may move to 0.8.7).
- [ ] Hardware video decoding (may move after 0.8.6).
-- [ ] Detecting the Pi 5 firmware's throttling.
+- [ ] Detecting the Pi 5 firmware's throttling. *Built, waiting for the check on a real Pi (2026-10-28/29):* the
+ LordOS kernel (`rpi-6.18.y`) only exposes the firmware's under-voltage alarm (`rpi_volt`'s `in0_lcrit_alarm`, the
+ last 2 s), not its capped, throttled or soft-limit bits, so LordBench watches that alarm and `get_throttled` where
+ an older kernel has it, and counts 80 °C on a Pi as the firmware's limit (peak tests stop as throttled); System
+ Information's Raspberry Pi rows read the same way through the shared `hw/rpifw.c`. Tested on fake sysfs trees only.
**The desktop under load** (`BENCHMARK.md`, "The desktop under load"; `GPU.md`). On the Pi 5 with its monitor the
desktop fell to 24 fps under an all-core load:
@@ -756,7 +760,8 @@ desktop fell to 24 fps under an all-core load:
into the helper; VM 116: 37.0 and 39.9 fps, 619 and 3,595 runs/s), and the helper-sandbox self-test inside
`lord-bench` (six tries that must fail, checked by the Stability verdict and `lordos-sysreport bench`). Left:
hardware video decoding, the x86 PC reference, measuring the Pi 5 with the interface workloads (its reference
- lists them as not measured), detecting the Pi 5 firmware's throttling, and the rest of what it found on the Pi 5 (the desktop fell to 24 fps under load;
+ lists them as not measured), checking the Pi 5 firmware's throttling detection on a real Pi (built on fake sysfs
+ trees: the LordOS kernel only exposes the under-voltage alarm, so 80 °C counts as the firmware's limit), and the rest of what it found on the Pi 5 (the desktop fell to 24 fps under load;
the compositor's CPU weight and its real-time priority fix it on VM 116; on the Pi 5 with its monitor they take it
to 29–30 fps and the frame's own build time under load, 15–16 ms instead of 7, is what remains to find,
`BENCHMARK.md` "The desktop under load").
diff --git a/server/mk/lordbench.mk b/server/mk/lordbench.mk
index a518651..4369ce8 100644
--- a/server/mk/lordbench.mk
+++ b/server/mk/lordbench.mk
@@ -6,7 +6,7 @@
# bench/lbui.c, with their fonts built in) 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 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
+$(LB_SRV_OBJ): $(wildcard src/bench/*.h) src/hw/rpifw.h src/media/proto.h build/gen/lord_version.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)
@@ -52,17 +52,17 @@ build/lord-bench: $(LB_SRC) $(LB_GL_SRC) build/obj/ui/stb.o $(QJS_OBJ) build/gen
# self-test's included), 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/lbui.c src/bench/lbproto.c src/bench/lbcond.c 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) build/gen/lb_corpus.h \
- build/gen/lb_fonts.h build/gen/lord_version.h $(wildcard src/bench/*.h) $(ENGINE_SRC) $(HDR)
+ 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/rpifw.c src/hw/jbuf.c src/sec/json.c build/obj/ui/stb.o $(QJS_OBJ) build/gen/lb_corpus.h \
+ build/gen/lb_fonts.h build/gen/lord_version.h $(wildcard src/bench/*.h) src/hw/rpifw.h $(ENGINE_SRC) $(HDR)
@mkdir -p build
$(CC) $(CPPFLAGS) $(CFLAGS) $(WARN) -std=c11 -o $@ tests/lordbench_test.c src/bench/lbwork.c src/bench/lbui.c src/bench/lbproto.c src/bench/lbcond.c \
- 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 \
+ 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/rpifw.c src/hw/jbuf.c src/sec/json.c \
$(ENGINE_SRC) 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)
LB_CLI_SRC := tests/lordbench_cli.c 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 src/hw/jbuf.c src/sec/json.c
+ src/bench/lbvideo.c src/bench/boottest.c src/media/proto.c src/hw/rpifw.c src/hw/jbuf.c src/sec/json.c
build/lordbench-cli: $(LB_CLI_SRC) \
build/gen/lord_version.h $(wildcard src/bench/*.h) build/lord-bench
$(CC) $(CPPFLAGS) $(CFLAGS) $(WARN) -std=c11 -o $@ $(LB_CLI_SRC) -lm -lpthread
diff --git a/server/mk/settings.mk b/server/mk/settings.mk
index a0d9be3..59287bd 100644
--- a/server/mk/settings.mk
+++ b/server/mk/settings.mk
@@ -3,7 +3,7 @@
# Objects are added to lord-server as extra prerequisites ($^ in its link rule takes them).
HW_SRC := src/hw/edid.c src/hw/modes.c src/hw/night.c src/hw/mimeapps.c src/hw/power.c src/hw/jbuf.c src/hw/display.c \
src/hw/uevent.c src/hw/sysbus.c src/hw/bt.c src/hw/ppd.c src/hw/hw.c src/hw/hw_admin.c src/bench/boottest.c src/hw/defaults.c src/hw/notifyd.c src/hw/hwscan.c src/hw/brframe.c src/ui/js_hw.c \
- src/sysreport/sysreport.c src/sysreport/sysreport_out.c src/sysreport/ids.c src/sysreport/smbios.c src/sysreport/facts.c \
+ src/sysreport/sysreport.c src/sysreport/sysreport_out.c src/sysreport/ids.c src/sysreport/smbios.c src/sysreport/facts.c src/hw/rpifw.c \
src/ui/js_fan.c src/fan/fancurve.c
HW_HDR := $(wildcard src/hw/*.h) $(wildcard src/sysreport/*.h) $(wildcard src/fan/*.h) src/ui/js_hw.h src/ui/js_fan.h src/kms.h src/vault/dbus.h
HW_OBJ := $(HW_SRC:src/%.c=build/obj/%.o)
diff --git a/server/mk/sysreport.mk b/server/mk/sysreport.mk
index f937029..d84f97b 100644
--- a/server/mk/sysreport.mk
+++ b/server/mk/sysreport.mk
@@ -1,8 +1,8 @@
# 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; `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
+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/rpifw.c src/hw/jbuf.c src/sec/json.c
+SYSREPORT_HDR := $(wildcard src/sysreport/*.h) src/hw/edid.h src/hw/rpifw.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 $@
diff --git a/server/src/bench/lbcond.c b/server/src/bench/lbcond.c
index a7991a4..a2933b9 100644
--- a/server/src/bench/lbcond.c
+++ b/server/src/bench/lbcond.c
@@ -73,15 +73,6 @@ static void hwmon(const char *root, LbCond *c) {
char p[96], name[24] = "";
snprintf(p, sizeof p, "/sys/class/hwmon/%s/name", e->d_name);
if (rd(root, p, name, sizeof name)) continue;
- if (!strcmp(name, "rpi_volt")) {
- /* the Pi firmware's under-voltage alarm (drivers/hwmon/raspberrypi-hwmon.c): GET_THROTTLED's sticky
- * under-voltage bit, asked every 2 s with the sticky bits cleared each time; "0" or "1" only */
- char v[8];
- snprintf(p, sizeof p, "/sys/class/hwmon/%s/in0_lcrit_alarm", e->d_name);
- c->rpi = 1;
- if (!rd(root, p, v, sizeof v) && (!strcmp(v, "0") || !strcmp(v, "1"))) c->rpi_uv_alarm = v[0] - '0';
- continue;
- }
if (strcmp(name, "coretemp") && strcmp(name, "k10temp") && strcmp(name, "zenpower")) continue;
for (int i = 1; i < 64; i++) {
snprintf(p, sizeof p, "/sys/class/hwmon/%s/temp%d_input", e->d_name, i);
@@ -129,41 +120,14 @@ static void cpus(const char *root, LbCond *c) {
rd(root, "/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor", c->governor, sizeof c->governor);
}
-int lb_rpi_parse_throttled(const char *s) {
- if (!s) return -1;
- if (s[0] == '0' && (s[1] == 'x' || s[1] == 'X')) s += 2;
- unsigned long v = 0;
- int n = 0;
- for (; *s && *s != '\n'; s++, n++) {
- int d = *s >= '0' && *s <= '9' ? *s - '0' : *s >= 'a' && *s <= 'f' ? *s - 'a' + 10 : *s >= 'A' && *s <= 'F' ? *s - 'A' + 10 : -1;
- if (d < 0 || n >= 8) return -1;
- v = v << 4 | (unsigned long)d;
- }
- if (!n || (*s == '\n' && s[1])) return -1;
- return (int)(v & (LB_RPI_NOW_MASK | LB_RPI_STICKY_MASK));
-}
-
-/* the Pi firmware's get_throttled (drivers/firmware/raspberrypi.c of older Raspberry Pi kernels; the rpi-6.18.y
- * one LordOS ships has no such file and reports through rpi_volt instead): directly under a platform node or in
- * its "<node>:firmware" child (soc/soc:firmware, axi/axi:firmware, soc@107c000000/soc@107c000000:firmware) */
+/* the Pi firmware: rpi_volt's alarm and get_throttled (hw/rpifw.c, shared with System Information), or the
+ * device tree */
static void rpi(const char *root, LbCond *c) {
- char d[PATH_MAX];
- snprintf(d, sizeof d, "%s/sys/devices/platform", root);
- DIR *dir = opendir(d);
- if (dir) {
- struct dirent *e;
- while (c->rpi_throttled < 0 && (e = readdir(dir))) {
- if (e->d_name[0] == '.' || strlen(e->d_name) > 64) continue;
- char p[256], b[32];
- for (int i = 0; i < 2 && c->rpi_throttled < 0; i++) {
- if (i) snprintf(p, sizeof p, "/sys/devices/platform/%s/%s:firmware/get_throttled", e->d_name, e->d_name);
- else snprintf(p, sizeof p, "/sys/devices/platform/%s/get_throttled", e->d_name);
- if (!rd(root, p, b, sizeof b)) c->rpi_throttled = lb_rpi_parse_throttled(b);
- }
- }
- closedir(dir);
- }
- if (c->rpi_throttled >= 0) c->rpi = 1;
+ RpiFw fw;
+ rpifw_read(root, &fw);
+ c->rpi_uv_alarm = fw.uv_alarm;
+ c->rpi_throttled = fw.throttled;
+ if (fw.hwmon || fw.throttled >= 0) c->rpi = 1;
if (c->rpi) return;
/* the device tree's root compatible ("raspberrypi,5-model-b\0brcm,bcm2712\0"), so a Pi without the hwmon
* module still gets LB_RPI_HOT */
diff --git a/server/src/bench/lbcond.h b/server/src/bench/lbcond.h
index eab9673..83e591b 100644
--- a/server/src/bench/lbcond.h
+++ b/server/src/bench/lbcond.h
@@ -7,6 +7,8 @@
#include <stdint.h>
+#include "../hw/rpifw.h"
+
typedef struct {
double temp_c; /* the hottest thermal zone or CPU hwmon sensor, °C; < -270 unknown */
double passive_c, critical_c; /* the lowest passive and critical trip points, °C; 0 unknown */
@@ -33,15 +35,11 @@ void lb_cond_read(const char *root, LbCond *c);
* does, every 2 s). LB_RPI_HOT is ours: on a Pi, the hottest zone at or above LB_RPI_FW_TEMP_C, where Raspberry
* Pi's documentation says the firmware starts slowing the ARM cores down. */
enum { LB_RPI_UV = 1, LB_RPI_CAPPED = 2, LB_RPI_THROTTLED = 4, LB_RPI_SOFTTEMP = 8, LB_RPI_HOT = 16 };
-#define LB_RPI_NOW_MASK 0x0000fu
-#define LB_RPI_STICKY_MASK 0xf0000u
+#define LB_RPI_NOW_MASK RPIFW_NOW_MASK
+#define LB_RPI_STICKY_MASK RPIFW_STICKY_MASK
#define LB_RPI_SLOWED (LB_RPI_CAPPED | LB_RPI_THROTTLED | LB_RPI_SOFTTEMP | LB_RPI_HOT)
#define LB_RPI_FW_TEMP_C 80.0
-/* get_throttled's text, strictly: 1-8 hex digits (an optional 0x), an optional newline, nothing else; the
- * value masked to the eight known bits, or -1 */
-int lb_rpi_parse_throttled(const char *s);
-
/* What the Pi firmware reported during a run, sample by sample. A sticky bit (or the hwmon alarm) already set
* at the start may predate the run, so it counts only once it was seen clear and then set again; the "now"
* bits and LB_RPI_HOT always count. lb_rpi_watch returns this sample's LB_RPI_* events and adds them to seen. */
diff --git a/server/src/hw/rpifw.c b/server/src/hw/rpifw.c
new file mode 100644
index 0000000..3db6bad
--- /dev/null
+++ b/server/src/hw/rpifw.c
@@ -0,0 +1,82 @@
+/* rpifw.c — see rpifw.h. */
+#include "rpifw.h"
+
+#include <dirent.h>
+#include <limits.h>
+#include <stdio.h>
+#include <string.h>
+
+/* a small sysfs file, one line, trailing newline kept for the strict parser; -1 if missing */
+static int rd(const char *root, const char *path, char *out, size_t n) {
+ char p[PATH_MAX];
+ snprintf(p, sizeof p, "%s%s", root, path);
+ FILE *f = fopen(p, "re");
+ if (!f) return -1;
+ size_t len = fread(out, 1, n - 1, f);
+ fclose(f);
+ out[len] = 0;
+ return 0;
+}
+
+int rpifw_parse_throttled(const char *s) {
+ if (!s) return -1;
+ if (s[0] == '0' && (s[1] == 'x' || s[1] == 'X')) s += 2;
+ unsigned long v = 0;
+ int n = 0;
+ for (; *s && *s != '\n'; s++, n++) {
+ int d = *s >= '0' && *s <= '9' ? *s - '0' : *s >= 'a' && *s <= 'f' ? *s - 'a' + 10 : *s >= 'A' && *s <= 'F' ? *s - 'A' + 10 : -1;
+ if (d < 0 || n >= 8) return -1;
+ v = v << 4 | (unsigned long)d;
+ }
+ if (!n || (*s == '\n' && s[1])) return -1;
+ return (int)(v & (RPIFW_NOW_MASK | RPIFW_STICKY_MASK));
+}
+
+/* the rpi_volt hwmon's under-voltage alarm: exactly "0" or "1" (an optional newline), anything else unknown */
+static void volt(const char *root, RpiFw *f) {
+ char d[PATH_MAX];
+ snprintf(d, sizeof d, "%s/sys/class/hwmon", root);
+ DIR *dir = opendir(d);
+ if (!dir) return;
+ struct dirent *e;
+ while (!f->hwmon && (e = readdir(dir))) {
+ if (strncmp(e->d_name, "hwmon", 5) || strlen(e->d_name) > 10) continue;
+ char p[96], name[32];
+ snprintf(p, sizeof p, "/sys/class/hwmon/%s/name", e->d_name);
+ if (rd(root, p, name, sizeof name) || (strcmp(name, "rpi_volt\n") && strcmp(name, "rpi_volt"))) continue;
+ f->hwmon = 1;
+ char v[8];
+ snprintf(p, sizeof p, "/sys/class/hwmon/%s/in0_lcrit_alarm", e->d_name);
+ if (!rd(root, p, v, sizeof v) && (v[0] == '0' || v[0] == '1') && (!v[1] || (v[1] == '\n' && !v[2])))
+ f->uv_alarm = v[0] - '0';
+ }
+ closedir(dir);
+}
+
+/* get_throttled (drivers/firmware/raspberrypi.c of older Raspberry Pi kernels): directly under a platform node
+ * or in its "<node>:firmware" child (soc/soc:firmware, axi/axi:firmware, soc@107c000000/soc@107c000000:firmware) */
+static void throttled(const char *root, RpiFw *f) {
+ char d[PATH_MAX];
+ snprintf(d, sizeof d, "%s/sys/devices/platform", root);
+ DIR *dir = opendir(d);
+ if (!dir) return;
+ struct dirent *e;
+ while (f->throttled < 0 && (e = readdir(dir))) {
+ if (e->d_name[0] == '.' || strlen(e->d_name) > 64) continue;
+ char p[256], b[32];
+ for (int i = 0; i < 2 && f->throttled < 0; i++) {
+ if (i) snprintf(p, sizeof p, "/sys/devices/platform/%s/%s:firmware/get_throttled", e->d_name, e->d_name);
+ else snprintf(p, sizeof p, "/sys/devices/platform/%s/get_throttled", e->d_name);
+ if (!rd(root, p, b, sizeof b)) f->throttled = rpifw_parse_throttled(b);
+ }
+ }
+ closedir(dir);
+}
+
+void rpifw_read(const char *root, RpiFw *f) {
+ f->hwmon = 0;
+ f->uv_alarm = -1;
+ f->throttled = -1;
+ volt(root, f);
+ throttled(root, f);
+}
diff --git a/server/src/hw/rpifw.h b/server/src/hw/rpifw.h
new file mode 100644
index 0000000..b1afba8
--- /dev/null
+++ b/server/src/hw/rpifw.h
@@ -0,0 +1,35 @@
+/* rpifw.h — what the Raspberry Pi firmware says about power and throttling, as the kernel shows it to an
+ * unprivileged process (docs/BENCHMARK.md, "The Raspberry Pi firmware's throttling"). Shared by LordBench's
+ * guards (bench/lbcond.c) and System Information (sysreport/sysreport.c). World-readable sysfs only: no
+ * mailbox (/dev/vcio), no vcgencmd, no exec. Every reader takes a root folder ("" for the real one) so tests
+ * can feed fake trees.
+ *
+ * Two sources, either, both or none:
+ * - the hwmon "rpi_volt" (drivers/hwmon/raspberrypi-hwmon.c), the only one the LordOS rpi-6.18.y kernel has:
+ * it asks GET_THROTTLED every 2 s with the sticky bits cleared each time and exposes in0_lcrit_alarm, the
+ * "under-voltage has occurred" bit of the last answer, so "under-voltage in the last 2 s window";
+ * - the firmware node's get_throttled of older Raspberry Pi kernels (the whole GET_THROTTLED word). With
+ * rpi_volt loaded too, its sticky bits only cover the last 2 s, not the time since boot. */
+#ifndef LORD_HW_RPIFW_H
+#define LORD_HW_RPIFW_H
+
+/* GET_THROTTLED: bit 0 under-voltage now, 1 ARM frequency capped now, 2 throttled now, 3 soft temperature
+ * limit now; bits 16-19 the same four "has occurred" (sticky until someone asks the firmware to clear them) */
+#define RPIFW_NOW_MASK 0x0000fu
+#define RPIFW_STICKY_MASK 0xf0000u
+
+typedef struct {
+ int hwmon; /* 1 if the rpi_volt hwmon exists (even if its alarm can't be read) */
+ int uv_alarm; /* its in0_lcrit_alarm: 1 under-voltage in the last report, 0 none, -1 unknown */
+ int throttled; /* get_throttled masked to RPIFW_NOW_MASK | RPIFW_STICKY_MASK, -1 no such file or not
+ * a strict number */
+} RpiFw;
+
+/* get_throttled's text, strictly: 1-8 hex digits (an optional 0x), an optional newline, nothing else; the
+ * value masked to the eight known bits, or -1 */
+int rpifw_parse_throttled(const char *s);
+
+/* both sources; never fails (unknown fields stay -1, hwmon 0) */
+void rpifw_read(const char *root, RpiFw *f);
+
+#endif
diff --git a/server/src/sysreport/sysreport.c b/server/src/sysreport/sysreport.c
index 6194094..5bd5bdb 100644
--- a/server/src/sysreport/sysreport.c
+++ b/server/src/sysreport/sysreport.c
@@ -7,6 +7,7 @@
#include "sysreport.h"
#include "ids.h"
#include "../hw/edid.h"
+#include "../hw/rpifw.h"
#include <ctype.h>
#include <dirent.h>
@@ -691,26 +692,17 @@ static void collect_pi(SysReport *r, const char *root, const char *cpuinfo) {
}
r->pi.is_pi = strstr(compat, "raspberrypi") != NULL;
r->pi.throttled = -1;
+ r->pi.uv_alarm = -1;
if (!r->pi.is_pi) return;
snprintf(r->pi.model, sizeof r->pi.model, "%s", r->machine.model);
field(cpuinfo, "Revision", r->pi.revision, sizeof r->pi.revision);
- /* the firmware node's get_throttled: soc:firmware on the Pi 4, soc@…:firmware on the Pi 5 */
- char **e;
- int n = list_dir(root, "/sys/devices/platform", &e);
- for (int i = 0; i < n && r->pi.throttled < 0; i++) {
- char d[256], **f;
- snprintf(d, sizeof d, "/sys/devices/platform/%s", e[i]);
- int m = list_dir(root, d, &f);
- for (int j = 0; j < m && r->pi.throttled < 0; j++) {
- size_t fl = strlen(f[j]);
- if (fl < 8 || strcmp(f[j] + fl - 8, "firmware")) continue;
- char fd[512];
- snprintf(fd, sizeof fd, "%s/%s", d, f[j]);
- r->pi.throttled = (int)attr_num(root, fd, "get_throttled", -1);
- }
- free_list(f, m);
- }
- free_list(e, n);
+ /* what the firmware says about power and throttling (hw/rpifw.c, shared with LordBench): rpi_volt's
+ * under-voltage alarm (the only one the LordOS rpi-6.18.y kernel has) and get_throttled where an older
+ * kernel has it; whatever the kernel doesn't show stays unknown */
+ RpiFw fw;
+ rpifw_read(root, &fw);
+ r->pi.throttled = fw.throttled;
+ r->pi.uv_alarm = fw.uv_alarm;
}
/* ---- software ---- */
diff --git a/server/src/sysreport/sysreport.h b/server/src/sysreport/sysreport.h
index 31fe0e9..26cb4ef 100644
--- a/server/src/sysreport/sysreport.h
+++ b/server/src/sysreport/sysreport.h
@@ -146,7 +146,9 @@ typedef struct {
typedef struct {
char model[SR_NAME], revision[16]; /* /proc/cpuinfo "Revision" (the board code) */
- int throttled; /* get_throttled bits, -1 unknown */
+ int throttled; /* get_throttled bits (hw/rpifw.h), -1 unknown (no such file: the
+ * LordOS rpi-6.18.y kernel has none) */
+ int uv_alarm; /* rpi_volt's under-voltage alarm: 1 in the last 2 s, 0 none, -1 unknown */
int is_pi;
} SrPi;
diff --git a/server/src/sysreport/sysreport_out.c b/server/src/sysreport/sysreport_out.c
index 988580d..be888db 100644
--- a/server/src/sysreport/sysreport_out.c
+++ b/server/src/sysreport/sysreport_out.c
@@ -167,6 +167,8 @@ char *sysreport_json(const SysReport *r) {
jkey(&b, &f, "raspberryPi"); hb_printf(&b, "{"); g = 1;
js(&b, &g, "model", r->pi.model); js(&b, &g, "revision", r->pi.revision);
jn(&b, &g, "throttled", r->pi.throttled, -1);
+ if (r->pi.uv_alarm >= 0) jb(&b, &g, "underVoltageAlarm", r->pi.uv_alarm);
+ else { jkey(&b, &g, "underVoltageAlarm"); hb_printf(&b, "null"); }
hb_printf(&b, "}");
}
@@ -331,9 +333,19 @@ char *sysreport_markdown(const SysReport *r) {
if (r->pi.is_pi) {
hb_printf(&b, "## Raspberry Pi\n\n%s, revision %s", r->pi.model, r->pi.revision[0] ? r->pi.revision : "unknown");
- if (r->pi.throttled >= 0)
- hb_printf(&b, "; %s (0x%x)", r->pi.throttled == 0 ? "never throttled or under-voltage since boot"
- : (r->pi.throttled & 0x50005) ? "under-voltage or throttling seen" : "flags set", (unsigned)r->pi.throttled);
+ /* rpi_volt clears the sticky bits every 2 s, so with it they cover that window, not the time since boot */
+ const char *since = r->pi.uv_alarm >= 0 ? "in the last 2 s" : "since boot";
+ if (r->pi.throttled >= 0) {
+ unsigned v = (unsigned)r->pi.throttled;
+ hb_printf(&b, "; %s", v & 0x1u ? "under-voltage now" : v & 0x10000u ? "under-voltage" : "no under-voltage");
+ if (!(v & 0x1u)) hb_printf(&b, " %s", since);
+ hb_printf(&b, "; %s", v & 0xeu ? "slowed down now" : v & 0xe0000u ? "slowed down" : "not slowed down");
+ if (!(v & 0xeu)) hb_printf(&b, " %s", since);
+ hb_printf(&b, " (get_throttled 0x%x)", v);
+ } else if (r->pi.uv_alarm >= 0) {
+ hb_printf(&b, "; %s in the last 2 s (rpi_volt); throttling not reported by this kernel",
+ r->pi.uv_alarm ? "under-voltage" : "no under-voltage");
+ }
hb_printf(&b, ".\n\n");
}
diff --git a/server/tests/lordbench_test.c b/server/tests/lordbench_test.c
index ebbd27f..78660d9 100644
--- a/server/tests/lordbench_test.c
+++ b/server/tests/lordbench_test.c
@@ -303,12 +303,12 @@ int main(void) {
CHECK(!lb_cpu_ticks(root, &busy, &total) && total == 1000 && busy == 150, "/proc/stat %llu/%llu", busy, total);
/* get_throttled's text, strictly */
- CHECK(lb_rpi_parse_throttled("0\n") == 0 && lb_rpi_parse_throttled("50005") == 0x50005 && lb_rpi_parse_throttled("0x8000A\n") == 0x8000a,
+ CHECK(rpifw_parse_throttled("0\n") == 0 && rpifw_parse_throttled("50005") == 0x50005 && rpifw_parse_throttled("0x8000A\n") == 0x8000a,
"get_throttled: plain, 0x and upper-case hex");
- CHECK(lb_rpi_parse_throttled("fffffff0") == 0xf0000, "get_throttled: unknown bits dropped (%#x)", lb_rpi_parse_throttled("fffffff0"));
- CHECK(lb_rpi_parse_throttled("") < 0 && lb_rpi_parse_throttled("0x") < 0 && lb_rpi_parse_throttled("123456789") < 0 &&
- lb_rpi_parse_throttled(" 5") < 0 && lb_rpi_parse_throttled("5 ") < 0 && lb_rpi_parse_throttled("-1") < 0 &&
- lb_rpi_parse_throttled("g") < 0 && lb_rpi_parse_throttled("5\nx") < 0 && lb_rpi_parse_throttled(NULL) < 0,
+ CHECK(rpifw_parse_throttled("fffffff0") == 0xf0000, "get_throttled: unknown bits dropped (%#x)", rpifw_parse_throttled("fffffff0"));
+ CHECK(rpifw_parse_throttled("") < 0 && rpifw_parse_throttled("0x") < 0 && rpifw_parse_throttled("123456789") < 0 &&
+ rpifw_parse_throttled(" 5") < 0 && rpifw_parse_throttled("5 ") < 0 && rpifw_parse_throttled("-1") < 0 &&
+ rpifw_parse_throttled("g") < 0 && rpifw_parse_throttled("5\nx") < 0 && rpifw_parse_throttled(NULL) < 0,
"get_throttled: empty, too long, spaces, signs, other letters and a second line refused");
/* a Raspberry Pi 5 with the kernel LordOS ships (rpi-6.18.y): no get_throttled, only rpi_volt's alarm (cleared
diff --git a/server/tests/sysinfo_model_test.mjs b/server/tests/sysinfo_model_test.mjs
index b9efe7c..846229c 100644
--- a/server/tests/sysinfo_model_test.mjs
+++ b/server/tests/sysinfo_model_test.mjs
@@ -2,7 +2,7 @@
// the reasons for CPU composition, the Compatibility panel and the Hardware sections. Run by
// tests/run_suites.sh (needs node).
import { evaluate, evaluateProbe, evaluateBench, LIMITS } from '../../apps/sysinfo/checks.js';
-import { compositionReason, cardLayers, sessionLayers, compatibility, hardwareSections, throttleFlags, machineName, reportFileName, reportJson, parseMemoryLines } from '../../apps/sysinfo/model.js';
+import { compositionReason, cardLayers, sessionLayers, compatibility, hardwareSections, throttleFlags, piStatus, machineName, reportFileName, reportJson, parseMemoryLines } from '../../apps/sysinfo/model.js';
let n = 0, bad = 0;
const eq = (what, got, want) => {
@@ -80,6 +80,15 @@ eq('a Pi adds its section', hardwareSections({ raspberryPi: { model: 'Raspberry
eq('throttle 0x50000', throttleFlags(0x50000), { underVoltageNow: false, cappedNow: false, throttledNow: false, softLimitNow: false,
underVoltage: true, capped: false, throttled: true, softLimit: false });
eq('throttle unknown', [throttleFlags(null), throttleFlags(-1)], [null, null]);
+// the Pi's rows: the LordOS kernel only has rpi_volt's alarm (no throttling row), older ones get_throttled
+eq('pi: LordOS kernel, no alarm', piStatus({ underVoltageAlarm: false }), { power: 'powerOkRecent', throttling: null });
+eq('pi: LordOS kernel, alarm', piStatus({ underVoltageAlarm: true }), { power: 'underVoltageRecent', throttling: null });
+eq('pi: nothing readable', piStatus({ model: 'Raspberry Pi 5' }), { power: null, throttling: null });
+eq('pi: no section', piStatus(null), { power: null, throttling: null });
+eq('pi: old kernel, since boot', piStatus({ throttled: 0x50000 }), { power: 'underVoltageSeen', throttling: 'throttledSeen' });
+eq('pi: old kernel, clear', piStatus({ throttled: 0 }), { power: 'powerOk', throttling: 'throttleOk' });
+eq('pi: old kernel, now', piStatus({ throttled: 0x9 }), { power: 'underVoltageNow', throttling: 'throttledNow' });
+eq('pi: both, sticky bits are recent', piStatus({ throttled: 0x20000, underVoltageAlarm: false }), { power: 'powerOkRecent', throttling: 'throttledRecent' });
eq('names', [machineName(vm), machineName({ machine: { model: 'Raspberry Pi 5 Model B Rev 1.0' } }), machineName({})], ['QEMU Standard PC', 'Raspberry Pi 5 Model B Rev 1.0', '']);
// ---- the Report tab ----
diff --git a/server/tests/sysreport_test.c b/server/tests/sysreport_test.c
index 918b72a..e53c4d2 100644
--- a/server/tests/sysreport_test.c
+++ b/server/tests/sysreport_test.c
@@ -1,6 +1,7 @@
/* sysreport_test.c — System Information's collector (src/sysreport) over fake trees: an AMD desktop,
- * an Intel laptop, an Nvidia desktop, a Raspberry Pi 5 and a VM. Each tree is full of things a report
- * must never carry (serial numbers, UUIDs, MAC addresses, a host name, a user name, a monitor's serial,
+ * an Intel laptop, an Nvidia desktop, a Raspberry Pi 5 (with the LordOS kernel) and a VM, and the Pi
+ * firmware's power and throttling on small trees (that kernel, an older one with get_throttled, both,
+ * neither, not a Pi). Each tree is full of things a report must never carry (serial numbers, UUIDs, MAC addresses, a host name, a user name, a monitor's serial,
* a MAC inside an interface name); the test checks what each report finds, that its JSON is valid,
* and that none of those values reaches the JSON or the Markdown.
*
@@ -50,6 +51,11 @@ static void putn(const char *root, const char *rel, const void *data, int len) {
fclose(f);
}
static void put(const char *root, const char *rel, const char *text) { putn(root, rel, text, -1); }
+static void mkdirs_in(const char *root, const char *rel) {
+ char p[1024];
+ snprintf(p, sizeof p, "%s/%s", root, rel);
+ mkdirs(p);
+}
static void lnk(const char *root, const char *rel, const char *target) {
char p[1024], d[1024];
@@ -336,7 +342,9 @@ static void fixture(const char *r, const char *kind) {
conn(r, 1, "Writeback-1", 0, NULL, NULL);
disk(r, "mmcblk0", "", "62333952\n", 0, NULL);
disk(r, "mmcblk0boot0", "", "8192\n", 0, NULL);
- put(r, "sys/devices/platform/soc@107c000000/soc@107c000000:firmware/get_throttled", "0x50000\n");
+ /* the LordOS rpi-6.18.y kernel: no get_throttled under soc@107c000000:firmware, only rpi_volt's alarm */
+ mkdirs_in(r, "sys/devices/platform/soc@107c000000/soc@107c000000:firmware");
+ put(r, "sys/class/hwmon/hwmon1/name", "rpi_volt\n"); put(r, "sys/class/hwmon/hwmon1/in0_lcrit_alarm", "0\n");
put(r, "sys/block/zram0/disksize", "2147483648\n");
put(r, "sys/block/zram0/comp_algorithm", "lzo lzo-rle lz4 [zstd]\n");
put(r, "sys/class/hwmon/hwmon2/name", "pwmfan"); put(r, "sys/class/hwmon/hwmon2/fan1_input", "2900");
@@ -475,7 +483,8 @@ static void test_kind(const char *kind) {
CHECK(r->cpu.cores == 10 && r->cpu.threads == 20 && !strcmp(r->machine.chassis, "desktop"), "nvidia: cpu/chassis");
CHECK(!r->ndisplay && !contains(md, "## Displays"), "nvidia: no displays");
} else if (!strcmp(kind, "rpi5")) {
- CHECK(r->pi.is_pi && !strcmp(r->pi.revision, "d04170") && r->pi.throttled == 0x50000, "rpi5: pi %s %x", r->pi.revision, r->pi.throttled);
+ CHECK(r->pi.is_pi && !strcmp(r->pi.revision, "d04170") && r->pi.throttled == -1 && r->pi.uv_alarm == 0,
+ "rpi5: pi %s %x %d", r->pi.revision, r->pi.throttled, r->pi.uv_alarm);
CHECK(!strcmp(r->machine.firmware, "dt") && !strcmp(r->machine.model, "Raspberry Pi 5 Model B Rev 1.0"), "rpi5: machine");
CHECK(!strcmp(r->cpu.vendor, "ARM") && !strcmp(r->cpu.model, "Cortex-A76") && !strcmp(r->cpu.arch, "aarch64"), "rpi5: cpu %s %s", r->cpu.vendor, r->cpu.model);
CHECK(!strcmp(r->cpu.flags, "asimd aes sha2 crc32 atomics"), "rpi5: features %s", r->cpu.flags);
@@ -484,7 +493,9 @@ static void test_kind(const char *kind) {
CHECK(r->ndisplay == 1 && !strcmp(r->display[0].card, "card1") && !strcmp(r->display[0].name, "LS27A600U"), "rpi5: display");
CHECK(r->ndisk == 1 && !strcmp(r->disk[0].transport, "mmc"), "rpi5: sd card (boot partitions skipped)");
CHECK(r->mem.zram_n == 1 && r->mem.zram_kb[0] == 2097152 && !strcmp(r->mem.zram_algo[0], "zstd"), "rpi5: zram");
- CHECK(contains(json, "\"raspberryPi\":{") && contains(md, "under-voltage or throttling seen (0x50000)"), "rpi5: report");
+ CHECK(contains(json, "\"raspberryPi\":{") && contains(json, "\"throttled\":null,\"underVoltageAlarm\":false}"),
+ "rpi5: report json");
+ CHECK(contains(md, "no under-voltage in the last 2 s (rpi_volt); throttling not reported by this kernel"), "rpi5: report markdown");
} else if (!strcmp(kind, "vm")) {
CHECK(!strcmp(r->machine.virt, "kvm") && !strcmp(r->machine.chassis, "vm") && !strcmp(r->machine.firmware, "bios"), "vm: virt %s %s", r->machine.virt, r->machine.chassis);
CHECK(r->ngpu == 1 && !strcmp(r->gpu[0].device, "Virtio 1.0 GPU") && !r->gpu[0].render_node, "vm: gpu");
@@ -610,6 +621,56 @@ static void test_facts(void) {
CHECK(sr_tcp_listening("/nonexistent", 5673) == -1, "facts: no /proc/net");
}
+/* The Raspberry Pi firmware's power and throttling (hw/rpifw.c, shared with LordBench) on small trees: what the
+ * kernel shows is reported, what it doesn't is left out, never a false "no throttling". */
+static void pi_case(const char *name, int pi, const char *throttled_path, const char *throttled, const char *alarm,
+ int want_thr, int want_uv, const char *want_json, const char *not_json, const char *want_md, const char *not_md) {
+ char root[] = "/tmp/sysreport-pi-XXXXXX";
+ if (!mkdtemp(root)) { printf("mkdtemp\n"); exit(2); }
+ mkdirs_in(root, "sys/devices/platform/soc@107c000000/soc@107c000000:firmware");
+ if (throttled) put(root, throttled_path, throttled);
+ if (alarm) { put(root, "sys/class/hwmon/hwmon0/name", "rpi_volt\n"); if (*alarm) put(root, "sys/class/hwmon/hwmon0/in0_lcrit_alarm", alarm); }
+ put(root, "sys/class/hwmon/hwmon1/name", "cpu_thermal\n");
+ if (pi) putn(root, "proc/device-tree/compatible", "raspberrypi,5-model-b\0brcm,bcm2712\0", 36);
+ char *json, *md;
+ SysReport *r = run(root, &json, &md);
+ CHECK(r->pi.is_pi == pi, "pi %s: is_pi %d", name, r->pi.is_pi);
+ CHECK(r->pi.throttled == want_thr && r->pi.uv_alarm == want_uv, "pi %s: throttled %d alarm %d", name, r->pi.throttled, r->pi.uv_alarm);
+ if (want_json) CHECK(contains(json, want_json), "pi %s: json has %s", name, want_json);
+ if (not_json) CHECK(!contains(json, not_json), "pi %s: json lacks %s", name, not_json);
+ if (want_md) CHECK(contains(md, want_md), "pi %s: markdown has \"%s\"", name, want_md);
+ if (not_md) CHECK(!contains(md, not_md), "pi %s: markdown lacks \"%s\"", name, not_md);
+ free(json); free(md); free(r);
+ rmtree(root);
+}
+static void test_pi_firmware(void) {
+ const char *p5 = "sys/devices/platform/soc@107c000000/soc@107c000000:firmware/get_throttled";
+ const char *p4 = "sys/devices/platform/soc/soc:firmware/get_throttled";
+ /* a Pi 5 with the LordOS kernel: rpi_volt only */
+ pi_case("lordos ok", 1, NULL, NULL, "0\n", -1, 0, "\"throttled\":null,\"underVoltageAlarm\":false}", NULL,
+ "no under-voltage in the last 2 s (rpi_volt); throttling not reported by this kernel", "since boot");
+ pi_case("lordos alarm", 1, NULL, NULL, "1\n", -1, 1, "\"throttled\":null,\"underVoltageAlarm\":true}", NULL,
+ "; under-voltage in the last 2 s (rpi_volt)", "slowed");
+ pi_case("lordos bad alarm", 1, NULL, NULL, "yes\n", -1, -1, "\"throttled\":null,\"underVoltageAlarm\":null}", NULL, NULL, "voltage");
+ pi_case("lordos alarm 01", 1, NULL, NULL, "01\n", -1, -1, "\"underVoltageAlarm\":null}", NULL, NULL, "voltage");
+ pi_case("lordos no alarm file", 1, NULL, NULL, "", -1, -1, "\"underVoltageAlarm\":null}", NULL, NULL, "voltage");
+ /* an older kernel with get_throttled and no rpi_volt: the sticky bits are since boot */
+ pi_case("old pi4 sticky", 1, p4, "0x50000\n", NULL, 0x50000, -1, "\"throttled\":327680,\"underVoltageAlarm\":null}", NULL,
+ "; under-voltage since boot; slowed down since boot (get_throttled 0x50000)", NULL);
+ pi_case("old pi5 clear", 1, p5, "0\n", NULL, 0, -1, "\"throttled\":0", NULL,
+ "; no under-voltage since boot; not slowed down since boot (get_throttled 0x0)", NULL);
+ pi_case("old now bits", 1, p5, "5\n", NULL, 5, -1, NULL, NULL, "; under-voltage now; slowed down now (get_throttled 0x5)", "since boot");
+ /* both: rpi_volt clears the sticky bits every 2 s, so they don't cover the time since boot */
+ pi_case("old with rpi_volt", 1, p5, "0x20000\n", "0\n", 0x20000, 0, "\"underVoltageAlarm\":false", NULL,
+ "; no under-voltage in the last 2 s; slowed down in the last 2 s (get_throttled 0x20000)", "since boot");
+ pi_case("old bad value", 1, p5, "0x5 junk\n", NULL, -1, -1, "\"throttled\":null", NULL, NULL, "voltage");
+ pi_case("old second line", 1, p5, "0\n0\n", NULL, -1, -1, "\"throttled\":null", NULL, NULL, "voltage");
+ /* a Pi that shows neither: model and revision only */
+ pi_case("pi nothing", 1, NULL, NULL, NULL, -1, -1, "\"throttled\":null,\"underVoltageAlarm\":null}", NULL, "## Raspberry Pi", "voltage");
+ /* not a Pi (no raspberrypi in the device tree), even with the files: no Pi section */
+ pi_case("not a pi", 0, p4, "0x50005\n", "1\n", -1, -1, NULL, "raspberryPi", NULL, "Raspberry Pi");
+}
+
static void test_empty(void) {
char root[] = "/tmp/sysreport-empty-XXXXXX";
if (!mkdtemp(root)) { printf("mkdtemp\n"); exit(2); }
@@ -653,6 +714,7 @@ int main(int argc, char **argv) {
setenv("TERM", "xterm-256color", 1);
setenv("COLORTERM", "truecolor", 1);
CHECK(fetch_color_mode("auto", 1) == FETCH_TRUECOLOR && fetch_color_mode("auto", 0) == FETCH_PLAIN && fetch_color_mode("never", 1) == FETCH_PLAIN, "color modes");
+ test_pi_firmware();
test_empty();
printf("sysreport-test: %d ok, %d failed\n", n_ok, n_bad);
return n_bad ? 1 : 0;
diff --git a/web/content/faq/faq.json b/web/content/faq/faq.json
index 820dd83..2fef9c9 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, and of LordOS's own interface work (laying out and drawing a desktop scene, and shaping text in five scripts), run in an isolated helper that checks its own sandbox first and 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). What that desktop test found is being fixed in 0.8.6: the compositor now gets more CPU weight than any app and the lowest real-time priority, so it no longer waits behind a busy app. On the reference virtual machine the desktop under load now measures as without load; on a Raspberry Pi 5 with its monitor the loaded test went from 24 to 29–30 frames a second, still short of 60 because each frame takes longer to build under the load, which is still being worked on.",
- "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, y del propio trabajo de la interfaz de LordOS (el diseño y dibujo de una escena de escritorio y la composición de texto en cinco escrituras), que corre en un ayudante aislado que primero comprueba su propio aislamiento 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). Lo que encontró esa prueba de escritorio se está corrigiendo en la 0.8.6: el compositor ahora recibe más peso de CPU que cualquier app y la menor prioridad de tiempo real, así que ya no espera detrás de una app ocupada. En la máquina virtual de referencia el escritorio con carga ahora mide igual que sin carga; en una Raspberry Pi 5 con su monitor la prueba con carga pasó de 24 a 29–30 cuadros por segundo, todavía lejos de 60 porque con la carga cada cuadro tarda más en armarse, y en eso se sigue trabajando.",
- "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, e do próprio trabalho da interface do LordOS (o layout e o desenho de uma cena de desktop e a composição de texto em cinco escritas), executado num auxiliar isolado que primeiro verifica o próprio isolamento e 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). O que esse teste de desktop encontrou está sendo corrigido na 0.8.6: o compositor agora recebe mais peso de CPU que qualquer app e a menor prioridade de tempo real, então não espera mais atrás de um app ocupado. Na máquina virtual de referência o desktop com carga agora mede igual a sem carga; num Raspberry Pi 5 com seu monitor o teste com carga passou de 24 para 29–30 quadros por segundo, ainda longe de 60 porque com a carga cada quadro leva mais tempo para ser montado, e isso continua sendo trabalhado."
+ "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, and of LordOS's own interface work (laying out and drawing a desktop scene, and shaping text in five scripts), run in an isolated helper that checks its own sandbox first and that stops near the temperature limit (on a Raspberry Pi also at 80 °C, where the board's firmware starts slowing the processor down; tested so far on simulated system files, not on a real Pi). 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). What that desktop test found is being fixed in 0.8.6: the compositor now gets more CPU weight than any app and the lowest real-time priority, so it no longer waits behind a busy app. On the reference virtual machine the desktop under load now measures as without load; on a Raspberry Pi 5 with its monitor the loaded test went from 24 to 29–30 frames a second, still short of 60 because each frame takes longer to build under the load, which is still being worked on.",
+ "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, y del propio trabajo de la interfaz de LordOS (el diseño y dibujo de una escena de escritorio y la composición de texto en cinco escrituras), que corre en un ayudante aislado que primero comprueba su propio aislamiento y se detiene cerca del límite de temperatura (en una Raspberry Pi también a los 80 °C, donde el firmware de la placa empieza a bajar la velocidad del procesador; por ahora probado con archivos de sistema simulados, no en una Pi real). 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). Lo que encontró esa prueba de escritorio se está corrigiendo en la 0.8.6: el compositor ahora recibe más peso de CPU que cualquier app y la menor prioridad de tiempo real, así que ya no espera detrás de una app ocupada. En la máquina virtual de referencia el escritorio con carga ahora mide igual que sin carga; en una Raspberry Pi 5 con su monitor la prueba con carga pasó de 24 a 29–30 cuadros por segundo, todavía lejos de 60 porque con la carga cada cuadro tarda más en armarse, y en eso se sigue trabajando.",
+ "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, e do próprio trabalho da interface do LordOS (o layout e o desenho de uma cena de desktop e a composição de texto em cinco escritas), executado num auxiliar isolado que primeiro verifica o próprio isolamento e que para perto do limite de temperatura (num Raspberry Pi também aos 80 °C, onde o firmware da placa começa a reduzir a velocidade do processador; por enquanto testado com arquivos de sistema simulados, não num Pi real). 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). O que esse teste de desktop encontrou está sendo corrigido na 0.8.6: o compositor agora recebe mais peso de CPU que qualquer app e a menor prioridade de tempo real, então não espera mais atrás de um app ocupado. Na máquina virtual de referência o desktop com carga agora mede igual a sem carga; num Raspberry Pi 5 com seu monitor o teste com carga passou de 24 para 29–30 quadros por segundo, ainda longe de 60 porque com a carga cada quadro leva mais tempo para ser montado, e isso continua sendo trabalhado."
}
}
]
diff --git a/web/content/paper/meta.json b/web/content/paper/meta.json
index a525217..216063b 100644
--- a/web/content/paper/meta.json
+++ b/web/content/paper/meta.json
@@ -10,7 +10,7 @@
"pt": "Documento técnico: projeto, modelo de segurança e estado atual"
},
"version": "0.8.5 Beta",
- "date": "2026-10-28",
+ "date": "2026-10-29",
"authors": [
"Pablo Miranda",
"Federico Pereira"
diff --git a/web/content/paper/paper.en.md b/web/content/paper/paper.en.md
index 268499c..8d6ed3e 100644
--- a/web/content/paper/paper.en.md
+++ b/web/content/paper/paper.en.md
@@ -488,7 +488,7 @@ The Raspberry Pi 5 is the only supported board. Results on a real board (16 GB,
### 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 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`). Also in development, it times LordOS's own interface work with the engine's real code (the layout and paint of a fixed full-HD desktop scene, and the shaping of paragraphs in Latin, Arabic, Devanagari, Thai and Chinese with fonts built into the helper, which opens no files; on the reference virtual machine 37 frames per second on one core and 40 with the paint threads, 619 shaping runs per second on one core and 3,595 on eight), compared with a reference only when it was measured with the same LordOS version, and `lord-bench` checks its own sandbox before any work: six things it must not be able to do (open a local socket or a network connection, run a program, start a process, create a file, read a system file) were all refused on that machine, and a run where one gets through is marked unstable. 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.
+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`). Also in development, it times LordOS's own interface work with the engine's real code (the layout and paint of a fixed full-HD desktop scene, and the shaping of paragraphs in Latin, Arabic, Devanagari, Thai and Chinese with fonts built into the helper, which opens no files; on the reference virtual machine 37 frames per second on one core and 40 with the paint threads, 619 shaping runs per second on one core and 3,595 on eight), compared with a reference only when it was measured with the same LordOS version, and `lord-bench` checks its own sandbox before any work: six things it must not be able to do (open a local socket or a network connection, run a program, start a process, create a file, read a system file) were all refused on that machine, and a run where one gets through is marked unstable. On a Raspberry Pi it watches the board's firmware during the whole run: the under-voltage alarm, the only flag the LordOS Pi kernel exposes, the firmware's full throttling flags where an older kernel has them, and 80 °C, where the firmware starts slowing the processor down, which stops a peak test as throttled; System Information's Raspberry Pi section reads the same alarm and flags and leaves out what the kernel doesn't show. This was tested on simulated system files, not yet on a real Pi. 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 7ce9889..db6447f 100644
--- a/web/content/paper/paper.es.md
+++ b/web/content/paper/paper.es.md
@@ -488,7 +488,7 @@ La Raspberry Pi 5 es la única placa soportada. Resultados en una placa real (16
### 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 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`). También en desarrollo, mide el trabajo de la propia interfaz de LordOS con el código real del motor (el diseño y dibujo de una escena de escritorio fija en full HD, y la composición tipográfica de párrafos en latín, árabe, devanagari, tailandés y chino con fuentes incluidas en el ayudante, que no abre archivos; en la máquina virtual de referencia 37 cuadros por segundo en un núcleo y 40 con los hilos de dibujo, 619 pasadas de composición por segundo en un núcleo y 3.595 en ocho), comparado con una referencia solo si se midió con la misma versión de LordOS, y `lord-bench` comprueba su propio aislamiento antes de cualquier trabajo: seis cosas que no debe poder hacer (abrir un socket local o una conexión de red, ejecutar un programa, iniciar un proceso, crear un archivo, leer un archivo del sistema) fueron todas rechazadas en esa máquina, y una prueba en la que alguna pase se marca como inestable. 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.
+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`). También en desarrollo, mide el trabajo de la propia interfaz de LordOS con el código real del motor (el diseño y dibujo de una escena de escritorio fija en full HD, y la composición tipográfica de párrafos en latín, árabe, devanagari, tailandés y chino con fuentes incluidas en el ayudante, que no abre archivos; en la máquina virtual de referencia 37 cuadros por segundo en un núcleo y 40 con los hilos de dibujo, 619 pasadas de composición por segundo en un núcleo y 3.595 en ocho), comparado con una referencia solo si se midió con la misma versión de LordOS, y `lord-bench` comprueba su propio aislamiento antes de cualquier trabajo: seis cosas que no debe poder hacer (abrir un socket local o una conexión de red, ejecutar un programa, iniciar un proceso, crear un archivo, leer un archivo del sistema) fueron todas rechazadas en esa máquina, y una prueba en la que alguna pase se marca como inestable. En una Raspberry Pi vigila el firmware de la placa durante toda la prueba: la alarma de bajo voltaje, el único indicador que expone el kernel de LordOS para la Pi, los indicadores completos de limitación del firmware donde un kernel más viejo los tiene, y los 80 °C, donde el firmware empieza a bajar la velocidad del procesador, que detienen una prueba de pico como limitada; la sección Raspberry Pi de Información del sistema lee la misma alarma y los mismos indicadores y deja afuera lo que el kernel no muestra. Esto se probó con archivos de sistema simulados, todavía no en una Pi real. 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 b62ef40..1221079 100644
--- a/web/content/paper/paper.pt.md
+++ b/web/content/paper/paper.pt.md
@@ -488,7 +488,7 @@ O Raspberry Pi 5 é a única placa suportada. Resultados numa placa real (16 GB,
### 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 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`). Também em desenvolvimento, mede o trabalho da própria interface do LordOS com o código real do motor (o layout e o desenho de uma cena de desktop fixa em full HD, e a composição tipográfica de parágrafos em latim, árabe, devanágari, tailandês e chinês com fontes embutidas no auxiliar, que não abre arquivos; na máquina virtual de referência 37 quadros por segundo em um núcleo e 40 com as threads de desenho, 619 passagens de composição por segundo em um núcleo e 3.595 em oito), comparado com uma referência só quando medido com a mesma versão do LordOS, e o `lord-bench` verifica o próprio isolamento antes de qualquer trabalho: seis coisas que não deve conseguir fazer (abrir um socket local ou uma conexão de rede, executar um programa, iniciar um processo, criar um arquivo, ler um arquivo do sistema) foram todas recusadas nessa máquina, e um teste em que alguma passe é marcado como instável. 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.
+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`). Também em desenvolvimento, mede o trabalho da própria interface do LordOS com o código real do motor (o layout e o desenho de uma cena de desktop fixa em full HD, e a composição tipográfica de parágrafos em latim, árabe, devanágari, tailandês e chinês com fontes embutidas no auxiliar, que não abre arquivos; na máquina virtual de referência 37 quadros por segundo em um núcleo e 40 com as threads de desenho, 619 passagens de composição por segundo em um núcleo e 3.595 em oito), comparado com uma referência só quando medido com a mesma versão do LordOS, e o `lord-bench` verifica o próprio isolamento antes de qualquer trabalho: seis coisas que não deve conseguir fazer (abrir um socket local ou uma conexão de rede, executar um programa, iniciar um processo, criar um arquivo, ler um arquivo do sistema) foram todas recusadas nessa máquina, e um teste em que alguma passe é marcado como instável. Num Raspberry Pi ele vigia o firmware da placa durante todo o teste: o alarme de subtensão, o único indicador que o kernel do LordOS para o Pi expõe, os indicadores completos de limitação do firmware onde um kernel mais antigo os tem, e os 80 °C, onde o firmware começa a reduzir a velocidade do processador, que param um teste de pico como limitado; a seção Raspberry Pi de Informações do sistema lê o mesmo alarme e os mesmos indicadores e deixa de fora o que o kernel não mostra. Isso foi testado com arquivos de sistema simulados, ainda não num Pi real. 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