[PATCH alsa-utils] alsactl: Make sure the kernel driver loaded before alsa-restore.service

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



alsa-restore.service requires the sound devices having been set up
beforehand.  However, systemd tends to start this service too early
before the driver setup, which leads to the unsuccessful state
restore.

For assuring the kernel driver setup before this service, add the
dependency on sound.target.

BugLink: https://bugzilla.suse.com/show_bug.cgi?id=1179363
Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
---
 alsactl/alsa-restore.service.in | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/alsactl/alsa-restore.service.in b/alsactl/alsa-restore.service.in
index a84c2e842444..104b97a6ef68 100644
--- a/alsactl/alsa-restore.service.in
+++ b/alsactl/alsa-restore.service.in
@@ -8,6 +8,8 @@ Description=Save/Restore Sound Card State
 ConditionPathExists=!@daemonswitch@
 ConditionPathExistsGlob=/dev/snd/control*
 ConditionPathExists=@asoundrcfile@
+Requires=sound.target
+After=sound.target
 
 [Service]
 Type=oneshot
-- 
2.26.2




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux