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 B98C0ADEB; Fri, 11 Jul 2025 02:44:33 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id CA7E7ADD9; Fri, 11 Jul 2025 02:44:30 +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_PASS,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=4.0.1 Received: from mail-qv1-xf33.google.com (mail-qv1-xf33.google.com [IPv6:2607:f8b0:4864:20::f33]) by atuin.qyliss.net (Postfix) with ESMTPS id F01A0ADD7 for ; Fri, 11 Jul 2025 02:44:28 +0000 (UTC) Received: by mail-qv1-xf33.google.com with SMTP id 6a1803df08f44-70478ba562aso30634326d6.1 for ; Thu, 10 Jul 2025 19:44:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1752201866; x=1752806666; darn=spectrum-os.org; h=content-transfer-encoding:in-reply-to:autocrypt:to:content-language :references:subject:from:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=4J0DNqX4ccGB+ef87kkS4Ih0sg0Bjk0ODXC2uzTTgQw=; b=nnkKtir1CnahCBl7WEmbN43B6owBhJSG5ObslqZPJb4Ac/xfZmDOlYtyJxXSBa561R C2hcykipP5vCvukumqOnFLfEC7UZsrXIL8V405C+jMuRpIZlgsSKllpRtbEr20dl9+vZ aTP2Do+GF6nTenTk5to/QyxBjm+4L5D82Dhnp8RRV19vTYg/85+Q/HYRBrApYBmyIZyl P/c9LD90wvgBueBa1W/2oWp3Yh4Q51lwmso7+L0lSxWIbabsVo8OsT2d70x7GdxTEhnz 7d5FwzQIA5YMJaZzelZ8oJbSeber/k58GLMNibWwwThMhA4BYnDQG695ZZgd64neUWl2 Zg0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752201866; x=1752806666; h=content-transfer-encoding:in-reply-to:autocrypt:to:content-language :references:subject:from:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=4J0DNqX4ccGB+ef87kkS4Ih0sg0Bjk0ODXC2uzTTgQw=; b=iIf32NX06iViy73S6fQFI776sOag8RzxLqCD5vcvq5rruOrwhEhR5vjhE8bayaGH/I 8CmT+HPMtpucdZh1u+0PqOeMxa3alMPQ8YnQN7SSMoPTiV73qhS5qf0xwnou15OcH7Oq mJ6PnEkY7PiKU4q5CaIhxyCzbWcWF0WPkvEhA2sxDdx74pB3WETWbYbQyh0SA79CAWie azY4V8A7yiCAfjhQuCZB+97b24mg0igiPKrpllNjSsqR9CSi6dosHyTVlHCEglN8VttM 9mGRvmZ+QampwZNdwrLYa5JugmK9iIDeGvy00gA6vWFh1NM7arFe4HlO1a1kHht/tz6f UhBQ== X-Gm-Message-State: AOJu0Yz3SYxqzYKTy8+g/f5a1zUKv1oK1+HpZ8+r4h3OyNIYGxYXXe0P h4ru838hk2K+/EM88I4mDtQGI6pj+IXM3MzVPe9Kczd/Jt8ae7dQt6J43MYLVqn1 X-Gm-Gg: ASbGncslIfhUKvU88sQuNwPOvwrPbs1iDA94GJPBinESDhA8pDUBNx8E9Q/qUjdDAF3 pgtOX9uY9r6b5+mcqZ3JgtS3Kljtr8gHUlVcS05ChVvuQkQLCiKzjZMyb7Yb6pIQ4pxPNmwh+JE zczO4hhyy9UoxnbpUZJXEZq880bJcYbuCE9izT+K0YjgGKnbmzXeOb+QvDJY3Z0W+Xcs1/ZMja1 8eoK+ocgsACyPEAxCm7lBLs/HYXP6uBvM5GGi22400sDW9utSMyLvcJNTdL7+564pCmFl4PBfGX 1Tpk6EYBc2V/JGQXLXaVIYsNmHK6CRQ7avTXA69jAYnlI8XALUzOBdLzakFLCumL+DN0RKT3tj/ +i86HkTtzfNMaBwGQS/4RNYiTf3k= X-Google-Smtp-Source: AGHT+IH2wLPEpkkYzts/+mv6JDYiHQWTHql6E9spjgSV6UFw6A1e4lkGQiaazpBoJ2cTnJ0Oit8AQQ== X-Received: by 2002:a05:6214:450e:b0:701:d74:7d69 with SMTP id 6a1803df08f44-704a401ea29mr26485196d6.21.1752201865317; Thu, 10 Jul 2025 19:44:25 -0700 (PDT) Received: from [10.138.10.6] ([89.187.178.201]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-7049c0a3629sm11303766d6.61.2025.07.10.19.44.24 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 10 Jul 2025 19:44:24 -0700 (PDT) Message-ID: <638beeaa-2351-4f51-81a6-bc58883930c2@gmail.com> Date: Thu, 10 Jul 2025 22:44:22 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Demi Marie Obenour Subject: [PATCH v3] Run PipeWire and WirePlumber in the VMs References: <> Content-Language: en-US To: Spectrum OS Development Autocrypt: addr=demiobenour@gmail.com; keydata= xsFNBFp+A0oBEADffj6anl9/BHhUSxGTICeVl2tob7hPDdhHNgPR4C8xlYt5q49yB+l2nipd aq+4Gk6FZfqC825TKl7eRpUjMriwle4r3R0ydSIGcy4M6eb0IcxmuPYfbWpr/si88QKgyGSV Z7GeNW1UnzTdhYHuFlk8dBSmB1fzhEYEk0RcJqg4AKoq6/3/UorR+FaSuVwT7rqzGrTlscnT DlPWgRzrQ3jssesI7sZLm82E3pJSgaUoCdCOlL7MMPCJwI8JpPlBedRpe9tfVyfu3euTPLPx wcV3L/cfWPGSL4PofBtB8NUU6QwYiQ9Hzx4xOyn67zW73/G0Q2vPPRst8LBDqlxLjbtx/WLR 6h3nBc3eyuZ+q62HS1pJ5EvUT1vjyJ1ySrqtUXWQ4XlZyoEFUfpJxJoN0A9H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8TG+03H8ecU2q50zgHWPdHM OBvy3EhzfAh2VmOSTcRK+tSUe/u3wdLRDPwv/DTzGI36Kgky9MsDC5gpIwNbOJP2G/q1wT1o Gkw4IXfWv2ufWiXqJ+k7HEi2N1sree7Dy9KBCqb+ca1vFhYPDJfhP75I/VnzHVssZ/rYZ9+5 1yDoUABoNdJNSGUYl+Yh9Pw9pE3Kt4EFzUlFZWbE4xKL/NPno+z4J9aWemLLszcYz/u3XnbO vUSQHSrmfOzX3cV4yfmjM5lewgSstoxGyTx2M8enslgdXhPthZlDnTnOT+C+OTsh8+m5tos8 HQjaPM01MKBiAqdPgksm1wu2DrrwUi6ChRVTUBcj6+/9IJ81H2P2gJk3Ls3AVIxIffLoY34E +MYSfkEjBz0E8CLOcAw7JIwAaeBT In-Reply-To: <> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-ID-Hash: K54FUBKKNEPVL6VFJEKAPPYAE7E7JU3N X-Message-ID-Hash: K54FUBKKNEPVL6VFJEKAPPYAE7E7JU3N X-MailFrom: demiobenour@gmail.com 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 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: 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. Signed-off-by: Demi Marie Obenour --- Changes since v2: Enable PipeWire's PulseAudio emulation. img/app/Makefile | 19 +- img/app/default.nix | 3 + img/app/etc/fstab | 5 +- .../pipewire.conf.d/90_enable_pulseaudio.conf | 172 ++++++++++++++++++ .../etc/s6-rc/app/dependencies.d/wireplumber | 0 .../app/dependencies.d/wireplumber.license | 2 + img/app/etc/s6-rc/directories/type | 1 + img/app/etc/s6-rc/directories/type.license | 2 + img/app/etc/s6-rc/directories/up | 11 ++ .../s6-rc/pipewire/dependencies.d/directories | 0 .../dependencies.d/directories.license | 2 + img/app/etc/s6-rc/pipewire/notification-fd | 1 + .../s6-rc/pipewire/notification-fd.license | 2 + img/app/etc/s6-rc/pipewire/run | 20 ++ img/app/etc/s6-rc/pipewire/type | 1 + img/app/etc/s6-rc/pipewire/type.license | 2 + .../dependencies.d/directories | 0 .../dependencies.d/directories.license | 2 + img/app/etc/s6-rc/wayland-proxy-virtwl/run | 11 -- .../etc/s6-rc/wireplumber/dependencies.d/dbus | 0 .../wireplumber/dependencies.d/dbus.license | 2 + .../s6-rc/wireplumber/dependencies.d/pipewire | 0 .../dependencies.d/pipewire.license | 2 + img/app/etc/s6-rc/wireplumber/run | 4 + img/app/etc/s6-rc/wireplumber/type | 1 + img/app/etc/s6-rc/wireplumber/type.license | 2 + 26 files changed, 251 insertions(+), 16 deletions(-) create mode 100644 img/app/etc/pipewire/pipewire.conf.d/90_enable_pulseaudio.conf create mode 100644 img/app/etc/s6-rc/app/dependencies.d/wireplumber create mode 100644 img/app/etc/s6-rc/app/dependencies.d/wireplumber.license create mode 100644 img/app/etc/s6-rc/directories/type create mode 100644 img/app/etc/s6-rc/directories/type.license create mode 100644 img/app/etc/s6-rc/directories/up create mode 100644 img/app/etc/s6-rc/pipewire/dependencies.d/directories create mode 100644 img/app/etc/s6-rc/pipewire/dependencies.d/directories.license create mode 100644 img/app/etc/s6-rc/pipewire/notification-fd create mode 100644 img/app/etc/s6-rc/pipewire/notification-fd.license create mode 100644 img/app/etc/s6-rc/pipewire/run create mode 100644 img/app/etc/s6-rc/pipewire/type create mode 100644 img/app/etc/s6-rc/pipewire/type.license create mode 100644 img/app/etc/s6-rc/wayland-proxy-virtwl/dependencies.d/directories create mode 100644 img/app/etc/s6-rc/wayland-proxy-virtwl/dependencies.d/directories.license create mode 100644 img/app/etc/s6-rc/wireplumber/dependencies.d/dbus create mode 100644 img/app/etc/s6-rc/wireplumber/dependencies.d/dbus.license create mode 100644 img/app/etc/s6-rc/wireplumber/dependencies.d/pipewire create mode 100644 img/app/etc/s6-rc/wireplumber/dependencies.d/pipewire.license create mode 100644 img/app/etc/s6-rc/wireplumber/run create mode 100644 img/app/etc/s6-rc/wireplumber/type create mode 100644 img/app/etc/s6-rc/wireplumber/type.license diff --git a/img/app/Makefile b/img/app/Makefile index f818e91..8144518 100644 --- a/img/app/Makefile +++ b/img/app/Makefile @@ -53,7 +53,8 @@ VM_FILES = \ etc/s6-linux-init/scripts/rc.init \ etc/s6-linux-init/scripts/rc.shutdown \ etc/s6-linux-init/scripts/rc.shutdown.final \ - etc/xdg/xdg-desktop-portal/portals.conf + etc/xdg/xdg-desktop-portal/portals.conf \ + etc/pipewire/pipewire.conf.d/90_enable_pulseaudio.conf VM_DIRS = dev run proc sys tmp \ etc/s6-linux-init/run-image/service VM_FIFOS = etc/s6-linux-init/run-image/service/s6-linux-init-shutdownd/fifo @@ -83,22 +84,34 @@ build/rootfs.erofs: ../../scripts/make-erofs.sh $(VM_FILES) $(VM_BUILD_FILES) bu VM_S6_RC_FILES = \ etc/s6-rc/app/dependencies.d/dbus \ etc/s6-rc/app/dependencies.d/wayland-proxy-virtwl \ + etc/s6-rc/app/dependencies.d/wireplumber \ etc/s6-rc/app/run \ etc/s6-rc/app/type \ etc/s6-rc/dbus/notification-fd \ etc/s6-rc/dbus/run \ etc/s6-rc/dbus/type \ + etc/s6-rc/directories/type \ + etc/s6-rc/directories/up \ etc/s6-rc/mdevd-coldplug/dependencies \ etc/s6-rc/mdevd-coldplug/type \ etc/s6-rc/mdevd-coldplug/up \ etc/s6-rc/mdevd/notification-fd \ etc/s6-rc/mdevd/run \ etc/s6-rc/mdevd/type \ + etc/s6-rc/ok-all/contents \ + etc/s6-rc/ok-all/type \ + etc/s6-rc/pipewire/dependencies.d/directories \ + etc/s6-rc/pipewire/notification-fd \ + etc/s6-rc/pipewire/run \ + etc/s6-rc/pipewire/type \ + etc/s6-rc/wayland-proxy-virtwl/dependencies.d/directories \ etc/s6-rc/wayland-proxy-virtwl/notification-fd \ etc/s6-rc/wayland-proxy-virtwl/run \ etc/s6-rc/wayland-proxy-virtwl/type \ - etc/s6-rc/ok-all/contents \ - etc/s6-rc/ok-all/type + etc/s6-rc/wireplumber/dependencies.d/dbus \ + etc/s6-rc/wireplumber/dependencies.d/pipewire \ + etc/s6-rc/wireplumber/run \ + etc/s6-rc/wireplumber/type build/etc/s6-rc: $(VM_S6_RC_FILES) mkdir -p $$(dirname $@) diff --git a/img/app/default.nix b/img/app/default.nix index 740643a..d3eed1f 100644 --- a/img/app/default.nix +++ b/img/app/default.nix @@ -48,6 +48,9 @@ let pkgs.xwayland pkgs.xdg-desktop-portal pkgs.xdg-desktop-portal-gtk + # Depends on pulseaudio libs + pkgs.pipewire + pkgs.wireplumber ]; })).fhsenv; in diff --git a/img/app/etc/fstab b/img/app/etc/fstab index a95088b..40aa3bd 100644 --- a/img/app/etc/fstab +++ b/img/app/etc/fstab @@ -1,7 +1,8 @@ # SPDX-License-Identifier: CC0-1.0 # SPDX-FileCopyrightText: 2020-2022 Alyssa Ross proc /proc proc defaults 0 0 -devpts /dev/pts devpts defaults,gid=4,mode=620 0 0 +devpts /dev/pts devpts defaults,gid=4,mode=620 0 0 tmpfs /dev/shm tmpfs defaults 0 0 sysfs /sys sysfs defaults 0 0 -tmpfs /tmp tmpfs defaults 0 0 +tmpfs /tmp tmpfs defaults,mode=1755 0 0 +tmpfs /run tmpfs defaults 0 0 diff --git a/img/app/etc/pipewire/pipewire.conf.d/90_enable_pulseaudio.conf b/img/app/etc/pipewire/pipewire.conf.d/90_enable_pulseaudio.conf new file mode 100644 index 0000000..a5b86a6 --- /dev/null +++ b/img/app/etc/pipewire/pipewire.conf.d/90_enable_pulseaudio.conf @@ -0,0 +1,172 @@ +# SPDX-License-Identifier: MIT +# SPDX-FileCopyrightText: Copyright © 2018 Wim Taymans + +# Copyright © 2018 Wim Taymans +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice (including the next +# paragraph) shall be included in all copies or substantial portions of the +# Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +# PulseAudio config file for PipeWire version "1.4.2" # +# +# Copy and edit this file in /etc/pipewire for system-wide changes +# or in ~/.config/pipewire for local changes. +# +# It is also possible to place a file with an updated section in +# /etc/pipewire/pipewire-pulse.conf.d/ for system-wide changes or in +# ~/.config/pipewire/pipewire-pulse.conf.d/ for local changes. +# + +context.modules = [ + { name = libpipewire-module-protocol-pulse + args = { + # contents of pulse.properties can also be placed here + # to have config per server. + } + } +] + +# Extra commands can be executed here. +# load-module : loads a module with args and flags +# args = " " +# ( flags = [ nofail ] ) +# ( condition = [ { = , ... } ... ] ) +# conditions will check the pulse.properties key/values. +pulse.cmd = [ + { cmd = "load-module" args = "module-always-sink" flags = [ ] + condition = [ { pulse.cmd.always-sink = !false } ] } + { cmd = "load-module" args = "module-device-manager" flags = [ ] + condition = [ { pulse.cmd.device-manager = !false } ] } + { cmd = "load-module" args = "module-device-restore" flags = [ ] + condition = [ { pulse.cmd.device-restore = !false } ] } + { cmd = "load-module" args = "module-stream-restore" flags = [ ] + condition = [ { pulse.cmd.stream-restore = !false } ] } + #{ cmd = "load-module" args = "module-switch-on-connect" } + #{ cmd = "load-module" args = "module-gsettings" flags = [ nofail ] } +] + +stream.properties = { + #node.latency = 1024/48000 + #node.autoconnect = true + #resample.quality = 4 + #channelmix.normalize = false + #channelmix.mix-lfe = true + #channelmix.upmix = true + #channelmix.upmix-method = psd # none, simple + #channelmix.lfe-cutoff = 150 + #channelmix.fc-cutoff = 12000 + #channelmix.rear-delay = 12.0 + #channelmix.stereo-widen = 0.0 + #channelmix.hilbert-taps = 0 + #dither.noise = 0 +} + +pulse.properties = { + # the addresses this server listens on + server.address = [ + "unix:native" + #"unix:/tmp/something" # absolute paths may be used + #"tcp:4713" # IPv4 and IPv6 on all addresses + #"tcp:[::]:9999" # IPv6 on all addresses + #"tcp:127.0.0.1:8888" # IPv4 on a single address + # + #{ address = "tcp:4713" # address + # max-clients = 64 # maximum number of clients + # listen-backlog = 32 # backlog in the server listen queue + # client.access = "restricted" # permissions for clients + #} + ] + #server.dbus-name = "org.pulseaudio.Server" + #pulse.allow-module-loading = true + #pulse.min.req = 128/48000 # 2.7ms + #pulse.default.req = 960/48000 # 20 milliseconds + #pulse.min.frag = 128/48000 # 2.7ms + #pulse.default.frag = 96000/48000 # 2 seconds + #pulse.default.tlength = 96000/48000 # 2 seconds + #pulse.min.quantum = 128/48000 # 2.7ms + #pulse.idle.timeout = 0 # don't pause after underruns + #pulse.default.format = F32 + #pulse.default.position = [ FL FR ] +} + +pulse.properties.rules = [ + { matches = [ { cpu.vm.name = !null } ] + actions = { + update-props = { + # These overrides are only applied when running in a vm. + pulse.min.quantum = 1024/48000 # 22ms + } + } + } +] + +# client/stream specific properties +pulse.rules = [ + { + matches = [ + { + # all keys must match the value. ! negates. ~ starts regex. + #client.name = "Firefox" + #application.process.binary = "teams" + #application.name = "~speech-dispatcher.*" + } + ] + actions = { + update-props = { + #node.latency = 512/48000 + } + # Possible quirks:" + # force-s16-info forces sink and source info as S16 format + # remove-capture-dont-move removes the capture DONT_MOVE flag + # block-source-volume blocks updates to source volume + # block-sink-volume blocks updates to sink volume + #quirks = [ ] + } + } + { + # skype does not want to use devices that don't have an S16 sample format. + matches = [ + { application.process.binary = "teams" } + { application.process.binary = "teams-insiders" } + { application.process.binary = "teams-for-linux" } + { application.process.binary = "skypeforlinux" } + ] + actions = { quirks = [ force-s16-info ] } + } + { + # firefox marks the capture streams as don't move and then they + # can't be moved with pavucontrol or other tools. + matches = [ { application.process.binary = "firefox" } ] + actions = { quirks = [ remove-capture-dont-move ] } + } + { + # speech dispatcher asks for too small latency and then underruns. + matches = [ { application.name = "~speech-dispatcher.*" } ] + actions = { + update-props = { + pulse.min.req = 512/48000 # 10.6ms + pulse.min.quantum = 512/48000 # 10.6ms + pulse.idle.timeout = 5 # pause after 5 seconds of underrun + } + } + } + #{ + # matches = [ { application.process.binary = "Discord" } ] + # actions = { quirks = [ block-source-volume ] } + #} +] diff --git a/img/app/etc/s6-rc/app/dependencies.d/wireplumber b/img/app/etc/s6-rc/app/dependencies.d/wireplumber new file mode 100644 index 0000000..e69de29 diff --git a/img/app/etc/s6-rc/app/dependencies.d/wireplumber.license b/img/app/etc/s6-rc/app/dependencies.d/wireplumber.license new file mode 100644 index 0000000..c4a0586 --- /dev/null +++ b/img/app/etc/s6-rc/app/dependencies.d/wireplumber.license @@ -0,0 +1,2 @@ +SPDX-License-Identifier: CC0-1.0 +SPDX-FileCopyrightText: 2025 Demi Marie Obenour diff --git a/img/app/etc/s6-rc/directories/type b/img/app/etc/s6-rc/directories/type new file mode 100644 index 0000000..bdd22a1 --- /dev/null +++ b/img/app/etc/s6-rc/directories/type @@ -0,0 +1 @@ +oneshot diff --git a/img/app/etc/s6-rc/directories/type.license b/img/app/etc/s6-rc/directories/type.license new file mode 100644 index 0000000..c4a0586 --- /dev/null +++ b/img/app/etc/s6-rc/directories/type.license @@ -0,0 +1,2 @@ +SPDX-License-Identifier: CC0-1.0 +SPDX-FileCopyrightText: 2025 Demi Marie Obenour diff --git a/img/app/etc/s6-rc/directories/up b/img/app/etc/s6-rc/directories/up new file mode 100644 index 0000000..2396fad --- /dev/null +++ b/img/app/etc/s6-rc/directories/up @@ -0,0 +1,11 @@ +#!/bin/execlineb -P +# SPDX-License-Identifier: EUPL-1.2+ +# SPDX-FileCopyrightText: 2023-2024 Alyssa Ross +# +# Directory creation (if it's copyrightable): +# SPDX-License-Identifier: MIT +# SPDX-FileCopyrightText: 2022 Unikie + +if { mkdir -m 1755 /tmp/.X11-unix } +if { mkdir -m 0755 /run/user } +if { mkdir -m 0700 /run/user/0 } diff --git a/img/app/etc/s6-rc/pipewire/dependencies.d/directories b/img/app/etc/s6-rc/pipewire/dependencies.d/directories new file mode 100644 index 0000000..e69de29 diff --git a/img/app/etc/s6-rc/pipewire/dependencies.d/directories.license b/img/app/etc/s6-rc/pipewire/dependencies.d/directories.license new file mode 100644 index 0000000..c4a0586 --- /dev/null +++ b/img/app/etc/s6-rc/pipewire/dependencies.d/directories.license @@ -0,0 +1,2 @@ +SPDX-License-Identifier: CC0-1.0 +SPDX-FileCopyrightText: 2025 Demi Marie Obenour diff --git a/img/app/etc/s6-rc/pipewire/notification-fd b/img/app/etc/s6-rc/pipewire/notification-fd new file mode 100644 index 0000000..7ed6ff8 --- /dev/null +++ b/img/app/etc/s6-rc/pipewire/notification-fd @@ -0,0 +1 @@ +5 diff --git a/img/app/etc/s6-rc/pipewire/notification-fd.license b/img/app/etc/s6-rc/pipewire/notification-fd.license new file mode 100644 index 0000000..c4a0586 --- /dev/null +++ b/img/app/etc/s6-rc/pipewire/notification-fd.license @@ -0,0 +1,2 @@ +SPDX-License-Identifier: CC0-1.0 +SPDX-FileCopyrightText: 2025 Demi Marie Obenour diff --git a/img/app/etc/s6-rc/pipewire/run b/img/app/etc/s6-rc/pipewire/run new file mode 100644 index 0000000..c0b55a1 --- /dev/null +++ b/img/app/etc/s6-rc/pipewire/run @@ -0,0 +1,20 @@ +#!/bin/execlineb -P +# SPDX-License-Identifier: EUPL-1.2+ +# SPDX-FileCopyrightText: 2023-2024 Alyssa Ross +# SPDX-FileCopyrightText: 2025 Demi Marie Obenour + +s6-ipcserver-socketbinder -B /run/user/0/pipewire-0 +fdmove -c 3 0 + +s6-ipcserver-socketbinder -B /run/user/0/pipewire-0-manager +fdmove -c 4 0 + +redirfd -r 0 /dev/null + +# Notify readiness. +if { fdmove 1 5 echo } +fdclose 5 + +export LISTEN_FDS 2 +getpid LISTEN_PID +pipewire diff --git a/img/app/etc/s6-rc/pipewire/type b/img/app/etc/s6-rc/pipewire/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/img/app/etc/s6-rc/pipewire/type @@ -0,0 +1 @@ +longrun diff --git a/img/app/etc/s6-rc/pipewire/type.license b/img/app/etc/s6-rc/pipewire/type.license new file mode 100644 index 0000000..c4a0586 --- /dev/null +++ b/img/app/etc/s6-rc/pipewire/type.license @@ -0,0 +1,2 @@ +SPDX-License-Identifier: CC0-1.0 +SPDX-FileCopyrightText: 2025 Demi Marie Obenour diff --git a/img/app/etc/s6-rc/wayland-proxy-virtwl/dependencies.d/directories b/img/app/etc/s6-rc/wayland-proxy-virtwl/dependencies.d/directories new file mode 100644 index 0000000..e69de29 diff --git a/img/app/etc/s6-rc/wayland-proxy-virtwl/dependencies.d/directories.license b/img/app/etc/s6-rc/wayland-proxy-virtwl/dependencies.d/directories.license new file mode 100644 index 0000000..c4a0586 --- /dev/null +++ b/img/app/etc/s6-rc/wayland-proxy-virtwl/dependencies.d/directories.license @@ -0,0 +1,2 @@ +SPDX-License-Identifier: CC0-1.0 +SPDX-FileCopyrightText: 2025 Demi Marie Obenour diff --git a/img/app/etc/s6-rc/wayland-proxy-virtwl/run b/img/app/etc/s6-rc/wayland-proxy-virtwl/run index 7b80343..c1e0e08 100755 --- a/img/app/etc/s6-rc/wayland-proxy-virtwl/run +++ b/img/app/etc/s6-rc/wayland-proxy-virtwl/run @@ -1,17 +1,6 @@ #!/bin/execlineb -P # SPDX-License-Identifier: EUPL-1.2+ # SPDX-FileCopyrightText: 2023-2024 Alyssa Ross -# -# Directory creation (if it's copyrightable): -# SPDX-License-Identifier: MIT -# SPDX-FileCopyrightText: 2022 Unikie - -foreground { mkdir /tmp/.X11-unix } -foreground { mkdir /run/user } -foreground { - umask 077 - mkdir /run/user/0 -} s6-ipcserver-socketbinder -B /run/user/0/wayland-0 fdmove -c 3 0 diff --git a/img/app/etc/s6-rc/wireplumber/dependencies.d/dbus b/img/app/etc/s6-rc/wireplumber/dependencies.d/dbus new file mode 100644 index 0000000..e69de29 diff --git a/img/app/etc/s6-rc/wireplumber/dependencies.d/dbus.license b/img/app/etc/s6-rc/wireplumber/dependencies.d/dbus.license new file mode 100644 index 0000000..c4a0586 --- /dev/null +++ b/img/app/etc/s6-rc/wireplumber/dependencies.d/dbus.license @@ -0,0 +1,2 @@ +SPDX-License-Identifier: CC0-1.0 +SPDX-FileCopyrightText: 2025 Demi Marie Obenour diff --git a/img/app/etc/s6-rc/wireplumber/dependencies.d/pipewire b/img/app/etc/s6-rc/wireplumber/dependencies.d/pipewire new file mode 100644 index 0000000..e69de29 diff --git a/img/app/etc/s6-rc/wireplumber/dependencies.d/pipewire.license b/img/app/etc/s6-rc/wireplumber/dependencies.d/pipewire.license new file mode 100644 index 0000000..c4a0586 --- /dev/null +++ b/img/app/etc/s6-rc/wireplumber/dependencies.d/pipewire.license @@ -0,0 +1,2 @@ +SPDX-License-Identifier: CC0-1.0 +SPDX-FileCopyrightText: 2025 Demi Marie Obenour diff --git a/img/app/etc/s6-rc/wireplumber/run b/img/app/etc/s6-rc/wireplumber/run new file mode 100644 index 0000000..e721d8d --- /dev/null +++ b/img/app/etc/s6-rc/wireplumber/run @@ -0,0 +1,4 @@ +#!/bin/execlineb -P +# SPDX-License-Identifier: EUPL-1.2+ +# SPDX-FileCopyrightText: 2025 Demi Marie Obenour +wireplumber diff --git a/img/app/etc/s6-rc/wireplumber/type b/img/app/etc/s6-rc/wireplumber/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/img/app/etc/s6-rc/wireplumber/type @@ -0,0 +1 @@ +longrun diff --git a/img/app/etc/s6-rc/wireplumber/type.license b/img/app/etc/s6-rc/wireplumber/type.license new file mode 100644 index 0000000..c4a0586 --- /dev/null +++ b/img/app/etc/s6-rc/wireplumber/type.license @@ -0,0 +1,2 @@ +SPDX-License-Identifier: CC0-1.0 +SPDX-FileCopyrightText: 2025 Demi Marie Obenour base-commit: 9090caebe25310caa80a13787ef58b1f81658a78 -- Sincerely, Demi Marie Obenour (she/her/hers)