Another cleaner way of disabling at boot the S/PDIF on MacBook Pros running Tumbleweed and globally is making systemd(1) handles this with a help of a new service and timer as by default alsa tries to restore /var/lib/alsa/asound.state before the sound card driver is entirely loaded by the kernel.
On a root shell:1. Create a new systemd service "/etc/systemd/system/alsa-restore-delayed.service" with the following content after disabling the S/PDIF output (see my first message of this tread):
Code:
[Unit]
Description=Delayed Restore Sound Card State
ConditionPathExists=!/etc/alsa/state-daemon.conf
ConditionPathExistsGlob=/dev/snd/control*
ConditionPathExists=/var/lib/alsa/asound.state
[Service]
Type=oneshot
ExecStart=-/usr/sbin/alsactl restore
2. Create a systemd timer "/etc/systemd/system/alsa-restore-delayed.timer" with the following content:
Code:
[Unit]
Description=Timer Delayed Restore Sound Card State
[Timer]
OnBootSec=30
3. Add the timer at multi-user.target:
Code:
systemctl add-wants multi-user.target alsa-restore-delayed.timer && systemctl daemon-reload
Credits goes to user laurent85
Bookmarks