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 572D318208; Thu, 25 Sep 2025 10:53:31 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 8435F181ED; Thu, 25 Sep 2025 10:53:29 +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-b8-smtp.messagingengine.com (fout-b8-smtp.messagingengine.com [202.12.124.151]) by atuin.qyliss.net (Postfix) with ESMTPS id C06F7181EB for ; Thu, 25 Sep 2025 10:53:27 +0000 (UTC) Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfout.stl.internal (Postfix) with ESMTP id BFE161D00100; Thu, 25 Sep 2025 06:53:26 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Thu, 25 Sep 2025 06:53:26 -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=1758797606; x=1758884006; bh=ZUAmyJE0lc NHsCJke9x3E9jy29WPQXkBn14IbmlXxMI=; b=KKNbykvMCB6D7KpYVx/HqpKSJ+ 8f9WFwGW04F2P6bqI8FbGv8ajxCp6JuSchs0XmQwhD3SXcy1ncl17TI1sBqVndTQ tUNvBzS/9v97jF2BDpLFS95xlJpl8+fCKMoURubAYYL8PrBufcsR32z8qx01zC3j iA8xcqhv/FVg8DJ57AB7+EgUFCral+68+3KqwhZKxP+rE5sons1EnGwEb8OCaK+U /CkB8o1dyqtHIflVZv/DPQ1gQceQZun7avZOZHsTqEDKsnQ2WmHm2HYE+wfo0oDc R55TdOqiWa7nwXF6bBouzFt/y56F01BRct+B8qDoEpNdkTrAHIm5SnMGsmnw== 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= 1758797606; x=1758884006; bh=ZUAmyJE0lcNHsCJke9x3E9jy29WPQXkBn14 IbmlXxMI=; b=WoysabPr7+mPvzEqC1Kbt7egyARCjKEyVKlrTHKsV4w2b2nUP67 jIJqLsCYfmSv7NPGJ2+hKmpKEW114U7SsVAYhrBmCLKMSubIrd8CCT5s1qPQMQWz kPeGlcgZI+FzVvs0/zmUl4B6JdReJxYKRzA1P/rNGatFaa8j8rhe/o+7fWIe7wsG NmEBK0NVVKKJpznfVcqAGj9wZd2JRDl7PMuP7viRT61WIx3hAZcI9Xbrm0N5GWXO y1Vu54phLF6FTZJHNJf/1Hbe3wDnS39MlF9sOqH7wxjihoUT0SgCMpoM7kAMvGru 4kEW+Nlifmi7gt+Vzwy/++a7f3EkWao6ikw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdeiieeftdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefhvfevufgjfhffkfggtgesghdtreertddttdenucfhrhhomheptehlhihsshgrucft ohhsshcuoehhihesrghlhihsshgrrdhisheqnecuggftrfgrthhtvghrnhepieduffeuie elgfetgfdttddtkeekheekgfehkedufeevteegfeeiffetvdetueevnecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhephhhisegrlhihshhsrgdrih hspdhnsggprhgtphhtthhopedvpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegu vghmihhosggvnhhouhhrsehgmhgrihhlrdgtohhmpdhrtghpthhtohepuggvvhgvlhessh hpvggtthhruhhmqdhoshdrohhrgh X-ME-Proxy: Feedback-ID: i12284293:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 25 Sep 2025 06:53:26 -0400 (EDT) Received: by mbp.qyliss.net (Postfix, from userid 1000) id 0B71724D339A; Thu, 25 Sep 2025 12:53:15 +0200 (CEST) From: Alyssa Ross To: Demi Marie Obenour Subject: Re: [PATCH v2 2/3] host/rootfs: Switch to systemd-udevd In-Reply-To: <20250924-udev-v2-2-6089de521b3b@gmail.com> References: <20250924-udev-v2-0-6089de521b3b@gmail.com> <20250924-udev-v2-2-6089de521b3b@gmail.com> Date: Thu, 25 Sep 2025 12:53:14 +0200 Message-ID: <87zfaiby79.fsf@alyssa.is> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Message-ID-Hash: J4EKIND3IY2W6ZJMNBTJV3FKSG4HM3OA X-Message-ID-Hash: J4EKIND3IY2W6ZJMNBTJV3FKSG4HM3OA 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 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: > This replaces the mdevd uevent daemon with systemd-udevd, which supports > much more hardware and is therefore to be preferred for a full desktop > environment. Various Wayland compositors integrate with systemd-udevd, > allowing them to discover devices as they appear rather than having to > only use devices plugged in when the compositor is started. > Additionally, systemd-udevd has quirks for various devices that are > needed to support the wide variety of hardware end-users have. > > The dependency on /dev/dri/card0 being present is eliminated, and > whatever devices the user has are now picked up by the compositor. New > dependencies are added to ensure that udev coldplug has finished before > any non-trivial services are started. systemd-udev-trigger.service runs > 'udevadm trigger' and has Before=3Dsysinit.target, so anything that is not > an early boot service can assume 'udevadm trigger' has run. > > systemd-udevd doesn't set PATH to anything useful, presumably because > under NixOS this is handled some other way. Therefore, explicitly set > it to /usr/bin in the scripts systemd-udevd calls. > > The /etc/mdev/listen and /etc/mdev/wait scripts are replaced by > 'udevadm wait', so they are deleted. The whole static-nodes target also > goes away, as Linux handles that itself and systemd-udevd deals with > autoloading. Not quite right. Linux does not create static nodes. Userspace has to. That's why we had a service for it. (It sucks.) > diff --git a/host/rootfs/image/etc/s6-rc/kvm/up b/host/rootfs/image/etc/s= 6-rc/kvm/up > index c02e3f90245e005b98b4de8245a1863fb49c1158..a8436de58580f2a2a6f42bb69= 418a319f967df47 100644 > --- a/host/rootfs/image/etc/s6-rc/kvm/up > +++ b/host/rootfs/image/etc/s6-rc/kvm/up > @@ -1,4 +1,3 @@ > # SPDX-License-Identifier: EUPL-1.2+ > -# SPDX-FileCopyrightText: 2023 Alyssa Ross > - > -/etc/mdev/wait kvm > +# SPDX-FileCopyrightText: 2025 Demi Marie Obenour > +udevadm wait /dev/kvm Any reason now not to just inline this into the services that need to wait? > diff --git a/host/rootfs/image/etc/s6-rc/systemd-udevd/run b/host/rootfs/= image/etc/s6-rc/systemd-udevd/run > new file mode 100644 > index 0000000000000000000000000000000000000000..2501680b69eb0060b651146df= fb6b3a99640c6fb > --- /dev/null > +++ b/host/rootfs/image/etc/s6-rc/systemd-udevd/run > @@ -0,0 +1,11 @@ > +#!/bin/execlineb -P > +# SPDX-License-Identifier: EUPL-1.2+ > +# SPDX-FileCopyrightText: 2025 Demi Marie Obenour > +if { rm -f /run/sd-notify-wrapper/systemd-udevd } > +background { > + s6-ipcserver-socketbinder -b0 -m -a 0600 /run/sd-notify-wrapper/syste= md-udevd > + fdmove 1 3 > + sd-notify-adapter > +} > +export NOTIFY_SOCKET /run/sd-notify-wrapper/systemd-udevd > +exec -a systemd-udevd udevadm How does systemd expect this to normally work? > diff --git a/host/rootfs/image/etc/s6-rc/vm-env/contents b/host/rootfs/im= age/etc/s6-rc/vm-env/contents > index 580795b1b02bb7a8dff7f872723c678141d4bb70..ed8b5c410adfc17f5bbc33932= ac79d97bd7b3115 100644 > --- a/host/rootfs/image/etc/s6-rc/vm-env/contents > +++ b/host/rootfs/image/etc/s6-rc/vm-env/contents > @@ -2,4 +2,5 @@ > # SPDX-FileCopyrightText: 2021 Alyssa Ross > # > static-nodes > +systemd-udevd-coldplug > weston Shouldn't static-nodes be removed here as well, and the static-nodes files deleted? > diff --git a/host/rootfs/image/etc/udev/rules.d/99-spectrum.rules b/host/= rootfs/image/etc/udev/rules.d/99-spectrum.rules > new file mode 100644 > index 0000000000000000000000000000000000000000..ca91367529f39eebe009cc8ac= ef782cf6a4516c1 > --- /dev/null > +++ b/host/rootfs/image/etc/udev/rules.d/99-spectrum.rules > @@ -0,0 +1,9 @@ > +# SPDX-License-Identifier: EUPL-1.2+ > +# SPDX-FileCopyrightText: 2025 Demi Marie Obenour > + > +# systemd-udevd has a built-in module loading feature, > +# but it seems to not work for some reason or another. > +# This works. > +ACTION!=3D"remove", ENV{MODALIAS}!=3D"", RUN+=3D"/usr/bin/modprobe -q $e= nv{MODALIAS}" > +# systemd-udevd unsets PATH, so fix that. > +ACTION!=3D"remove", ENV{PCI_CLASS}=3D=3D"2????", RUN+=3D"/usr/bin/env PA= TH=3D/usr/bin /usr/libexec/net-add" This is such a weird behavior. Do we know why it does that? > diff --git a/host/rootfs/image/usr/bin/vm-start b/host/rootfs/image/usr/b= in/vm-start > index 67480e5215d8a8260ce3f03c67f71ba8f210c291..9725ef5ec549ff191606282a7= b0ae56838f53f03 100755 > --- a/host/rootfs/image/usr/bin/vm-start > +++ b/host/rootfs/image/usr/bin/vm-start > @@ -2,7 +2,7 @@ > # SPDX-License-Identifier: EUPL-1.2+ > # SPDX-FileCopyrightText: 2022-2023, 2025 Alyssa Ross >=20=20 > -foreground { s6-rc -bu change vm-env } > +foreground { s6-rc -bu change weston } >=20=20 > foreground { > redirfd -w 2 /dev/null Why? --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRV/neXydHjZma5XLJbRZGEIw/wogUCaNUfGgAKCRBbRZGEIw/w ogeIAP9YTMy5CnQ47jlLS54mVAsFr/Sgmy7y1RPEz9y1uUQUOwEAnfSK/FjB461s GDtPT9geuPwyAdvMLbUR7pL32BE6ngc= =rCMY -----END PGP SIGNATURE----- --=-=-=--