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 473B657FB for ; Fri, 18 Jul 2025 10:02:32 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 8ECF5584F; Fri, 18 Jul 2025 10:02:28 +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.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DMARC_MISSING,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=4.0.1 Received: from fhigh-a5-smtp.messagingengine.com (fhigh-a5-smtp.messagingengine.com [103.168.172.156]) by atuin.qyliss.net (Postfix) with ESMTPS id 25EC8584D for ; Fri, 18 Jul 2025 10:02:26 +0000 (UTC) Received: from phl-compute-03.internal (phl-compute-03.phl.internal [10.202.2.43]) by mailfhigh.phl.internal (Postfix) with ESMTP id B5C0E14000D1; Fri, 18 Jul 2025 06:02:24 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Fri, 18 Jul 2025 06:02:24 -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=fm1; t=1752832944; x=1752919344; bh=TDd+l1lglh RYvZx7RSMnfzn9mucgMTM5dl8WkOFh4Bc=; b=AZw2zBYIkSFPB3jWEOxg2RhHuM H/YPO/SuIp46sIgVLhRRqIW++3866QSMVhaajLzjOyBP4ihe4xhTO4Y7Kgvqyi8u Yb+A8yXojZ1siyWUdsWFTW/sOCC9hv+oPM2vZl0iPb1/UBigVI90fCCp7wB5LEe6 xk0ubexOXf0m4LpT/lza/lMaAtucQkxBKvqzEFourl2edc/QhCrIEfD+9aV6lDAn 4Vsu66u93OsBAZqGoZOM0+Gqw9ONQCy25IjneLXRn13wRKto1HH3blHMFHBSsKh1 iwhAnJVPGCUlTDei5x2yUjG1Nk1Rjc0HA0fQ/+aWg6/J8geryDrSjWrO4UJg== 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=fm2; t= 1752832944; x=1752919344; bh=TDd+l1lglhRYvZx7RSMnfzn9mucgMTM5dl8 WkOFh4Bc=; b=IfV1V7ZUCZvr9n/u1noncrayR+YnyCyRsmgvR7xSXl8fmz+G0/z ek74/+vyChxmMi3hpQJ/26Tap99Snef5YjhMqCZPhqv1tt1BQJd2YQwLA4j9mN3e 8/gmlrx+Soq4bZHUi09vW7o8lcRG8jc5hT45+5ftq9gAMWsJYfNrWp0Xz3wkqLO7 9XSHZg8qKmTQWqiGQqniFDDv9lHXjl9Li8hRubfdZlecua5t+3TNhWNqDDJAVmIn diotSLf19Grnoa+SsEugRaiAA9niVgo2GzhEBbvV5C4A54nl5J5q2vyCqRa3Y3yu iskrgptCzflQlI2u08nqGmmYaRg+Qvqf++Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdeifeduiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefhvfevufgjfhffkfggtgesghdtreertddtjeenucfhrhhomheptehlhihsshgrucft ohhsshcuoehhihesrghlhihsshgrrdhisheqnecuggftrfgrthhtvghrnhepteejtefgve efgedugeeukeehjeeuffelhfetgeehfeejleethfeflefgvdevgedvnecuffhomhgrihhn pegslhhuvgiirdhsvggrthdpmhhiughirdhnohenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehhihesrghlhihsshgrrdhishdpnhgspghrtghp thhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepuggvmhhiohgsvghnoh hurhesghhmrghilhdrtghomhdprhgtphhtthhopeguvghvvghlsehsphgvtghtrhhumhdq ohhsrdhorhhg X-ME-Proxy: Feedback-ID: i12284293:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 18 Jul 2025 06:02:24 -0400 (EDT) Received: by sf.qyliss.net (Postfix, from userid 1000) id B43EF2B72D9BC; Fri, 18 Jul 2025 12:02:22 +0200 (CEST) From: Alyssa Ross To: Demi Marie Obenour Subject: Re: [PATCH v3] Run PipeWire and WirePlumber in the VMs In-Reply-To: References: <638beeaa-2351-4f51-81a6-bc58883930c2@gmail.com> <87seiyg6w2.fsf@alyssa.is> Date: Fri, 18 Jul 2025 12:02:20 +0200 Message-ID: <87tt39stoz.fsf@alyssa.is> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Message-ID-Hash: LMDPTCTO2W6EJU5CPWRCZ7QOIMY6TV76 X-Message-ID-Hash: LMDPTCTO2W6EJU5CPWRCZ7QOIMY6TV76 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; charset=utf-8 Content-Transfer-Encoding: quoted-printable Demi Marie Obenour writes: > On 7/14/25 10:54, Alyssa Ross wrote: >> Demi Marie Obenour writes: >>=20 >>> WirePlumber is completely overkill as a session manager here, and >>> ideally a trivial session manager would be used instead. I did build a >>> Spectrum OS image and found that PipeWire and WirePlumber both >>> successfully started. PipeWire is configured to listen on the >>> PulseAudio socket, so PulseAudio compatibility works. This does inject >>> a large number of completely unnecessary files into the VM, notably for >>> libcamera and Bluetooth support. >>=20 >> Yeah, I saw this in the log: >>=20 >> N 14:27:54.810067 wp-internal-comp-l ../lib/wp/private/internal-comp-loa= der.c:588:on_component_loaded: optional component 'supp= ort.logind [module: libwireplumber-module-logind]' failed to load: failed t= o start systemd logind monitor: -2 (No such file or directory) >> N 14:27:54.811299 wp-internal-comp-l ../lib/wp/private/internal-comp-loa= der.c:640:wp_component_array_load_task_execute_step: sk= ipping component 'monitor.bluez.seat-monitoring [virtual]' because some of = its dependencies were not loaded >> E 14:27:54.851210 spa.dbus ../spa/plugins/support/dbus.c:333:i= mpl_connection_get: Failed to connect to system bus: Failed to connect to s= ocket /run/dbus/system_bus_socket: No such file or directory >> E 14:27:54.852143 spa.bluez5 ../spa/plugins/bluez5/bluez5-dbus.c= :6632:impl_init: failed to get dbus connection >> N 14:27:54.855904 wp-device ../lib/wp/device.c:710:wp_spa_devic= e_new_from_spa_factory: SPA handle 'api.bluez5.enum.dbus' could not be load= ed; is it installed? >> N 14:27:54.856657 s-monitors bluez.lua:411:createMonitor: PipeWi= re's BlueZ SPA plugin is missing or broken. Bluetooth devices will not be s= upported. >> E 14:27:54.859091 spa.bluez5.midi ../spa/plugins/bluez5/midi-enum.c:8= 05:impl_init: Creating GDBus connection failed: Could not connect: No such = file or directory >> N 14:27:54.859810 wp-device ../lib/wp/device.c:710:wp_spa_devic= e_new_from_spa_factory: SPA handle 'api.bluez5.midi.enum' could not be load= ed; is it installed? >> N 14:27:54.860524 s-monitors bluez-midi.lua:95:createMonitor: Pi= peWire's BlueZ MIDI SPA missing or broken. Bluetooth not supported. >> E 14:27:54.861346 spa.bluez5.midi.no ../spa/plugins/bluez5/midi-node.c:1= 989:impl_init: failed to get dbus connection: Could not connect: No such fi= le or directory >> E 14:27:54.862435 pw.resource ../src/pipewire/resource.c:255:pw_r= esource_errorf_id: can't create node: Input/output error >> W 14:27:54.863275 wp-node ../lib/wp/node.c:913:wp_impl_node_n= ew_from_pw_factory: failed to create node from factory 'spa-node-factory' >> N 14:27:54.863965 s-monitors bluez-midi.lua:130:createServers: F= ailed to create BLE MIDI server. >> [0:00:01.314658075] [123] INFO IPAManager ipa_manager.cpp:137 libcamera= is not installed. Adding '/nix/store/src/ipa' to the IPA search path >> [0:00:01.321611889] [123] INFO Camera camera_manager.cpp:326 libcamera = v0.5.0 >>=20 >> Can we set something in a config file or something to disable this extra >> stuff? > > I started work on a v4 patch, but before sending it I decided to test > that not only did PipeWire and WirePlumber start, but also that I > could actually play sound to a virtio-sound device I had attached > to the VM. This failed rather miserably, and I finally figured out > the culprit: PipeWire relies on udev for device discovery, and without > udev it doesn't detect any devices. > > It appears possible to create devices in PipeWire via the PipeWire CLI > or via the configuration file. The former would allow them to be > created by mdevd, while the latter would be appropriate if the devices > were known to be ready before PipeWire started. > > I strongly recommend using either systemd-udevd (with systemd) or eudev > (without systemd) in the host and in any VM that will have real hardware > attached to it. udev rules are where all the upstream work on uevent > processing is happening, so it fits with Spectrum's "upstream first" > mindset. Something simpler like mdevd might be appropriate for VMs that > will only ever see virtual hardware with known behavior and do not need > to deal with the quirks of real hardware. No real objection to udev in VMs. On the host I'm less sure, because ideally the host shouldn't really be interacting with hardware very much, so it comes down to whether there are things in scope for the host where the kernel doesn't do the right thing by default. > For the host, I think systemd is probably the right solution. It's > complicated, but that is because it solves a complicated problem. > Without systemd, Spectrum will wind up needing to reimplement a lot of > configuration that has already been written for systemd. Also, systemd > has fantastic TPM support. systemd is very modular. I'm not sure you need much of the rest of systemd to use the TPM stuff, for example. The value I'd see in systemd would be all the sandboxing stuff for services. It's annoying because none of that has to be part of a single unified service manager either =E2= =80=94 it could largely easily be done by modular chainloaders =E2=80=94 but given nobody is implementing it outside of systemd there might not be a reasonable other choice. So I'm not really opposed to this either, and I guess it probably means we need udev on the host anyway. I don't know when I'd be able to prioritise making the switch, though=E2=80=A6 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRV/neXydHjZma5XLJbRZGEIw/wogUCaHobrQAKCRBbRZGEIw/w otTyAQCrel3X+JzVCKcM87bS30yd2kwItOTzhHaJ+tAoUv2hsAEA+/NwbnKxbL/H 4ENxNDotMkh1OKioKQzuq7BBnUTTiQg= =aD88 -----END PGP SIGNATURE----- --=-=-=--