alsactl hangs
I built EasyOS Pyro64 0.9, with the intention of uploading it.
Also built it in two variants, with Xorg 'modesetting' driver or 'vesa'
driver preselected.
Testing the 'vesa' variant, hit an "interesting" bug, a show-stopper.
At bootup, /etc/init.d/10alsa executes, which creates /etc/asound.state
and runs "alsactl -f /etc/asound.state store" on the first bootup, on
subsequent bootups "alsactl -f /etc/asound.state restore".
I got to the desktop, and everything seemed OK, but noticed 'xload'
in tray was very busy. I found that alsactl had not terminated.
Furthermore, it cannot be killed, not even at shutdown, requiring a hard
poweroff by holding down the power-button.
A process cannot be killed if it is doing "uninterruptible I/O". Not even at shutdown!
So, what is different about 'vesa'? The Xorg vesa driver does not use
KMS (Kernel Mode Setting), so requires "options i915 modeset=0" in file
/etc/modprobe.d/i915.conf (I have Intel video -- and audio).
I also tested by totally removing i915.ko, the kernel module, alsactl
still hangs. Note, blacklisting i915.ko does not work, it has to be
actually removed, then rerun 'depmod'.
If I change the permissions on /etc/init.d/10alsa, turn off execute
permissions, then alsactl will not run at bootup, nor at shutdown. And
this is interesting... sound works!
Yep, works perfectly, and "aplay -l" shows the interfaces are there.
"aplay <sound file>" works. pnmixer tray applet levels work.
Yet, "alsactl -f /etc/asound.state store" or ""alsactl -f /etc/asound.state restore" hangs.
My wild guess is that support for non-KMS has lapsed, at least for
Intel. The i915.ko driver does seem to be tied into the audio for some
reason.
The workaround, for anyone else who wants to use the Xorg 'vesa'
driver with Intel video, who hits this problem, is, change
/etc/init.d/10alsa to non-executable.
You won't get saving of sound level settings though.
Tags: easy