From 5926e592fa5e6290b9f4588939945869adb5c55f Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Wed, 9 Dec 2020 10:56:51 +0100 Subject: [PATCH] udev: Fix sound.target dependency The recent bug report indicated a race at device creation and the sound.target dependencies, and the cause turned out to be the condition of the sound.target trigger. Currently it's set for "card*", but this is actually the parent object; i.e. the sound.target is triggered before the sound devices are created. For assuring the whole sound device creations beforehand, we need to use "controlC*" instead of "card*"; as already described in 78-sound-card.rules, this is guaranteed to be the last device, and can be used as a synchronization point. BugLink: https://bugzilla.suse.com/show_bug.cgi?id=1179363 Signed-off-by: Takashi Iwai --- rules.d/99-systemd.rules.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules.d/99-systemd.rules.in b/rules.d/99-systemd.rules.in index d2f595d18e..7c22eefdb7 100644 --- a/rules.d/99-systemd.rules.in +++ b/rules.d/99-systemd.rules.in @@ -51,7 +51,7 @@ SUBSYSTEM=="bluetooth", TAG+="systemd", ENV{SYSTEMD_ALIAS}+="/sys/subsystem/blue SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0b????:*", ENV{ID_SMARTCARD_READER}="1" ENV{ID_SMARTCARD_READER}=="?*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="smartcard.target", ENV{SYSTEMD_USER_WANTS}+="smartcard.target" -SUBSYSTEM=="sound", KERNEL=="card*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="sound.target", ENV{SYSTEMD_USER_WANTS}+="sound.target" +SUBSYSTEM=="sound", KERNEL=="controlC*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="sound.target", ENV{SYSTEMD_USER_WANTS}+="sound.target" SUBSYSTEM=="printer", TAG+="systemd", ENV{SYSTEMD_WANTS}+="printer.target", ENV{SYSTEMD_USER_WANTS}+="printer.target" SUBSYSTEM=="usb", KERNEL=="lp*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="printer.target", ENV{SYSTEMD_USER_WANTS}+="printer.target"