* [PATCH] alsactl: Check existence of `alsactl` in udev rule @ 2016-12-28 22:31 Paul Menzel 2016-12-29 13:28 ` Takashi Iwai 0 siblings, 1 reply; 4+ messages in thread From: Paul Menzel @ 2016-12-28 22:31 UTC (permalink / raw) To: alsa-devel; +Cc: Jordi Mallach [-- Attachment #1.1: Type: text/plain, Size: 1536 bytes --] From: Jordi Mallach <jordi@debian.org> Date: Thu, 10 Jan 2013 00:17:58 +0000 Include the line `TEST=="/usr/sbin/alsactl"` in the udev rule, to properly fix the state restoring for users with split `/usr` filesystems [1]. Upstream the patch from the Debian package [2]. [1] https://bugs.debian.org/670490 "Debian Bug report logs - #670490 alsa-utils: Restore sound volume in udev" [2] https://sources.debian.net/src/alsa-utils/1.1.2-1/debian/patches/udev_test_alsactl.patch/ Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net> CC: Jordi Mallach <jordi@debian.org> --- Please apply with `git am saved-messages.mbox`. alsactl/90-alsa-restore.rules.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/alsactl/90-alsa-restore.rules.in b/alsactl/90-alsa-restore.rules.in index c0c1b23..f190b85 100644 --- a/alsactl/90-alsa-restore.rules.in +++ b/alsactl/90-alsa-restore.rules.in @@ -2,7 +2,7 @@ ACTION=="add", SUBSYSTEM=="sound", KERNEL=="controlC*", KERNELS!="card*", TEST== GOTO="alsa_restore_end" LABEL="alsa_restore_go" -TEST!="@daemonswitch@", RUN+="@sbindir@/alsactl restore $attr{device/number}" -TEST=="@daemonswitch@", RUN+="@sbindir@/alsactl nrestore $attr{device/number}" +TEST!="@daemonswitch@", TEST=="@sbindir@/alsactl", RUN+="@sbindir@/alsactl restore $attr{device/number}" +TEST=="@daemonswitch@", TEST=="@sbindir@/alsactl", RUN+="@sbindir@/alsactl nrestore $attr{device/number}" LABEL="alsa_restore_end" -- 2.11.0 [-- Attachment #1.2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 195 bytes --] [-- Attachment #2: Type: text/plain, Size: 0 bytes --] ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] alsactl: Check existence of `alsactl` in udev rule 2016-12-28 22:31 [PATCH] alsactl: Check existence of `alsactl` in udev rule Paul Menzel @ 2016-12-29 13:28 ` Takashi Iwai 2016-12-30 10:04 ` Paul Menzel 0 siblings, 1 reply; 4+ messages in thread From: Takashi Iwai @ 2016-12-29 13:28 UTC (permalink / raw) To: Paul Menzel; +Cc: alsa-devel, Jordi Mallach On Wed, 28 Dec 2016 23:31:15 +0100, Paul Menzel wrote: > > From: Jordi Mallach <jordi@debian.org> > Date: Thu, 10 Jan 2013 00:17:58 +0000 > > Include the line `TEST=="/usr/sbin/alsactl"` in the udev rule, to > properly fix the state restoring for users with split `/usr` > filesystems > [1]. This doesn't sound like a real "fix". It means that the whole save/restore mechanism will be silently lost, right? thanks, Takashi > > Upstream the patch from the Debian package [2]. > > [1] https://bugs.debian.org/670490 > "Debian Bug report logs - #670490 alsa-utils: Restore sound volume > in udev" > [2] https://sources.debian.net/src/alsa-utils/1.1.2-1/debian/patches/udev_test_alsactl.patch/ > > Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net> > CC: Jordi Mallach <jordi@debian.org> > --- > Please apply with `git am saved-messages.mbox`. > > alsactl/90-alsa-restore.rules.in | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/alsactl/90-alsa-restore.rules.in b/alsactl/90-alsa-restore.rules.in > index c0c1b23..f190b85 100644 > --- a/alsactl/90-alsa-restore.rules.in > +++ b/alsactl/90-alsa-restore.rules.in > @@ -2,7 +2,7 @@ ACTION=="add", SUBSYSTEM=="sound", KERNEL=="controlC*", KERNELS!="card*", TEST== > GOTO="alsa_restore_end" > > LABEL="alsa_restore_go" > -TEST!="@daemonswitch@", RUN+="@sbindir@/alsactl restore $attr{device/number}" > -TEST=="@daemonswitch@", RUN+="@sbindir@/alsactl nrestore $attr{device/number}" > +TEST!="@daemonswitch@", TEST=="@sbindir@/alsactl", RUN+="@sbindir@/alsactl restore $attr{device/number}" > +TEST=="@daemonswitch@", TEST=="@sbindir@/alsactl", RUN+="@sbindir@/alsactl nrestore $attr{device/number}" > > LABEL="alsa_restore_end" > -- > 2.11.0 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] alsactl: Check existence of `alsactl` in udev rule 2016-12-29 13:28 ` Takashi Iwai @ 2016-12-30 10:04 ` Paul Menzel 2016-12-30 10:16 ` Takashi Iwai 0 siblings, 1 reply; 4+ messages in thread From: Paul Menzel @ 2016-12-30 10:04 UTC (permalink / raw) To: Takashi Iwai; +Cc: alsa-devel, Jordi Mallach [-- Attachment #1.1: Type: text/plain, Size: 2557 bytes --] Am Donnerstag, den 29.12.2016, 14:28 +0100 schrieb Takashi Iwai: > On Wed, 28 Dec 2016 23:31:15 +0100, > Paul Menzel wrote: > > > > From: Jordi Mallach <jordi@debian.org> > > Date: Thu, 10 Jan 2013 00:17:58 +0000 > > > > Include the line `TEST=="/usr/sbin/alsactl"` in the udev rule, to > > properly fix the state restoring for users with split `/usr` > > filesystems > > [1]. > > This doesn't sound like a real "fix". It means that the whole > save/restore mechanism will be silently lost, right? Well, if the binary `alsactl` is not available, it shouldn’t be run. But you are right, it depends on the system setup, what happens. See the description of commit de7c3eff (alsactl: systemd and udev hookup). > - At boot the asound.state file might not be readable, since it resides > on a different file system. That means exclusively restoring sound card > settings from udev rules will no suffice, since if the rule is > executed at early boot (for example within udev settle) then the file > will no be readable and cannot be restored. Thanks, Paul > > Upstream the patch from the Debian package [2]. > > > > [1] https://bugs.debian.org/670490 > > "Debian Bug report logs - #670490 alsa-utils: Restore sound volume > > in udev" > > [2] https://sources.debian.net/src/alsa-utils/1.1.2-1/debian/patches/udev_test_alsactl.patch/ > > > > Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net> > > CC: Jordi Mallach <jordi@debian.org> > > --- > > Please apply with `git am saved-messages.mbox`. > > > > alsactl/90-alsa-restore.rules.in | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/alsactl/90-alsa-restore.rules.in b/alsactl/90-alsa-restore.rules.in > > index c0c1b23..f190b85 100644 > > --- a/alsactl/90-alsa-restore.rules.in > > +++ b/alsactl/90-alsa-restore.rules.in > > @@ -2,7 +2,7 @@ ACTION=="add", SUBSYSTEM=="sound", KERNEL=="controlC*", KERNELS!="card*", TEST== > > GOTO="alsa_restore_end" > > > > LABEL="alsa_restore_go" > > -TEST!="@daemonswitch@", RUN+="@sbindir@/alsactl restore $attr{device/number}" > > -TEST=="@daemonswitch@", RUN+="@sbindir@/alsactl nrestore $attr{device/number}" > > +TEST!="@daemonswitch@", TEST=="@sbindir@/alsactl", RUN+="@sbindir@/alsactl restore $attr{device/number}" > > +TEST=="@daemonswitch@", TEST=="@sbindir@/alsactl", RUN+="@sbindir@/alsactl nrestore $attr{device/number}" > > > > LABEL="alsa_restore_end" > > -- > > 2.11.0 [-- Attachment #1.2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 195 bytes --] [-- Attachment #2: Type: text/plain, Size: 0 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] alsactl: Check existence of `alsactl` in udev rule 2016-12-30 10:04 ` Paul Menzel @ 2016-12-30 10:16 ` Takashi Iwai 0 siblings, 0 replies; 4+ messages in thread From: Takashi Iwai @ 2016-12-30 10:16 UTC (permalink / raw) To: Paul Menzel; +Cc: alsa-devel, Jordi Mallach On Fri, 30 Dec 2016 11:04:54 +0100, Paul Menzel wrote: > > Am Donnerstag, den 29.12.2016, 14:28 +0100 schrieb Takashi Iwai: > > On Wed, 28 Dec 2016 23:31:15 +0100, > > Paul Menzel wrote: > > > > > > From: Jordi Mallach <jordi@debian.org> > > > Date: Thu, 10 Jan 2013 00:17:58 +0000 > > > > > > Include the line `TEST=="/usr/sbin/alsactl"` in the udev rule, to > > > properly fix the state restoring for users with split `/usr` > > > filesystems > > > [1]. > > > > This doesn't sound like a real "fix". It means that the whole > > save/restore mechanism will be silently lost, right? > > Well, if the binary `alsactl` is not available, it shouldn’t be run. > > But you are right, it depends on the system setup, what happens. > > See the description of commit de7c3eff (alsactl: systemd and udev > hookup). > > > - At boot the asound.state file might not be readable, since it resides > > on a different file system. That means exclusively restoring sound card > > settings from udev rules will no suffice, since if the rule is > > executed at early boot (for example within udev settle) then the file > > will no be readable and cannot be restored. Yeah, if you allow a separate /usr partition to be mounted later, all stuff executed in udev rules should be put in either /bin or /sbin. The same is true for /var/lib/alsa. And yet the question is whether we should suppress the error in such a case. When suppressed, user might not notice what went wrong. Meanwhile an error message is annoying if you know it. Takashi > > > Thanks, > > Paul > > > > > Upstream the patch from the Debian package [2]. > > > > > > [1] https://bugs.debian.org/670490 > > > "Debian Bug report logs - #670490 alsa-utils: Restore sound volume > > > in udev" > > > [2] https://sources.debian.net/src/alsa-utils/1.1.2-1/debian/patches/udev_test_alsactl.patch/ > > > > > > Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net> > > > CC: Jordi Mallach <jordi@debian.org> > > > --- > > > Please apply with `git am saved-messages.mbox`. > > > > > > alsactl/90-alsa-restore.rules.in | 4 ++-- > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > diff --git a/alsactl/90-alsa-restore.rules.in b/alsactl/90-alsa-restore.rules.in > > > index c0c1b23..f190b85 100644 > > > --- a/alsactl/90-alsa-restore.rules.in > > > +++ b/alsactl/90-alsa-restore.rules.in > > > @@ -2,7 +2,7 @@ ACTION=="add", SUBSYSTEM=="sound", KERNEL=="controlC*", KERNELS!="card*", TEST== > > > GOTO="alsa_restore_end" > > > > > > LABEL="alsa_restore_go" > > > -TEST!="@daemonswitch@", RUN+="@sbindir@/alsactl restore $attr{device/number}" > > > -TEST=="@daemonswitch@", RUN+="@sbindir@/alsactl nrestore $attr{device/number}" > > > +TEST!="@daemonswitch@", TEST=="@sbindir@/alsactl", RUN+="@sbindir@/alsactl restore $attr{device/number}" > > > +TEST=="@daemonswitch@", TEST=="@sbindir@/alsactl", RUN+="@sbindir@/alsactl nrestore $attr{device/number}" > > > > > > LABEL="alsa_restore_end" > > > -- > > > 2.11.0 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-12-30 10:16 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-12-28 22:31 [PATCH] alsactl: Check existence of `alsactl` in udev rule Paul Menzel 2016-12-29 13:28 ` Takashi Iwai 2016-12-30 10:04 ` Paul Menzel 2016-12-30 10:16 ` Takashi Iwai
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.