From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from atuin.qyliss.net (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id 804F59FDB; Tue, 26 May 2026 14:15:16 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id CF59E9FBE; Tue, 26 May 2026 14:15:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DMARC_MISSING,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=4.0.1 Received: from fout-c3-smtp.messagingengine.com (fout-b3-smtp.messagingengine.com [202.12.124.146]) by atuin.qyliss.net (Postfix) with ESMTPS id 921FD9FBC for ; Tue, 26 May 2026 14:15:11 +0000 (UTC) Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfout.stl.internal (Postfix) with ESMTP id 672731D00144; Tue, 26 May 2026 10:15:09 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-02.internal (MEProxy); Tue, 26 May 2026 10:15:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alyssa.is; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1779804909; x=1779891309; bh=hl1XBwIzC1 lk6bz+XRiJkdrU1fuAjCjLYi6ckVyGC3Q=; b=ZWLBoj8W2a0SeiJk+hXxdMJwFL 4T4FQmQOzo8p+8S7KJswzjzLziwu9m8traWu0w1q7zf65/IXzF2W8GQ4SDLsP63l Jgkhmfx4eh3hM+BglLKJXrVCDCv0gotYuBOfhLCRVI88LL33dZqxCcxkXdy1jZiQ lxdzvaC8e6l9uuVb2xDFgliOTB03JQ7H3QWVJcJXgq+DVuJ7kGO2iyw/5qBp7n4a bp/kwUbrNBrInfLO3PpV4KU2tXgiYXS26kDopgs9JcSJt5DbZ6yJFUYSslTTi0jr XxPtmQy72kJi6iw/TqRIZ0m/sK27C2xF1bxu7g9RLqqRJlktHXxFfsdGH+HA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1779804909; x=1779891309; bh=hl1XBwIzC1lk6bz+XRiJkdrU1fuAjCjLYi6 ckVyGC3Q=; b=T6kjmlA3hzDYlUnchBBNlWG5fFAG/7PlKj2hKHwQEvuEq5LD8yb R+Cc+WTK4aN9p8mIPGL1LbRZKRsw4d3/PwXaS7/2G8YY3ihfrygEbYE5rXPY/i0e C5Dn0DRLdKIdedULUz/LnCEdEX4uuZu0vkTKVJMUN7ohec9R2D9Faa7jQbkpM26o dF0pZkstfTmbhpGFrWLGY1CYw5ag51smloAZ16x9A/w79kaHd77Sx77lguL6NdVb Qnzj5h05Iymtbxww3wz09jzqRu8CaORe29HHuNjs9Dwi1eLfIeVrgGhh5Ihu6kYx oX4PDgFMgM94wCP0F4e3bP8Cs44IgfEcUwg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTGcUCcWLel75BSGpjU5HxoSXoAhnDntwzYIlkvQM6R5m1ozSaq1RydASWL+d+MV8W J3rVc3oLS7YQfwTgZZyu/R64HhjkWMQDZdrhT4mkVwP426qjT7x3LVyX9J3EVvi6HTglJd gjy1GxIBdN7gr26eVIUfDHem4UUxf6k8lJAu01eHkp9lDFvfgyzckxKROHJTkgYEoDcvo+ iVjslSiSlWHtAVMvFX20HJTCkOmIWhsFeKKI7ZXREA/is4ZOia90e2CVTMChD11HteGNWl 8D+N0Xg5UJRbcJXyTkd0/lgZ2sTm3uPpXY9ugQuMCHqYZY5H942J1TN+MRJCL954ik7ePx /y5U2GwCNXKnfHtpLfZs73b6bWI2U3/M1BwoJnMBgW77+Lbp1ioHCPzECT7DDber+WBnkp MLgnL9DAYRNCpIZSQI24SckpfbF8OsuGG5XKE/unCtmxdHdoOdw2G6jLRbFSnmz22liJ1Y pF1rQAJ6x5UG5H/KsjQGxkIas4zhi4T6N5aIvItKK7v227MWMhKoQyZR47p92XXt49NgFH sdrDc73tEEixqwKP0RH1kYHXE24P1wz+bFqdPGP6RPxJMcxTBbyQ0t6x0jyR14zXN9yPw0 4bxa5csZf870ERk92xufY4HSFABzKBnMf3Dib2HECdvUobWUdAS11I6TM17Q X-ME-Proxy: Feedback-ID: i12284293:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 26 May 2026 10:15:08 -0400 (EDT) Received: by fw12.qyliss.net (Postfix, from userid 1000) id E5A59B2BA499; Tue, 26 May 2026 16:15:06 +0200 (CEST) From: Alyssa Ross To: Demi Marie Obenour Subject: Re: [PATCH v2] host/rootfs: Don't wait for /dev/dri/card0 In-Reply-To: <20260526-weston-card-fix-v2-1-784a47aea8fb@gmail.com> References: <20260524-weston-card-fix-v1-1-9c6dad59c245@gmail.com> <20260526-weston-card-fix-v2-1-784a47aea8fb@gmail.com> Date: Tue, 26 May 2026 16:15:04 +0200 Message-ID: <878q96tfyv.fsf@alyssa.is> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Message-ID-Hash: 3MESWTDL5FBQ264YTLCCPP5OGQKTIRXL X-Message-ID-Hash: 3MESWTDL5FBQ264YTLCCPP5OGQKTIRXL X-MailFrom: hi@alyssa.is X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-devel.spectrum-os.org-0; header-match-devel.spectrum-os.org-1; header-match-devel.spectrum-os.org-2; header-match-devel.spectrum-os.org-3; header-match-devel.spectrum-os.org-4; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Spectrum OS Development , Yureka Lilian X-Mailman-Version: 3.3.9 Precedence: list List-Id: Patches and low-level development discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Demi Marie Obenour 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 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=2071216f0aa36049cbd3c7b7562e6e7ff225a1c810 Mon Sep 17 00:00:00 2001 From: Alyssa Ross 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=3Dy. (If there's no device at startup, s6 will just keep restarting the services until there is one, but that case should be pretty unusual.) Closes: https://matrix.to/#/!xSysqhzbOZImdvGpix:fairydust.space/$FXt0B6ZcIn= 1KO1k-sis5WrESsePTmi1hfg4ZXiVXwTM?via=3Dfairydust.space&via=3Dmatrix.org&vi= a=3Ddataaturservice.se Link: https://matrix.to/#/!xSysqhzbOZImdvGpix:fairydust.space/$Gvq6jxvt5d5q= ngIqs0xssBmONLH-q66g-HG_9E7TOWw?via=3Dfairydust.space&via=3Dmatrix.org&via= =3Ddataaturservice.se Reported-by: Yureka Lilian Closes: https://inbox.spectrum-os.org/spectrum-devel/6ba1fc13-c905-4074-a87= 8-bb2488ef2020@gmail.com Link: https://inbox.spectrum-os.org/spectrum-devel/20260524-weston-card-fix= -v1-1-9c6dad59c245@gmail.com Signed-off-by: Alyssa Ross =2D-- host/rootfs/image/etc/s6-rc/weston/run | 1 - img/app/image/etc/mdev.conf | 2 +- img/app/image/etc/s6-rc/wayland-proxy-virtwl/run | 2 -- release/checks/wayland/default.nix | 8 ++------ 4 files changed, 3 insertions(+), 10 deletions(-) diff --git a/host/rootfs/image/etc/s6-rc/weston/run b/host/rootfs/image/etc= /s6-rc/weston/run index fd59586c..68eff51a 100644 =2D-- a/host/rootfs/image/etc/s6-rc/weston/run +++ b/host/rootfs/image/etc/s6-rc/weston/run @@ -40,7 +40,6 @@ redirfd -r 0 /dev/tty1 =20 importas -i home HOME cd $home =2Dif { udevadm wait /dev/dri/card0 } s6-setuidgid wayland bwrap # no --unshare-net, breaks udev hotplug diff --git a/img/app/image/etc/mdev.conf b/img/app/image/etc/mdev.conf index 33a07d6b..40c2149d 100644 =2D-- a/img/app/image/etc/mdev.conf +++ b/img/app/image/etc/mdev.conf @@ -4,7 +4,7 @@ -$MODALIAS=3D.* 0:0 0 ! +importas -Siu MODALIAS modprobe -q $MODALIAS $INTERFACE=3D.* 0:0 0 ! +/etc/mdev/iface $MODALIAS=3Dvirtio:d0000001Av.* 0:0 0 ! +/etc/mdev/virtiofs =2Ddri/card0 user:user 660 +background { /etc/mdev/listen card0 } +dri/card0 user:user 660 =20 -SUBSYSTEM=3Dsound;.* pipewire:pipewire 660 snd/controlC0 pipewire:pipewire 660 +background { /etc/mdev/listen control= C0 } diff --git a/img/app/image/etc/s6-rc/wayland-proxy-virtwl/run b/img/app/ima= ge/etc/s6-rc/wayland-proxy-virtwl/run index 3fe113fe..bcd4c0fc 100755 =2D-- a/img/app/image/etc/s6-rc/wayland-proxy-virtwl/run +++ b/img/app/image/etc/s6-rc/wayland-proxy-virtwl/run @@ -20,8 +20,6 @@ redirfd -r 0 /dev/null if { fdmove 1 5 echo } fdclose 5 =20 =2Dif { /etc/mdev/wait card0 } =2D export LISTEN_FDS 2 export LISTEN_FDNAMES wayland:x11 getpid LISTEN_PID diff --git a/release/checks/wayland/default.nix b/release/checks/wayland/de= fault.nix index 40f96199..a36f5b91 100644 =2D-- a/release/checks/wayland/default.nix +++ b/release/checks/wayland/default.nix @@ -16,10 +16,6 @@ testers.nixosTest ({ lib, pkgs, ... }: { nodes.machine =3D { ... }: { hardware.graphics.enable =3D true; =20 =2D services.udev.extraRules =3D '' =2D KERNEL=3D=3D"card0", TAG+=3D"systemd" =2D ''; =2D systemd.mounts =3D [ { name =3D "shared-config.mount"; @@ -63,8 +59,8 @@ testers.nixosTest ({ lib, pkgs, ... }: { }; =20 systemd.services.weston =3D { =2D after =3D [ "dev-dri-card0.device" "surface-notify-socket.service"= ]; =2D wants =3D [ "dev-dri-card0.device" "surface-notify-socket.service"= ]; + after =3D [ "surface-notify-socket.service" ]; + wants =3D [ "surface-notify-socket.service" ]; environment.XDG_RUNTIME_DIR =3D "/run"; environment.WAYLAND_DEBUG =3D "server"; serviceConfig.ExecStart =3D "${lib.getExe pkgs.westonLite} --modules= ${surface-notify}/lib/weston/surface-notify.so,systemd-notify.so"; =2D-=20 2.53.0 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQQGoGac7QfI+H5ZtFCZddwkt31pFQUCahWq6AAKCRCZddwkt31p FTNDAQD2d/nlxwfmFHV/aUzjpFVxG9J1nNsreTOooMiY7ijFCgEAkgvTD0ZMtboX +WfI2D9GcWspPYUT+oOt8oD6zCgBkAQ= =7mAo -----END PGP SIGNATURE----- --=-=-=--