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 C2690969C; Wed, 24 Jun 2026 08:55:48 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 30AF09579; Wed, 24 Jun 2026 08:55:46 +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,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=4.0.1 Received: from fout-b1-smtp.messagingengine.com (fout-b1-smtp.messagingengine.com [202.12.124.144]) by atuin.qyliss.net (Postfix) with ESMTPS id 1E1A09576 for ; Wed, 24 Jun 2026 08:55:44 +0000 (UTC) Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfout.stl.internal (Postfix) with ESMTP id DE8E81D0014D; Wed, 24 Jun 2026 04:55:42 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-05.internal (MEProxy); Wed, 24 Jun 2026 04:55:42 -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=fm3; t=1782291342; x=1782377742; bh=KPnFGCjfMH eMGVjFRrwZhcBr/HLVz5ds+oBWFwUEF5E=; b=n1agrziz+JUy2G/o8KDqxbyP1F M8Ms2JX1hly4nwvY25r2X1QQFh6CoTzJtVgSDBZHH3z15z5Gg8ikotMPfHueHgAk tGDynXoR3D5yskFYlL7ztRSp3kbJx5SkZ/poPNkFOJNdovR8rWGeUhj3cT5WSQY3 ZG1LR9YNqi6f+RBzBlpIqn6+eRE/14Hd3ncEOt0rlOj5hcCy3VGITyb8b/R28YFD fNX7mdj/Iyrpd3lb032la6ESTJC0DjCaYzQMByXFHyUUYr35bi+k4L6ctc6+rgQF A/S8zNMd2Ow9E4I5aox9nf/kXde4COSY9KnpXdr/9KnZTnnALIwoaYlR8buw== 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=fm1; t= 1782291342; x=1782377742; bh=KPnFGCjfMHeMGVjFRrwZhcBr/HLVz5ds+oB WFwUEF5E=; b=QLQoflu6Lg0+8fjJO91Y3JkDcVtBm+hpgNkM+j/SOtHhuitgo+o /SH/Lgik2Q8ORius20ZoLCSQsry2YlUIou25UcBSkt6XybG/cN9Dr/wTfBxI8/rs AJvyfeJWrXngKHd6Osu1wbKNlouGM00NtghRrx/g4sHGm93VuKjAgr43z74m7apR v0cOLy5yFoGUzCZli2yoPNXE6QBzhar1tLRfbKnWO3UYRae/Lblruyg0RmxGWHdT poTVUpm09dFQ5eA+ooqxVuYp4MUVag5xoeJdGiDzVjWsdc60Kwjah14DQEPNJngZ aY1vw1vHHqebuaUPJm4Iey5A4EuQEf6kmYg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTFDK8JAtvRMcQ00tDPRSM139Qmg0+80n4Uyldb5nECpUWLkd1NeG6lQOu61mksU1o JGyznEYnpq80rVWG0xHAKU16im7I4Dtsuz8IpPc44yqSX84chvPIAGNHEIeyM1ba2r2aKy iz7+Cp0vM8Ij8aRbDy+b4m6M5e/VERqrSy+Nv3gyvspLAYWsEaP2+OWaURbdFzgJz29Ki5 SAakWmdBaQkdq8POgEtg/mL8DxOO1ugol0mJHfpwk57ibuvCyFWLkFc52yitS76Ca217yb Khk9XBXiee9UWsu/91RPW373ZD7r1tZn3A1aqeRjcERRGqC3Yb3yDIrmgSwFN8dAOWM8pa pFb8thTty3eK5vwI8JfKWvedUyrbxmQCggmJduyTz8VneOhPu2035RpQUb0xDzGMCnz2FO jV0ZGCO3DPE6lxZXwgMT5C9qSc1nUfVD/JGnmqNnu3zlCjdFiBjIRMFOKQsCvK77Zq7D4P lQUWoMva+LItUq9194V8SxFinqNoS7hyz9RG/a2gGXJoGMMcqsTjaIDTT6qYJ/AGHsGFGs fDxMdwfK04HJVOUn5wz6vooN1E6oW+feigAhcV19H26Z1frgWROcoHFiBbWszM4xs2DpfR mWm9TORVtVfIZKagd7QzIcMx3ZCE4a+NU/5Zc2TUTRNIL7CSR30l+1yWREQw X-ME-Proxy: Feedback-ID: i12284293:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 24 Jun 2026 04:55:42 -0400 (EDT) Received: by fw12.qyliss.net (Postfix, from userid 1000) id 913F0B90E6EE; Wed, 24 Jun 2026 10:55:40 +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: <878q96tfyv.fsf@alyssa.is> References: <20260524-weston-card-fix-v1-1-9c6dad59c245@gmail.com> <20260526-weston-card-fix-v2-1-784a47aea8fb@gmail.com> <878q96tfyv.fsf@alyssa.is> Date: Wed, 24 Jun 2026 10:55:38 +0200 Message-ID: <87zf0k5ncl.fsf@alyssa.is> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Message-ID-Hash: M72XW4COZ3SXFUYLB7YNTPC7PY3I5FA6 X-Message-ID-Hash: M72XW4COZ3SXFUYLB7YNTPC7PY3I5FA6 X-MailFrom: hi@alyssa.is X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; 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; emergency; member-moderation; 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.10 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; charset=utf-8 Content-Transfer-Encoding: quoted-printable Alyssa Ross writes: > 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 71216f0aa36049cbd3c7b7562e6e7ff225a1c810 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 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=E2=80=A6 > 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/$FXt0B6Zc= In1KO1k-sis5WrESsePTmi1hfg4ZXiVXwTM?via=3Dfairydust.space&via=3Dmatrix.org&= via=3Ddataaturservice.se > Link: https://matrix.to/#/!xSysqhzbOZImdvGpix:fairydust.space/$Gvq6jxvt5d= 5qngIqs0xssBmONLH-q66g-HG_9E7TOWw?via=3Dfairydust.space&via=3Dmatrix.org&vi= a=3Ddataaturservice.se > Reported-by: Yureka Lilian > Closes: https://inbox.spectrum-os.org/spectrum-devel/6ba1fc13-c905-4074-a= 878-bb2488ef2020@gmail.com > Link: https://inbox.spectrum-os.org/spectrum-devel/20260524-weston-card-f= ix-v1-1-9c6dad59c245@gmail.com > Signed-off-by: Alyssa Ross > --- > 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/e= tc/s6-rc/weston/run > index fd59586c..68eff51a 100644 > --- 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=20 > importas -i home HOME > cd $home > -if { 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 > --- 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 > -dri/card0 user:user 660 +background { /etc/mdev/listen card0 } > +dri/card0 user:user 660 >=20=20 > -SUBSYSTEM=3Dsound;.* pipewire:pipewire 660 > snd/controlC0 pipewire:pipewire 660 +background { /etc/mdev/listen contr= olC0 } > diff --git a/img/app/image/etc/s6-rc/wayland-proxy-virtwl/run b/img/app/i= mage/etc/s6-rc/wayland-proxy-virtwl/run > index 3fe113fe..bcd4c0fc 100755 > --- 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=20 > -if { /etc/mdev/wait card0 } > - > export LISTEN_FDS 2 > export LISTEN_FDNAMES wayland:x11 > getpid LISTEN_PID > diff --git a/release/checks/wayland/default.nix b/release/checks/wayland/= default.nix > index 40f96199..a36f5b91 100644 > --- 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=20 > - services.udev.extraRules =3D '' > - KERNEL=3D=3D"card0", TAG+=3D"systemd" > - ''; > - > systemd.mounts =3D [ > { > name =3D "shared-config.mount"; > @@ -63,8 +59,8 @@ testers.nixosTest ({ lib, pkgs, ... }: { > }; >=20=20 > systemd.services.weston =3D { > - after =3D [ "dev-dri-card0.device" "surface-notify-socket.service"= ]; > - 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} --modul= es ${surface-notify}/lib/weston/surface-notify.so,systemd-notify.so"; > --=20 > 2.53.0 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQQGoGac7QfI+H5ZtFCZddwkt31pFQUCajubiwAKCRCZddwkt31p FTArAP0ThjBYloLVjxgTz+3yNcxuL7dfTcUIivsVA4w1YwjFjAD+O4sivQTsxIUw W9q4GLN1KHFBIMlObAKk7ajNgJz0PwQ= =mwnB -----END PGP SIGNATURE----- --=-=-=--