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

Вечный Студент student975 at yandex.ru
Sun Sep 2 10:16:24 PDT 2012


On 02.09.2012 20:17, Zbigniew Jędrzejewski-Szmek wrote:
> In general it is not possible to predict when the sound cards will
> appear in the system.  Maybe they are connected over USB and the user
> will plug them in one hour after start. So synchronizing to fixed
> point in the boot sequence is guaranteed to fail in the general case.
> Proper way is to make the restoration based on proper udev events.

In accordance with

~ $ find /sys -name snd_hdsp
/sys/bus/pci/drivers/snd_hdsp
/sys/module/snd/holders/snd_hdsp
/sys/module/snd_hwdep/holders/snd_hdsp
/sys/module/snd_page_alloc/holders/snd_hdsp
/sys/module/snd_pcm/holders/snd_hdsp
/sys/module/snd_rawmidi/holders/snd_hdsp
/sys/module/snd_hdsp

(and digging in the paths with udevadm info) I have tried these two rules:

ACTION=="add", KERNEL=="snd_hdsp", SUBSYSTEM="drivers" RUN+="/usr/sbin/alsactl restore"
ACTION=="add", KERNEL=="snd_hdsp", SUBSYSTEM="module" RUN+="/usr/sbin/alsactl restore"

But they didn't help. It seems "add" is triggered earlier rather a card is initialized. Can not understand which other events can be used here.




More information about the systemd-devel mailing list