Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Whenever I plugged in my old audio jack headset, sound was immediately diverted from my speakers to the headset speakers, and the microphone was immediately available.

When I plug in my new USB headset, I have to open Sound Preferences and switch both input and output to the headset.

Is there any way to make this happen automatically?

I'm using a Fujitsu-Siemens Amilo Pi laptop, Maverick and a Logitech H330 USB headset.

share|improve this question
2  
Is a bug in alsamixer –  Javier González Jan 14 '11 at 21:15

2 Answers 2

up vote 3 down vote accepted

This is actually a bug in Pulseaudio.

Here is a recent bug report on the situation, but it might be a dupe of this older (but reportedly fixed) one.

Here's a workaround that you could possibly use. Create a text file and paste this in:

#! /bin/bash

amixer cset iface=MIXER,name='Input Source' 1
amixer cset iface=MIXER,name='Output Source' 1
exit

If it is fact your third one then you should replace the end numbers on the commands with the number '2'. If fourth, then '3'. And so on.

You can then make a launcher on the panel and click on it every time you plug in the headset. It's an ugly workaround for now but until it is fixed (i.e. Pulseaudio remembers preferred devices) I don't see much else you can do.

You could do some extreme crazy workaround involving writing udev rules.... but is it worth it? ;)

share|improve this answer
    
I'll try it out - those bugs didn't quite fit, and I found another about sound output, so I create my own - bugs.launchpad.net/ubuntu/+source/gnome-media/+bug/708573 –  d3vid Jan 27 '11 at 11:27

I found the answer here: http://crunchbang.org/forums/viewtopic.php?pid=114968

You can do either one of two things (or both):

open alsamixer using the command line:

alsamixer

and then press F6 and select the default device for alsa. Once you've done that, save the alsa settings:

sudo alsactl store

It may also be necessary to edit the alsa configuration file: (/etc/modprobe.d/alsabase.conf). You then place a '0' next to the device you want as your default, so if it's a usb sound device, you'll have a line like this:

options snd-usb-audio index=0

Then reboot system.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.