[pulseaudio-discuss] alsa module fails after rebooting (solved)

Colin Guthrie gmane at colin.guthr.ie
Sun Dec 28 15:58:02 PST 2008


'Twas brillig, and Pete Nesbitt at 28/12/08 23:51 did gyre and gimble:
> On Fri, 26 Dec 2008 14:15:27 -0800
> Pete Nesbitt <pete at linux1.ca> wrote:
> 
>> Hi,
>> I have a system serving music locally and over the network. It was
>> working properly (once I took it off wireless), however after shutting
>> it down (to move it) the ALSA modules are failing to load.
>>
>> Maybe this is not a PA issue, it may be an ALSA problem but thought I 
>> would post anyway.
>>
>> I am auto loading the alsa modules.
>>
>> Here is the log information for when it was working, followed by the
>> same info when it failed. I don't know why it would quit working after 
>> a reboot.
>>
>> When it was working:
>>
>> Dec 26 11:11:43 artigo pulseaudio[11657]: module-hal-detect.c: Trying capability alsa
>> Dec 26 11:11:43 artigo pulseaudio[11657]: module-alsa-sink.c: Successfully opened device front:0.
>> Dec 26 11:11:43 artigo pulseaudio[11657]: module-alsa-sink.c: Successfully enabled mmap() mode.
>> Dec 26 11:11:43 artigo pulseaudio[11657]: alsa-util.c: Unable to attach to mixer front:0: No such file or directory
>> Dec 26 11:11:43 artigo pulseaudio[11657]: alsa-util.c: Successfully attached to mixer 'hw:0'
>> Dec 26 11:11:43 artigo pulseaudio[11657]: alsa-util.c: Cannot find mixer control "Master".
>> Dec 26 11:11:43 artigo pulseaudio[11657]: alsa-util.c: Using mixer control "PCM".
>> Dec 26 11:11:43 artigo pulseaudio[11657]: sink.c: Created sink 0 "alsa_output.pci_1106_3288_sound_card_0_alsa_playback_0" with sample spec "s16le 2ch 48000Hz"
>> Dec 26 11:11:43 artigo pulseaudio[11657]: source.c: Created source 0 "alsa_output.pci_1106_3288_sound_card_0_alsa_playback_0.monitor" with sample spec "s16le 2ch 48000Hz"
>> Dec 26 11:11:43 artigo pulseaudio[11657]: module-alsa-sink.c: Using 4 fragments of size 4736 bytes.
>> Dec 26 11:11:43 artigo pulseaudio[11657]: alsa-util.c: All 2 channels can be mapped to mixer channels. Using hardware volume control.
>> Dec 26 11:11:43 artigo pulseaudio[11657]: module-alsa-sink.c: Starting playback.
>> Dec 26 11:11:43 artigo pulseaudio[11657]: module.c: Loaded "module-alsa-sink" (index: #0; argument: "device_id=0 sink_name=alsa_output.pci_1106_3288_sound_card_0_alsa_playback_0").
>> Dec 26 11:11:43 artigo pulseaudio[11657]: module-alsa-source.c: Successfully opened device front:0.
>> Dec 26 11:11:43 artigo pulseaudio[11657]: module-alsa-source.c: Successfully enabled mmap() mode.
>> Dec 26 11:11:43 artigo pulseaudio[11657]: alsa-util.c: Unable to attach to mixer front:0: No such file or directory
>> Dec 26 11:11:43 artigo pulseaudio[11657]: alsa-util.c: Successfully attached to mixer 'hw:0'
>> Dec 26 11:11:43 artigo pulseaudio[11657]: alsa-util.c: Using mixer control "Capture".
>> Dec 26 11:11:43 artigo pulseaudio[11657]: source.c: Created source 1 "alsa_input.pci_1106_3288_sound_card_0_alsa_capture_0" with sample spec "s16le 2ch 48000Hz"
>> Dec 26 11:11:43 artigo pulseaudio[11657]: module-alsa-source.c: Using 4 fragments of size 4736 bytes.
>> Dec 26 11:11:43 artigo pulseaudio[11657]: alsa-util.c: All 2 channels can be mapped to mixer channels. Using hardware volume control.
>> Dec 26 11:11:43 artigo pulseaudio[11657]: module.c: Loaded "module-alsa-source" (index: #1; argument: "device_id=0 source_name=alsa_input.pci_1106_3288_sound_card_0_alsa_capture_0").
>> Dec 26 11:11:43 artigo pulseaudio[11657]: module-hal-detect.c: Loaded 2 modules.
>>
>> ______
>>
>> Rebooted at: 11:59
>> ______
>> Now ALSA fails, as does the daemon:
>>
>> Dec 26 12:07:05 artigo-nic pulseaudio[2705]: alsa-util.c: Error opening PCM device hw:0: No such file or directory
>> Dec 26 12:07:05 artigo-nic pulseaudio[2705]: module.c: Failed to load  module "module-alsa-sink" (argument: "device_id=0 sink_name=alsa_output.pci_1106_3288_sound_card_0_alsa_playback_0"): initialization failed.
>> Dec 26 12:07:05 artigo-nic pulseaudio[2705]: alsa-util.c: Error opening PCM device hw:0: No such file or directory
>> Dec 26 12:07:05 artigo-nic pulseaudio[2705]: module.c: Failed to load  module "module-alsa-source" (argument: "device_id=0 source_name=alsa_input.pci_1106_3288_sound_card_0_alsa_capture_0"): initialization failed.
>> Dec 26 12:07:05 artigo-nic pulseaudio[2705]: module-rtp-send.c: Source does not exist.
>> Dec 26 12:07:05 artigo-nic pulseaudio[2705]: module.c: Failed to load  module "module-rtp-send" (argument: "source=alsa_output.pci_1106_3288_sound_card_0_alsa_playback_0.monitor"): initialization failed.
>> Dec 26 12:07:05 artigo-nic pulseaudio[2705]: main.c: Module load failed.
>> Dec 26 12:07:05 artigo-nic pulseaudio[2705]: main.c: Failed to initialize daemon.
>>
>> _______
>> I modified my default.pa so not use the alsa sink as rtp source, so now 
>> as expected ALSA fails, but still sends music to remote hosts:
>>
>> Dec 26 12:56:07 artigo-nic pulseaudio[2834]: alsa-util.c: Error opening PCM device hw:0: No such file or directory
>> Dec 26 12:56:07 artigo-nic pulseaudio[2834]: module.c: Failed to load  module "module-alsa-sink" (argument: "device_id=0 sink_name=alsa_output.pci_1106_3288_sound_card_0_alsa_playback_0"): initialization failed.
>> Dec 26 12:56:07 artigo-nic pulseaudio[2834]: alsa-util.c: Error opening PCM device hw:0: No such file or directory
>> Dec 26 12:56:07 artigo-nic pulseaudio[2834]: module.c: Failed to load  module "module-alsa-source" (argument: "device_id=0 source_name=alsa_input.pci_1106_3288_sound_card_0_alsa_capture_0"): initialization failed.
>>
>> I have powered it off, rebooted etc but no luck. Not sure if it is a 
>> hardware issue of something on the software side.
>>
>> Any ideas?
>> Thanks.
> 
> The problem was that udev overwrites permissions to the sound device on 
> reboot. I had given everyone rw (it's an appliance so I'm not worried 
> about local user security).
> 
> I'm running Fedora 9, and had to modify /etc/udev/rules.d/40-alsa.rules
> I changed this:
> KERNEL=="controlC[0-9]*",	NAME="snd/%k"
> KERNEL=="hwC[D0-9]*",		NAME="snd/%k"
> KERNEL=="pcmC[D0-9cp]*",	NAME="snd/%k"
> KERNEL=="midiC[D0-9]*",		NAME="snd/%k"
> KERNEL=="timer",		NAME="snd/%k"
> KERNEL=="seq",			NAME="snd/%k"
> 
> To this:
> KERNEL=="controlC[0-9]*",	NAME="snd/%k", MODE="0666"
> KERNEL=="hwC[D0-9]*",		NAME="snd/%k", MODE="0666"
> KERNEL=="pcmC[D0-9cp]*",	NAME="snd/%k", MODE="0666"
> KERNEL=="midiC[D0-9]*",		NAME="snd/%k", MODE="0666"
> KERNEL=="timer",		NAME="snd/%k", MODE="0666"
> KERNEL=="seq",			NAME="snd/%k", MODE="0666"

Please note that while I'm not certain about F9, the job of assigning 
permissions to the audio device have moved on from simple modes. 
Nowadays console-kit will assign an acl to the device nodes when a given 
user is considered "active" e.g. has the active tty login or the active 
X11 login etc. This acl cannot be seen when doing a simple ls -l 
/dev/snd. You need to use "getfacl /dev/snd/*" Also see ck-list-sessions 
and check that one of them is ACTIVE.


> It now works great locally and over the LAN via RTP. Would still like to 
> use wireless but that seems to be too much traffic  for the network.
> 
> FYI, wireless floods my logs with 20 lines per second!
> Dec 21 13:05:13 artigo pulseaudio[2126]: module-rtp-send.c: Failed to push chunk into memblockq.
> 
> Oh well :(

Wireless works OK for me (not via RTP, just plain pulse protocol, 
althouhg it does suffer from occasional pops etc. Tunnels are worse than 
just setting PULSE_SERVER.

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
   Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
   Mandriva Linux Contributor [http://www.mandriva.com/]
   PulseAudio Hacker [http://www.pulseaudio.org/]
   Trac Hacker [http://trac.edgewall.org/]




More information about the pulseaudio-discuss mailing list