How to activate USB speakers consistently

I have a pair of Trust USB speakers. As these are external, I sought to use them with 11.10. They are recognized by 'aplay -l' and Pulseaudio- I have selected them, but, have to reset the volume, every time I log on. Also, I can receive only feedback and sound from apps and programs- like Kaffeine or Firefox- on this boosted volume- I cannot get System Sounds, like logon or logoff. I have tried the gnome-alsamixer install that used to work, to no effect. Is their an app that I should be trying or is this feat impossible?

  • I have tried to delete all the files in .pulse and rebooting or just deletion of the entire .purge directory, as Michael K suggested- neither works as the directory is automatically rewritten on reboot.

[I have found that any other soundcards (of those tried- many) will zero out all the options for a USB system. DO NOT USE A SECOND SOUNDCARD DURING THIS SETUP]

Ideas?


I executed the command:

sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install linux-sound-base alsa-base alsa-utils gdm ubuntu-desktop linux-image-`uname -r` libasound2
sudo apt-get -y --reinstall install linux-sound-base alsa-base alsa-utils gdm ubuntu-desktop  linux-image-`uname -r` libasound2
killall pulseaudio
rm -r ~/.pulse*
sudo usermod -aG 'cat /etc/group | grep -e '^pulse:' -e '^audio:' -e '^pulse-access:' -e '^pulse-rt:' -e '^video:' | awk -F: '{print $1}' | tr '\n' ',' | sed 's:,$::g'` `whoami`

[this command should be taken from their helppage, not mine, for certainty]

to totally reset and rejig my system (from https://help.ubuntu.com/community/SoundTroubleshootingProcedure). This reloads all the defaults and then scans for audio devices.

In a terminal, type alsamixer

This should load a GUI, allowing you to scan all channels.

Press F6 and look at the channel (s) available. If USB Audio is set to channel 0 (usually in brackets), then this will interfere with any inbuilt soundcards- even if they are disabled. As such, this USB must be set to another channel, say 1.

However these speakers can be tested, now, by selecting them, but, they will disappear on reboot

Now execute the command

find /lib/modules/`uname -r` | grep snd

this should give you a massive list of possible sound systems- look for

snd-usb-audio *or somesuch, depending on your speakers*

Your inbuilt card is shown, too.

Even if you have disabled or do not have an inbuilt soundcard, Linux will set up a virtual, 'ghost' card, if necessary. This is always set to card 0.

Now type

sudo gedit /etc/module.d/alsa-base.conf

and, at the bottom of the file, add the line

   option snd-usb-audio = 1

This should set your soundcard to channel 1 and not conflict with the default settings. Reboot.

Now type

cat /proc/asound/cards

You will get something like

Cybermedia USB device
 1 [Audio          ]: USB-Audio - USB Audio
                      C-Media INC. USB Audio at usb-0000:00:13.1-1, full speed

========================================================================

It is always advisable, to now type in this teminal

sudo cp /usr/share/sounds/ubuntu/stereo/* /usr/share/sounds/

This will copy your new ALSA card to this directory, along with any default sounds and subdirectories.


I found that the Pulse frontend to ALSA is faulty, especially in 64 bit systems- the System Volume will reset to 100%, whatever is. .

Looked up this Pulse problem and was told to try enabling/disabling (whichever works) the flat-volumes option (yes or no)in /etc/pulse/daemon.conf. Monkeying with this option is recommended, as it is disabled by default (set to 'yes', if you have USB speakers). This allows the use of the Sound Preference sliders to be permanent. This appears to be a known bug. Leave the editor.


PAV SETTINGS I found this advisable.

=============

I mistakenly thought that while the speakers are USB, I must include the inbuilt soundcard, as a sound source. Now I have working USB speakers but the volume sliders in Sound Preferences are reset, every time I log on.

After an overnight reboot, to allow the ALSA to catch up, I attain a new sound card

> aplay -l

card 0: SB [HDA ATI SB], device 0: ALC662 rev1 Analog [ALC662 rev1 Analog]
  Subdevices: 1/USB card 0 is my inbu1
  Subdevice #0: subdevice #0
card 0: SB [HDA ATI SB], device 1: ALC662 rev1 Digital [ALC662 rev1 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Audio [USB Audio], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Open the Dash (top left of screen and a circular icon) and type

pav

Select the PulseAudio Volume Controller and run it.

and go to the Configuration tab.

YOU MUST SET YOUR INBUILT/INTERNAL CARD AS INPUT ONLY- via this tab. Now reboot immediately.

USB card 0 is my inbuilt card. It is far easier to deal with a real card than a virtual one (Ubuntu needs some sort of soundcard and will create a 'ghost', virtual one if your mo'bo and PCIs are bereft of one.

To set the System Volume, it is vital to use the PAV and not System Preferences. Select this option, from the Dash and set your volume/amplification; click on the sliders to hear the set level.

Using the Volume sliders in System Preferences > Sound or the Sound icon is a base level method and will totally zero any changes to PAV. Do not use them.


FYI Adobe Flash 10 does not work with 64-bit v 11.10- it may be necessary to install the v 11, if your Firefox Flash goes away [playing video, but, no sound or such] or does not work, at all.


Solution 1:

I had a similar issue with my laptop where the default sound device was actually the headphone jack.

If you use alsamixer to make everything the way it should be, then use the command alsactl store it will store those preferences. Then I put as a startup command alsactl restore and every time I logged in it was reset to my original settings. Hope this helps!