"Your audio capture settings are invalid. Please correct them in the Multimedia settings." is a really unhelpful error message

Bug #61211 reported by Chris Wagner on 2006-09-19
26
This bug affects 2 people
Affects Status Importance Assigned to Milestone
GNOME media utilities
New
Undecided
Unassigned
gnome-media (Ubuntu)
Wishlist
Ubuntu Desktop Bugs

Bug Description

Binary package hint: gnome-media

This "bug" was found in dapper, with all of the latest updates as of 2006-09-18.

After fiddling with the volume control application, switching the managed device and "tracks to be visible" (Edit -> Preferences), gnome-sound-recorder started giving this error message (the one in the bug summary). gnome-sound-recorder opened successfully just before fiddling around with this. I eventually managed to get gnome-sound-recorder to open properly again, after messing with the volume control a little more, although I'm not at all sure what change I made that caused the error message to go away.

Anyhow, surely gnome-sound-recorder knows a little more about these "invalid" settings and can be a little more specific.

A few threads with related discussion:
 http://ubuntuforums.org/archive/index.php/t-211601.html
 http://ubuntuforums.org/archive/index.php/t-147778.html

description: updated
Sebastien Bacher (seb128) wrote :

Thanks for your bug. Do you have a better suggestion for that message?

Changed in gnome-media:
assignee: nobody → desktop-bugs
importance: Untriaged → Wishlist
status: Unconfirmed → Needs Info
Chris Wagner (chris-wagner) wrote :

I wish I did have a better suggestion!

I still don't know what I "did wrong" to make this error message begin to appear. In any case, the message should reflect what is wrong and perhaps what I need to do to make gnome-sound-recorder work again. (Don't you think?)

Would you like me to forward this bug upstream, as it most likely is an upstream problem?

^rooker (rooker) wrote :

I had the same problem and I think I know how I produced it:
Hardware:
IBM Thinkpad X24 with Onboard soundcard "Intel 82801CA-ICH3", running Ubuntu 6.06.1

Audio was working properly until I attached an external USB headset. I've tried 2:
One Logitech and one from CMedia.

Logitech didn't work, but CMedia did - so I selected CMedia headset as sound device from "System > Preferences > Sound Preferences"

I only had this headset attached temporarily.

Now sound in gnome is behaving quite strange:
- sound during boot: yes
- sound in Totem: yes
- sound recorder: no (with error)
- audacity: no errors, but recording is broken and played back in other players with bad resampling artefacts.

I'm still having this error so maybe I'm lucky and can find out how to fix it.

^rooker (rooker) wrote :

I fixed it.
The problem was that the ~/.asoundrc.asoundconf entry for the "default" soundcard was broken:

#------------ BROKEN ----------------
!defaults.pcm.card default
defaults.ctl.card default
defaults.pcm.device 0
defaults.pcm.subdevice -1

#------------ WORKING --------------
!defaults.pcm.card I82801CAICH3
defaults.ctl.card I82801CAICH3
defaults.pcm.device 0
defaults.pcm.subdevice -1

Here's how I fixed it:
(lines starting with $ are shell commands)
===================
$ asoundconf list
Names of available sound cards:
I82801CAICH3

$ asoundconf set-default-card I82801CAICH3
===================

Chris Wagner (chris-wagner) wrote :

This issue is a little similar to bug 67998. I solved another problem (see my message on that bug report) by issuing (essentially) the same commands as you did, ^rooker.

These are not the same bug, though, as this report refers to the lousy error message given by gnome-sound-recorder.

^rooker (rooker) wrote :

Sorry.
In that case, I should say here that IF the errormessage would have been similar to the one I got from "alsamixer", I would have solved things faster:

"Cannot find soundcard 'default'..."

Because that told me that my system was trying and failing to resolve some card labeled "default".

Chris Wagner (chris-wagner) wrote :

I found this link ( http://l10n-status.gnome.org/gnome-2.18/PO/gnome-media.HEAD.pot ) when googl'ing, which may help to trace the problem back to the source code that actually uses it. I will do so myself if time permits...

Changed in gnome-media:
status: Needs Info → Unconfirmed
William Lachance (wrlach) wrote :

FYI, this bug is trivially reproducible by doing the following on the command line:

asoundconf set-default-card foo

Just to save the time of whoever winds up looking into this.

William Lachance (wrlach) wrote :

This bug is definitely reproducible.

Changed in gnome-media:
status: Unconfirmed → Confirmed

I'm not sure if this is the right place to discuss the reason for this "bug". The actual cause is in 99% of all cases, that the alsa alias "default" is pointint at an invalid (e.g. unplugged USB headset) sound device.

On ubuntuforums.org, I see at least 2 posts a day which are a direct result of this problem - The solution is almost always to use "asoundconf set-default-card xxx" in order to point it at the right soundcard.

Maybe it would make sense to fix the handling in gnome's sound settings, because if they would work correctly, people would probably sort things out themselves - in 2mins.
Currently you "can" choose the right soundcard there in the dropdown settings, but it almost never updates the "default" alias.

Any suggestions where else to put my comment on this?

Chris Wagner (chris-wagner) wrote :

^rooker - It might make sense to file a separate bug for the USB headset issue, which would probably affect anyone who is removing a sound device that is set as the "default". Resolving this bug may ease the problems of USB headset users, but it may not make things entirely intuitive yet.

^rooker (rooker) wrote :

The USB headset was just an example.

This bug report here is actually about the errormessage in "gnome-sound-recorder", but the problem causing this error to appear occurs *very* often - and it might be more important to fix the source than the symptom, so bug-details about "what causes it" maybe should go somewhere else (gnome sound settings?).

I certainly agree that errormessages should be more meaningful - in general.

On Thu, 2007-03-08 at 17:15 +0000, ^rooker wrote:
> ... so bug-details about "what causes it" maybe should go somewhere
> else (gnome sound settings?).

I'm not sure. I don't know whose responsibility it would be to make
sure sound settings are sane. You might even consider that a problem at
the ALSA level. I'm not one to ask, though...

^rooker (rooker) wrote :

Regarding Ubuntu/Gnome, it's currently even *if* I am aware of un-sane sound device settings, the only existing frontent (gnome sound settings) suggests that it can be used to select/change the default device, but in fact does nothing in most of the cases.

Maybe I should check if there's some bug-report regarding that filed there already...

However, returning to the actual topic, here's my suggestion for the errormessage ("Your audio capture settings are invalid. Please correct them in the Multimedia settings")

What about: "Unable to find/use device XXX. Please correct this in the Multimedia settings"

apjjr (alex-ourwoods) wrote :

I'm using Ubuntu 7.04 and there is nothing called "Multimedia settings". Furthermore, why shouldn't it tell me exactly what it considers invalid. I can't get it to record anything. It's a useless program for me. I have no idea what to set to what to get it to work. I follow the instructions and click File->New and get this insane message. How am I supposed to know what is invalid? A good idea, but needs work. - <email address hidden>

Pedro I. Sanchez (pirivan) wrote :

This may sound silly but I was hit by this annoying error message until I enabled "Software Sound Mixing (ESD)" under System->Preferences-->Sound-->Sounds Tab. The sound recorder didn't work for me without this option. Now everything is fine!

Using Gutsy!

Alvaro del Castillo (acs) wrote :

It is very usuful to launch gnome-source-record with debug options:

gnome-sound-recorder --gst-debug-level=2
0:00:00.315261000 16096 0x805e408 WARN alsa pcm_hw.c:1242:snd_pcm_hw_open: alsalib error: open /dev/snd/pcmC0D0c failed: Dispositivo รณ recurso ocupado
0:00:00.315482000 16096 0x805e408 WARN alsa pcm_dsnoop.c:558:snd_pcm_dsnoop_open: alsalib error: unable to open slave
0:00:00.315643000 16096 0x805e408 WARN alsa gstalsasrc.c:596:gst_alsasrc_open:<alsasrc0> error: Device 'default:0' is busy

At least you can see what it is going wrong.

Jason Eisner (jason-cs) wrote :

Let me add another reason that it is an unhelpful error message:

*** What is meant by "in the Multimedia settings"? ***

I am running LInux Mint 4.0 (basically Ubuntu Gutsy Gibbon with extra codecs), and my Gnome menu doesn't list any program called "Multimedia." So what am I supposed to fiddle with? We do have Administration / Services / Audio settings management (alsa-utils), and Preferences / Sound, and a whole Sound and Video submenu ... or I could open gnome-volume-control, which allows me to tweak Alsa mixer settings, from the right-click menu of the volume control icon on the panel ...

At a minimum, could someone fix the error message to tell us which of these to fiddle with?

The particular details of my situation are perhaps off-topic for a bug about an error message, but just to flesh out the picture: This bug comes and goes for me, without my attaching any other hardware. Sound Recorder can be working fine, but then crashes with this message when I try to open a new file in it. (Yes, software sound mixing is turned on.) Usually restarting Sound Recorder works okay; but today I am getting the error message immediately whenever I start Sound Recorder. Here's the bug trace today (thanks, Alvaro):

   $ gnome-sound-recorder --gst-debug-level=2
   0:00:00.202968000 21830 0x805e408 WARN alsa pcm_hw.c:1242:snd_pcm_hw_open: alsalib error: open /dev/snd/pcmC0D0c failed: Invalid argument
   0:00:00.203016000 21830 0x805e408 WARN alsa pcm_dsnoop.c:606:snd_pcm_dsnoop_open: alsalib error: unable to open slave
   0:00:00.203065000 21830 0x805e408 WARN alsa gstalsasrc.c:600:gst_alsasrc_open:<alsasrc0> error: Recording open error on device 'default': Invalid argument

This seems perhaps consistent with ^rooker's diagnosis above. However, his or her solution doesn't work in my case:
   $ asoundconf list
   Names of available sound cards:
   Intel
   $ asoundconf set-default-card Intel

Jason Eisner (jason-cs) wrote :

I wrote:

> Usually restarting Sound Recorder works okay; but today I am getting the error
> message immediately whenever I start Sound Recorder.

Well, that turns out to be because I already had another copy of Sound Recorder running (oops).
So a more helpful error message in this case would be "You have another copy of Sound Recorder running." :-)
(Or better, yet, just tell the existing copy to open a new window, and return immediately --
many applications behave this way now.)

Alvaro del Castillo (acs) wrote :

Finally I have it working selecting in the Audio Capture in System->Settings, Alsa.

acs@reborn:~$ asoundconf list
Names of available sound cards:
ICH6

acs@reborn:~$ head -14 .asoundrc.asoundconf | tail -5
defaults.ctl.card ICH6
defaults.pcm.device 0
defaults.pcm.subdevice -1
defaults.pcm.nonblock 1
defaults.pcm.ipc_key 5678293

I think it is the first time I have gnome-source-record working like an angel.

Patricio (patricio-stwing) wrote :

I am new and lost... I have the same problem. This is what I get:

patricio@patricio-desktop:~$ asoundconf list
Names of available sound cards:
rev20

patricio@patricio-desktop:~$ asoundconf set-default-card rev20
patricio@patricio-desktop:~$

patricio@patricio-desktop:~$ gnome-sound-recorder --gst-debug-level=2
0:00:01.664087000 22944 0x805e408 WARN alsa conf.c:3949:snd_config_expand: alsalib error: Unknown parameters 0
0:00:01.664454000 22944 0x805e408 WARN alsa control.c:909:snd_ctl_open_noupdate: alsalib error: Invalid CTL default:0
0:00:01.664611000 22944 0x805e408 WARN alsa gstalsamixer.c:69:gst_alsa_mixer_open: Cannot open mixer for sound device 'default:0': Invalid argument
patricio@patricio-desktop:~$

patricio@patricio-desktop:~$ head -14 .asoundrc.asoundconf | tail -5
defaults.pcm.subdevice -1
defaults.pcm.nonblock 1
defaults.pcm.ipc_key 5678293
defaults.pcm.ipc_gid audio
defaults.pcm.ipc_perm 0660
patricio@patricio-desktop:~$

^rooker (rooker) wrote :

Please try some lower-level access to your soundcard (I suppose that gnome-sound-recorder goes over ESD?), by running "speaker-test" (http://linux.die.net/man/1/speaker-test):

speaker-test -c 2
(This should output some white noise on your left/right speaker) if this works, please try also:

speaker-test -c 2 -Ddefault
(this should use the "default" alias for your soundcard)

In case the above tests didn't work, please try to manually set the "default" alias in .asoundrc.asoundconf:

# Make a backup of .asoundrc:
cp .asoundrc.asoundconf .asoundrc.asoundconf.bak

# Overwrite it with the following content:
!defaults.pcm.card rev20
defaults.ctl.card rev20
defaults.pcm.device 0
defaults.pcm.subdevice -1

Patricio (patricio-stwing) wrote :

Thanks!
I got it to work but I am not sure how. I think what I did was: System -> Preferences -> Sound
Then, in the Sound Prefrences, I went to "Audio conferencing " and selected "ALSA - Advanced Linux Sound Architecture"

However, the mic sound is not good, it is very soft. I played with the volume and gain, it is better but still not normal.
This is what I get when I save and then play:

patricio@patricio-desktop:~$ gnome-sound-recorder --gst-debug-level=2
0:00:02.794622000 11574 0x805e408 WARN pipeline gstpipeline.c:491:gst_pipeline_change_state:<record-pipeline> failed to query pipeline latency
0:00:06.408507000 11574 0x80974e0 WARN oggdemux gstoggdemux.c:2337:gst_ogg_demux_read_chain:<oggdemux0> page is not BOS page
0:00:06.539519000 11574 0x80974e0 WARN oggdemux gstoggdemux.c:2333:gst_ogg_demux_read_chain:<oggdemux0> problem reading BOS page: ret=-3
sh: jackd: not found
0:00:06.760597000 11574 0x80974e0 WARN jackclient gstjackaudioclient.c:274:gst_jack_audio_get_connection: could not create connection
0:00:06.760755000 11574 0x80974e0 WARN jacksink gstjackaudiosink.c:428:gst_jack_ring_buffer_open_device:<autoaudiosink0-actual-sink-jackaudio> error: Jack client open error (status 1)

Then I installed jackd, but that didn't help:
patricio@patricio-desktop:~$ gnome-sound-recorder --gst-debug-level=2
0:00:03.875385000 11785 0x805e408 WARN pipeline gstpipeline.c:491:gst_pipeline_change_state:<record-pipeline> failed to query pipeline latency
0:00:10.447041000 11785 0x8093668 WARN oggdemux gstoggdemux.c:2337:gst_ogg_demux_read_chain:<oggdemux0> page is not BOS page
0:00:10.574366000 11785 0x8093668 WARN oggdemux gstoggdemux.c:2333:gst_ogg_demux_read_chain:<oggdemux0> problem reading BOS page: ret=-3
JACK tmpdir identified as [/dev/shm]
0:00:10.935946000 11785 0x8093668 WARN jackclient gstjackaudioclient.c:274:gst_jack_audio_get_connection: could not create connection
0:00:10.936225000 11785 0x8093668 WARN jacksink gstjackaudiosink.c:425:gst_jack_ring_buffer_open_device:<autoaudiosink0-actual-sink-jackaudio> error: Cannot connect to the Jack server (status 17)

Thanks
Patricio

I had this message in Ubuntu 8.04 when I tried to launch Applications > Sound & Video > Sound Recorder.
I went to System > Preferences > Sounds and in 'Audio Conferencing' I changed the option 'ALSA - Advanced Linux Sound Architecture' to 'PulseAudio Sound Server'.
Anyway, most end users (including me) do not have an idea of what is all about and documentation is not very clear.

Sebastien Bacher (seb128) wrote :

could anybody having the issue send it to bugzilla.gnome.org?

Sebastien Bacher (seb128) wrote :

does anybody still get the issue in intrepid or jaunty?

Sam Geeraerts (samgee) wrote :

I just tested again.

In Hardy (well, gNewSense):

asoundconf set-default-card foo
Start Sound Recorder => error about multimedia settings

In Intrepid:

asoundconf set-default-card foo
Start Sound Recorder => no error
Recording from input Capture works.

So it looks like it's fixed in Intrepid.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers