1 |
On 04/11/17 21:23, Rich Freeman wrote: |
2 |
> On Sat, Nov 4, 2017 at 2:17 PM, Nikos Chantziaras <realnc@×××××.com> wrote: |
3 |
>> [...] The only problem I have with systemd is that it's unable to |
4 |
>> reliably restore the ALSA mixer volumes/settings on startup. It fails 50% of |
5 |
>> the time. Which is very annoying, but not the end of the world. |
6 |
> |
7 |
> Out of curiosity - are you using alsa-state or alsa-restore? |
8 |
> Apparently alsa provides two different ways of preserving state. You |
9 |
> might consider switching them (which is triggered by the existence of |
10 |
> /etc/alsa/state-daemon.conf - but it might have some other |
11 |
> requirements which I didn't bother to check on). |
12 |
|
13 |
alsa-restore. It claims to do exactly what I want, run: |
14 |
|
15 |
/usr/sbin/alsactl restore |
16 |
|
17 |
at startup. |
18 |
|
19 |
|
20 |
> With any save/restore tool like these I always keep a copy of the |
21 |
> state somewhere where it doesn't get overwritten at shutdown if I have |
22 |
> a complex configuration. |
23 |
Well, the thing is that the state is not getting overwritten. When |
24 |
during boot systemd fails to restore the volumes, the state is still |
25 |
fine and I can manually run: |
26 |
|
27 |
/usr/sbin/alsactl restore |
28 |
|
29 |
and restore the volumes. This sounds like some sort of race condition |
30 |
where something else is calling "alsactl init", so sometimes "restore" |
31 |
happens after "init", which results in my volumes getting restores, and |
32 |
sometimes "init" happens after "restore", which gives me default volume |
33 |
levels. |