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

Lennart Poettering lennart at poettering.net
Tue Sep 11 05:12:48 PDT 2012

On Tue, 11.09.12 11:15, Colin Guthrie (gmane at colin.guthr.ie) wrote:

> >> 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
> > 
> > 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. 
> Well I think in this case the problem is that the card somehow doesn't
> accept input until slightly after it advertises itself as being
> available, thus the sleep allows it to work.
> I'm not sure where the real problem lies, whether it's in udev, some
> sort of firmware loading thing, the kernel driver or something else. I
> figured you'd probably have some kind of clue as to where in the stack
> the problem is likely to lie.

Ah, this is a sound card which requires firmware? This appears to be a
broken kernel driver to me. I have the suspicion it should not create
the device nodes before the firmware is around.

Kay, you know the intended behaviour of firmware devices much better,
can you comment on this?


Lennart Poettering - Red Hat, Inc.

More information about the systemd-devel mailing list