Demi Marie Obenour <demiobenour@gmail.com> writes:
On 6/24/26 04:55, Alyssa Ross wrote:
Alyssa Ross <hi@alyssa.is> writes:
Demi Marie Obenour <demiobenour@gmail.com> writes:
Weston can find a card itself. If the card is not ready, it will exit, but s6 will automatically restart it.
Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
I don't think this commit message really captures it. As long as the card is not hotplugged, it _will_ be ready, as far as I know, because it will become ready when DRM is loaded, before userspace starts. This makes it sound like Weston not finding a card and being restarted by s6 would be routine behaviour, whereas we'd actually not expect to ever see it, except in the very unusual case of somebody having no cards at boot and later hotplugging one. (Even then it's not ideal to need to restart in a loop, but that case can wait for COSMIC.)
I suggest the following alternative, which also removes some other obsolete instances of the same pattern.
From 71216f0aa36049cbd3c7b7562e6e7ff225a1c810 Mon Sep 17 00:00:00 2001 From: Alyssa Ross <hi@alyssa.is> Date: Tue, 26 May 2026 16:05:21 +0200 Subject: [PATCH] Stop waiting for /dev/dri/card0
On the host, which does not run in a well-controlled VM environment, there might not be a card0 (sometimes you just get card1). This causes hangs. It hasn't been necessary to wait for non-hotplugged DRI devices to exist since the Nixpkgs kernel set CONFIG_DRM=y. (If
Alas this is not true upon further investigation. I saw release/checks/wayland fail with this applied, because while DRM was loaded pre-userspace, DRM_BOCHS still wasn't. s6 would indeed just restart Weston until it works, but I don't really want a restart loop to be a routine thing…
Is it okay to just let the restart loop happen until Spectrum switches to COSMIC? An alternative would be to use a udev rule and a FIFO, but that's extra work that will be thrown away later.
I think it's a small amount of work, and we can reuse some of what we did before with mdevd, so I'll just do it. More is needed than just switching to COSMIC: COSMIC needs to be modified so that it won't refuse to start up if there are no cards.