[Pkg-alsa-devel] Bug#848395: Bug#848395: udev rule fails with exit code 99

Paul Menzel pmenzel at molgen.mpg.de
Sat Dec 17 15:01:50 UTC 2016


Dear Elimar,


Thank you very much for your quick reply.


On 2016-12-17 14:10, Elimar Riesebieter wrote:
> Control: tags -1 +moreinfo
> 
> * Paul Menzel <pmenzel at molgen.mpg.de> [2016-12-17 11:03 +0100]:
> 
>> Package: alsa-utils
>> Version: 1.1.2
>> Severity: normal

>> I see the message below on a Debian Sid/unstable system.
>> 
>> ```
>> $ sudo journalctl -u systemd-udevd
>> […]
>> […] systemd-udevd[323]: Process '/usr/sbin/alsactl -E HOME=/run/alsa 
>> restore 0' failed with exit code 99.
>> ```
> 
> We do have users running sysvinit as #1

I know. Isn’t there is a SysV init script too [2]?

```
/etc/init.d/alsa-utils
```

>> If I am not mistaken, this is from the udev rule file [1].
>> 
>> ```
>> ACTION=="add", SUBSYSTEM=="sound", KERNEL=="controlC*", 
>> KERNELS!="card*", TEST=="@sbindir@", TEST=="@mydatadir@", 
>> GOTO="alsa_restore_go"
>> GOTO="alsa_restore_end"
>> 
>> LABEL="alsa_restore_go"
>> TEST!="@daemonswitch@", TEST=="/usr/sbin/alsactl", 
>> RUN+="@sbindir@/alsactl -E HOME=@alsactlhome@ restore 
>> $attr{device/number}"
>> TEST=="@daemonswitch@", TEST=="/usr/sbin/alsactl", 
>> RUN+="@sbindir@/alsactl -E HOME=@alsactlhome@ nrestore 
>> $attr{device/number}"
>> 
>> LABEL="alsa_restore_end"
>> ```
>> 
>> Manually running this command shows that `/var/lib/alsa/asound.state` 
>> is
>> missing.
>> 
>> ```
>> $ sudo /usr/sbin/alsactl -E HOME=/run/alsa restore 0
>> /usr/sbin/alsactl: load_state:1683: Cannot open 
>> /var/lib/alsa/asound.state for reading: No such file or directory
>> /usr/sbin/alsactl: sysfs_init:48: sysfs path '/sys' is invalid
>> ```
> 
> Could you please try as root:
> alsactl init

I can on Monday. Could you please tell me, what that does exactly? I 
don’t know of any problems with the sound system. PulseAudio is 
installed on the system.

The manual page of alsactl says.

> init tries to initialize all devices to a default state. If device is 
> not known, error code 99 is returned.
> […]
> 
>        /var/lib/alsa/asound.state  (or whatever file you specify with 
> the -f flag) is used to store current settings for your soundcards. The 
> settings include all
>        the usual soundcard mixer settings.  More importantly, alsactl 
> is capable of controlling other card-specific features that mixer apps  
> usually  don't  know
>        about.
> 
>        The configuration file is generated automatically by running 
> alsactl store. Editing the configuration file by hand may be necessary 
> for some soundcard fea‐
>        tures (e.g. enabling/disabling automatic mic gain, digital 
> output, joystick/game ports, some future MIDI routing options, etc).

>> Is the udev rule still needed?
> 
> yes

Interesting. Sorry, for being ignorant, just to be clear, it does the 
same thing, what the systemd service unit does?

>> I don’t really know, how it’s supposed to
>> work, and what I don’t have that file `asound.state`.
> 
> Create it as mentioned above
> 
>> It would be nice to not run `alsactl` during startup, if it’s failing,
>> to get rid of the error message.
> 
> What do you think: Is it an error or just a message?

As it exits with an error code different from 0, I consider it an error.

Also, if at every system startup a command is executed, which fails, I 
consider it an error too. (But I am probably missing something.)


Kind regards,

Paul


[2] https://packages.debian.org/sid/amd64/alsa-utils/filelist



More information about the Pkg-alsa-devel mailing list