Text only code pasted @ 02:43
on Sat, 21 Mar 09
| Revise and Submit New Paste | View as Plain Text
PulseAudio fixes and workarounds by Dennis Johnson — last modified Mar 18, 2009 08:23 AM — filed under: Multimedia Solutions A collection of fixes and work-arounds for PulseAudio: This page has hints for if you are having some sound, but it is choppy, skips - or is too quiet. Applicable to Fedora Versions Fedora 9-10+ This guide is based around the default set of tools, so if you do not have Gnome - the commands may be slightly different. (Particularly related to sound properties and volume controls.) Requirements Explanation of requirements. Run "cat /proc/asound/cards" and verify that your audio hardware shows up. If it does not, that issue needs to be resolved first. Another command to verify that your sound drivers are loaded is "/sbin/lsmod | grep -c snd". This command should print a number above 12. If either of these commands does not have proper output, then your sound driver is not loading. You have reviewed the document in "yum install kernel-doc ; more /usr/share/doc/kernel-doc-*/Documentation/sound/alsa/ALSA-Configuration.txt" and made any adjustments need. (Example here is for laptops that have sound output on both speaker and headphones) You have already run "gnome-sound-properties" and select your default output devices. Frequently - the PCM device is muted. Unmute it with these commands. Adjust the volume upwards to somewhere between 80-100%. Be sure you unmute PulseAudio, and Hardware levels for Master, PCM and Speakers. Certain cards default the Speaker volume to 0. You have already run "gnome-volume-control" and un-mute all devices. [TUI] Install alsa-utils ("yum install alsa-utils") if you have not done so already, and then you can adjust your sound controls with "alsamixer -c 0" as well. Another command to try is "alsamixer -D hw:0". [GUI] Install and run pavucontrol ("yum install pavucontrol") and adjust your volume levels. You have run "yum update" and applied all the system-updates before continuing. If you updated your kernel, you will need to reboot before moving onward. Doing the Work Install the base PulseAudio tools from a Terminal window. Install the Jack Audio Connection Kit: su -c "yum install alsa-plugins-pulseaudio pulseaudio pulseaudio-module-jack alsa-plugins-jack jack-audio-connection-kit" Add your user-id to the proper audio groups: su -c "usermod -aG pulse-rt,jackuser username" Apply the changes: From the System menu bar, Select logout. Log back in to apply the changes above. Doing the Work 2 (only if #1 above did not resolve the issue) You have tried the first part, and it did not help enough - this section covers additional cases. Most people will probabily not need this section, but it has helped a number of individuals. Change the scheduler default (Caution, this step can cause high-CPU usage on some systems. You can undo this step if it causes you problems.) su -c "nano -w /etc/pulse/default.pa" Skip down to about line 48, where it reads: load-module module-hal-detect Change this to: load-module module-hal-detect tsched=0 Save and exit nano. Install additional audio tools: su -c "yum install pavucontrol pavumeter paman padevchooser paprefs alsa-plugins-pulseaudio gstreamer-plugins-pulse pulseaudio pulseaudio-core-libs pulseaudio-esound-compat pulseaudio-libs pulseaudio-libs-glib2 pulseaudio-libs-zeroconf pulseaudio-module-gconf pulseaudio-module-x11 pulseaudio-module-zeroconf pulseaudio-utils xine-lib-pulseaudio xmms-pulse" Ensure that you're using PulseAudio as your default audio: System > Preferences > Hardware > Sound for "Sound Playback" set to PulseAudio Sound Server. Apply the changes: From the System menu bar, Select logout. Log back in to apply the changes above. Troubleshooting How to test Explanation troubleshooting basics and expectations. Verify that your user-id is a member of "pulse-rt" and "jackuser": (Your output may look different) $ id user1 uid=500(user1) gid=500(user1) groups=500(user1),10(wheel),100(users),497(pulse-rt),490(jackuser) Restart PulseAudio (as your own ID, not root): pulseaudio -k Test without using flash, mp3 or anything special: If you are unsure how to test audio, run "cat /dev/urandom > /dev/dsp" and press Ctrl-C to stop. You should hear noise/static if it is working. Common problems and fixes If the above does not work there are several things you can try To temporarily disable PulseAudio for a given application, in this example xine, in a terminal (as your user) run: pasuspender xine To remove PulseAudio from being used by default: Remove the plugin that calls PulseAudio: su -c "yum remove alsa-plugins-pulseaudio" Apply the changes: From the System menu bar, Select logout. Log back in to apply the changes above. If you are running Fedora under VMWare, and it reports unable to open /dev/dsp (starts with sound disconnected): Install pulseaudio-utils and run vmware under padsp to provide backward compatability: su -c "yum install pulseaudio-utils" ; padsp vmware To really remove PulseAudio for some reason: Remove PulseAudio and all of it's dependencies: su -c "yum remove alsa-plugins-pulseaudio pulseaudio" Apply the changes: From the System menu bar, Select logout. Log back in to apply the changes above. File a bug under "Fedora 10" and "PulseAudio" to explain the problems you were having and how this helped: https://bugzilla.redhat.com/ There are known conflicts with kernel-2.6.27.9-159.fc10 and Intel Audio cards. To see if this includes you run the following: uname -r ; lspci |grep Audio ; lsmod |grep snd_hda_intel If it does match, update and reboot your system: su -c "yum update" ; shutdown -r now (At this time, kernel-2.6.27.12-170.2.5.fc10 is current, and has this problem resolved.) More Information Any additional information or notes. If you are unsure how to test audio, run "cat /dev/urandom > /dev/dsp" and press Ctrl-C to stop. You should hear noise/static if it is working. If the problem you are having is with Flash, See http://fedorasolved.org/browser-solutions/flash If you are attempting to play audio from MP3 or other sources, first add rpmfusion ( http://fedorasolved.org/post-install-solutions/yum-config ), then try "yum install audacious-plugins* gstreamer-plugins* --exclude=*-devel". Logout/Login required. Disclaimer We test this stuff on our own machines, really we do. But you may run into problems, if you do, come to #fedora on irc.freenode.net Added Reading http://www.pulseaudio.org/wiki/PerfectSetup http://forums.fedoraforum.org/showthread.php?t=206868 http://www.harald-hoyer.de/linux/pulseaudio-and-jackd http://www.fedorafaq.org/#sound-pops