Text only code pasted @ 02:43 on Sat, 21 Mar 09 | Revise and Submit New Paste | View as Plain Text
  1. PulseAudio fixes and workarounds
  2. by Dennis Johnson — last modified Mar 18, 2009 08:23 AM
  3. — filed under: Multimedia Solutions
  4. 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.
  5. Applicable to Fedora Versions
  6. Fedora 9-10+
  7. 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.)
  8. Requirements
  9. Explanation of requirements.
  10. 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.
  11. 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)
  12. You have already run "gnome-sound-properties" and select your default output devices.
  13. 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.
  14. You have already run "gnome-volume-control" and un-mute all devices.
  15. [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".
  16. [GUI] Install and run pavucontrol ("yum install pavucontrol") and adjust your volume levels.
  17. 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.
  18. Doing the Work
  19. Install the base PulseAudio tools from a Terminal window.
  20. Install the Jack Audio Connection Kit:
  21. su -c "yum install alsa-plugins-pulseaudio pulseaudio pulseaudio-module-jack alsa-plugins-jack jack-audio-connection-kit"
  22. Add your user-id to the proper audio groups:
  23. su -c "usermod -aG pulse-rt,jackuser username"
  24. Apply the changes:
  25. From the System menu bar, Select logout. Log back in to apply the changes above.
  26. Doing the Work 2 (only if #1 above did not resolve the issue)
  27. 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.
  28. 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.)
  29. su -c "nano -w /etc/pulse/default.pa"
  30. Skip down to about line 48, where it reads:
  31. load-module module-hal-detect
  32. Change this to:
  33. load-module module-hal-detect tsched=0
  34. Save and exit nano.
  35. Install additional audio tools:
  36. 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"
  37. Ensure that you're using PulseAudio as your default audio:
  38. System > Preferences > Hardware > Sound for "Sound Playback"
  39. set to PulseAudio Sound Server.
  40. Apply the changes:
  41. From the System menu bar, Select logout. Log back in to apply the changes above.
  42. Troubleshooting
  43. How to test
  44. Explanation troubleshooting basics and expectations.
  45. Verify that your user-id is a member of "pulse-rt" and "jackuser": (Your output may look different)
  46. $ id user1
  47. uid=500(user1) gid=500(user1) groups=500(user1),10(wheel),100(users),497(pulse-rt),490(jackuser)
  48. Restart PulseAudio (as your own ID, not root):
  49. pulseaudio -k
  50. Test without using flash, mp3 or anything special:
  51. 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.
  52. Common problems and fixes
  53. If the above does not work there are several things you can try
  54. To temporarily disable PulseAudio for a given application, in this example xine, in a terminal (as your user) run:
  55. pasuspender xine
  56. To remove PulseAudio from being used by default:
  57. Remove the plugin that calls PulseAudio:
  58. su -c "yum remove alsa-plugins-pulseaudio"
  59. Apply the changes:
  60. From the System menu bar, Select logout. Log back in to apply the changes above.
  61. If you are running Fedora under VMWare, and it reports unable to open /dev/dsp (starts with sound disconnected):
  62. Install pulseaudio-utils and run vmware under padsp to provide backward compatability:
  63. su -c "yum install pulseaudio-utils" ;
  64. padsp vmware
  65. To really remove PulseAudio for some reason:
  66. Remove PulseAudio and all of it's dependencies:
  67. su -c "yum remove alsa-plugins-pulseaudio pulseaudio"
  68. Apply the changes:
  69. From the System menu bar, Select logout. Log back in to apply the changes above.
  70. File a bug under "Fedora 10" and "PulseAudio" to explain the problems you were having and how this helped: https://bugzilla.redhat.com/
  71. There are known conflicts with kernel-2.6.27.9-159.fc10 and Intel Audio cards.
  72. To see if this includes you run the following:
  73. uname -r ;
  74. lspci |grep Audio ;
  75. lsmod |grep snd_hda_intel
  76. If it does match, update and reboot your system:
  77. su -c "yum update" ;
  78. shutdown -r now
  79. (At this time, kernel-2.6.27.12-170.2.5.fc10 is current, and has this problem resolved.)
  80. More Information
  81. Any additional information or notes.
  82. 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.
  83. If the problem you are having is with Flash, See http://fedorasolved.org/browser-solutions/flash
  84. 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.
  85. Disclaimer
  86. 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
  87. Added Reading
  88. http://www.pulseaudio.org/wiki/PerfectSetup
  89. http://forums.fedoraforum.org/showthread.php?t=206868
  90. http://www.harald-hoyer.de/linux/pulseaudio-and-jackd
  91. http://www.fedorafaq.org/#sound-pops