On 04/11/17 21:23, Rich Freeman wrote:
On Sat, Nov 4, 2017 at 2:17 PM, Nikos Chantziaras <rea...@gmail.com> wrote:
[...] The only problem I have with systemd is that it's unable to
reliably restore the ALSA mixer volumes/settings on startup. It fails 50% of
the time. Which is very annoying, but not the end of the world.

Out of curiosity - are you using alsa-state or alsa-restore?
Apparently alsa provides two different ways of preserving state.  You
might consider switching them (which is triggered by the existence of
/etc/alsa/state-daemon.conf - but it might have some other
requirements which I didn't bother to check on).

alsa-restore. It claims to do exactly what I want, run:

  /usr/sbin/alsactl restore

at startup.


With any save/restore tool like these I always keep a copy of the
state somewhere where it doesn't get overwritten at shutdown if I have
a complex configuration.
Well, the thing is that the state is not getting overwritten. When during boot systemd fails to restore the volumes, the state is still fine and I can manually run:

  /usr/sbin/alsactl restore

and restore the volumes. This sounds like some sort of race condition where something else is calling "alsactl init", so sometimes "restore" happens after "init", which results in my volumes getting restores, and sometimes "init" happens after "restore", which gives me default volume levels.


Reply via email to