From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id d4HKM+hQQGKGrAAAgWs5BA (envelope-from ) for ; Sun, 27 Mar 2022 13:56:24 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 8EJ1L+hQQGKCfwEAauVa8A (envelope-from ) for ; Sun, 27 Mar 2022 13:56:24 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3E7AE2F5B6 for ; Sun, 27 Mar 2022 13:56:24 +0200 (CEST) Received: from localhost ([::1]:47834 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nYRVP-0005Le-2t for larch@yhetil.org; Sun, 27 Mar 2022 07:56:23 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34968) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nYRV3-0005LW-CL for guix-devel@gnu.org; Sun, 27 Mar 2022 07:56:01 -0400 Received: from mout-p-101.mailbox.org ([80.241.56.151]:34766) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1nYRV1-0007PQ-2y; Sun, 27 Mar 2022 07:56:01 -0400 Received: from smtp102.mailbox.org (smtp102.mailbox.org [80.241.60.233]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4KRDmh1C6gz9sN4; Sun, 27 Mar 2022 13:55:48 +0200 (CEST) Content-Type: multipart/alternative; boundary="------------DPcrvCCGmbLTnaT5SyW3xuLV" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brendan.scot; s=MBO0001; t=1648382146; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=yYCKhVknM7LUmt2PPl28IDszhbk76J9rWGQ3u2S9V9Y=; b=yMBYYByRhZGENm0RQmPtvbXSWy8WBMFCEB4ZSeHyVguDcWITE9GGW+shaC67D6RhUtLcnH qXnWkllTGo8Xm0aycayzvkP+QVONAlS0fL0MF4saiso/CjKHlSU0SUdHDL6+4CdzGvTW5a rEveylKhAq325+toQ7f70W/IncDQ4hWNMrQbCZIbBguFLToyWb5TxPiZSV5UwvSBd7mL3B Q6K6KH+7FU+BgiMCexYk2VB9pOp4aGXcPgDM7Mz9Xo0jxSLkDXxIjBBguUFo3KchBPiFOt BmF1G3oUsEQ4Hr7XlaNxluIm4CHdYRWRc4g//viAn7hYriJyFv/woROxmVcJCg== Message-ID: <4c65293b-dbc1-afa9-6548-0308abb70a97@brendan.scot> Date: Sun, 27 Mar 2022 22:55:36 +1100 MIME-Version: 1.0 Subject: Re: PipeWire as a PulseAudio replacement (was Re: The Shepherd on Fibers) Content-Language: en-US To: Josselin Poiret , "ludo@gnu.org" , "guix-devel@gnu.org" References: <780223431.610773.1648104505746@office.mailbox.org> <87a6dchh39.fsf@jpoiret.xyz> From: Brendan Tildesley In-Reply-To: <87a6dchh39.fsf@jpoiret.xyz> Received-SPF: pass client-ip=80.241.56.151; envelope-from=mail@brendan.scot; helo=mout-p-101.mailbox.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: mail@brendan.scot Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1648382184; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=yYCKhVknM7LUmt2PPl28IDszhbk76J9rWGQ3u2S9V9Y=; b=Eweuzmz/g8JaIzgBfIxF2lvesvX6lh5yUWk+4DifuXlAKB6Z24yyT7He4CLsBpmYEljrkd p8i2zhhdl1bj5iCDGwxFLyexDwpBUiTnksL/Xvbv/mali7xtf4kyfVBvDk/3/O9L6QD+mf I8k1g+hbIJPu6CPVzvDfAVYK8ax7BjY/Jv0AiLKffcg2FCufsVaZLPS5bqZsES8qEhzSOY nDq1f5nYjj7PA/trqf1V+Sw03jnH/vAmyrl7p0eNpX6dbab0AmZ9nqag9hcpGEttNgG5az lfWyK8JCLYmCUFFAXFj5Fxzzd1U1MsP1JxRYuDXnxCyBwFVpeOLZiGHnqsLz4Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1648382184; a=rsa-sha256; cv=none; b=m1AmdUbRRQtn6G8eeXZQ7wdjTw7TEn7wNugZ6V5UCQlmS/nokwaD1/uPutfiCmcMIhqn4T 6kxl3MgUY7UKxNzQNjm/d/JEHuadE32QHyM2Po/AZI68XBW5IMjUoqYEhEgRWC57258l+t cbyDIf4Z/G+EVaMV08znC2J4up6zd+qpK6lSaF5153KFVHKEHjfkyc5TADB7S5/wSm7mdk 02jWH541GP0WJGxN0Y72H8mffq6AeV2lSaxWUrbIqOyOJUR/jWpJ4t4bgIbWQRnHnfSycW 80toY5yxYw8sv34SAh4ajil88Ds9S0MHFdss9EgakMvbwHhKm8iTubZ9DgfGOQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=brendan.scot header.s=MBO0001 header.b=yMBYYByR; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -9.37 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=brendan.scot header.s=MBO0001 header.b=yMBYYByR; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 3E7AE2F5B6 X-Spam-Score: -9.37 X-Migadu-Scanner: scn0.migadu.com X-TUID: Q2UlCn+0QOHZ This is a multi-part message in MIME format. --------------DPcrvCCGmbLTnaT5SyW3xuLV Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 27/3/22 01:24, Josselin Poiret wrote: > Hello Brendan, > > Brendan Tildesley writes: >> I would like to replace pulseaudio with pipewire as the default in >> %desktop-services, the only hurdle is how to launch the user daemons in all the >> different desktop configurations one might use. Other distros use systemd's >> socket activation to magically launch pipewire. >> >> Otherwise XDG autostarts or some kind of guix home service could >> launch it? > The main issue for PipeWire is that it really doesn't support running a > single system-wide daemon as we're doing with PulseAudio, so you would > need to launch it through XDG autostart, guix home or something similar > like you said! I think this is not right. Pulseaudio and Pipewire are both "user services". The Guix (pulseaudio-service-type) merely sets up some global configuration files and evironment variables. Actually these could be a part of the user profile if one really wanted. The only parts that actually need to be done by root is the udev service and the alsa service setting two configuration files. Pulseaudio is automatically started by applications that make use of it via DBUS. I don't understand how that works, but for whatever reason Pipewire's official way to launch is via systemd sockets. Systems without systemd use XDG autolaunch with a trivial script like this one: https://gitweb.gentoo.org/repo/gentoo.git/tree/media-video/pipewire/files/gentoo-pipewire-launcher.in So it is not difficult at all to run Pipewire, just a method must be chosen. > > One thing that I think is blocking right now is that PipeWire (or > actually WirePlumber, I don't remember) would need to see some > environment variables set by other user services eg. session D-Bus or > even the compositor, which isn't possible yet with Shepherd. Which environment variables are you talking about? I'm running pipewire on Guix System and it seems to work fine. > Best, --------------DPcrvCCGmbLTnaT5SyW3xuLV Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

    
On 27/3/22 01:24, Josselin Poiret wrote:
Hello Brendan,

Brendan Tildesley <mail@brendan.scot> writes:
I would like to replace pulseaudio with pipewire as the default in
%desktop-services, the only hurdle is how to launch the user daemons in all the
different desktop configurations one might use. Other distros use systemd's
socket activation to magically launch pipewire.

Otherwise XDG autostarts or some kind of guix home service could
launch it?
The main issue for PipeWire is that it really doesn't support running a
single system-wide daemon as we're doing with PulseAudio, so you would
need to launch it through XDG autostart, guix home or something similar
like you said!
I think this is not right. Pulseaudio and Pipewire are both "user services".
The Guix (pulseaudio-service-type) merely sets up some global configuration files
and evironment variables. Actually these could be a part of the user profile if one
really wanted. The only parts that actually need to be done by root is the udev service
and the alsa service setting two configuration files.

Pulseaudio is automatically started by applications that make use of it via DBUS.
I don't understand how that works, but for whatever reason Pipewire's official way
to launch is via systemd sockets. Systems without systemd use XDG autolaunch with a
trivial script like this one:
https://gitweb.gentoo.org/repo/gentoo.git/tree/media-video/pipewire/files/gentoo-pipewire-launcher.in

So it is not difficult at all to run Pipewire, just a method must be chosen.

One thing that I think is blocking right now is that PipeWire (or
actually WirePlumber, I don't remember) would need to see some
environment variables set by other user services eg. session D-Bus or
even the compositor, which isn't possible yet with Shepherd.
Which environment variables are you talking about? I'm running pipewire on Guix System
and it seems to work fine.
Best,
--------------DPcrvCCGmbLTnaT5SyW3xuLV--