bf0667303eea2e46cc20023b1cd3fee83f7499ac
2
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
6510e315d4 |
module: make outputs monitor rules for real connectors, and own the seat flag
A machine running this module has a GPU. aquamarine's headless backend has no allocator of its own -- `CHeadlessBackend::drmFD()` returns -1 and `CBackend::start()` takes the allocator from the first backend with a drm fd -- so the session always rides on the DRM backend and always has the host's own connectors. `HEADLESS-1` is a name no connector will ever have, which made the shipped default a monitor rule Hyprland silently ignored, and made `vm-hyprland`'s assertion on that name unsatisfiable. `outputs` now means "monitor rules applied to whatever outputs the machine has". `name` is a regex against the real connector names and defaults to the empty string -- Hyprland's own wildcard form, as in its shipped `monitor=,preferred,auto,1` -- so `enable = true` alone gives a session at a known size on any host. Nothing else about the option changed. SEATD_VTBOUND=0 moves from checks/lib/gpu-session.nix into the compositor unit, where it belongs: libseat finds no seatd socket and no logind session for a system service, falls back to its embedded seatd, and that seat is VT-bound by default -- so it opens /dev/tty0, which the service user cannot, and every device open is refused. That is true on any host, not just in the test. gpu-session.nix keeps only the two things that really are the test machine's business: a render node and Mesa. vm-hyprland now asserts over `hyprctl -j monitors` that at least one monitor exists at the configured mode, with no monitor name anywhere in the check. It also gains a wallpaper, because `--reject-blank` could not otherwise mean anything: the session the module configures by default is a flat black field, which grim captures as an all-zero 1280x720 RGBA PNG of exactly 3653 bytes -- `blank_png_size()` to the byte. Runs that passed that assertion were reading Hyprland's startup notification overlay, which expires after about fifteen seconds. With `misc:force_default_wallpaper` on, the frame is 85267 bytes with all 921600 pixels non-zero and is byte-identical at +15s, +30s and +60s. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M5GEju6XhoRXDWvEiaAX2r |
||
|
|
a37b3dd485 |
checks: give both VM machines a virtio GPU, and say why when it is not enough
`nix build .#checks.x86_64-linux.vm-basic` failed because Hyprland 0.56.2
aborted with `CBackend::create() failed!` on every start. Reading aquamarine
0.15.1 rather than guessing at it, that abort had three independent causes on a
NixOS test machine, and none of them is visible in the journal until
`debug:disable_logs = false` is set -- Hyprland mutes aquamarine, so the abort
is all that survives. checks/lib/gpu-session.nix now supplies all three and
records the evidence for each:
* `-vga virtio`, for a DRM render node. `virtualisation.graphics = false`
still leaves QEMU's default bochs-drm adapter, which gives card0 and no
renderD*. Measured in the guest: `-vga virtio` -> card0 + renderD128;
`-device virtio-gpu-pci` only *adds* a card next to bochs-drm, so it would
need `-vga none` beside it.
* `hardware.graphics.enable`, so Mesa's GBM backends exist at all. Without it
gbm_create_device() fails with "MESA-LOADER: failed to open dri:
/run/opengl-driver/lib/gbm/dri_gbm.so" and aquamarine reports "Cannot open
backend: no allocator available".
* `SEATD_VTBOUND=0`, so libseat's embedded seatd hands out a seat with no VT.
`CHeadlessBackend::drmFD()` returns -1 unconditionally, so the *only*
source of an allocator is the DRM backend, which opens /dev/dri/card0
through libseat -- and the default VT-bound seat needs /dev/tty0, which the
unprivileged service user cannot open.
The diagnostics dump grows a "graphics devices" section (`ls -l /dev/dri`,
`cat /proc/fb`) and a "wayland socket vs WAYLAND_DISPLAY" section, so the next
machine that is missing a render node, or that binds a socket the frame server
is not waiting on, says so in three lines instead of timing out mutely.
vm-basic's `dump()` is now vm-hyprland's, which reports the exit status too.
vm-basic also gained `python3` in the guest: its last subtest shells out to a
python one-liner and had been dying on exit code 127 -- invisible until the
compositor got far enough to reach that subtest.
Neither check passes yet, and the two remaining blockers both live in
nix/module.nix, which this slice may not edit, so they are reported rather
than patched:
* vm-basic stops at "the module's two units come up". The compositor is up
and healthy; the frame server sits in ExecStartPre forever. The module
hardcodes `waylandDisplay = "wayland-0"`, but Hyprland's socket loop is
`// get socket, avoid using 0` over candidates 1..32 (src/Compositor.cpp),
so the session binds wayland-1. Forcing WAYLAND_DISPLAY=wayland-1 in the
guest was verified to carry vm-basic through every other subtest.
* vm-hyprland stops at "the compositor reports the configured headless
output" with "hyprctl never reported a HEADLESS-1 monitor". hyprctl reports
`Monitor Virtual-1` at 1280x800 -- the virtio-gpu output. A HEADLESS-N
output only exists after `hyprctl output create headless`, which the module
never issues; Hyprland's own fallback output is named FALLBACK. The
`monitor = HEADLESS-1, ...` line in hyprland.conf is a rule for a monitor
that is never created.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018fJZYyS4pqxt2FC37JsFYd
|