Take the 2-minute tour ×

When plugging a USB sound card may sometimes cause the current audio output (ie. Banshee and PC speakers) to switch immediately. But the volume controls (sound widget in systray, volume keyboard keys) are stuck on the old sound card.

Plug a soundcard and amplifier while the volume is set to ultra high for the pc speakers. You can't control the volume without opening the sound settings or alsamixer. This could probably cause neighbour disturbance in some countries. You can't control it with the sound widget of the systray nor the volume keyboard keys.

How to disable auto switch of hardware audio output, or enable auto switch of software volume controls ? It would be great to make the software behaviour consistent with the hardware's.

Ubuntu 11.10 vanilla up to date.

share|improve this question
Not a solution, but one workaround is to plug and unplug headphones. This forces a toggle of the controls. –  hbdgaf Mar 20 '12 at 9:05
Instead of hotplugging, again this is a band aid solution, perhaps you can leave it plugged in and when not in use manually switch its profile to 'off'? –  AyaneForever May 10 '12 at 19:38
Third band-aid solution: turn down the hardware volume on your usb sound card prior to plugging it in--generally the best practice with all audio devices (digital and analog) is to zero all levels before hitching things together. –  adempewolff May 24 '12 at 9:32

1 Answer 1

up vote 2 down vote accepted

You can achive what you want by using an udev rule that is written to act upon certain events. In this case these events are to plug usb sound card and to unplug it. According to this forum answer, possible solution is like following:

  1. Open the file that has usb sound card udev rules:

    sudo -H nautilus /etc/udev/rules.d/10-usb-sound-card.rules
  2. Paste and copy

  3. Save the file and give

    sudo udevadm trigger --action=add /etc/udev/rules.d/10-usb-sound-card.rules

command. Then test this rule by pluging and unpluging your usb sound card.

I hope this will help you.

share|improve this answer

Your Answer


