PDA

View Full Version : HOWTO: Solving Audio Problems in Karmic (installing latest Alsa and Pulse)



lmilano
Nov 28th 2009, 01:25 AM
If you are having audio issues (no sound, no mic), the first thing to do is check the volumes in KMix (the little speaker in the panel at the bottom right of your screen). See the second post in this thread for more. Also: you may need to enable additional channels in KMix -> Settings.

If that doesn't help, there is a nice Howto here (you issue may be addressed there):
https://wiki.kubuntu.org/DebuggingSoundProblems/KarmicCaveats

What follows here is my fix, which might help you. It basically consists of using latest sound components (Alsa and Pulse). My specific problem was: only KDE applications had audio (I had this problem on and off since Jaunty). Other applications, such as VLC, Firefox, they were all muted. Here is what worked for me:

1. Upgrade Alsa. From the wiki:

Install the "linux-backports-modules-alsa-karmic-generic" package (or "linux-backports-modules-alsa-karmic-server" for Ubuntu Server edition). For changes to take effect, you must reboot your system afterwards.

2. Reboot. If the problem is solved, just don't do anything else. Otherwise:

3. Install latest Pulseaudio from Daniel Chen's ppa. In a konsole type:


sudo add-apt-repository ppa:ubuntu-audio-dev/ppa
sudo apt-get update
sudo apt-get install pulseaudio pavucontrol


4. Log out and in, and Open System Settings -> Multimedia, and choose Pulse at the top of the list in all Categories. You may need to use pavucontrol (in the Multimedia Menu) to adjust some Pulse settings.

5. (Optional, only use it if needed). Sometimes, Pulse mutes itself for a particular user in my computer. Let the user run this in a new konsole session, in order to recreate the pulse settings:

rm -rf .pulse*
killall pulseaudio

I hope this helps other people. Cheers!
-- Leo

Credits:
https://wiki.kubuntu.org/DebuggingSoundProblems/KarmicCaveats
http://drowninginbugs.blogspot.com/2009/10/caveats-for-audio-in-910.html
https://bugs.launchpad.net/ubuntu/+source/alsa-lib/+bug/396558

Zorael
Nov 28th 2009, 08:19 PM
One little thing you want to make sure of before installing pulse to counter this (unless you specifically want to) is that your channels are unmuted and have sane volumes.

My Intel HDA chipset has three volume sliders that all affect output multiplicatively; Master, Front, and PCM. If they're all at 80%, the end sound output becomes 80% of 80% of 80%, or (0.8^3 = 0.512); 51.2%. Now, KDE and its apps don't seem to take the PCM channel into account at all, while for instance Flash does. And some app (that I haven't been able to pinpoint) keeps putting my PCM volume at 0%, making it 80% of 80% of 0%.

So, pop up kmix and make sure those sliders look like they're supposed to. (Or use alsamixer.)


$ alsamixer

GreyGeek
Nov 28th 2009, 10:35 PM
But, IF you want voice in SecondLife you can't have PulseAudio installed. :(

lmilano
Nov 29th 2009, 12:57 PM
But, IF you want voice in SecondLife you can't have PulseAudio installed. :(


I think that depends on many things. In my desktop, ever since Jaunty, all the way through Karmic, the only problem has been non-KDe apps (such as Second Life in particular). And, to my dismay, the fix has been, at different times, to use Pulse or to Remove Pulse, and only one combination would work. For some time, usingealsa-oss (which is not officially supported), got me going. But that broke in the latest kernel upgrade. The latest Pulseaudio, however, since to include many fixes. Having a sound-server under the hood (such as Pulse) is very good, because several apps can share audio this way.

Zorael's suggestion is very good, this is my first recommendation when someone reports sound issues here in KFN. Another suggestion is to enable more sound channels in KMix's settings.

GreyGeek
Nov 29th 2009, 07:37 PM
....
And, to my dismay, the fix has been, at different times, to use Pulse or to Remove Pulse, and only one combination would work.
...


What you say is true. Various comments on the site had folks using or not using PulseAudio, depending on hardware and distro and version. But for me, using KJ 9.04 at the time, the SL bug site recommendation to remove PulseAudio worked for me.

tlhodgson
Jan 29th 2010, 01:47 AM
New to Kubuntu here. I figured out how to install alsa, and pulseaudio. I set the preference for pulseaudio as stated earlier and tested it in multimedia. Sound came out of my computer.

However, when I go to yahoo music, I can't hear anything. I have checked the volume sttings and nothing is muted. What am I doing wrong?

tlhodgson
Jan 29th 2010, 02:30 AM
Disregard my last post. All it took was a reboot. Thanks for the help.

lmilano
Jan 29th 2010, 07:13 PM
Disregard my last post. All it took was a reboot. Thanks for the help.


Excellent, I am glad it got you going! Remember to use the Pulse Audio Volume Control in the Multimedia menu if you run into trouble (like, no mic volume, etc)

rmdegennaro
May 5th 2010, 06:50 PM
I hope not to confuse things. I went through the information above and still had difficulties. I found that Skype would "steal" the sound device from Amarok. Meaning, Amarok would be playing, I'd pause it and answer a call (or play message) from Skype, and Amarok would tell me the audio device was not accessible. Also, if I never got YouTube sound to work, and if I played a movie file (through any player), there would be no sound, or Amarok would not be able to play the next MP3. Oh, If I closed Amarok and restarted it, it would be fine again.

My situation may be complicated from the fact that I installed Ubuntu and then switched to kubuntu-desktop.

My solution, which seems to be stable now, was to:

Uninstall pulseaudio (sudo apt-get remove pulseaudio && sudo apt-get autoremove)
Create file ~/.pulse/client.conf
Add line "autospawn = no"

Then log out, restart the X server and log back in.

This has also helped with getting Flash (including YouTube), VLC, Movie Player and Dragon Player to all work happily together. No more locking each other out or missing audio entirely. ;D