Default sound card selection doesn't work properly or without reboot

Bug #71994 reported by Aleksi Nurmi
4
Affects Status Importance Assigned to Milestone
control-center (Ubuntu)
Fix Released
Low
Ubuntu Desktop Bugs

Bug Description

Changing the card in System -> Settings -> Sound (gnome-sound-properties) rewrites ~/.asoundrc.asoundconf fine. amixer and others treat the card as if it were changed.

However, the sound will play through the old card at least until reboot which isn't convenient if you want to change the sound card just for using headphones for a little while. gnome-sound-properties doesn't alert the user about the need for reboot. It also always shows that it's always using the same card (the module with the first index, it would appear). Multimedia volume keys do not adhere to the sound card chosen even after reboot - again, it would appear they use the module with the first index.

Steps to repeat:
1. Install Ubuntu Dapper or Edgy to a system with two sound cards.

2. Open gnome-sound-properties and change the sound card.

3. Play sound: "aplay /usr/share/sounds/startup.wav" or use totem or rhythmbox. It will use the old card.

4. Open gnome-sound-properties. You will see the old card.

5. Reboot

7. Try multimedia keys - they will change the volume only for the driver module having the first index (cat /proc/asound/modules too see the indices)

AFAIK this happens with all hardware.

See also for confirmation: https://launchpad.net/distros/ubuntu/+bug/45786

Workaround to change the module indices to get multimedia keys working:
sudo gedit /etc/modprobe.d/alsa-base

Add the following lines:
options snd-whatever-module-you-want-first index=0
options snd-whatever-module-you-want-second index=1

(See "cat /proc/asound/modules" for the modules, and replace '_' characters with '-'.)

If you know a way to make applications use the selected sound card without reboot, please share it with us.

Revision history for this message
Aleksi Nurmi (aleksi-nurmi) wrote :

I should add that the workaround above does, um, something to the other problem as well. After using it, it seems it's possible to change to card without reboot, but not back again. Sometimes it's random: sometimes the card changes only after playing a couple of files, for example.

Revision history for this message
Brian Murray (brian-murray) wrote :

Thanks for your bug report. With which version of Ubuntu did you notice this?

Revision history for this message
Sebastien Bacher (seb128) wrote :

That bug is fixed with feisty, the sound capplet uses hal and write gconf keys now rather modifying the asoundrc configuration

Changed in gnome-system-tools:
assignee: brian-murray → desktop-bugs
importance: Undecided → Low
status: Needs Info → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.