[systemd-devel] alsa-restore.service seems to be too early
lennart at poettering.net
Mon Sep 10 18:12:22 PDT 2012
On Mon, 03.09.12 14:34, Вечный Студент (student975 at yandex.ru) wrote:
> 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
> sleep 1
> /usr/sbin/alsactl restore
What is the problem here? Why do you need the sleep 1? Normally
/usr/lib/udev/rules.d/90-alsa-restore.rules (which is shipped as part of
ALSA) should just make this all work. It will fix the volumes as soon as
the control device shows up.
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel