From 35c01cf29b5a99907334e9c8baeae658c85e2ecc Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Sun, 14 Jan 2024 17:57:12 -0800 Subject: [PATCH] feat: Make wireplumber write-able for later use with steamdeck-dsp --- Containerfile | 1 + .../system/wireplumber-workaround.service | 17 +++++++++++++++++ .../lib/tmpfiles.d/wireplumber-workaround.conf | 1 + 3 files changed, 19 insertions(+) create mode 100644 system_files/deck/shared/usr/lib/systemd/system/wireplumber-workaround.service create mode 100644 system_files/deck/shared/usr/lib/tmpfiles.d/wireplumber-workaround.conf diff --git a/Containerfile b/Containerfile index 60881d7b..ebb729b6 100644 --- a/Containerfile +++ b/Containerfile @@ -645,6 +645,7 @@ RUN /tmp/image-info.sh && \ systemctl disable gdm.service && \ systemctl enable sddm.service \ ; fi && \ + systemctl enable wireplumber-workaround.service && \ systemctl enable bazzite-autologin.service && \ systemctl enable wireplumber-sysconf.service && \ systemctl enable btrfs-dedup@run-media-mmcblk0p1.timer && \ diff --git a/system_files/deck/shared/usr/lib/systemd/system/wireplumber-workaround.service b/system_files/deck/shared/usr/lib/systemd/system/wireplumber-workaround.service new file mode 100644 index 00000000..10694c92 --- /dev/null +++ b/system_files/deck/shared/usr/lib/systemd/system/wireplumber-workaround.service @@ -0,0 +1,17 @@ +[Unit] +Description=Workaround wireplumber needing to be written into by steamdeck-dsp +ConditionPathExists=/usr/share/wireplumber +After=local-fs.target + +[Service] +Type=oneshot +# Copy if it doesn't exist +ExecStartPre=/usr/bin/bash -c "[ -d /usr/local/share/.wireplumber ] || /usr/bin/cp -r /usr/share/wireplumber /usr/local/share/.wireplumber" +ExecStart=/usr/bin/mount --bind /usr/local/share/.wireplumber /usr/share/wireplumber +# Clean-up after ourselves +ExecStop=/usr/bin/umount /usr/share/wireplumber +ExecStop=/usr/bin/rm -r /usr/local/share/.wireplumber +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target diff --git a/system_files/deck/shared/usr/lib/tmpfiles.d/wireplumber-workaround.conf b/system_files/deck/shared/usr/lib/tmpfiles.d/wireplumber-workaround.conf new file mode 100644 index 00000000..7ed88256 --- /dev/null +++ b/system_files/deck/shared/usr/lib/tmpfiles.d/wireplumber-workaround.conf @@ -0,0 +1 @@ +C /usr/local/share/.wireplumber - - - - /usr/share/wireplumber