Getting PulseAudio to cooperate

Issues Related to Hardware (Sound, Video, Printers, Scanners, Webcams, Touchpads, Keyboards, Sensors, Drives, GRUB, etc.)

Moderator: Moderators

Getting PulseAudio to cooperate

Postby Fitzcarraldo » Thu Oct 29, 2009 2:43

It took a bit of fiddling to get PulseAudio working on my laptop. As so many people have trouble with PulseAudio, I thought I would detail here what I did in case it helps someone. Now, I'm sure some of what I did below with the PulseAudio tools is actually wrong, but I now have audio input and output all working, so I'm not complaining.

My sound card is an Intel 82801G HDA controller using the Realtek ALC883 chip, but hopefully the procedure will be similar for other sound cards.

Firstly, I made sure that the ALSA side of things was configured correctly by using the alsaconf command followed by the alsamixer command, both done as the root user in a Konsole/Terminal window. In AlsaMixer I made sure that all the volume control sliders were turned up to a reasonable level and that nothing was muted (use the M key to mute/un-mute a channel). Don't forget to use the Tab key to page through all of AlsaMixer's pages. I also pressed F6 in AlsaMixer and selected my sound card.

Secondly, I looked into the PulseAudio side of things:

I went to Kickoff > Computer > System Settings, double-clicked on the Multimedia icon and used the Prefer and Defer buttons to select the following Audio Output Device Preference for all cases of Audio Output in the left panel:

PulseAudio
HDA Intel (ALC883 Analog)
HDA Intel (ALC883 Digital)
Jack Audio Connection Kit

For the Audio Capture cases I only have one entry:

HDA Intel (ALC883 Analog).

I then installed the various PulseAudio GUI configuration tools:

Code: Select all
equo install paprefs pavucontrol paman padevchooser pavumeter

The installation of these tools automatically creates the following icons in the Kickoff > Applications > Multimedia menu:

Capture Volume Meter
PulseAudio Volume Meter (Capture)

Device Chooser
PulseAudio Device Chooser

Playback Volume Meter
PulseAudio Volume Meter (Playback)

PulseAudio Manager

Volume Control
PulseAudio Volume Control

I launched the last of these, Volume Control, and clicked on the Output Devices tab. I selected Show All Output Devices, and on my laptop there are two devices shown: dmix:0 and Internal Audio Analog Stereo. I made sure that none of the output devices was muted (clicking on the speaker icon toggles muting on/off). Then I clicked on the down arrow next to the 'Lock channels together' button for dmix:0, and ticked Default.

I also checked under the Playback tab that System Sounds was not muted.

I clicked on the Input Devices tab. I selected Show All Output Devices, and there are three devices shown on my laptop: 'Monitor of dmix:0', 'Internal Audio Analog Stereo' and 'Monitor of Internal Audio Analog Stereo'. I made sure that none of these input devices was muted (clicking on the speaker icon toggles muting on/off). Then I clicked on the down arrow next to the 'Lock channels together' button for 'Monitor of dmix:0', and ticked Default.

I clicked on the Configuration tab and there are two Internal Audio Profiles to select. I selected 'Analog Stereo Input' for the first Internal Audio profile, and 'Analog Stereo Output' for the second one.

I closed the Volume Control window and launched PulseAudio Device Chooser. An icon appeared in the Panel, and I right-clicked on it and selected 'Default' for the Default Server, for the Default Sink and for the Default Source. I also clicked on Preferences and ticked the boxes for 'Show notifications for discovered servers', 'Show notifications for discovered sinks' and 'Show notifications for discovered sources'. Then I clicked on 'Configure Local Sound Server...' and, under the 'Simultaneous Output' tab, I ticked 'Add virtual output device for simultaneous output on all local sound cards'.

I checked the media players XBMC, VLC, PyKaraoke, Xine, MPlayer, Dragon Player, SMPlayer and Amarok. Only Xine didn't seem to have audio working, but that was soon solved in Xine itself simply by selecting Audio > Volume > increase 10%.

Next I checked Skype. I had to select 'HDA Intel, ALC883 Analog (hw:0,2)' for Microphone, and I left 'Default device (default)' for Speakers and Ringing.

So there you have it. I have no idea whether PulseAudio is working its magic or whether what I did has in fact bypassed it, as it is so darned confusing that you need to be a rocket scientist to understand what the Hell it is doing and what it all means. I have found in practice that I can select different things as Default and it seems to make no difference, which is why I wonder if PulseAudio is actually being bypassed on my laptop and ALSA is being used directly. However, it must be doing something, as I had to tinker with the PulseAudio tools to get XBMC to produce sound.

Just one more tip to mention: On one occasion only, a couple of weeks ago when I booted up there was no sound. I checked in KMix and none of the channels were muted. I then ticked the Mute box for the Front channel (or perhaps it was the Master or PCM channel, I can't remember) and then unticked it, and sound was restored. Figure that one out.

Linux's audio architecture and configuration of it is just plain awful!

Anyway, hope this helps someone. Good luck!


EDIT (Dec. 22, 2009): Since I wrote the above, the package paman has been removed from Portage and the PulseAudio Web site says PulseAudio Manager (paman) and the PulseAudio Device Chooser (padevchooser) are now both obsolete. However, padevchooser is currently still in Portage so I decided to uninstall paman but left padevchooser for the time being.

EDIT2 (Feb. 17, 2010): Things have changed a bit with the new versions of PulseAudio packages that I installed since this first post. My current configuration is described with screenshots in my post of 17 Feb. 2010 in this thread, so be sure to read it (and my other posts) too. Don't forget to make sure first that the ALSA side of things is configured correctly, as described above. Actually, after you have done what I wrote above for ALSA, also run alsamixer under your normal user account too.

EDIT3 (Mar. 5, 2010): If all your multimedia applications produce sound, don't mess with anything! "If it ain't broke, don't fix it."

EDIT 4 (March 31, 2010): Just a note for those of you with hardware including HDMI Audio who are still having trouble:

My new laptop has the following audio hardware:

Code: Select all
# lspci | grep Audio
00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 05)
01:00.1 Audio device: ATI Technologies Inc Redwood HDMI Audio [Radeon HD 5600 Series]

On the Configuration tab of the PulseAudio Volume Control application, I had to change the Profile of 'Redwood HDMI Audio [Radeon HD 5600] Series' to Off for audio to come out of the speakers (I left the Profile of 'Internal Audio' as 'Analog Stereo Duplex' as usual).
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7981
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Getting PulseAudio to cooperate

Postby totedati » Tue Nov 17, 2009 21:46

yeah ... what can be very useful is a way to restart that thing when is not behaving nicely ... many time sound is ok then bang! no more working ... no audio output .. exactly when you want to listen a favorite song ... damn!
linux is free, the expertise to harness it is not!
you don't make so much money selling open source software!
You make MORE money USING it, just like google!
linux registered user #352479
totedati
Technological Hen
 
Posts: 417
Joined: Thu Jan 11, 2007 0:24
Location: Sibiu, Romania

Re: Getting PulseAudio to cooperate

Postby Fitzcarraldo » Tue Nov 17, 2009 22:18

Yes, that used to happen to me too but, since I did what I wrote above, audio has been consistently OK on my laptop.

I really don't understand PulseAudio, but my guess is that it is possible for various permutations of configurations to work, but only one of them is the optimal one. I don't see how that would be possible, but my installation of SL from the LiveDVD was definitely not optimal yet I did get sound (apart from XBMC). Then I tinkered around and got XBMC working but sometimes I lost all sound. Then I tinkered some more -- which I documented in my previous post in this thread -- and, touch wood, audio has been stable ever since. Which is why I think there must be suboptimal configurations of PulseAudio.

I read somewhere that the developer of PulseAudio (I think it was) said that the problem with PulseAudio is that most distro developers don't configure it properly because they don't understand it fully, which is why users have so much trouble with it. He cited Ubuntu as one distro that did (does?) not configure PulseAudio correctly. Anyway, as I've written several times in the past, audio in Linux is awful. Mind you, so is video. :roll:
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7981
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Getting PulseAudio to cooperate

Postby RParade » Thu Nov 19, 2009 0:39

I figured I would post here aswell for those having issue with this.

Personally, I don't like pulseaudio. I had problems with pulseaudio too, my sound wouldn't work. I managed to get my sound working by modprobe'ing snd-hda-intel (ALC662 3-stack works for nForce4 audio).

However, after getting my sound working I still had problems with pulseaudio. Pulseaudio would crash randomly, and would spawn dozens of defunct processes.So I decided not to use Pulseaudio anymore.

You don't need Pulseaudio to have sound on Sabayon, you can use the ALSA output daemon if you like. If you choose to go this route, do not remove Pulseaudio, because it has alot of dependencies; instead, just rename the binary in /usr/bin that way it doesn't load automatically.

Code: Select all
mv /usr/bin/pulseaudio /usr/bin/pulsesucks
killall pulseaudio


I just use the ALSA driver for sound, it sounds better without pulseaudio on my system anyway. Pulseaudio has some nice features, but I won't be using it until the conflicts I've had with it are resolved.
RParade
Baby Hen
 
Posts: 3
Joined: Fri Oct 05, 2007 18:41

Re: Getting PulseAudio to cooperate

Postby totedati » Wed Nov 25, 2009 11:16

from my uderstanding all pulseaudio infrastructure is hoo heavily geared around that general sound server thing ... a sound server for many things, even networking ... and in the process simple things like a reliable sound for a single linux user box, with very few multiuser things, is suffering ....

i want my sound, reliable and not with jumping volume like is now in kde4, for my dvd playback, my mp3 playback, my games, and my webcams! and youtube videos ofcourse ... that's all i need! no home mp3 streamer all around my home network, no fancy track mixing, only simple things ...

every time i start to listen an mp3 i need to set again my master channel volume to an audible level ... for unknown reasons is reset'ed to 0% volume ... volume levels for channels is not saved between sessions ...
linux is free, the expertise to harness it is not!
you don't make so much money selling open source software!
You make MORE money USING it, just like google!
linux registered user #352479
totedati
Technological Hen
 
Posts: 417
Joined: Thu Jan 11, 2007 0:24
Location: Sibiu, Romania

Re: Getting PulseAudio to cooperate

Postby Fitzcarraldo » Wed Nov 25, 2009 14:07

totedati wrote:every time i start to listen an mp3 i need to set again my master channel volume to an audible level ... for unknown reasons is reset'ed to 0% volume ... volume levels for channels is not saved between sessions ...

Isn't that to do with ALSA, though, not PulseAudio? You need to configure ALSA to preserve the volume settings when rebooting: http://alsa.opensrc.org/index.php/Using ... lume_state
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7981
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Getting PulseAudio to cooperate

Postby Fitzcarraldo » Wed Nov 25, 2009 22:17

totedati,

Also, another thing to check if you're using KDE, is if you have the file restore_kmix_volumes.desktop in the directory /usr/share/autostart/ in addition to the file kmix_autostart.desktop:

Code: Select all
[Desktop Entry]
X-KDE-autostart-phase=1
X-KDE-autostart-condition=kmixrc:Global:startkdeRestore:true
Type=Application
Exec=kmixctrl --restore
OnlyShowIn=KDE;
Name=Restore Mixer Volumes
Name[ar]=استعادة أصوات المازج
Name[bg]=Възстановяване стойностите на смесителя
Name[bn]=মিক্সার ভলিউম পুনঃস্থাপন করে
Name[br]=Assav pep tolzennad mesker
Name[ca]=Restaura els volums del mesclador
Name[cs]=Obnovit nastavení hlasitosti
Name[cy]=Adfer Lefelau Sain y Cymysgydd
Name[da]=Genskab mikserlydstyrke
Name[de]=Lautstärken wiederherstellen
Name[el]=Επαναφορά των εντάσεων του μείκτη
Name[en_GB]=Restore Mixer Volumes
Name[eo]=Restarigi la miksilajn laŭtecojn
Name[es]=Restaurar los volúmenes del mezclador
Name[et]=Mikseri helitugevuste taastamine
Name[eu]=Nahasgailuaren bolumenak berreskuratu
Name[fa]=باز‌گردانی حجم صداهای مخلوط‌کن
Name[fi]=Palauta mikserin äänivoimakkuudet
Name[fr]=Restaurer les volumes du mixage
Name[ga]=Athchóirigh Leibhéil Airde an Mheascthóra
Name[gl]=Restaurar os Volumes do Mesturador
Name[he]=שיחזור עוצמות הקול של המערבל
Name[hi]=मिक्सर आवाज़ बहाल करें
Name[hne]=मिक्सर अवाज बहाल करव
Name[hu]=A hangkeverő hangerőinek visszaállítása
Name[is]=Sækja aftur stillingar hljóðrása
Name[it]=Ripristina i volumi del Mixer
Name[ja]=ミキサーの音量設定を復元する
Name[kk]=Микшер деңгейлерін қалпына келтіру
Name[km]=ស្ដារ​កម្រិត​សំឡេង​កម្មវិធី​លាយ​ឡើងវិញ
Name[ko]=믹서 음량 복원
Name[ku]=Bilindahiya Alozkerê Nû Ve Saz Bike
Name[lt]=Atstatyti maišytuvo garso lygius
Name[lv]=Atjaunot miksera skaļumus
Name[mk]=Враќање на гласностите на миксетата
Name[nb]=Gjenopprett lydstyrkene til mikser
Name[nds]=Mischerluutstärken wedderherstellen
Name[ne]=मिक्सर भोल्युम पूर्वावस्थामा ल्यानुहोस्
Name[nl]=Mixervolumes herstellen
Name[nn]=Gjenopprett miksarlydstyrkar
Name[pa]=ਮਿਕਸਰ ਵਾਲੀਅਮ ਰੀ-ਸਟੋਰ ਕਰੋ
Name[pl]=Odtwarzanie głośności miksera
Name[pt]=Repor os Volumes
Name[pt_BR]=Restaurar volumes do Mixer
Name[ro]=Reface volumele mixerului
Name[ru]=Восстановление настроек микшера
Name[sk]=Obnoviť nastavenia mixéra
Name[sl]=Obnovi nastavitve mešalnika
Name[sr]=Обнови јачине миксете
Name[[email protected]]=Obnovi jačine miksete
Name[sv]=Återställ mixervolymer
Name[ta]=ஒன்றுசேர்க்கும் ஒலியளவு மீட்கவும்
Name[th]=เรียกคืนระดับเสียงของมิกเซอร์
Name[tr]=Karıştırıcı Seslerini Yenile
Name[uk]=Відновити параметри мікшера
Name[wa]=Rimete come divant les apontiaedjes do maxheu d' sons
Name[x-test]=xxRestore Mixer Volumesxx
Name[zh_CN]=恢复混音器设置
Name[zh_HK]=回復混音器音量
Name[zh_TW]=回復混音器音量
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7981
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Getting PulseAudio to cooperate

Postby totedati » Wed Dec 02, 2009 18:07

Fitzcarraldo wrote:totedati,

Also, another thing to check if you're using KDE, is if you have the file restore_kmix_volumes.desktop in the directory /usr/share/autostart/ in addition to the file kmix_autostart.desktop:


is here:

Code: Select all
ls -1sh /usr/share/autostart/
total 96K
4.0K guidance-power-manager.desktop
4.0K kabcdistlistupdater.desktop
4.0K kalarm.autostart.desktop
4.0K kde4-knetworkmanager-autostart.desktop
8.0K kgpg.desktop
 12K klipper.desktop
4.0K kmix_autostart.desktop
8.0K konqy_preload.desktop
8.0K korgac.desktop
4.0K krunner.desktop
4.0K magneto.desktop
 12K nepomukserver.desktop
4.0K plasma.desktop
4.0K plasma-desktop.desktop
8.0K printer-applet-kde.desktop
4.0K restore_kmix_volumes.desktop


and

Code: Select all
cat /usr/share/autostart/restore_kmix_volumes.desktop | grep -v Name
[Desktop Entry]
X-KDE-autostart-phase=1
X-KDE-autostart-condition=kmixrc:Global:startkdeRestore:true
Type=Application
Exec=kmixctrl --restore
OnlyShowIn=KDE;


still i see from time to time this behavior, master channel in kmix is reset'ed to 0% and ofcourse no sound ... very annoying ... not every time i start a new apps, is a random thing ... and don't have enough time and patience to try to make a reproductible path for this bug ...
linux is free, the expertise to harness it is not!
you don't make so much money selling open source software!
You make MORE money USING it, just like google!
linux registered user #352479
totedati
Technological Hen
 
Posts: 417
Joined: Thu Jan 11, 2007 0:24
Location: Sibiu, Romania

Re: Getting PulseAudio to cooperate

Postby albfneto » Thu Dec 03, 2009 3:13

Fitz, without doubt is useful.!
ALBERTO FEDERMAN NETO
albfneto
[email protected]
Favorite Distros: Sabayon, Gentoo, Mageia and OpenSUSE
User avatar
albfneto
Sagely Hen
 
Posts: 1705
Joined: Fri Nov 16, 2007 1:15
Location: Ribeirão Preto City, São Paulo State, Brazil

Re: Getting PulseAudio to cooperate

Postby albfneto » Thu Dec 03, 2009 16:27

A good Thing .
if you have some Time, i suggest that you made a Wiki article with this.
You autorize me, citing you as the author, to make a Portuguese Translation of your procedure for the Portuguese Shed?
ALBERTO FEDERMAN NETO
albfneto
[email protected]
Favorite Distros: Sabayon, Gentoo, Mageia and OpenSUSE
User avatar
albfneto
Sagely Hen
 
Posts: 1705
Joined: Fri Nov 16, 2007 1:15
Location: Ribeirão Preto City, São Paulo State, Brazil

Next

Return to Hardware

Who is online

Users browsing this forum: No registered users and 1 guest

cron