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

Attachment: signature.asc
Description: PGP signature

Reply via email to