[Pkg-alsa-devel] Bug#878401: [systemd] Dependency on /tmp not correctly stated for some sound.target (or /tmp/pulse-* shows up underneath my /tmp mount)

Dominick Grift dac.override at gmail.com
Sun Sep 22 16:40:14 BST 2019


Setting PULSE_RUNTIME_PATH did not do it for me.

I borrowed the following from Fedora, and did:

1. /etc/udev/rules.d/90-alsa-restore.rules:

ACTION=="add", SUBSYSTEM=="sound", KERNEL=="controlC*", KERNELS!="card*", GOTO="alsa_restore_go"
GOTO="alsa_restore_end"

LABEL="alsa_restore_go"
TEST!="/etc/alsa/state-daemon.conf", RUN+="/usr/sbin/alsactl -E HOME=/run/alsa -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.conf --initfile=/usr/share/alsa/init/00main restore /dev/$name"
TEST=="/etc/alsa/state-daemon.conf", RUN+="/usr/sbin/alsactl -E HOME=/run/alsa -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.conf --initfile=/usr/share/alsa/init/00main nrestore /dev/$name"

LABEL="alsa_restore_end"

2. /etc/systemd/system/alsa-state.service:

#
# Note that two different ALSA card state management schemes exist and they
# can be switched using a file exist check - /etc/alsa/state-daemon.conf .
#

[Unit]
Description=Manage Sound Card State (restore and store)
Documentation=man:alsactl(1)
ConditionPathExists=/etc/alsa/state-daemon.conf

[Service]
Type=simple
ExecStart=-/usr/sbin/alsactl -E HOME=/run/alsa -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.conf --initfile=/usr/share/alsa/init/00main -s -n 19 -c rdaemon
ExecStop=-/usr/sbin/alsactl -E HOME=/run/alsa -s kill save_and_quit

3. /etc/systemd/system/alsa-restore.service:

#
# Note that two different ALSA card state management schemes exist and they
# can be switched using a file exist check - /etc/alsa/state-daemon.conf .
#

[Unit]
Description=Save/Restore Sound Card State
Documentation=man:alsactl(1)
ConditionPathExists=!/etc/alsa/state-daemon.conf

[Service]
Type=oneshot
RemainAfterExit=true
ExecStart=-/usr/sbin/alsactl -E HOME=/run/alsa -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.conf --initfile=/usr/share/alsa/init/00main restore
ExecStop=-/usr/sbin/alsactl -E HOME=/run/alsa -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.conf store
StandardOutput=syslog


... seems to work

-- 
Key fingerprint = 5F4D 3CDB D3F8 3652 FBD8 02D5 3B6C 5F1D 2C7B 6B02
https://sks-keyservers.net/pks/lookup?op=get&search=0x3B6C5F1D2C7B6B02
Dominick Grift
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-alsa-devel/attachments/20190922/8a201695/attachment.sig>


More information about the Pkg-alsa-devel mailing list