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 app (0.8.5): Overview, Hardware and Compatibility from lord.sysinfo.report() (the sysreport collector plus how this session composes the screen: lord_composition() and gpu_info(), the last gpu_init outcome as a fixed code, renderer, render node, dmabuf, scanouts); GPU as separate layers and the Compatibility panel in apps/sysinfo/model.js with its own test; About LordOS → System Report…; en, es, pt

Federico Pereiraf15467e4f492
diff --git a/CHANGELOG.md b/CHANGELOG.md
index dbe7e2f..3809bf2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -15,6 +15,11 @@ of the matching [GitHub release](https://github.com/lordbasex/LordOS/releases),
- **`lordos-fetch`.** Type it in a terminal to see the LordOS crown beside a summary of your
computer: system, kernel, CPU, GPU, display, memory, disk, packages and how apps are isolated.
`lordos-fetch --share` leaves out your user and computer names, for a screenshot you'll post.
+- **System Information** (About LordOS → System Report…): every piece of hardware this computer has
+ and what LordOS makes of it. The graphics card is shown layer by layer (driver, display output,
+ render node, GPU context, composition, direct scanout) with the exact reason when the screen is
+ composed on the CPU, and a Compatibility panel says what works, what works with limits and what
+ wasn't checked.
- **`lordos-sysreport report`** prints the hardware of this computer and what the system made of it,
as Markdown or `--json`, with no serial numbers, addresses or names: the base of System
Information.
diff --git a/apps/about/index.jsx b/apps/about/index.jsx
index 412f4de..297da7f 100644
--- a/apps/about/index.jsx
+++ b/apps/about/index.jsx
@@ -1,7 +1,7 @@
// About LordOS: real system data (/proc) and display server stats.
import { version as reactVersion } from 'react';
import { useMemo } from 'react';
-import { View, Text, LordOSLogo, LordOSWordmark, Lumo, screen, lordosVersion, useTheme, useSystemInfo, useServerStats, formatBytes, formatDuration, formatNumber, typeScale, codeStatus, isSystemApp, t as tr } from '@lordos/sdk';
+import { View, Text, Button, wm, LordOSLogo, LordOSWordmark, Lumo, screen, lordosVersion, useTheme, useSystemInfo, useServerStats, formatBytes, formatDuration, formatNumber, typeScale, codeStatus, isSystemApp, t as tr } from '@lordos/sdk';
export function Icon({ size }) {
return <LordOSLogo size={size} />;
@@ -77,6 +77,9 @@ export default function About() {
<InfoRow k={tr('about.ram')} v={`${formatNumber(st.rssKB / 1024, 1)} MB (JS ${formatNumber(st.jsKB / 1024, 1)} MB)`} />
<InfoRow k={tr('about.render')} v={tr('about.renderValue', { ms: formatNumber(st.layoutMs + st.paintMs, 1), count: st.nodes })} />
</View>
+ <View style={{ marginTop: 12 }}>
+ <Button small label={tr('about.systemReport')} onClick={() => wm.open('sysinfo')} />
+ </View>
<View style={{ flex: 1, minHeight: 12 }} />
<View style={{ alignSelf: 'stretch', flexDirection: 'row', alignItems: 'center', gap: 8, paddingHorizontal: 24 }}>
<Lumo pose="avatar" size={24} />
diff --git a/apps/about/manifest.json b/apps/about/manifest.json
index 6ed1b81..15591e1 100644
--- a/apps/about/manifest.json
+++ b/apps/about/manifest.json
@@ -4,7 +4,7 @@
"description": "System and graphics server information",
"size": [
440,
- 650
+ 690
],
"dock": true,
"permissions": [
diff --git a/apps/sysinfo/index.jsx b/apps/sysinfo/index.jsx
new file mode 100644
index 0000000..0feb78a
--- /dev/null
+++ b/apps/sysinfo/index.jsx
@@ -0,0 +1,334 @@
+// System Information (0.8.5, docs/BENCHMARK.md): every piece of hardware detected and what LordOS
+// makes of it. Overview, Hardware (a source list and a detail pane) and Compatibility. The report
+// comes from lord.sysinfo.report() (server/src/sysreport, the same collector as lordos-sysreport and
+// lordos-fetch), read once on open and again with Refresh; model.js works out the GPU layers and the
+// Compatibility panel. Nothing here holds serial numbers, addresses or names: the report has none.
+import {
+ View, Text, ScrollView, useTheme, useLocale, LordOSLogo, systemReport, systemInfo, lordosVersion, formatBytes, formatNumber,
+ Toolbar, ToolbarSpacer, ToolbarButton, Segmented, SidebarItem, GroupBox, FormRow, EmptyState, Hairline, spacing, typeScale,
+} from '@lordos/sdk';
+import { useMemo, useState } from 'react';
+import { cardLayers, sessionLayers, compatibility, hardwareSections, throttleFlags, machineName, compositionReason } from './model.js';
+
+// The app's icon: a chip on the brand gradient.
+export function Icon({ size: s }) {
+ return (
+ <View style={{ width: s, height: s, borderRadius: s * 0.22, alignItems: 'center', justifyContent: 'center',
+ background: 'linear-gradient(135deg, #B46CFF, #4F46E5)' }}>
+ <View style={{ width: s * 0.5, height: s * 0.5, borderRadius: s * 0.08, border: `${Math.max(1, s * 0.04)}px solid rgba(255,255,255,0.95)`,
+ alignItems: 'center', justifyContent: 'center' }}>
+ <View style={{ width: s * 0.22, height: s * 0.22, borderRadius: s * 0.03, backgroundColor: '#FFD60A' }} />
+ </View>
+ {[0.32, 0.5, 0.68].map((p) => [
+ <View key={`t${p}`} style={{ position: 'absolute', left: s * p - s * 0.02, top: s * 0.16, width: s * 0.04, height: s * 0.08, backgroundColor: 'rgba(255,255,255,0.8)' }} />,
+ <View key={`b${p}`} style={{ position: 'absolute', left: s * p - s * 0.02, bottom: s * 0.16, width: s * 0.04, height: s * 0.08, backgroundColor: 'rgba(255,255,255,0.8)' }} />,
+ ])}
+ </View>
+ );
+}
+
+const camel = (s) => String(s).replace(/-([a-z0-9])/g, (_, c) => c.toUpperCase());
+const STATE_COLOR = { yes: '#30d158', works: '#30d158', limits: '#ff9f0a', no: '#ff453a', absent: '#8e8e93', unchecked: '#8e8e93' };
+const ghz = (mhz) => formatNumber(mhz / 1000, 2);
+// "Intel(R) Core(TM) i7 CPU @ 2.80GHz" → "Intel Core i7 @ 2.80GHz", as About shows it
+const cpuName = (s) => (s || '').replace(/\(R\)|\(TM\)|\bCPU\b|\bProcessor\b/g, '').replace(/\s+/g, ' ').trim();
+
+function Badge({ state }) {
+ const t = useTheme();
+ const { t: tr } = useLocale();
+ return (
+ <View style={{ flexDirection: 'row', alignItems: 'center', gap: 6, paddingHorizontal: 8, height: 22, borderRadius: 11,
+ backgroundColor: t.mode === 'dark' ? 'rgba(255,255,255,0.07)' : 'rgba(0,0,0,0.05)' }}>
+ <View style={{ width: 8, height: 8, borderRadius: 4, backgroundColor: STATE_COLOR[state] || '#8e8e93' }} />
+ <Text style={{ fontSize: typeScale.caption, fontWeight: 500, color: t.text, whiteSpace: 'nowrap' }}>{tr(`sysinfo.state.${state}`)}</Text>
+ </View>
+ );
+}
+
+function Row({ label, value }) {
+ const t = useTheme();
+ return (
+ <FormRow label={label} labelWidth={170} minHeight={30}>
+ <Text style={{ fontSize: typeScale.body, color: value ? t.text : t.textDim, textAlign: 'start' }}>{value || '—'}</Text>
+ </FormRow>
+ );
+}
+
+// A layer or compatibility row: name, state and what it means.
+function StateRow({ label, state, detail }) {
+ const t = useTheme();
+ return (
+ <View style={{ flexDirection: 'row', alignItems: 'center', gap: spacing.m, minHeight: 40, paddingVertical: 6 }}>
+ <Text style={{ width: 170, fontSize: typeScale.body, color: t.text, textAlign: 'start' }}>{label}</Text>
+ <Badge state={state} />
+ <Text style={{ flex: 1, minWidth: 0, fontSize: typeScale.callout, color: t.textDim, textAlign: 'start', lineHeight: 1.35 }}>{detail || ''}</Text>
+ </View>
+ );
+}
+
+// ---- Overview ----
+
+function Card({ title, value, sub }) {
+ const t = useTheme();
+ return (
+ <View style={{ flex: 1, minWidth: 0, minHeight: 104, gap: 4, padding: spacing.m, borderRadius: t.groupRadius, border: `1px solid ${t.separator}`,
+ backgroundColor: t.mode === 'dark' ? 'rgba(255,255,255,0.04)' : 'rgba(0,0,0,0.025)' }}>
+ <Text style={{ fontSize: typeScale.caption, fontWeight: 600, color: t.textDim, textAlign: 'start' }}>{title}</Text>
+ <Text style={{ fontSize: typeScale.headline, fontWeight: 600, color: t.text, textAlign: 'start' }}>{value || '—'}</Text>
+ {sub ? <Text style={{ fontSize: typeScale.callout, color: t.textDim, textAlign: 'start', lineHeight: 1.35 }}>{sub}</Text> : null}
+ </View>
+ );
+}
+
+function Overview({ r, info }) {
+ const t = useTheme();
+ const { t: tr } = useLocale();
+ const ver = lordosVersion(info);
+ const c = r.cpu || {};
+ const s = r.session || {};
+ const reason = compositionReason(s);
+ const gpu = (r.gpus || []).find((g) => g.connected) || (r.gpus || [])[0];
+ const disks = r.storage || [];
+ const sw = r.software || {};
+ const m = r.machine || {};
+ const kind = m.virtualization ? tr('sysinfo.kind.vm', { name: m.virtualization }) : m.chassis ? tr(`sysinfo.kind.${camel(m.chassis)}`) : '';
+ return (
+ <ScrollView style={{ flex: 1 }}>
+ <View style={{ padding: spacing.xl, gap: spacing.xl }}>
+ <View style={{ flexDirection: 'row', alignItems: 'center', gap: spacing.l }}>
+ <LordOSLogo size={64} />
+ <View style={{ flex: 1, minWidth: 0, gap: 2 }}>
+ <Text style={{ fontSize: typeScale.largeTitle, fontWeight: 600, color: t.text, textAlign: 'start' }}>{machineName(r) || tr('sysinfo.thisComputer')}</Text>
+ <Text style={{ fontSize: typeScale.callout, color: t.textDim, textAlign: 'start' }}>
+ {[kind, ver.channel ? tr('sysinfo.lordosChannel', { v: ver.version, channel: ver.channel }) : tr('sysinfo.lordos', { v: ver.version }), sw.os].filter(Boolean).join(' · ')}
+ </Text>
+ {s.fixture ? <Text style={{ fontSize: typeScale.caption, color: '#ff9f0a', textAlign: 'start' }}>{tr('sysinfo.fixture')}</Text> : null}
+ </View>
+ </View>
+ <View style={{ flexDirection: 'row', gap: spacing.m }}>
+ <Card title={tr('sysinfo.section.cpu')} value={cpuName(c.model) || c.arch}
+ sub={[tr('sysinfo.coresThreads', { cores: c.cores, threads: c.threads }), c.maxMHz ? tr('sysinfo.upTo', { ghz: ghz(c.maxMHz) }) : ''].filter(Boolean).join(' · ')} />
+ <Card title={tr('sysinfo.section.memory')} value={formatBytes((r.memory?.totalKB || 0) * 1024)}
+ sub={(r.memory?.zram || []).length ? tr('sysinfo.withZram', { size: formatBytes(r.memory.zram[0].sizeKB * 1024) }) : r.memory?.swapKB ? tr('sysinfo.withSwap', { size: formatBytes(r.memory.swapKB * 1024) }) : ''} />
+ <Card title={tr('sysinfo.section.graphics')} value={gpu ? (gpu.device || gpu.vendor || gpu.driver) : tr('sysinfo.none')}
+ sub={s.composition === 'gpu' ? tr('sysinfo.composedGpu') : tr('sysinfo.composedCpu', { reason: tr(`sysinfo.reason.${camel(reason)}`) })} />
+ </View>
+ <View style={{ flexDirection: 'row', gap: spacing.m }}>
+ <Card title={tr('sysinfo.section.displays')} value={(r.displays || []).length ? (r.displays || []).map((d) => d.name || d.connector).join(', ') : tr('sysinfo.none')}
+ sub={(r.displays || []).map((d) => d.nativeWidth ? `${d.nativeWidth} × ${d.nativeHeight}` : d.mode).filter(Boolean).join(', ')} />
+ <Card title={tr('sysinfo.section.storage')} value={formatBytes(disks.reduce((a, d) => a + d.bytes, 0))}
+ sub={tr('sysinfo.disks', { count: disks.length })} />
+ <Card title={tr('sysinfo.isolation')} value={sw.landlockAbi > 0 ? tr('sysinfo.landlock', { abi: sw.landlockAbi }) : tr('sysinfo.landlockUnknown')}
+ sub={[sw.bpfLsm ? tr('sysinfo.bpfLsm') : '', sw.cgroup2 ? tr('sysinfo.cgroup2') : '', sw.services?.['lord-netperm'] ? tr('sysinfo.appFirewall') : ''].filter(Boolean).join(' · ')} />
+ </View>
+ </View>
+ </ScrollView>
+ );
+}
+
+// ---- Hardware ----
+
+function layerDetail(tr, l) {
+ if (l.note) return tr(`sysinfo.note.${camel(l.note)}`, l.vars || {});
+ if (l.state !== 'yes') return '';
+ return { device: () => l.vars.name, driver: () => l.vars.driver, kms: () => tr('sysinfo.detail.kms', l.vars), egl: () => l.vars.renderer }[l.id]?.() || '';
+}
+
+function Graphics({ r }) {
+ const { t: tr } = useLocale();
+ return (
+ <View style={{ gap: spacing.xl }}>
+ {(r.gpus || []).map((g) => (
+ <GroupBox key={g.card} title={tr('sysinfo.cardTitle', { card: g.card, bus: g.bus })}>
+ {cardLayers(g).map((l) => <StateRow key={l.id} label={tr(`sysinfo.layer.${l.id}`)} state={l.state} detail={layerDetail(tr, l)} />)}
+ </GroupBox>
+ ))}
+ <GroupBox title={tr('sysinfo.thisSession')} footer={tr('sysinfo.uncheckedFooter')}>
+ {sessionLayers(r.session).map((l) => <StateRow key={l.id} label={tr(`sysinfo.layer.${l.id}`)} state={l.state}
+ detail={l.id === 'composition' && l.note ? tr(`sysinfo.reason.${camel(l.note)}`) : layerDetail(tr, l)} />)}
+ </GroupBox>
+ </View>
+ );
+}
+
+function List({ items, render }) {
+ return <View style={{ gap: spacing.l }}>{items.map(render)}</View>;
+}
+
+function Section({ id, r }) {
+ const { t: tr } = useLocale();
+ const yesNo = (v) => (v ? tr('sysinfo.yes') : tr('sysinfo.no'));
+ const m = r.machine || {}, c = r.cpu || {}, mem = r.memory || {}, sw = r.software || {};
+ switch (id) {
+ case 'computer': return (
+ <GroupBox>
+ <Row label={tr('sysinfo.f.vendor')} value={m.vendor} />
+ <Row label={tr('sysinfo.f.product')} value={[m.product, m.version].filter(Boolean).join(' ')} />
+ <Row label={tr('sysinfo.f.model')} value={m.model} />
+ <Row label={tr('sysinfo.f.board')} value={[m.boardVendor, m.boardName].filter(Boolean).join(' ')} />
+ <Row label={tr('sysinfo.f.kind')} value={m.virtualization ? tr('sysinfo.kind.vm', { name: m.virtualization }) : m.chassis ? tr(`sysinfo.kind.${camel(m.chassis)}`) : ''} />
+ <Row label={tr('sysinfo.f.firmware')} value={[m.firmware ? tr(`sysinfo.firmware.${m.firmware}`) : '', m.biosVendor, m.biosVersion, m.biosDate].filter(Boolean).join(' · ')} />
+ <Row label={tr('sysinfo.f.secureBoot')} value={m.secureBoot == null ? '' : m.secureBoot ? tr('sysinfo.on') : tr('sysinfo.off')} />
+ </GroupBox>);
+ case 'cpu': return (
+ <GroupBox>
+ <Row label={tr('sysinfo.f.model')} value={cpuName(c.model)} />
+ <Row label={tr('sysinfo.f.vendor')} value={c.vendor} />
+ <Row label={tr('sysinfo.f.arch')} value={c.arch} />
+ <Row label={tr('sysinfo.f.layout')} value={tr('sysinfo.layout', { sockets: c.sockets, cores: c.cores, threads: c.threads })} />
+ <Row label={tr('sysinfo.f.frequency')} value={c.maxMHz ? tr('sysinfo.freqRange', { min: ghz(c.minMHz), max: ghz(c.maxMHz) }) : ''} />
+ <Row label={tr('sysinfo.f.governor')} value={c.governor} />
+ <Row label={tr('sysinfo.f.cache')} value={[c.l1dKB && `L1d ${c.l1dKB} KB`, c.l1iKB && `L1i ${c.l1iKB} KB`, c.l2KB && `L2 ${c.l2KB} KB`, c.l3KB && `L3 ${c.l3KB} KB`].filter(Boolean).join(' · ')} />
+ <Row label={tr('sysinfo.f.instructions')} value={c.flags} />
+ <Row label={tr('sysinfo.f.microcode')} value={c.microcode} />
+ </GroupBox>);
+ case 'memory': return (
+ <GroupBox>
+ <Row label={tr('sysinfo.f.total')} value={formatBytes((mem.totalKB || 0) * 1024)} />
+ <Row label={tr('sysinfo.f.swap')} value={mem.swapKB ? formatBytes(mem.swapKB * 1024) : tr('sysinfo.none')} />
+ {(mem.zram || []).map((z, i) => <Row key={i} label={tr('sysinfo.f.zram')} value={`${formatBytes(z.sizeKB * 1024)}${z.algorithm ? ` · ${z.algorithm}` : ''}`} />)}
+ </GroupBox>);
+ case 'graphics': return <Graphics r={r} />;
+ case 'displays': return <List items={r.displays || []} render={(d, i) => (
+ <GroupBox key={i} title={d.connector}>
+ <Row label={tr('sysinfo.f.monitor')} value={[d.name, d.manufacturer].filter(Boolean).join(' · ')} />
+ <Row label={tr('sysinfo.f.native')} value={d.nativeWidth ? `${d.nativeWidth} × ${d.nativeHeight}` : d.mode} />
+ <Row label={tr('sysinfo.f.size')} value={d.diagonalTenths ? tr('sysinfo.diagonal', { inch: formatNumber(d.diagonalTenths / 10, 1), w: d.widthCm, h: d.heightCm }) : ''} />
+ <Row label={tr('sysinfo.f.year')} value={d.year ? String(d.year) : ''} />
+ <Row label={tr('sysinfo.f.card')} value={d.card} />
+ </GroupBox>)} />;
+ case 'storage': return <List items={r.storage || []} render={(d) => (
+ <GroupBox key={d.name} title={d.name}>
+ <Row label={tr('sysinfo.f.model')} value={[d.vendor, d.model].filter(Boolean).join(' ')} />
+ <Row label={tr('sysinfo.f.size')} value={formatBytes(d.bytes)} />
+ <Row label={tr('sysinfo.f.connection')} value={[d.transport ? tr(`sysinfo.bus.${d.transport}`) : '', d.link].filter(Boolean).join(' · ')} />
+ <Row label={tr('sysinfo.f.kind')} value={d.removable ? tr('sysinfo.removable') : d.rotational ? tr('sysinfo.hdd') : tr('sysinfo.ssd')} />
+ </GroupBox>)} />;
+ case 'network': return (
+ <GroupBox>
+ {(r.network || []).map((n, i) => <Row key={i} label={tr(`sysinfo.net.${n.kind}`)}
+ value={[n.driver, n.up ? (n.speedMbps ? tr('sysinfo.upAt', { mbps: n.speedMbps }) : tr('sysinfo.up')) : tr('sysinfo.down')].filter(Boolean).join(' · ')} />)}
+ </GroupBox>);
+ case 'audio': return <GroupBox>{(r.audio || []).map((a, i) => <Row key={i} label={tr('sysinfo.f.card')} value={a} />)}</GroupBox>;
+ case 'bluetooth': return <GroupBox>{(r.bluetooth || []).map((b, i) => <Row key={i} label={tr('sysinfo.f.controller')} value={b.driver} />)}</GroupBox>;
+ case 'power': return <List items={r.power || []} render={(p, i) => (
+ <GroupBox key={i} title={tr(`sysinfo.power.${p.kind}`)}>
+ {p.kind === 'battery' ? [
+ <Row key="m" label={tr('sysinfo.f.model')} value={[p.vendor, p.model].filter(Boolean).join(' ')} />,
+ <Row key="t" label={tr('sysinfo.f.technology')} value={p.technology} />,
+ <Row key="c" label={tr('sysinfo.f.charge')} value={p.capacity != null ? `${p.capacity} %` : ''} />,
+ <Row key="h" label={tr('sysinfo.f.health')} value={p.health != null ? tr('sysinfo.health', { health: p.health }) : ''} />,
+ <Row key="s" label={tr('sysinfo.f.status')} value={p.status} />,
+ ] : <Row label={tr('sysinfo.f.plugged')} value={p.online == null ? '' : yesNo(p.online)} />}
+ </GroupBox>)} />;
+ case 'thermal': return (
+ <GroupBox>
+ {(r.thermal || []).map((x, i) => <Row key={i} label={x.sensor}
+ value={[x.milliC != null ? `${formatNumber(x.milliC / 1000, 1)} °C` : '', x.fans ? tr('sysinfo.fans', { count: x.fans }) : ''].filter(Boolean).join(' · ')} />)}
+ </GroupBox>);
+ case 'pci': return (
+ <GroupBox>
+ {(r.pci || []).map((p, i) => <Row key={i} label={p.className || p.class} value={[[p.vendor, p.device].filter(Boolean).join(' ') || `${p.vendorId}:${p.deviceId}`, p.driver].filter(Boolean).join(' · ')} />)}
+ </GroupBox>);
+ case 'usb': return (
+ <GroupBox>
+ {(r.usb || []).map((u, i) => <Row key={i} label={u.speedMbps ? tr('sysinfo.usbSpeed', { mbps: u.speedMbps }) : 'USB'}
+ value={[[u.vendor, u.product].filter(Boolean).join(' ') || `${u.vendorId}:${u.productId}`, u.driver].filter(Boolean).join(' · ')} />)}
+ </GroupBox>);
+ case 'raspberryPi': {
+ const pi = r.raspberryPi;
+ const f = throttleFlags(pi.throttled);
+ 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')} />
+ </GroupBox>);
+ }
+ case 'software': return (
+ <View style={{ gap: spacing.xl }}>
+ <GroupBox>
+ <Row label={tr('sysinfo.f.system')} value={sw.os} />
+ <Row label={tr('sysinfo.f.kernel')} value={sw.kernel} />
+ <Row label={tr('sysinfo.f.lsm')} value={sw.lsm} />
+ <Row label={tr('sysinfo.f.landlock')} value={sw.landlockAbi == null ? '' : sw.landlockAbi ? String(sw.landlockAbi) : tr('sysinfo.unavailable')} />
+ <Row label={tr('sysinfo.f.cgroup2')} value={yesNo(sw.cgroup2)} />
+ </GroupBox>
+ <GroupBox title={tr('sysinfo.services')}>
+ {Object.entries(sw.services || {}).map(([k, v]) => <Row key={k} label={k} value={v ? tr('sysinfo.running') : tr('sysinfo.notRunning')} />)}
+ </GroupBox>
+ <GroupBox title={tr('sysinfo.kernelOptions')}>
+ {Object.entries(sw.kernelConfig || {}).map(([k, v]) => <Row key={k} label={k.replace(/^CONFIG_/, '')} value={['y', 'm', 'n'].includes(v) ? tr(`sysinfo.kconf.${v}`) : tr('sysinfo.unknown')} />)}
+ </GroupBox>
+ </View>);
+ default: return null;
+ }
+}
+
+function Hardware({ r }) {
+ const t = useTheme();
+ const { t: tr } = useLocale();
+ const sections = useMemo(() => hardwareSections(r), [r]);
+ const [sel, setSel] = useState('computer');
+ const cur = sections.includes(sel) ? sel : sections[0];
+ return (
+ <View style={{ flex: 1, flexDirection: 'row' }}>
+ <View style={{ width: 200, backgroundColor: t.sidebarBg }}>
+ <ScrollView style={{ flex: 1 }} contentStyle={{ padding: spacing.s, gap: 1 }}>
+ {sections.map((id) => <SidebarItem key={id} label={tr(`sysinfo.section.${id}`)} selected={id === cur} onClick={() => setSel(id)} />)}
+ </ScrollView>
+ <Hairline edge="end" />
+ </View>
+ <ScrollView style={{ flex: 1 }}>
+ <View style={{ padding: spacing.xl, gap: spacing.l }}>
+ <Text style={{ fontSize: typeScale.title, fontWeight: 600, color: t.text, textAlign: 'start' }}>{tr(`sysinfo.section.${cur}`)}</Text>
+ <Section id={cur} r={r} />
+ </View>
+ </ScrollView>
+ </View>
+ );
+}
+
+// ---- Compatibility ----
+
+function compatNote(tr, c) {
+ if (!c.note) return c.vars && c.vars.count != null && c.state === 'works' ? tr(`sysinfo.compat.count.${c.id}`, c.vars) : '';
+ if (c.note.startsWith('cpu.')) return tr('sysinfo.compat.cpuBecause', { reason: tr(`sysinfo.reason.${camel(c.note.slice(4))}`) });
+ return tr(`sysinfo.compat.${c.note.replace('.', '_')}`, c.vars);
+}
+
+function Compatibility({ r }) {
+ const { t: tr } = useLocale();
+ const rows = useMemo(() => compatibility(r), [r]);
+ return (
+ <ScrollView style={{ flex: 1 }}>
+ <View style={{ padding: spacing.xl, gap: spacing.l }}>
+ <GroupBox footer={tr('sysinfo.compatFooter')}>
+ {rows.map((c) => <StateRow key={c.id} label={tr(`sysinfo.component.${c.id}`)} state={c.state} detail={compatNote(tr, c)} />)}
+ </GroupBox>
+ </View>
+ </ScrollView>
+ );
+}
+
+export default function SystemInformation() {
+ const { t: tr } = useLocale();
+ const [tab, setTab] = useState('overview');
+ const [n, setN] = useState(0);
+ const r = useMemo(() => systemReport(), [n]);
+ const info = useMemo(() => systemInfo(), [n]);
+ if (!r) return <EmptyState mascot="confused" title={tr('sysinfo.unavailable')} />;
+ return (
+ <View style={{ flex: 1 }}>
+ <Toolbar>
+ <ToolbarSpacer />
+ <Segmented appearance="neutral" value={tab} onChange={setTab}
+ options={[['overview', tr('sysinfo.tab.overview')], ['hardware', tr('sysinfo.tab.hardware')], ['compat', tr('sysinfo.tab.compat')]]} />
+ <ToolbarSpacer />
+ <ToolbarButton icon="↻" title={tr('sysinfo.refresh')} onClick={() => setN(n + 1)} />
+ </Toolbar>
+ {tab === 'overview' ? <Overview r={r} info={info} /> : tab === 'hardware' ? <Hardware r={r} /> : <Compatibility r={r} />}
+ </View>
+ );
+}
diff --git a/apps/sysinfo/manifest.json b/apps/sysinfo/manifest.json
new file mode 100644
index 0000000..fb99041
--- /dev/null
+++ b/apps/sysinfo/manifest.json
@@ -0,0 +1,18 @@
+{
+ "id": "sysinfo",
+ "name": "System Information",
+ "description": "Every piece of hardware detected and what LordOS makes of it",
+ "size": [
+ 960,
+ 640
+ ],
+ "minSize": [
+ 760,
+ 480
+ ],
+ "dock": false,
+ "permissions": [
+ "system:read"
+ ],
+ "category": "System"
+}
diff --git a/apps/sysinfo/model.js b/apps/sysinfo/model.js
new file mode 100644
index 0000000..56686d8
--- /dev/null
+++ b/apps/sysinfo/model.js
@@ -0,0 +1,134 @@
+// model.js — System Information's model (docs/BENCHMARK.md, "0.8.5 — System Information"): the GPU
+// as separate layers and the Compatibility panel, worked out from lord.sysinfo.report(). Pure
+// functions with no UI and no SDK, tested by server/tests/sysinfo_model_test.mjs. States and notes
+// are codes; the app turns them into text with t('sysinfo.…').
+//
+// Layer states: 'yes' (available), 'no' (not available), 'unchecked' (not checked in this
+// version). Compatibility states: 'works', 'limits' (works, with a limit the note names), 'no'
+// (doesn't work), 'absent' (no such device), 'unchecked'.
+
+// Why this session composes on the CPU, from lord_composition() and gpu_info()'s outcome.
+export function compositionReason(session) {
+ const s = session || {};
+ if (s.composition === 'gpu') return null;
+ if (s.composition && s.composition !== 'gpu-off') return s.composition; // headless, no-display, rotated, capture
+ return s.gpuInit || 'unknown'; // env-off, no-3d, no-gbm, no-egl, no-config, no-context, software, shaders, not-built
+}
+
+// The layers of one card: what the kernel shows of it.
+export function cardLayers(gpu) {
+ const g = gpu || {};
+ return [
+ { id: 'device', state: 'yes', vars: { name: [g.vendor, g.device].filter(Boolean).join(' ') || `${g.vendorId || '?'}:${g.deviceId || '?'}` } },
+ { id: 'driver', state: g.driver ? 'yes' : 'no', vars: { driver: g.driver || '' } },
+ { id: 'kms', state: g.connectors > 0 ? 'yes' : 'no', note: g.connectors > 0 ? null : 'renderOnly',
+ vars: { connected: g.connected || 0, connectors: g.connectors || 0 } },
+ { id: 'render', state: g.renderNode ? 'yes' : 'no' },
+ ];
+}
+
+// The layers of this session: the EGL context, composition, scanout, and what 0.8.5 doesn't check.
+export function sessionLayers(session) {
+ const s = session || {};
+ const on = s.composition === 'gpu';
+ const reason = compositionReason(s);
+ const soft = /llvmpipe|softpipe|swrast/i.test(s.renderer || '');
+ return [
+ { id: 'egl', state: on ? 'yes' : 'no', note: on ? (soft ? 'software' : null) : reason === 'software' ? 'softwareRefused' : null,
+ vars: { renderer: s.renderer || '' } },
+ { id: 'composition', state: on ? 'yes' : 'no', note: on ? null : reason },
+ { id: 'scanout', state: on ? 'yes' : 'no', vars: { count: s.scanouts || 0 }, note: on ? (s.scanouts ? 'scanoutSeen' : 'scanoutNone') : null },
+ { id: 'dmabuf', state: on && s.dmabuf ? 'yes' : 'no' },
+ { id: 'decode', state: 'unchecked' },
+ { id: 'encode', state: 'unchecked' },
+ { id: 'vulkan', state: 'unchecked' },
+ ];
+}
+
+// The Compatibility panel: one row per component, from this machine's detection only (0.8.5).
+export function compatibility(r) {
+ const rep = r || {};
+ const out = [];
+ const add = (id, state, note = null, vars = {}) => out.push({ id, state, note, vars });
+ const s = rep.session || {};
+ const gpus = rep.gpus || [];
+
+ if (s.composition === 'gpu') add('gpu', 'works', 'gpuComposes', { renderer: s.renderer || '' });
+ else if (gpus.length) add('gpu', 'limits', `cpu.${compositionReason(s)}`);
+ else add('gpu', 'limits', 'noGpu');
+
+ const displays = rep.displays || [];
+ if (displays.length) {
+ const noEdid = displays.filter((d) => !d.nativeWidth).length;
+ add('display', noEdid ? 'limits' : 'works', noEdid ? 'noEdid' : null, { count: displays.length });
+ } else add('display', s.composition === 'headless' ? 'unchecked' : 'absent', s.composition === 'headless' ? 'headless' : null);
+
+ const disks = rep.storage || [];
+ add('storage', disks.length ? 'works' : 'absent', null, { count: disks.length });
+
+ const nets = (rep.network || []).filter((n) => n.kind === 'ethernet' || n.kind === 'wifi');
+ if (!nets.length) add('network', 'absent');
+ else add('network', nets.some((n) => n.up) ? 'works' : 'limits', nets.some((n) => n.up) ? null : 'notConnected');
+
+ const wifi = (rep.network || []).filter((n) => n.kind === 'wifi');
+ if (!wifi.length) add('wifi', 'absent');
+ else add('wifi', wifi.every((n) => n.driver) ? 'works' : 'limits', wifi.every((n) => n.driver) ? null : 'noDriver', { driver: wifi[0].driver || '' });
+
+ const bt = rep.bluetooth || [];
+ if (!bt.length) add('bluetooth', 'absent');
+ else add('bluetooth', bt[0].driver ? 'works' : 'limits', bt[0].driver ? null : 'noDriver', { driver: bt[0].driver || '' });
+
+ add('audio', (rep.audio || []).length ? 'works' : 'absent', null, { count: (rep.audio || []).length });
+
+ const bat = (rep.power || []).find((p) => p.kind === 'battery');
+ if (!bat) add('power', 'absent');
+ else if (bat.health != null && bat.health < 70) add('power', 'limits', 'batteryWorn', { health: bat.health });
+ else add('power', 'works', bat.health != null ? 'batteryHealth' : null, { health: bat.health });
+
+ // isolation: Landlock (null = not known, e.g. a fixture), the BPF LSM and the unified cgroup tree
+ const sw = rep.software || {};
+ const ll = sw.landlockAbi;
+ const missing = [ll === 0 ? 'landlock' : null, sw.bpfLsm ? null : 'bpfLsm', sw.cgroup2 ? null : 'cgroup2'].filter(Boolean);
+ if (ll == null && !missing.length) add('isolation', 'works');
+ else add('isolation', missing.length ? 'limits' : 'works', missing.length ? `missing.${missing[0]}` : null, { abi: ll || 0 });
+
+ add('suspend', 'unchecked');
+ return out;
+}
+
+// The Hardware tab's sections that this machine has something for.
+export function hardwareSections(r) {
+ const rep = r || {};
+ const has = {
+ computer: true, cpu: true, memory: true,
+ graphics: (rep.gpus || []).length > 0 || !!rep.session,
+ displays: (rep.displays || []).length > 0,
+ storage: (rep.storage || []).length > 0,
+ network: (rep.network || []).length > 0,
+ audio: (rep.audio || []).length > 0,
+ bluetooth: (rep.bluetooth || []).length > 0,
+ power: (rep.power || []).length > 0,
+ thermal: (rep.thermal || []).length > 0,
+ pci: (rep.pci || []).length > 0,
+ usb: (rep.usb || []).length > 0,
+ raspberryPi: !!rep.raspberryPi,
+ software: true,
+ };
+ return Object.keys(has).filter((k) => has[k]);
+}
+
+// Raspberry Pi get_throttled bits: what happened now and since boot.
+export function throttleFlags(v) {
+ if (v == null || v < 0) return null;
+ const bit = (n) => (v >> n) & 1;
+ return {
+ underVoltageNow: !!bit(0), cappedNow: !!bit(1), throttledNow: !!bit(2), softLimitNow: !!bit(3),
+ underVoltage: !!bit(16), capped: !!bit(17), throttled: !!bit(18), softLimit: !!bit(19),
+ };
+}
+
+// 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) || {};
+ return [m.vendor, m.product].filter(Boolean).join(' ') || m.model || '';
+}
diff --git a/assets/locales/en/about.json b/assets/locales/en/about.json
index 060d0c4..8c5eb4d 100644
--- a/assets/locales/en/about.json
+++ b/assets/locales/en/about.json
@@ -33,6 +33,7 @@
},
"server": "Display server",
"systemApp": "System app",
+ "systemReport": "System Report…",
"tagline": "A free, fast and secure GNU/Linux desktop, built on Debian and Wayland.",
"uptime": "Uptime",
"version": "Version {v}",
diff --git a/assets/locales/en/apps.json b/assets/locales/en/apps.json
index 00653bb..95000c6 100644
--- a/assets/locales/en/apps.json
+++ b/assets/locales/en/apps.json
@@ -28,5 +28,6 @@
"contacts": "Contacts",
"reminders": "Reminders",
"mail": "Mail",
- "imager": "LordOS Imager"
+ "imager": "LordOS Imager",
+ "sysinfo": "System Information"
}
diff --git a/assets/locales/en/sysinfo.json b/assets/locales/en/sysinfo.json
new file mode 100644
index 0000000..026d661
--- /dev/null
+++ b/assets/locales/en/sysinfo.json
@@ -0,0 +1,218 @@
+{
+ "appFirewall": "per-app firewall",
+ "bpfLsm": "BPF security module",
+ "bus.mmc": "SD card or eMMC",
+ "bus.nvme": "NVMe",
+ "bus.sata": "SATA",
+ "bus.scsi": "SCSI",
+ "bus.usb": "USB",
+ "bus.virtio": "Virtual disk",
+ "cardTitle": "{card} ({bus})",
+ "cgroup2": "cgroup v2",
+ "compat.batteryHealth": "The battery holds {health} % of its design charge",
+ "compat.batteryWorn": "The battery holds {health} % of its design charge",
+ "compat.count.audio": {
+ "one": "{count} sound card",
+ "other": "{count} sound cards"
+ },
+ "compat.count.display": {
+ "one": "{count} display",
+ "other": "{count} displays"
+ },
+ "compat.count.storage": {
+ "one": "{count} disk",
+ "other": "{count} disks"
+ },
+ "compat.cpuBecause": "Composed on the CPU: {reason}",
+ "compat.gpuComposes": "Composed on the GPU ({renderer})",
+ "compat.headless": "This session has no monitor",
+ "compat.missing_bpfLsm": "The BPF security module is off: Bluetooth can't be denied per app",
+ "compat.missing_cgroup2": "No unified cgroup tree: apps can't get their own scopes",
+ "compat.missing_landlock": "The kernel has no Landlock: apps are isolated with less",
+ "compat.noDriver": "No driver is bound to it",
+ "compat.noEdid": "A display doesn't report its identity (EDID): its size and native mode are unknown",
+ "compat.noGpu": "No graphics card found: composed on the CPU",
+ "compat.notConnected": "Not connected",
+ "compatFooter": "From what this computer detected. Suspend isn't checked in this version.",
+ "component.audio": "Audio",
+ "component.bluetooth": "Bluetooth",
+ "component.display": "Displays",
+ "component.gpu": "Graphics",
+ "component.isolation": "App isolation",
+ "component.network": "Network",
+ "component.power": "Battery",
+ "component.storage": "Storage",
+ "component.suspend": "Suspend",
+ "component.wifi": "Wi-Fi",
+ "composedCpu": "The screen is composed on the CPU: {reason}",
+ "composedGpu": "The screen is composed on the GPU",
+ "coresThreads": "{cores} cores, {threads} threads",
+ "detail.kms": "{connected} of {connectors} outputs connected",
+ "diagonal": "{inch}\" ({w} × {h} cm)",
+ "disks": {
+ "one": "{count} disk",
+ "other": "{count} disks"
+ },
+ "down": "not connected",
+ "f.arch": "Architecture",
+ "f.board": "Motherboard",
+ "f.cache": "Cache",
+ "f.card": "Card",
+ "f.cgroup2": "cgroup v2",
+ "f.charge": "Charge",
+ "f.connection": "Connection",
+ "f.controller": "Controller",
+ "f.firmware": "Firmware",
+ "f.frequency": "Frequency",
+ "f.governor": "Frequency governor",
+ "f.health": "Health",
+ "f.instructions": "Instruction sets",
+ "f.kernel": "Kernel",
+ "f.kind": "Kind",
+ "f.landlock": "Landlock ABI",
+ "f.layout": "Cores",
+ "f.lsm": "Security modules",
+ "f.microcode": "Microcode",
+ "f.model": "Model",
+ "f.monitor": "Monitor",
+ "f.native": "Native resolution",
+ "f.plugged": "Plugged in",
+ "f.power": "Power supply",
+ "f.product": "Product",
+ "f.revision": "Board revision",
+ "f.secureBoot": "Secure Boot",
+ "f.size": "Size",
+ "f.status": "Status",
+ "f.swap": "Swap",
+ "f.system": "System",
+ "f.technology": "Technology",
+ "f.throttling": "Throttling",
+ "f.total": "Installed",
+ "f.vendor": "Manufacturer",
+ "f.year": "Made in",
+ "f.zram": "Compressed memory",
+ "fans": {
+ "one": "{count} fan",
+ "other": "{count} fans"
+ },
+ "firmware.bios": "BIOS",
+ "firmware.dt": "Device tree",
+ "firmware.uefi": "UEFI",
+ "fixture": "Test data: this report reads a fake system, not this computer.",
+ "freqRange": "{min}–{max} GHz",
+ "hdd": "Hard disk",
+ "health": "holds {health} % of its design charge",
+ "isolation": "Isolation",
+ "kconf.m": "Module",
+ "kconf.n": "Not set",
+ "kconf.y": "Built in",
+ "kernelOptions": "Kernel options LordOS uses",
+ "kind.allInOne": "All-in-one",
+ "kind.desktop": "Desktop",
+ "kind.handheld": "Handheld",
+ "kind.laptop": "Laptop",
+ "kind.miniPc": "Mini PC",
+ "kind.other": "Other",
+ "kind.server": "Server",
+ "kind.tablet": "Tablet",
+ "kind.vm": "Virtual machine ({name})",
+ "landlock": "Landlock ABI {abi}",
+ "landlockUnknown": "Landlock not known",
+ "layer.composition": "Composition",
+ "layer.decode": "Video decoding",
+ "layer.device": "Device",
+ "layer.dmabuf": "Shared app buffers (dmabuf)",
+ "layer.driver": "Kernel driver",
+ "layer.egl": "GPU context (EGL)",
+ "layer.encode": "Video encoding",
+ "layer.kms": "Display output (KMS)",
+ "layer.render": "Render node",
+ "layer.scanout": "Direct scanout",
+ "layer.vulkan": "Vulkan",
+ "layout": "{sockets} × {cores} cores, {threads} threads",
+ "lordos": "LordOS {v}",
+ "lordosChannel": "LordOS {v} ({channel})",
+ "net.ethernet": "Ethernet",
+ "net.other": "Other",
+ "net.virtual": "Virtual interface",
+ "net.wifi": "Wi-Fi",
+ "no": "No",
+ "none": "None",
+ "notRunning": "Not running",
+ "note.renderOnly": "renders only: the displays are on another card",
+ "note.scanoutNone": "ready; used by fullscreen video and games",
+ "note.scanoutSeen": {
+ "one": "{count} frame shown directly, without composing",
+ "other": "{count} frames shown directly, without composing"
+ },
+ "note.software": "a software renderer, forced on",
+ "note.softwareRefused": "only a software renderer was found",
+ "off": "Off",
+ "on": "On",
+ "pi.powerOk": "No under-voltage since boot",
+ "pi.throttleOk": "Never slowed down since boot",
+ "pi.throttledNow": "Slowed down now (heat or power)",
+ "pi.throttledSeen": "Slowed down at some point since boot",
+ "pi.underVoltageNow": "Under-voltage now: use the official power supply",
+ "pi.underVoltageSeen": "Under-voltage happened since boot",
+ "power.ac": "Power adapter",
+ "power.battery": "Battery",
+ "power.other": "Power supply",
+ "power.ups": "UPS",
+ "power.usb": "USB power",
+ "reason.capture": "the screen is being recorded, or a remote viewer sees protected windows",
+ "reason.envOff": "turned off with LORD_GPU=0",
+ "reason.headless": "this session has no monitor (remote desktop only)",
+ "reason.no3d": "the graphics card has no 3D acceleration",
+ "reason.noConfig": "no suitable EGL configuration",
+ "reason.noContext": "the GPU context couldn't be created",
+ "reason.noDisplay": "no display is connected",
+ "reason.noEgl": "EGL didn't start",
+ "reason.noGbm": "the graphics card has no GBM support",
+ "reason.notBuilt": "this build has no GPU support",
+ "reason.rotated": "a rotated display is composed on the CPU",
+ "reason.shaders": "the shaders failed to build",
+ "reason.software": "the only renderer is software, which is slower than the CPU path",
+ "reason.unknown": "reason unknown",
+ "refresh": "Refresh",
+ "removable": "Removable",
+ "running": "Running",
+ "section.audio": "Audio",
+ "section.bluetooth": "Bluetooth",
+ "section.computer": "Computer",
+ "section.cpu": "Processor",
+ "section.displays": "Displays",
+ "section.graphics": "Graphics",
+ "section.memory": "Memory",
+ "section.network": "Network",
+ "section.pci": "PCI devices",
+ "section.power": "Power",
+ "section.raspberryPi": "Raspberry Pi",
+ "section.software": "Software",
+ "section.storage": "Storage",
+ "section.thermal": "Temperatures and fans",
+ "section.usb": "USB devices",
+ "services": "LordOS services",
+ "ssd": "Solid state",
+ "state.absent": "Not present",
+ "state.limits": "Works with limits",
+ "state.no": "Not available",
+ "state.unchecked": "Not checked",
+ "state.works": "Works",
+ "state.yes": "Available",
+ "tab.compat": "Compatibility",
+ "tab.hardware": "Hardware",
+ "tab.overview": "Overview",
+ "thisComputer": "This computer",
+ "thisSession": "This session",
+ "unavailable": "System Information isn't available in this session.",
+ "uncheckedFooter": "Video decoding and encoding and Vulkan aren't checked in this version.",
+ "unknown": "Unknown",
+ "up": "connected",
+ "upAt": "connected at {mbps} Mbit/s",
+ "upTo": "up to {ghz} GHz",
+ "usbSpeed": "USB · {mbps} Mbit/s",
+ "withSwap": "plus {size} of swap",
+ "withZram": "plus {size} of compressed memory (zram)",
+ "yes": "Yes"
+}
diff --git a/assets/locales/es/about.json b/assets/locales/es/about.json
index 30821a4..6a8237f 100644
--- a/assets/locales/es/about.json
+++ b/assets/locales/es/about.json
@@ -33,6 +33,7 @@
},
"server": "Servidor gráfico",
"systemApp": "App del sistema",
+ "systemReport": "Informe del sistema…",
"tagline": "Un escritorio GNU/Linux libre, rápido y seguro, construido sobre Debian y Wayland.",
"uptime": "Encendido hace",
"version": "Versión {v}",
diff --git a/assets/locales/es/apps.json b/assets/locales/es/apps.json
index 8d46bd0..defa35d 100644
--- a/assets/locales/es/apps.json
+++ b/assets/locales/es/apps.json
@@ -28,5 +28,6 @@
"contacts": "Contactos",
"reminders": "Recordatorios",
"mail": "Mail",
- "imager": "LordOS Imager"
+ "imager": "LordOS Imager",
+ "sysinfo": "Información del sistema"
}
diff --git a/assets/locales/es/sysinfo.json b/assets/locales/es/sysinfo.json
new file mode 100644
index 0000000..bd3776d
--- /dev/null
+++ b/assets/locales/es/sysinfo.json
@@ -0,0 +1,218 @@
+{
+ "appFirewall": "firewall por app",
+ "bpfLsm": "módulo de seguridad BPF",
+ "bus.mmc": "Tarjeta SD o eMMC",
+ "bus.nvme": "NVMe",
+ "bus.sata": "SATA",
+ "bus.scsi": "SCSI",
+ "bus.usb": "USB",
+ "bus.virtio": "Disco virtual",
+ "cardTitle": "{card} ({bus})",
+ "cgroup2": "cgroup v2",
+ "compat.batteryHealth": "La batería conserva el {health} % de su carga de diseño",
+ "compat.batteryWorn": "La batería conserva el {health} % de su carga de diseño",
+ "compat.count.audio": {
+ "one": "{count} placa de sonido",
+ "other": "{count} placas de sonido"
+ },
+ "compat.count.display": {
+ "one": "{count} pantalla",
+ "other": "{count} pantallas"
+ },
+ "compat.count.storage": {
+ "one": "{count} disco",
+ "other": "{count} discos"
+ },
+ "compat.cpuBecause": "Se compone en la CPU: {reason}",
+ "compat.gpuComposes": "Se compone en la GPU ({renderer})",
+ "compat.headless": "Esta sesión no tiene monitor",
+ "compat.missing_bpfLsm": "El módulo de seguridad BPF está apagado: no se puede negar Bluetooth por app",
+ "compat.missing_cgroup2": "No hay árbol de cgroup unificado: las apps no tienen su propio scope",
+ "compat.missing_landlock": "El kernel no tiene Landlock: las apps quedan menos aisladas",
+ "compat.noDriver": "No tiene un driver asignado",
+ "compat.noEdid": "Una pantalla no informa su identidad (EDID): no se conocen su tamaño ni su modo nativo",
+ "compat.noGpu": "No se encontró tarjeta gráfica: se compone en la CPU",
+ "compat.notConnected": "Sin conexión",
+ "compatFooter": "Según lo que detectó este equipo. La suspensión no se verifica en esta versión.",
+ "component.audio": "Audio",
+ "component.bluetooth": "Bluetooth",
+ "component.display": "Pantallas",
+ "component.gpu": "Gráficos",
+ "component.isolation": "Aislamiento de apps",
+ "component.network": "Red",
+ "component.power": "Batería",
+ "component.storage": "Almacenamiento",
+ "component.suspend": "Suspensión",
+ "component.wifi": "Wi-Fi",
+ "composedCpu": "La pantalla se compone en la CPU: {reason}",
+ "composedGpu": "La pantalla se compone en la GPU",
+ "coresThreads": "{cores} núcleos, {threads} hilos",
+ "detail.kms": "{connected} de {connectors} salidas conectadas",
+ "diagonal": "{inch}\" ({w} × {h} cm)",
+ "disks": {
+ "one": "{count} disco",
+ "other": "{count} discos"
+ },
+ "down": "desconectada",
+ "f.arch": "Arquitectura",
+ "f.board": "Placa madre",
+ "f.cache": "Caché",
+ "f.card": "Tarjeta",
+ "f.cgroup2": "cgroup v2",
+ "f.charge": "Carga",
+ "f.connection": "Conexión",
+ "f.controller": "Controlador",
+ "f.firmware": "Firmware",
+ "f.frequency": "Frecuencia",
+ "f.governor": "Gobernador de frecuencia",
+ "f.health": "Salud",
+ "f.instructions": "Conjuntos de instrucciones",
+ "f.kernel": "Kernel",
+ "f.kind": "Tipo",
+ "f.landlock": "ABI de Landlock",
+ "f.layout": "Núcleos",
+ "f.lsm": "Módulos de seguridad",
+ "f.microcode": "Microcódigo",
+ "f.model": "Modelo",
+ "f.monitor": "Monitor",
+ "f.native": "Resolución nativa",
+ "f.plugged": "Enchufado",
+ "f.power": "Alimentación",
+ "f.product": "Producto",
+ "f.revision": "Revisión de la placa",
+ "f.secureBoot": "Arranque seguro",
+ "f.size": "Tamaño",
+ "f.status": "Estado",
+ "f.swap": "Intercambio",
+ "f.system": "Sistema",
+ "f.technology": "Tecnología",
+ "f.throttling": "Limitación de velocidad",
+ "f.total": "Instalada",
+ "f.vendor": "Fabricante",
+ "f.year": "Fabricado en",
+ "f.zram": "Memoria comprimida",
+ "fans": {
+ "one": "{count} ventilador",
+ "other": "{count} ventiladores"
+ },
+ "firmware.bios": "BIOS",
+ "firmware.dt": "Device tree",
+ "firmware.uefi": "UEFI",
+ "fixture": "Datos de prueba: este informe lee un sistema falso, no este equipo.",
+ "freqRange": "{min}–{max} GHz",
+ "hdd": "Disco rígido",
+ "health": "conserva el {health} % de su carga de diseño",
+ "isolation": "Aislamiento",
+ "kconf.m": "Módulo",
+ "kconf.n": "No activada",
+ "kconf.y": "Integrada",
+ "kernelOptions": "Opciones del kernel que usa LordOS",
+ "kind.allInOne": "Todo en uno",
+ "kind.desktop": "Equipo de escritorio",
+ "kind.handheld": "De mano",
+ "kind.laptop": "Portátil",
+ "kind.miniPc": "Mini PC",
+ "kind.other": "Otro",
+ "kind.server": "Servidor",
+ "kind.tablet": "Tableta",
+ "kind.vm": "Máquina virtual ({name})",
+ "landlock": "Landlock ABI {abi}",
+ "landlockUnknown": "Landlock desconocido",
+ "layer.composition": "Composición",
+ "layer.decode": "Decodificación de video",
+ "layer.device": "Dispositivo",
+ "layer.dmabuf": "Búferes compartidos de apps (dmabuf)",
+ "layer.driver": "Driver del kernel",
+ "layer.egl": "Contexto de GPU (EGL)",
+ "layer.encode": "Codificación de video",
+ "layer.kms": "Salida de pantalla (KMS)",
+ "layer.render": "Render node",
+ "layer.scanout": "Scanout directo",
+ "layer.vulkan": "Vulkan",
+ "layout": "{sockets} × {cores} núcleos, {threads} hilos",
+ "lordos": "LordOS {v}",
+ "lordosChannel": "LordOS {v} ({channel})",
+ "net.ethernet": "Ethernet",
+ "net.other": "Otra",
+ "net.virtual": "Interfaz virtual",
+ "net.wifi": "Wi-Fi",
+ "no": "No",
+ "none": "Ninguno",
+ "notRunning": "Detenido",
+ "note.renderOnly": "solo renderiza: las pantallas están en otra tarjeta",
+ "note.scanoutNone": "listo; lo usan el video y los juegos a pantalla completa",
+ "note.scanoutSeen": {
+ "one": "{count} cuadro mostrado directo, sin componer",
+ "other": "{count} cuadros mostrados directo, sin componer"
+ },
+ "note.software": "un renderer por software, forzado",
+ "note.softwareRefused": "solo se encontró un renderer por software",
+ "off": "Desactivado",
+ "on": "Activado",
+ "pi.powerOk": "Sin bajo voltaje desde el arranque",
+ "pi.throttleOk": "Nunca se limitó desde el arranque",
+ "pi.throttledNow": "Limitada ahora (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.underVoltageSeen": "Hubo bajo voltaje desde el arranque",
+ "power.ac": "Adaptador de corriente",
+ "power.battery": "Batería",
+ "power.other": "Fuente",
+ "power.ups": "UPS",
+ "power.usb": "Alimentación USB",
+ "reason.capture": "se está grabando la pantalla, o alguien ve ventanas protegidas por escritorio remoto",
+ "reason.envOff": "apagada con LORD_GPU=0",
+ "reason.headless": "esta sesión no tiene monitor (solo escritorio remoto)",
+ "reason.no3d": "la tarjeta gráfica no tiene aceleración 3D",
+ "reason.noConfig": "no hay una configuración EGL adecuada",
+ "reason.noContext": "no se pudo crear el contexto de la GPU",
+ "reason.noDisplay": "no hay ninguna pantalla conectada",
+ "reason.noEgl": "EGL no arrancó",
+ "reason.noGbm": "la tarjeta gráfica no admite GBM",
+ "reason.notBuilt": "esta compilación no tiene soporte de GPU",
+ "reason.rotated": "una pantalla rotada se compone en la CPU",
+ "reason.shaders": "no se pudieron compilar los shaders",
+ "reason.software": "el único renderer es por software, más lento que el camino por CPU",
+ "reason.unknown": "motivo desconocido",
+ "refresh": "Actualizar",
+ "removable": "Extraíble",
+ "running": "En marcha",
+ "section.audio": "Audio",
+ "section.bluetooth": "Bluetooth",
+ "section.computer": "Equipo",
+ "section.cpu": "Procesador",
+ "section.displays": "Pantallas",
+ "section.graphics": "Gráficos",
+ "section.memory": "Memoria",
+ "section.network": "Red",
+ "section.pci": "Dispositivos PCI",
+ "section.power": "Energía",
+ "section.raspberryPi": "Raspberry Pi",
+ "section.software": "Software",
+ "section.storage": "Almacenamiento",
+ "section.thermal": "Temperaturas y ventiladores",
+ "section.usb": "Dispositivos USB",
+ "services": "Servicios de LordOS",
+ "ssd": "Estado sólido",
+ "state.absent": "No presente",
+ "state.limits": "Funciona con límites",
+ "state.no": "No disponible",
+ "state.unchecked": "Sin verificar",
+ "state.works": "Funciona",
+ "state.yes": "Disponible",
+ "tab.compat": "Compatibilidad",
+ "tab.hardware": "Hardware",
+ "tab.overview": "Resumen",
+ "thisComputer": "Este equipo",
+ "thisSession": "Esta sesión",
+ "unavailable": "La información del sistema no está disponible en esta sesión.",
+ "uncheckedFooter": "La decodificación y codificación de video y Vulkan no se verifican en esta versión.",
+ "unknown": "Desconocido",
+ "up": "conectada",
+ "upAt": "conectada a {mbps} Mbit/s",
+ "upTo": "hasta {ghz} GHz",
+ "usbSpeed": "USB · {mbps} Mbit/s",
+ "withSwap": "más {size} de intercambio",
+ "withZram": "más {size} de memoria comprimida (zram)",
+ "yes": "Sí"
+}
diff --git a/assets/locales/pt/about.json b/assets/locales/pt/about.json
index 9e68713..8245aa9 100644
--- a/assets/locales/pt/about.json
+++ b/assets/locales/pt/about.json
@@ -33,6 +33,7 @@
},
"server": "Servidor gráfico",
"systemApp": "App do sistema",
+ "systemReport": "Relatório do sistema…",
"tagline": "Um desktop GNU/Linux livre, rápido e seguro, construído sobre Debian e Wayland.",
"uptime": "Ligado há",
"version": "Versão {v}",
diff --git a/assets/locales/pt/apps.json b/assets/locales/pt/apps.json
index d720e07..a5a98f3 100644
--- a/assets/locales/pt/apps.json
+++ b/assets/locales/pt/apps.json
@@ -28,5 +28,6 @@
"contacts": "Contatos",
"reminders": "Lembretes",
"mail": "Mail",
- "imager": "LordOS Imager"
+ "imager": "LordOS Imager",
+ "sysinfo": "Informações do sistema"
}
diff --git a/assets/locales/pt/sysinfo.json b/assets/locales/pt/sysinfo.json
new file mode 100644
index 0000000..e1e2802
--- /dev/null
+++ b/assets/locales/pt/sysinfo.json
@@ -0,0 +1,218 @@
+{
+ "appFirewall": "firewall por app",
+ "bpfLsm": "módulo de segurança BPF",
+ "bus.mmc": "Cartão SD ou eMMC",
+ "bus.nvme": "NVMe",
+ "bus.sata": "SATA",
+ "bus.scsi": "SCSI",
+ "bus.usb": "USB",
+ "bus.virtio": "Disco virtual",
+ "cardTitle": "{card} ({bus})",
+ "cgroup2": "cgroup v2",
+ "compat.batteryHealth": "A bateria mantém {health} % da carga original",
+ "compat.batteryWorn": "A bateria mantém {health} % da carga original",
+ "compat.count.audio": {
+ "one": "{count} placa de som",
+ "other": "{count} placas de som"
+ },
+ "compat.count.display": {
+ "one": "{count} tela",
+ "other": "{count} telas"
+ },
+ "compat.count.storage": {
+ "one": "{count} disco",
+ "other": "{count} discos"
+ },
+ "compat.cpuBecause": "Composta na CPU: {reason}",
+ "compat.gpuComposes": "Composta na GPU ({renderer})",
+ "compat.headless": "Esta sessão não tem monitor",
+ "compat.missing_bpfLsm": "O módulo de segurança BPF está desligado: não é possível negar Bluetooth por app",
+ "compat.missing_cgroup2": "Sem árvore cgroup unificada: os apps não têm escopo próprio",
+ "compat.missing_landlock": "O kernel não tem Landlock: os apps ficam menos isolados",
+ "compat.noDriver": "Nenhum driver associado",
+ "compat.noEdid": "Uma tela não informa sua identidade (EDID): tamanho e modo nativo desconhecidos",
+ "compat.noGpu": "Nenhuma placa de vídeo encontrada: composta na CPU",
+ "compat.notConnected": "Sem conexão",
+ "compatFooter": "Segundo o que este computador detectou. A suspensão não é verificada nesta versão.",
+ "component.audio": "Áudio",
+ "component.bluetooth": "Bluetooth",
+ "component.display": "Telas",
+ "component.gpu": "Gráficos",
+ "component.isolation": "Isolamento de apps",
+ "component.network": "Rede",
+ "component.power": "Bateria",
+ "component.storage": "Armazenamento",
+ "component.suspend": "Suspensão",
+ "component.wifi": "Wi-Fi",
+ "composedCpu": "A tela é composta na CPU: {reason}",
+ "composedGpu": "A tela é composta na GPU",
+ "coresThreads": "{cores} núcleos, {threads} threads",
+ "detail.kms": "{connected} de {connectors} saídas conectadas",
+ "diagonal": "{inch}\" ({w} × {h} cm)",
+ "disks": {
+ "one": "{count} disco",
+ "other": "{count} discos"
+ },
+ "down": "desconectada",
+ "f.arch": "Arquitetura",
+ "f.board": "Placa-mãe",
+ "f.cache": "Cache",
+ "f.card": "Placa",
+ "f.cgroup2": "cgroup v2",
+ "f.charge": "Carga",
+ "f.connection": "Conexão",
+ "f.controller": "Controlador",
+ "f.firmware": "Firmware",
+ "f.frequency": "Frequência",
+ "f.governor": "Governador de frequência",
+ "f.health": "Saúde",
+ "f.instructions": "Conjuntos de instruções",
+ "f.kernel": "Kernel",
+ "f.kind": "Tipo",
+ "f.landlock": "ABI do Landlock",
+ "f.layout": "Núcleos",
+ "f.lsm": "Módulos de segurança",
+ "f.microcode": "Microcódigo",
+ "f.model": "Modelo",
+ "f.monitor": "Monitor",
+ "f.native": "Resolução nativa",
+ "f.plugged": "Conectado",
+ "f.power": "Alimentação",
+ "f.product": "Produto",
+ "f.revision": "Revisão da placa",
+ "f.secureBoot": "Inicialização segura",
+ "f.size": "Tamanho",
+ "f.status": "Estado",
+ "f.swap": "Swap",
+ "f.system": "Sistema",
+ "f.technology": "Tecnologia",
+ "f.throttling": "Limitação de velocidade",
+ "f.total": "Instalada",
+ "f.vendor": "Fabricante",
+ "f.year": "Fabricado em",
+ "f.zram": "Memória comprimida",
+ "fans": {
+ "one": "{count} ventoinha",
+ "other": "{count} ventoinhas"
+ },
+ "firmware.bios": "BIOS",
+ "firmware.dt": "Device tree",
+ "firmware.uefi": "UEFI",
+ "fixture": "Dados de teste: este relatório lê um sistema falso, não este computador.",
+ "freqRange": "{min}–{max} GHz",
+ "hdd": "Disco rígido",
+ "health": "mantém {health} % da carga original",
+ "isolation": "Isolamento",
+ "kconf.m": "Módulo",
+ "kconf.n": "Não ativada",
+ "kconf.y": "Embutida",
+ "kernelOptions": "Opções do kernel que o LordOS usa",
+ "kind.allInOne": "Tudo em um",
+ "kind.desktop": "Desktop",
+ "kind.handheld": "Portátil de mão",
+ "kind.laptop": "Notebook",
+ "kind.miniPc": "Mini PC",
+ "kind.other": "Outro",
+ "kind.server": "Servidor",
+ "kind.tablet": "Tablet",
+ "kind.vm": "Máquina virtual ({name})",
+ "landlock": "Landlock ABI {abi}",
+ "landlockUnknown": "Landlock desconhecido",
+ "layer.composition": "Composição",
+ "layer.decode": "Decodificação de vídeo",
+ "layer.device": "Dispositivo",
+ "layer.dmabuf": "Buffers compartilhados de apps (dmabuf)",
+ "layer.driver": "Driver do kernel",
+ "layer.egl": "Contexto de GPU (EGL)",
+ "layer.encode": "Codificação de vídeo",
+ "layer.kms": "Saída de tela (KMS)",
+ "layer.render": "Render node",
+ "layer.scanout": "Scanout direto",
+ "layer.vulkan": "Vulkan",
+ "layout": "{sockets} × {cores} núcleos, {threads} threads",
+ "lordos": "LordOS {v}",
+ "lordosChannel": "LordOS {v} ({channel})",
+ "net.ethernet": "Ethernet",
+ "net.other": "Outra",
+ "net.virtual": "Interface virtual",
+ "net.wifi": "Wi-Fi",
+ "no": "Não",
+ "none": "Nenhum",
+ "notRunning": "Parado",
+ "note.renderOnly": "só renderiza: as telas estão em outra placa",
+ "note.scanoutNone": "pronto; usado por vídeo e jogos em tela cheia",
+ "note.scanoutSeen": {
+ "one": "{count} quadro mostrado direto, sem compor",
+ "other": "{count} quadros mostrados direto, sem compor"
+ },
+ "note.software": "um renderizador por software, forçado",
+ "note.softwareRefused": "só foi encontrado um renderizador por software",
+ "off": "Desativado",
+ "on": "Ativado",
+ "pi.powerOk": "Sem subtensão desde a inicialização",
+ "pi.throttleOk": "Nunca foi limitada desde a inicialização",
+ "pi.throttledNow": "Limitada agora (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.underVoltageSeen": "Houve subtensão desde a inicialização",
+ "power.ac": "Adaptador de energia",
+ "power.battery": "Bateria",
+ "power.other": "Fonte",
+ "power.ups": "Nobreak",
+ "power.usb": "Alimentação USB",
+ "reason.capture": "a tela está sendo gravada, ou alguém vê janelas protegidas pela área de trabalho remota",
+ "reason.envOff": "desligada com LORD_GPU=0",
+ "reason.headless": "esta sessão não tem monitor (só área de trabalho remota)",
+ "reason.no3d": "a placa de vídeo não tem aceleração 3D",
+ "reason.noConfig": "não há configuração EGL adequada",
+ "reason.noContext": "não foi possível criar o contexto da GPU",
+ "reason.noDisplay": "nenhuma tela está conectada",
+ "reason.noEgl": "o EGL não iniciou",
+ "reason.noGbm": "a placa de vídeo não suporta GBM",
+ "reason.notBuilt": "esta compilação não tem suporte a GPU",
+ "reason.rotated": "uma tela girada é composta na CPU",
+ "reason.shaders": "os shaders não compilaram",
+ "reason.software": "o único renderizador é por software, mais lento que o caminho pela CPU",
+ "reason.unknown": "motivo desconhecido",
+ "refresh": "Atualizar",
+ "removable": "Removível",
+ "running": "Em execução",
+ "section.audio": "Áudio",
+ "section.bluetooth": "Bluetooth",
+ "section.computer": "Computador",
+ "section.cpu": "Processador",
+ "section.displays": "Telas",
+ "section.graphics": "Gráficos",
+ "section.memory": "Memória",
+ "section.network": "Rede",
+ "section.pci": "Dispositivos PCI",
+ "section.power": "Energia",
+ "section.raspberryPi": "Raspberry Pi",
+ "section.software": "Software",
+ "section.storage": "Armazenamento",
+ "section.thermal": "Temperaturas e ventoinhas",
+ "section.usb": "Dispositivos USB",
+ "services": "Serviços do LordOS",
+ "ssd": "Estado sólido",
+ "state.absent": "Ausente",
+ "state.limits": "Funciona com limites",
+ "state.no": "Indisponível",
+ "state.unchecked": "Não verificado",
+ "state.works": "Funciona",
+ "state.yes": "Disponível",
+ "tab.compat": "Compatibilidade",
+ "tab.hardware": "Hardware",
+ "tab.overview": "Resumo",
+ "thisComputer": "Este computador",
+ "thisSession": "Esta sessão",
+ "unavailable": "As informações do sistema não estão disponíveis nesta sessão.",
+ "uncheckedFooter": "A decodificação e codificação de vídeo e o Vulkan não são verificados nesta versão.",
+ "unknown": "Desconhecido",
+ "up": "conectada",
+ "upAt": "conectada a {mbps} Mbit/s",
+ "upTo": "até {ghz} GHz",
+ "usbSpeed": "USB · {mbps} Mbit/s",
+ "withSwap": "mais {size} de swap",
+ "withZram": "mais {size} de memória comprimida (zram)",
+ "yes": "Sim"
+}
diff --git a/docs/BENCHMARK.md b/docs/BENCHMARK.md
index 25b4e12..a8beac4 100644
--- a/docs/BENCHMARK.md
+++ b/docs/BENCHMARK.md
@@ -247,8 +247,22 @@ machine. `lordos-fetch` (the same binary under that name; `lordos-sysreport fetc
the brand colors beside a short summary (system, computer, kernel, uptime, packages, shell, display, CPU,
GPU, memory, disk, isolation); the user and host names appear only on screen and `--share` leaves them out
for a screenshot to post; `--color=auto|always|never`, `NO_COLOR` respected, true color when `COLORTERM`
-says so, plain ASCII without color. Not yet: the GPU's EGL, composition and scanout layers (they come from the running
-`lord-server`, with `lord.sysinfo`), `hw-memory-modules`, the app.
+says so, plain ASCII without color. **The app (2026-10-26):** `apps/sysinfo` (also About LordOS → System Report…) with Overview, Hardware and
+Compatibility, from `lord.sysinfo.report()` (`ui/js_hw.c`): the same report plus `session`, how this
+session composes the screen now (`lord_composition()` in `main.c`: `gpu`, `headless`, `no-display`,
+`rotated`, `capture` or `gpu-off`) and the GPU context (`gpu_info()`: the last `gpu_init` outcome as a
+fixed code, the renderer, render node, dmabuf import and direct scanouts since start). The layers and
+the Compatibility panel are worked out in `apps/sysinfo/model.js` (`server/tests/sysinfo_model_test.mjs`).
+Checked on VM 116 in an isolated headless session (own home, runtime folder and bus):
+
+![Overview](sysinfo-overview.png)
+
+![Graphics as separate layers](sysinfo-graphics.png)
+
+![Compatibility](sysinfo-compatibility.png)
+
+Not yet: `hw-memory-modules`, video decode and encode and Vulkan (shown as *Not checked*), the Checks
+and Report tabs.
1. `server/src/sysreport/`: collector, GPU layers, `pci.ids`/EDID readers, fake-sysfs fixtures
(AMD desktop, Intel laptop, Nvidia desktop, Raspberry Pi 5, VM), the anonymization test,
diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md
index 9913bf0..a19fedf 100644
--- a/docs/ROADMAP.md
+++ b/docs/ROADMAP.md
@@ -592,9 +592,9 @@ Details in `MAIL.md`. Tested on VM 123 against local Dovecot, Postfix and Radica
`server/src/sysreport/`, shared by the app, the `lordos-sysreport` command and tests.
- [x] collector, `pci.ids`/`usb.ids`/EDID readers, fake-sysfs fixtures, anonymization test,
`lordos-sysreport report` (2026-10-26);
- - [ ] the GPU's live layers (EGL, composition, scanout) through `lord.sysinfo`, the read-only
- `hw-memory-modules` admin action;
- - [ ] Overview, Hardware and Compatibility tabs (en, es, pt, right to left);
+ - [x] the GPU's live layers (EGL, composition, scanout) through `lord.sysinfo` (2026-10-26);
+ - [ ] the read-only `hw-memory-modules` admin action;
+ - [x] Overview, Hardware and Compatibility tabs (en, es, pt; 2026-10-26; right to left not yet checked on screen);
- [ ] Checks, configured and effective, with the probe app and a signed `checks.json`;
- [ ] reports; first real reports from the Pi 5 with a monitor and the RX 580 PC.
- [ ] from the live USB without installing: a *Check this computer* boot entry, reports marked
diff --git a/docs/VM-SETUP.md b/docs/VM-SETUP.md
index daddbb5..ffda72e 100644
--- a/docs/VM-SETUP.md
+++ b/docs/VM-SETUP.md
@@ -1661,3 +1661,7 @@ over `/usr/local/lib/lordos`.
- **Installed:** `usb.ids` (Debian, architecture `all`: the USB vendor and product names, read by
`lordos-sysreport`; `pci.ids` was already installed). The package recommends both.
+- **The app:** `lord-server` from that tree in an isolated headless session (`--headless 1280x800`,
+ its own `HOME`, `XDG_RUNTIME_DIR` and `dbus-run-session`, removed afterwards), driven and captured
+ over its own `remote.sock` (keys, clicks and the still frame's lossless tiles); the user's session
+ was not touched.
diff --git a/docs/sysinfo-compatibility.png b/docs/sysinfo-compatibility.png
new file mode 100644
index 0000000..302cb13
Binary files /dev/null and b/docs/sysinfo-compatibility.png differ
diff --git a/docs/sysinfo-graphics.png b/docs/sysinfo-graphics.png
new file mode 100644
index 0000000..0619ab5
Binary files /dev/null and b/docs/sysinfo-graphics.png differ
diff --git a/docs/sysinfo-overview.png b/docs/sysinfo-overview.png
new file mode 100644
index 0000000..79d4be1
Binary files /dev/null and b/docs/sysinfo-overview.png differ
diff --git a/sdk/index.js b/sdk/index.js
index a91ae63..5a78abd 100644
--- a/sdk/index.js
+++ b/sdk/index.js
@@ -80,7 +80,7 @@ import { startDiskWatch } from './diskwatch.js';
import { maybeStartTour } from './help.js';
import { getApp as getAppOf, isLiveSystem as isLiveSystemOf, wm as wmOf, windows as windowsStore } from './windows.js';
export const windowIcon = (w) => windowIconOf(w, getAppOf);
-export { systemInfo, lordosVersion, useSystemInfo, useServerStats, useCpuUsage, formatBytes, formatDuration } from './system.js';
+export { systemInfo, systemReport, lordosVersion, useSystemInfo, useServerStats, useCpuUsage, formatBytes, formatDuration } from './system.js';
export * as fs from './fs.js';
export { useDirectory } from './fs.js';
export { ThemeProvider, useTheme, DEFAULT_TOKENS } from './theme.js';
diff --git a/sdk/system.js b/sdk/system.js
index d155b52..8989c7d 100644
--- a/sdk/system.js
+++ b/sdk/system.js
@@ -24,6 +24,11 @@ function usePoll(read, intervalMs) {
}
export const useSystemInfo = (intervalMs = 5000) => usePoll(systemInfo, intervalMs);
+// System Information's report (lord.sysinfo, server/src/sysreport; docs/BENCHMARK.md): the hardware,
+// what the kernel made of it and how this session composes the screen. null without the API.
+export function systemReport() {
+ try { return typeof lord !== 'undefined' && lord.sysinfo ? lord.sysinfo.report() : null; } catch (e) { return null; }
+}
export const useServerStats = (intervalMs = 2000) => usePoll(() => lord.stats(), intervalMs);
// CPU usage (0..1) computed between reads of /proc/stat.
diff --git a/server/mk/settings.mk b/server/mk/settings.mk
index b341938..d505e5a 100644
--- a/server/mk/settings.mk
+++ b/server/mk/settings.mk
@@ -3,8 +3,9 @@
# 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/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/ui/js_fan.c src/fan/fancurve.c
-HW_HDR := $(wildcard src/hw/*.h) $(wildcard src/fan/*.h) src/ui/js_hw.h src/ui/js_fan.h src/kms.h src/vault/dbus.h
+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)
$(HW_OBJ): $(HW_HDR)
build/lord-server: $(HW_OBJ)
diff --git a/server/src/gpu/gpu.c b/server/src/gpu/gpu.c
index 7f0bcd8..c2c2103 100644
--- a/server/src/gpu/gpu.c
+++ b/server/src/gpu/gpu.c
@@ -26,6 +26,7 @@ int gpu_init(Kms *k) { (void)k; return -1; }
int gpu_active(void) { return 0; }
void gpu_shutdown(void) {}
const char *gpu_renderer(void) { return ""; }
+void gpu_info(GpuInfo *i) { *i = (GpuInfo){ .why = "not-built", .renderer = "", .render_node = "" }; }
int gpu_formats(GpuFormat *out, int max) { (void)out; (void)max; return 0; }
int gpu_device(dev_t *dev) { (void)dev; return -1; }
GpuTex *gpu_tex_pixels(GpuTex *t, const uint32_t *px, int w, int h, int opaque) { (void)t; (void)px; (void)w; (void)h; (void)opaque; return NULL; }
@@ -138,6 +139,9 @@ static struct {
/* These outlive the context (G is wiped by gpu_shutdown). */
static unsigned last_gen;
+static const char *last_why = ""; /* gpu_info: the last gpu_init's outcome */
+static unsigned long total_scanouts;
+static char last_renderer[160]; /* the software renderer that was turned down */
static void (*hook_lost)(void), (*hook_changed)(void);
void gpu_set_hooks(void (*lost)(void), void (*changed)(void)) { hook_lost = lost; hook_changed = changed; }
@@ -380,22 +384,31 @@ int gpu_add_output(Kms *k) {
int gpu_active(void) { return G.on; }
const char *gpu_renderer(void) { return G.renderer; }
+void gpu_info(GpuInfo *i) {
+ i->why = last_why;
+ i->renderer = G.on ? G.renderer : !strcmp(last_why, "software") ? last_renderer : "";
+ i->render_node = G.on ? G.render_node : "";
+ i->dmabuf = G.on && G.create_image != NULL;
+ i->scanouts = total_scanouts;
+}
+
int gpu_init(Kms *k) {
const char *env = getenv("LORD_GPU");
G.debug = getenv("LORD_GPU_DEBUG") != NULL;
- if (env && !strcmp(env, "0")) { fprintf(stderr, "gpu: off (LORD_GPU=0), CPU composition\n"); return -1; }
+ if (env && !strcmp(env, "0")) { fprintf(stderr, "gpu: off (LORD_GPU=0), CPU composition\n"); last_why = "env-off"; return -1; }
G.k = k;
char drv[64];
if (!drm_accelerated(k->fd, drv, sizeof drv) && !(env && !strcmp(env, "1"))) {
fprintf(stderr, "gpu: the card (%s) has no 3D acceleration: CPU composition (LORD_GPU=1 forces it)\n", drv);
+ last_why = "no-3d";
return -1;
}
G.gbm = gbm_create_device(k->fd);
- if (!G.gbm) { fprintf(stderr, "gpu: no GBM on the card, CPU composition\n"); return -1; }
+ if (!G.gbm) { fprintf(stderr, "gpu: no GBM on the card, CPU composition\n"); last_why = "no-gbm"; return -1; }
PFNEGLGETPLATFORMDISPLAYEXTPROC get_display = (PFNEGLGETPLATFORMDISPLAYEXTPROC)eglGetProcAddress("eglGetPlatformDisplayEXT");
G.dpy = get_display ? get_display(EGL_PLATFORM_GBM_KHR, G.gbm, NULL) : eglGetDisplay((EGLNativeDisplayType)G.gbm);
EGLint maj, min;
- if (G.dpy == EGL_NO_DISPLAY || !eglInitialize(G.dpy, &maj, &min)) { fprintf(stderr, "gpu: EGL did not start, CPU composition\n"); goto fail; }
+ if (G.dpy == EGL_NO_DISPLAY || !eglInitialize(G.dpy, &maj, &min)) { fprintf(stderr, "gpu: EGL did not start, CPU composition\n"); last_why = "no-egl"; goto fail; }
const char *exts = eglQueryString(G.dpy, EGL_EXTENSIONS);
query_render_node();
eglBindAPI(EGL_OPENGL_ES_API);
@@ -408,25 +421,27 @@ int gpu_init(Kms *k) {
EGLint vid = 0;
if (eglGetConfigAttrib(G.dpy, cfgs[i], EGL_NATIVE_VISUAL_ID, &vid) && vid == GBM_FORMAT_XRGB8888) cfg = cfgs[i];
}
- if (!cfg) { fprintf(stderr, "gpu: no XRGB8888 EGL config, CPU composition\n"); goto fail; }
+ if (!cfg) { fprintf(stderr, "gpu: no XRGB8888 EGL config, CPU composition\n"); last_why = "no-config"; goto fail; }
static const EGLint ctx_attr[] = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE };
G.ctx = eglCreateContext(G.dpy, cfg, EGL_NO_CONTEXT, ctx_attr);
G.cfg = cfg;
G.gen = ++last_gen;
if (last_gen == 0) G.gen = last_gen = 1; /* 0 means "no context" */
- if (G.ctx == EGL_NO_CONTEXT || out_setup(&G.out[0], k)) { fprintf(stderr, "gpu: could not create the context or the surface, CPU composition\n"); goto fail; }
+ if (G.ctx == EGL_NO_CONTEXT || out_setup(&G.out[0], k)) { fprintf(stderr, "gpu: could not create the context or the surface, CPU composition\n"); last_why = "no-context"; goto fail; }
const char *rend = (const char *)glGetString(GL_RENDERER), *gl_exts = (const char *)glGetString(GL_EXTENSIONS);
snprintf(G.renderer, sizeof G.renderer, "%s", rend ? rend : "?");
int software = strstr(G.renderer, "llvmpipe") || strstr(G.renderer, "softpipe") || strstr(G.renderer, "swrast");
if (software && !(env && !strcmp(env, "1"))) {
fprintf(stderr, "gpu: the renderer is software (%s): CPU composition (LORD_GPU=1 forces it)\n", G.renderer);
+ last_why = "software";
+ snprintf(last_renderer, sizeof last_renderer, "%s", G.renderer);
goto fail;
}
G.bgra = has_ext(gl_exts, "GL_EXT_texture_format_BGRA8888");
G.have_external = has_ext(gl_exts, "GL_OES_EGL_image_external");
if (!has_ext(gl_exts, "GL_EXT_unpack_subimage")) dbg("no GL_EXT_unpack_subimage: the whole canvas is uploaded");
- if (make_prog(0, fs_2d) || (G.have_external && make_prog(1, fs_ext))) { fprintf(stderr, "gpu: shaders failed, CPU composition\n"); goto fail; }
+ if (make_prog(0, fs_2d) || (G.have_external && make_prog(1, fs_ext))) { fprintf(stderr, "gpu: shaders failed, CPU composition\n"); last_why = "shaders"; goto fail; }
if (has_ext(exts, "EGL_EXT_image_dma_buf_import")) {
G.create_image = (PFNEGLCREATEIMAGEKHRPROC)eglGetProcAddress("eglCreateImageKHR");
G.destroy_image = (PFNEGLDESTROYIMAGEKHRPROC)eglGetProcAddress("eglDestroyImageKHR");
@@ -442,6 +457,7 @@ int gpu_init(Kms *k) {
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
G.on = 1;
+ last_why = "on";
if (G.debug) {
GpuFormat f[64];
int nf = gpu_formats(f, 64);
@@ -790,6 +806,7 @@ int gpu_scanout(const GpuDmabuf *d, void (*done)(void *), void *data) {
return -1;
}
G.scanouts++;
+ total_scanouts++;
if (G.debug && (G.scanouts == 1 || G.scanouts % 300 == 0)) dbg("direct scanout: %ld frames (composed %ld)", G.scanouts, G.frames);
return present(o, s);
}
diff --git a/server/src/gpu/gpu.h b/server/src/gpu/gpu.h
index aefc193..063c206 100644
--- a/server/src/gpu/gpu.h
+++ b/server/src/gpu/gpu.h
@@ -26,6 +26,19 @@ int gpu_active(void);
void gpu_shutdown(void);
const char *gpu_renderer(void); /* "llvmpipe (LLVM …)", "AMD Radeon …" */
+/* What System Information shows of the GPU path (docs/BENCHMARK.md, "The GPU as separate layers").
+ * why: the last gpu_init's outcome, a fixed code: "on", "not-built" (built without Mesa), "env-off"
+ * (LORD_GPU=0), "no-3d", "no-gbm", "no-egl", "no-config", "no-context", "software" (llvmpipe and
+ * the like), "shaders", or "" (never tried). The rest is the live context's, "" or 0 without one
+ * (the renderer also names the software one that was turned down);
+ * scanouts counts the frames shown directly since lord-server started. */
+typedef struct {
+ const char *why, *renderer, *render_node;
+ int dmabuf;
+ unsigned long scanouts;
+} GpuInfo;
+void gpu_info(GpuInfo *i);
+
/* Formats/modifiers that can be imported (linux-dmabuf) and the DRM device. */
int gpu_formats(GpuFormat *out, int max);
int gpu_device(dev_t *dev);
diff --git a/server/src/main.c b/server/src/main.c
index 7118276..33cfd8b 100644
--- a/server/src/main.c
+++ b/server/src/main.c
@@ -50,6 +50,7 @@
#include "ui/js_logs.h"
#include "hw/hw.h"
#include "hw/modes.h"
+#include "ui/js_hw.h"
#include "outputs.h"
#include "monitor/netrec.h"
#include "sec/codesig.h"
@@ -1567,6 +1568,17 @@ static int hw_heads(Kms **out, int max) {
static void hw_redraw(void) { if (hw_server) full_damage(hw_server); }
static const DisplayHost hw_host = { hw_kms, hw_redraw, js_hw_event, hw_heads };
+const char *lord_composition(void) {
+ Server *s = hw_server;
+ if (!s) return "";
+ if (gpu_active()) return "gpu";
+ if (s->headless) return "headless";
+ if (out_count(s) < 1) return "no-display";
+ if (display_cpu_only()) return "rotated";
+ if (need_cpu()) return "capture";
+ return "gpu-off";
+}
+
/* A client that hangs up mid-write (remote desktop, Wayland, a helper) must not kill the
* session: writes get EPIPE instead. Caught, not SIG_IGN, so exec'd children (shells, Linux
* apps) get the default SIGPIPE back, as execve resets caught signals. */
diff --git a/server/src/ui/js_hw.c b/server/src/ui/js_hw.c
index 93e78e3..5795c16 100644
--- a/server/src/ui/js_hw.c
+++ b/server/src/ui/js_hw.c
@@ -21,6 +21,10 @@
* lord.hwinfo.scan() read-only hardware facts for the Store's suggestions
* (hw/hwscan.c: DMI, device tree, PCI/USB IDs, virtio
* ports, missing firmware when the kernel log is readable)
+ * lord.sysinfo.report() System Information (sysreport/: the same report as
+ * lordos-sysreport, no serials, addresses or names) plus
+ * session: how this session composes the screen and its
+ * GPU context (gpu/gpu.h gpu_info, lord_composition)
* lord.fan.status() / setProfile(p) / setCurve(pts) / force(v) / caseConfig() (js_fan.c, lord-fand)
* lord.browserFrame.apply(on, which) Settings → Appearance → "Browsers: tabs in the title bar":
* one preference in the user's Chromium/Firefox profiles
@@ -38,6 +42,8 @@
#include "../hw/display.h"
#include "../hw/hw.h"
#include "../hw/hwscan.h"
+#include "../gpu/gpu.h"
+#include "../sysreport/sysreport.h"
#include "../hw/mimeapps.h"
#include "../hw/notifyd.h"
#include "../hw/ppd.h"
@@ -366,6 +372,33 @@ static JSValue f_hwinfo_scan(JSContext *c, JSValueConst t, int argc, JSValueCons
static const JSCFunctionListEntry hwinfo_funcs[] = { JS_CFUNC_DEF("scan", 0, f_hwinfo_scan) };
+/* ---- lord.sysinfo (System Information, docs/BENCHMARK.md) ---- */
+
+static JSValue f_sysinfo_report(JSContext *c, JSValueConst t, int argc, JSValueConst *argv) {
+ (void)t; (void)argc; (void)argv;
+ SysReport *r = malloc(sizeof *r);
+ if (!r) return JS_NULL;
+ const char *root = hwscan_root(); /* the same development fixtures as the Store's */
+ sysreport_collect(r, root, NULL, NULL);
+ JSValue v = json_or_null(c, sysreport_json(r));
+ free(r);
+ if (!JS_IsObject(v)) return v;
+ GpuInfo g;
+ gpu_info(&g);
+ JSValue s = JS_NewObject(c);
+ JS_SetPropertyStr(c, s, "composition", JS_NewString(c, lord_composition()));
+ JS_SetPropertyStr(c, s, "gpuInit", JS_NewString(c, g.why));
+ JS_SetPropertyStr(c, s, "renderer", JS_NewString(c, g.renderer));
+ JS_SetPropertyStr(c, s, "renderNode", JS_NewString(c, g.render_node));
+ JS_SetPropertyStr(c, s, "dmabuf", JS_NewBool(c, g.dmabuf));
+ JS_SetPropertyStr(c, s, "scanouts", JS_NewFloat64(c, (double)g.scanouts));
+ JS_SetPropertyStr(c, s, "fixture", JS_NewBool(c, root[0] != 0));
+ JS_SetPropertyStr(c, v, "session", s);
+ return v;
+}
+
+static const JSCFunctionListEntry sysinfo_funcs[] = { JS_CFUNC_DEF("report", 0, f_sysinfo_report) };
+
/* ---- lord.browserFrame (Settings → Appearance; hw/brframe.c, docs/WAYLAND.md) ---- */
/* The folders are fixed: $XDG_CONFIG_HOME (absolute) or ~/.config, and ~ for the legacy ~/.mozilla. */
@@ -439,6 +472,7 @@ void js_hw_register(JSContext *c, JSValue lord) {
add(c, lord, "timedate", td_funcs, sizeof td_funcs / sizeof td_funcs[0]);
add(c, lord, "notifyd", nd_funcs, sizeof nd_funcs / sizeof nd_funcs[0]);
add(c, lord, "hwinfo", hwinfo_funcs, sizeof hwinfo_funcs / sizeof hwinfo_funcs[0]);
+ add(c, lord, "sysinfo", sysinfo_funcs, sizeof sysinfo_funcs / sizeof sysinfo_funcs[0]);
add(c, lord, "browserFrame", brf_funcs, sizeof brf_funcs / sizeof brf_funcs[0]);
js_fan_register(c, lord); /* lord.fan: Settings → Cooling and Monitor (js_fan.c) */
}
diff --git a/server/src/ui/js_hw.h b/server/src/ui/js_hw.h
index bdcf81e..b0ceadd 100644
--- a/server/src/ui/js_hw.h
+++ b/server/src/ui/js_hw.h
@@ -6,4 +6,9 @@
void js_hw_register(JSContext *c, JSValue lord);
+/* How this session composes the screen right now, for lord.sysinfo (in main.c): "gpu", or why it
+ * goes by the CPU: "headless" (no monitor), "no-display", "rotated" (a rotated display),
+ * "capture" (recording, or a remote viewer with protected windows), "gpu-off" (gpu_info says why). */
+const char *lord_composition(void);
+
#endif
diff --git a/server/tests/run_suites.sh b/server/tests/run_suites.sh
index 3e76503..8eee4bc 100644
--- a/server/tests/run_suites.sh
+++ b/server/tests/run_suites.sh
@@ -171,6 +171,9 @@ EOF
# (0.8.5) Monitor → Network's model (sdk/netmodel.js): search tokens, filters, the tree, sorting
if have node; then run "netmodel-test (sdk/netmodel.js)" node tests/netmodel_test.mjs
else skip "netmodel-test" "node"; fi
+ # (0.8.5) System Information's model (apps/sysinfo/model.js): GPU layers, CPU reasons, Compatibility
+ if have node; then run "sysinfo-model-test (apps/sysinfo/model.js)" node tests/sysinfo_model_test.mjs
+ else skip "sysinfo-model-test" "node"; fi
}
full() {
diff --git a/server/tests/sysinfo_model_test.mjs b/server/tests/sysinfo_model_test.mjs
new file mode 100644
index 0000000..2fb8564
--- /dev/null
+++ b/server/tests/sysinfo_model_test.mjs
@@ -0,0 +1,85 @@
+// sysinfo_model_test.mjs — System Information's model (apps/sysinfo/model.js, 0.8.5): the GPU layers,
+// the reasons for CPU composition, the Compatibility panel and the Hardware sections. Run by
+// tests/run_suites.sh (needs node).
+import { compositionReason, cardLayers, sessionLayers, compatibility, hardwareSections, throttleFlags, machineName } from '../../apps/sysinfo/model.js';
+
+let n = 0, bad = 0;
+const eq = (what, got, want) => {
+ n++;
+ const g = JSON.stringify(got), w = JSON.stringify(want);
+ if (g !== w) { bad++; console.log(`✗ ${what}\n got ${g}\n want ${w}`); }
+};
+const states = (rows) => Object.fromEntries(rows.map((r) => [r.id, r.state]));
+const notes = (rows) => Object.fromEntries(rows.map((r) => [r.id, r.note]));
+
+// ---- why the CPU composes ----
+eq('gpu: no reason', compositionReason({ composition: 'gpu', gpuInit: 'on' }), null);
+eq('session reasons win', ['headless', 'no-display', 'rotated', 'capture'].map((c) => compositionReason({ composition: c, gpuInit: 'on' })),
+ ['headless', 'no-display', 'rotated', 'capture']);
+eq('gpu-off: the init outcome', compositionReason({ composition: 'gpu-off', gpuInit: 'software' }), 'software');
+eq('nothing known', compositionReason({}), 'unknown');
+
+// ---- layers ----
+const amd = { card: 'card0', bus: 'pci', vendorId: '1002', deviceId: '67df', vendor: 'AMD', device: 'RX 580', driver: 'amdgpu', renderNode: true, connectors: 2, connected: 1 };
+eq('a display card', states(cardLayers(amd)), { device: 'yes', driver: 'yes', kms: 'yes', render: 'yes' });
+eq('device name', cardLayers(amd)[0].vars.name, 'AMD RX 580');
+const v3d = { card: 'card0', bus: 'platform', driver: 'v3d', renderNode: true, connectors: 0, connected: 0 };
+eq('a render-only card (Pi 5 v3d)', [states(cardLayers(v3d)).kms, cardLayers(v3d)[2].note, cardLayers(v3d)[0].vars.name], ['no', 'renderOnly', '?:?']);
+eq('no driver', states(cardLayers({ ...amd, driver: '' })).driver, 'no');
+
+const on = { composition: 'gpu', gpuInit: 'on', renderer: 'AMD Radeon RX 580', renderNode: '/dev/dri/renderD128', dmabuf: true, scanouts: 12 };
+eq('session on the GPU', states(sessionLayers(on)), { egl: 'yes', composition: 'yes', scanout: 'yes', dmabuf: 'yes', decode: 'unchecked', encode: 'unchecked', vulkan: 'unchecked' });
+eq('scanout notes', [sessionLayers(on)[2].note, sessionLayers({ ...on, scanouts: 0 })[2].note], ['scanoutSeen', 'scanoutNone']);
+eq('forced llvmpipe is marked software', sessionLayers({ ...on, renderer: 'llvmpipe (LLVM 19.1.7, 256 bits)' })[0].note, 'software');
+const soft = { composition: 'gpu-off', gpuInit: 'software', renderer: 'llvmpipe (LLVM 19.1.7, 256 bits)', dmabuf: false, scanouts: 0 };
+eq('software refused', [states(sessionLayers(soft)).egl, sessionLayers(soft)[0].note, sessionLayers(soft)[1].note], ['no', 'softwareRefused', 'software']);
+eq('headless', notes(sessionLayers({ composition: 'headless', gpuInit: '' })).composition, 'headless');
+
+// ---- compatibility ----
+const vm = {
+ machine: { vendor: 'QEMU', product: 'Standard PC', virtualization: 'kvm' },
+ gpus: [{ card: 'card0', driver: 'virtio-pci', connectors: 1, connected: 1 }],
+ displays: [{ connector: 'Virtual-1', nativeWidth: 1280, nativeHeight: 800 }],
+ storage: [{ name: 'sda', bytes: 34e9 }],
+ network: [{ kind: 'ethernet', driver: 'virtio_net', up: true }],
+ audio: ['HDA Intel'], bluetooth: [], power: [],
+ software: { landlockAbi: 6, bpfLsm: true, cgroup2: true },
+ session: { composition: 'gpu-off', gpuInit: 'no-3d' },
+};
+const c = compatibility(vm);
+eq('a VM', states(c), { gpu: 'limits', display: 'works', storage: 'works', network: 'works', wifi: 'absent', bluetooth: 'absent', audio: 'works', power: 'absent', isolation: 'works', suspend: 'unchecked' });
+eq('the GPU note names the reason', notes(c).gpu, 'cpu.no-3d');
+eq('counts', [c.find((r) => r.id === 'display').vars.count, c.find((r) => r.id === 'storage').vars.count], [1, 1]);
+
+const laptop = {
+ ...vm,
+ gpus: [{ card: 'card0', driver: 'i915', connectors: 1, connected: 1, renderNode: true }],
+ displays: [{ connector: 'eDP-1', nativeWidth: 0, mode: '1920x1200' }],
+ network: [{ kind: 'wifi', driver: 'iwlwifi', up: false }, { kind: 'ethernet', driver: 'r8152', up: false }],
+ bluetooth: [{ driver: 'btusb' }],
+ power: [{ kind: 'ac', online: 0 }, { kind: 'battery', capacity: 76, health: 64 }],
+ software: { landlockAbi: 0, bpfLsm: false, cgroup2: true },
+ session: { composition: 'gpu', renderer: 'Mesa Intel(R) Xe Graphics' },
+};
+const l = compatibility(laptop);
+eq('a laptop', states(l), { gpu: 'works', display: 'limits', storage: 'works', network: 'limits', wifi: 'works', bluetooth: 'works', audio: 'works', power: 'limits', isolation: 'limits', suspend: 'unchecked' });
+eq('laptop notes', [notes(l).display, notes(l).network, notes(l).power, notes(l).isolation], ['noEdid', 'notConnected', 'batteryWorn', 'missing.landlock']);
+eq('gpu note carries the renderer', l[0].vars.renderer, 'Mesa Intel(R) Xe Graphics');
+eq('healthy battery', compatibility({ ...laptop, power: [{ kind: 'battery', health: 92 }] }).find((r) => r.id === 'power'), { id: 'power', state: 'works', note: 'batteryHealth', vars: { health: 92 } });
+eq('Landlock unknown (a fixture) with the rest present', compatibility({ ...vm, software: { landlockAbi: null, bpfLsm: true, cgroup2: true } }).find((r) => r.id === 'isolation').state, 'works');
+eq('a Wi-Fi card without a driver', compatibility({ ...vm, network: [{ kind: 'wifi', driver: '', up: false }] }).find((r) => r.id === 'wifi').note, 'noDriver');
+eq('headless: displays not checked', compatibility({ ...vm, displays: [], session: { composition: 'headless' } }).find((r) => r.id === 'display'),
+ { id: 'display', state: 'unchecked', note: 'headless', vars: {} });
+eq('no GPU at all', notes(compatibility({ ...vm, gpus: [] })).gpu, 'noGpu');
+eq('an empty report does not throw', compatibility({}).length, 10);
+
+// ---- sections, Pi flags, names ----
+eq('sections of a VM', hardwareSections({ ...vm, pci: [{}], usb: [] }), ['computer', 'cpu', 'memory', 'graphics', 'displays', 'storage', 'network', 'audio', 'pci', 'software']);
+eq('a Pi adds its section', hardwareSections({ raspberryPi: { model: 'Raspberry Pi 5' } }).includes('raspberryPi'), true);
+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]);
+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', '']);
+
+console.log(`sysinfo-model-test: ${n - bad} ok, ${bad} failed`);
+process.exit(bad ? 1 : 0);