[systemd-devel] alsa-restore.service seems to be too early

Вечный Студент student975 at yandex.ru
Mon Sep 3 03:34:25 PDT 2012


03.09.2012, 13:48, "Colin Guthrie" <gmane at colin.guthr.ie>:
> Then you should probably try and debug this further - e.g. by rmmod'ing
> the module and inserting it and trying to work out why it's not run. You
> can always replace the rule with one that runs a script instead that
> writes debugging info or similar.
>
> In theory the control device should appear last to udev (something which
> we had to fight with a few years back with PulseAudio). When the control
> device appears it should be all ready. The only complication that I can
> think of is that there might be some kind of firmware loading issue that
> means that the control device appears before the device can really be used.
>
> If you do replace it with a script, try introducing a sleep in it

Yes, thanks, sleeping does help (the card under question is the second one, i.e. with suffix '1'):

~ $ cat /etc/udev/rules.d/99-zlocal.rules | grep alsa
ACTION=="add", SUBSYSTEM=="sound", KERNEL=="controlC1", KERNELS=="card1", RUN+="/usr/local/bin/realsa.sh"
~ $ cat /usr/local/bin/realsa.sh
#!/bin/bash

sleep 1
/usr/sbin/alsactl restore

> to
> give the firmware time to load - this isn't a solution of course, but it
> might help work out if it's a timing thing and that, in turn, might
> highlight where the real solution lies.

Sorry, I don't see real solution yet :)


More information about the systemd-devel mailing list