[pulseaudio-discuss] alsa-util.c: Unable to attach to mixer

Ben Finney bignose+hates-spam at benfinney.id.au
Wed Jul 30 16:19:50 PDT 2008

Lennart Poettering <lennart at poettering.net> writes:

> On Sun, 27.07.08 14:42, Ben Finney (bignose+hates-spam at benfinney.id.au) wrote:
> > The trouble seems (to my eyes) to begin at the error message "ALSA lib
> > control.c:909:(snd_ctl_open_noupdate) Invalid CTL plug:hw:0".
> That message is not really important. PA tries to find the right mixer
> device for a PCM stream. ALSA has not real API for that. So we try a
> few things, which unfortuncately results in a bit of debug messages by
> alsa-lib.

Okay, thanks for that reassurance.

> > $ sudo /usr/bin/pulseaudio -vvvv --daemonize=false
> -vvvvv? Better safe than sorry, heh?

I think I was told earlier that '-vvvv' would result in the highest
debugging level. What is the highest level of debugging that would be
useful in this case?

> > I: core-util.c: Successfully gained nice level -11.
> > W: main.c: This program is not intended to be run as root (unless
> > --system is specified).
> Don't run PA as root!

The daemon is to be started as a system service on startup, since no
users will be logging in; see earlier in the thread for why (summary:
this is a networked host with the desired audio devices, which is one
reason PulseAudio is attractive).

> > I: module-alsa-sink.c: Successfully opened device plug:hw:0.
> > I: module-alsa-sink.c: Successfully enabled mmap() mode.
> So you opened plug:hw:0 here. 

Yes, but:

> > ALSA lib control.c:909:(snd_ctl_open_noupdate) Invalid CTL plug:hw:0
> > I: alsa-util.c: Unable to attach to mixer plug:hw:0: No such file or directory

Is this not indicative that PA is still having trouble connecting to

> > I: alsa-util.c: Unable to attach to mixer hw:(null): No such device
> > I: sink.c: Created sink 0 "output" with sample spec "s16be 2ch 44100Hz"
> > I: source.c: Created source 0 "output.monitor" with sample spec "s16be 2ch 44100Hz"
> > I: module-alsa-sink.c: Using 4 fragments of size 4408 bytes.
> > D: module-alsa-sink.c: Thread starting up
> > D: rtpoll.c: Acquired POSIX realtime signal SIGRTMIN+29
> > I: module-alsa-sink.c: Starting playback.
> > I: module.c: Loaded "module-alsa-sink" (index: #0; argument: "device=plug:hw:0 sink_name=output").

This indicates PA thinks it *can* talk to 'plug:hw:0'. Which
interpretation is right?

> > D: cli-command.c: Checking for existance of '/usr/lib/pulse-0.9/modules/module-hal-detect.so': success
> > I: module-hal-detect.c: Trying capability alsa
> > D: module-hal-detect.c: Not loaded device /org/freedesktop/Hal/devices/computer_alsa_timer
> > D: module-hal-detect.c: Loading module-alsa-sink with arguments 'device_id=0 sink_name=alsa_output.pci_106b_3e_alsa_playback_0'
> > D: alsa-util.c: Trying front:0...
> And now you are trying to load another module for audio device 0?

I see nothing in my configuration (posted in the message to which you
replied) that requests a device '0'. Where would such a request come

> You shouldn't have both hal-detect and module-alsa-sink in your
> startup script. That usually makes no sense, unless you really know
> what you are doing.

Notice that the configuration has those two in an if-else relationship:

.ifexists module-hal-detect.so
load-module module-hal-detect
load-module module-detect

Since the output shows 'module-hal-detect.so' exists, this should mean
the 'load-module module-detect' will not occur. Is that right?

> > At that point the daemon is running, accepts connections, but
> > produces no sound. Eventualy I send it SIGINT and it closes.
> Have you set all volume sliders correctly and unmuted all controls?

Sound output works fine via ALSA on the host.

> "alsamixer -c0"? pavucontrol?

Both show the PCM output levels at 100%.

A PulseAudio client (a GNOME session, in this case) on another host
connects successfully, shows when the server is available or not, and
has its volume set to 100%.

The connection results in the following server output:

I: socket-server.c: TCP connection accepted by tcpwrap.
I: client.c: Created 0 "Native client (TCP/IP client from"
I: client.c: Client 0 changed name from "Native client (TCP/IP client from" to "PulseAudio Volume Control"

Testing the client (via GNOME's "Preferences -> Sound -> Devices ->
Music and Movies -> Test") cycles without anything audible, until I
stop it.

> Are you sure your stream is connected to the right device?

How can I tell? What should I try to test this?

 \             “Experience is that marvelous thing that enables you to |
  `\   recognize a mistake when you make it again.” —Franklin P. Jones |
_o__)                                                                  |
Ben Finney

More information about the pulseaudio-discuss mailing list