• 対象とするUbuntuのバージョン

    • 8.04
    • 8.10

目次

  1. HOWTO: PulseAudio Fixes & System-Wide Equalizer Support
  2. PulseAudio のトラブルシューティング及びシステム全体でのイコライザーの利用
    1. Overview:
    2. 全体的なこと:
    3. Frequently Asked Questions
    4. F.A.Q.
      1. Q. What exactly is PulseAudio?
      2. Q.実際「ぱるすおーでぃお」って何さ?
      3. Q. PulseAudio? Bleh! I don't want it on my system.
      4. Q. ぱるすおーでぃお?うえぇ!ぼくそんなのいらないよ。
      5. Q. If PulseAudio is already installed, why do I need this guide?
      6. Q. PulseAudio がもう入ってんならどうしてこんなガイドが必要なのさ?
      7. Q. I'm glad to hear these issue are fixed in Intrepid, but why the hell aren't they fixed in Hardy already?
      8. Q. I followed your guide and PulseAudio still doesn't work!
      9. Q. I can't get Skype/WINE/an OSS application/XYZ working correctly with PulseAudio, what can I do?
      10. Q. Where can I find the appropriate bug reports related to these issues?
    5. Part A: Common instructions (Hardy & Intrepid)
      1. 1. Backup (and then delete) your previous configuration files:
      2. 2. Ensure you have Adobe Flash & the necessary PulseAudio libraries and configuration utilities installed:
      3. 3. Ensure the evil "libflashsupport" library is not installed:
      4. 4.
      5. 5.
      6. 6.
    6. Part B: Hardy Heron (8.04)
      1. 0. 64-bit users only: Install "getlibs" and some extra 32-bit libraries that are required for Flash 10 & Skype to function properly:
      2. 1. Edit /etc/apt/sources.list:
      3. 2. Update your repositories and upgrade packages:
      4. 3. Enable the PulseAudio ALSA plugins:
      5. 4.
    7. Part C: Intrepid Ibex (8.10)
      1. 1. Edit /etc/apt/sources.list:
      2. 2. Update your repositories and upgrade packages:
      3. 3. Ensure that your sound card's PCM mixer is not muted or set to 0% volume (this appears to be a bug in Intrepid):
      4. 4.
    8. Appendix A - General Troubleshooting
    9. Appendix B: Advanced PulseAudio Configuration
      1. Q. Where are the PulseAudio configuration utilities?
      2. Q. How can I tell if an application is using PulseAudio successfully?
      3. Q. How can I change the default playback and/or recording device for my system?
      4. Q. Is it possible to change to a different playback and/or recording device for an individual application?
      5. Q. If I plug in my USB/Bluetooth headset, my external speakers no longer work!
      6. Q. PulseAudio is working correctly, but I am noticing some stuttering on my system. Is there anything I can do to help?
      7. Q. I'm unhappy about the audio quality / CPU usage of PulseAudio. How do I change this?
    10. Appendix C: Application Compatibility Guide
      1. OSS applications:
      2. Skype:
      3. WINE:
      4. Audacity (updated 11/12):
      5. Everything else:
    11. Appendix D: System-Wide Equalizer
      1. 1. Install the required LADSPA plugins and tools:
      2. 2. Edit ~/.asoundrc:
      3. 3. Edit /etc/pulse/default.pa:
      4. 4.

Ubuntu 英語の "Tutorial & Tips" を翻訳してみませんか?詳しくはこちらを参照下さい。

以下、とりあえず対訳式で翻訳中。現在翻訳作業中。手伝ってもらえると助かります。

HOWTO: PulseAudio Fixes & System-Wide Equalizer Support

PulseAudio のトラブルシューティング及びシステム全体でのイコライザーの利用

  • # (風流塵)題名の上手い訳が思いつかない :(

Overview:

全体的なこと:

(i) Note 1. Jaunty users: If you are upgrading from Hardy or Intrepid, it is highly recommended that you follow the guide to remove obsolete configuration. If you have performed a clean installation, follow the guide only if you are experiencing issues.

(i) 注意 1. Jaunty を使っている方へ: もしお使いのシステムが Hardy や Intrepid からアップグレードしたものならば、すでにある古い設定を削除することを強く推奨します。クリーンインストールを行ったのであれば問題が生じた場合にのみこのガイドの記述に従って下さい。

(i) Note 2. Intrepid users: due to a bug in the ALSA libraries, your PCM mixer may occasionally become muted or reset to 0% volume. If you cannot hear sound - or hear a faint crackling - refer to Part C, Step 3.

(i) 注意2. Intrepid を使っている方へ: ALSA のライブラリのバグのために、PCMのミキサが時折消音されたり、あるいは音量0に初期化されたりするかもしれません。もし音が聞こえない、あるいは微かな音がカリカリと聞こえる場合は パートCの手順3を参照下さい。

(i) Note 3: OSSv4 users: PulseAudio does not support OSSv4, so this guide will serve no purpose to you. If you have chosen to install OSSv4 and experience issues, you should seek guidance within the threads dedicated to OSSv4. I do not recommend users to install OSSv4 due to compatibility and support issues.

(i) 注意3: OSSv4 を使っている方へ: PulseAudio は OSSv4 をサポートしていません。よってこのガイドは OSSv4 を使っている方には意味がありません。もし OSSv4 をインストールし体感したいと決めているなら フォーラムのスレッドから OSSv4 向けの入門記事を探して下さい。筆者は互換性とサポートの問題から OSSv4 のインストールはおすすめしません。

(i) Note 4: Kubuntu users: Don't follow this guide - PulseAudio isn't used in your distribution.

(i) 注意4: Kubuntu を使っている方へ: このガイドに従わないで下さい。Kubuntu は PulseAudio を利用するようには設計されていません。

PulseAudio is an advanced sound server which has been included in Ubuntu (i.e. the standard GNOME version) since the release of Hardy Heron (8.04). Unfortunately, Hardy shipped with a suboptimal configuration of PulseAudio which has resulted in users experiencing various problems, ranging from sporadic crashes in Firefox to sound mixing being completely broken. PulseAudio in Intrepid should work by default, but it is quite possible that your configuration is suboptimal. For more information, refer to the FAQ below.

PulseAudio はリリース 8.04(Hardy Heron) から Ubuntu(つまり標準のGNOME版デスクトップ)に含まれている先進的なサウンドサーバです。不幸なことに、Hardy は PulseAudio の 最適とは呼べない設定状態とともに船出してしまいました。ユーザーはそれによって、程度の軽いものでは思いだしたように落ちる Firefox から、重いものではサウンドミキシングが完璧に壊れてしまう状況まで、種々の問題を体験することとなりました。Intrepid の PulseAudio は初期状態で動くことは動くはずですが、設定が不十分な可能性は充分にあります。より多くの情報は以下の FAQ を参照下さい。

  • When you are ready to follow this guide, this is all you need to know:
    • Hardy users: Follow Part A & B.

    • Intrepid users: Follow Part A & C.

  • Additionally:
    • Appendix A gives general troubleshooting tips - if you have problems, start here.

    • Appendix B gives useful information on the more advanced/technical features of PulseAudio.

    • Appendix C gives information on how to properly configure specific applications that may not work with PulseAudio by default, including (but not limited to): WINE, Skype, and all OSS applications.

    • Appendix D will show you how to enable equalized audio for all applications on your system - this is especially useful for laptop users who experience poor audio quality with their internal speakers.

  • ガイドに従う準備が出来たら以下をご覧下さい。これが知る必要がある全てです。
    • Hardy を使っている方: パートAパートB

    • Intrepid を使っている方: パートAパートC

  • おまけ:

    • おまけAは一般的なトラブルシューティングについてのTipsです。もしPulseAudioに問題を抱えていたらここから読み始めて下さい。

    • おまけBはPulseAudioのより高度な、あるいは技術的な特色についての記事です。

    • おまけCは初期設定ではPulseAudio下で動かないだろうアプリケーション毎の適切な設定に関するHowToです。WINE、Skype、Audacity、そして全OSS利用アプリケーションについての記述が含まれます。

    • おまけDは自分のシステムにインストールされている全てのアプリケーションの音声出力に同一のイコライザを適用する方法についての記事です。この記述はとりわけ内蔵スピーカーの貧弱な音声品質に困っているユーザーにとって有益でしょう。

Frequently Asked Questions

The most common queries are answered here.

F.A.Q.

ここでは良くある質問とその答えを示します。

Q. What exactly is PulseAudio?

Q.実際「ぱるすおーでぃお」って何さ?

A. From the homepage:

PulseAudio is a sound server for POSIX and Win32 systems. A sound server is basically a proxy for your sound applications. It allows you to do advanced operations on your sound data as it passes between your application and your hardware. Things like transferring the audio to a different machine, changing the sample format or channel count and mixing several sounds into one are easily achieved using a sound server.

A. ホームページより引用:

PulseAudio は POSIX や Win32 システム向けのサウンドサーバです。サウンドサーバとは基本的にはお使いのサウンドアプリケーションのプロキシです。サウンドサーバはアプリとハードの間に存在し、仲介するサウンドデータに対する高度な操作を可能にします。音声を他のマシンに伝達したり、サンプリングフォーマットやチャンネル数を変更したり、複数の音声を一つにミキシングしたりといったことがサウンドーサーバによってたやすく実現出来ます。

Simplified: PulseAudio is responsible for playback and mixing of audio on your system. It is not a sound driver - in fact, it runs on top of the Advanced Linux Sound Architecture (ALSA). Aside from all the cool effects PulseAudio provides, it serves as a replacement for ALSA's virtual sound mixing device (DmixPlugin, or "dmix") - thus allowing multiple applications to share access to your sound card.

要約: PulseAudio はお使いのシステムの音声再生とミキシングを引き受けます。しかしサウンド・ドライバではありません。事実、PulseAudio は Advanced Linux Sound Architecture(ALSA) 上で動作しています。PulseAudio はそれ自身が優れた機能を提供するばかりか、ALSA の仮想サウンドミキシングデバイス (DmixPlugin、もしくは「dmix」) の置き換えとしても有用です。それゆえアプリケーション同士がサウンドカードへの出力を共有出来るようになるのです。

Q. PulseAudio? Bleh! I don't want it on my system.

Q. ぱるすおーでぃお?うえぇ!ぼくそんなのいらないよ。

  • # (風流塵)Bleh!って何でしょう?スラングか何か?

A. Well... tough! PulseAudio is already installed and active on Hardy and Intrepid by default; it replaces ESD (ESound Daemon) for system sounds, and most of Ubuntu's default applications already use it (Totem, Rhythmbox, and any other applications using the GStreamer framework). Although some high-profile applications support PulseAudio natively (such as VLC and mplayer), most applications use plain ALSA or OSS output, and thus don't have native PulseAudio support.

A. ええと……お生憎様! Hardy や Intrepid では初期状態で既に PulseAudio がインストールされ有効化されています。PulseAudio はシステムサウンド向けに ESD (ESound Daemon) を置き換えているので、Ubuntu のほとんどの標準アプリ (Totem、Rhythmbox といった GStreamer フレームワークで動くアプリ) は実はもう利用しているのですよ。ただ、(VLCやmplayerのような)一部の人気のアプリはネイティブで PulseAudio をサポートしているものの、大体のアプリは無印の ALSA や OSS への出力を行うので PulseAudio のネイティブサポートは有しないのです。

Q. If PulseAudio is already installed, why do I need this guide?

Q. PulseAudio がもう入ってんならどうしてこんなガイドが必要なのさ?

A. While PulseAudio has been installed by default since Hardy Heron (8.04), we dropped the ball when it came to the configuration part. A quote from the main PulseAudio developer, Lennart Pöttering:

A. PulseAudio が Hardy Heron (8.04) 以降システムに標準でインストールされるようになった一方で、私達はそれの設定の段になって、突然ぬかるみに足をとられボールを落っことしてしまうが如き状況に置かれました。以下は PulseAudio の主要な開発者である Lennart Pöttering氏の言葉の引用です。

  • # (風流塵)"we dropped the ball when it came to the configuration part"は良くわからなかったので超訳しました。

Some distributions did a better job adopting PulseAudio than others. On the good side I certainly have to list Mandriva, Debian, and Fedora. OTOH Ubuntu didn't exactly do a stellar job. They didn't do their homework. Adopting PA in a distribution is a fair amount of work, given that it interfaces with so many different things at so many different places. The integration with other systems is crucial. The information was all out there, communicated on the wiki, the mailing lists and on the PA IRC channel. But if you join and hang around on neither, then you won't get the memo. To my surprise when Ubuntu adopted PulseAudio they moved into one of their 'LTS' releases rightaway. Which I guess can be called gutsy -- on the background that I work for Red Hat and PulseAudio is not part of RHEL at this time. I get a lot of flak from Ubuntu users, and I am pretty sure the vast amount of it is undeserving and not my fault.

ディストリビューションによっては PulseAudio を他ディストリより良好な状態で採用する仕事をやってのけた。良い仕事をしたのはもちろん、Mandriva、Debian、そして Fedora だ。他方、Ubuntu の仕事は必ずしも三つ星とは言い難いものだった。彼らは「宿題」をやらなかった。PulseAudio がどれほどの数の箇所においてどれほどの数のもの同士のインターフェイスになっているかを考えるなら、ディストリビューションにおける PulseAudio の採用は大仕事だ。異なる仕組みを統合させるのは困難なのだ。The information was all out there, communicated on the wiki, the mailing lists and on the PA IRC channel. But if you join and hang around on neither, then you won't get the memo. 驚いたのは Ubuntu が LTS のひとつに !PulseAudio を採用したことだ。Which I guess can be called gutsy -- on the background that I work for Red Hat and PulseAudio is not part of RHEL at this time. 私は Ubuntuユーザーから多くの非難を浴びたが、大半は不当なものであり、私の落ち度によるものではないと強く確信している。

When PulseAudio is running, it requires exclusive access to your sound card in order to work correctly as it assumes responsibility for mixing application's sounds instead of ALSA's "dmix" device. If you launch a "regular" application that does not have explicit PulseAudio support, it will most likely try to open the "Dmix" device - and this will deprive PulseAudio of control over the sound card. From the user's perspective, they will observe that audio mixing between applications is broken.

PulseAudio includes ALSA plugins (within the package "libasound2-plugins") which are designed make regular ALSA applications remap audio to the PulseAudio server (and thus avoid mixing problems as described above). Unfortunately, Hardy Heron shipped without these plugins enabled (or even installed) by default, which is causing many, many audio mixing issues for users. To compound the problem, the version of these PulseAudio ALSA plugins in the Hardy repositories do not function correctly, so updated versions are required for ALSA applications to work correctly with PulseAudio.

By following this guide, your system will be configured to use these PulseAudio ALSA plugins for Hardy users (and updated versions of necessary packages will get installed from my PPA). Although Intrepid has these plugins installed and configured by default, following this guide is still worthwhile because a) it will ensure you have a clean PulseAudio configuration, and b) you will hopefully gain a better understanding of how PulseAudio works.

Q. I'm glad to hear these issue are fixed in Intrepid, but why the hell aren't they fixed in Hardy already?

A. The simplest answer to this question is: complexity. Hardy is a LTS (Long Term Support) release, and there is a very strict policy towards updates (SRU; even the most trivial of bugfixes are entered into a code review). In order to fix Hardy, many components will require updates and changes, including but not limited to: libflashsupport, ia32-libs, pulseaudio, libasound2, libasound2-plugins, flashplugin-nonfree, nspluginwrapper...

Up until the last moment of Hardy's development cycle, the PulseAudio ALSA plugins weren't functioning correctly, and Flash 9 absolutely would not work without the "evil" libflashsupport library (I say evil, because it caused frequent random crashes in Firefox) - and so it wasn't possible to enact the required changes before the final release. It's possible now, but there would require a huge amount of effort to review and apply these changes.

Q. I followed your guide and PulseAudio still doesn't work!

A. Refer to Appendix A and provide the requested information in your post.

Q. I can't get Skype/WINE/an OSS application/XYZ working correctly with PulseAudio, what can I do?

A. Some applications require some extra configuration, and some applications don't work with PulseAudio - please refer to Appendix C for information on specific applications.

A. If you click on a step number it will link to the appropriate bug report, if one exists.

Part A: Common instructions (Hardy & Intrepid)

All users must must follow the steps in this section to guarantee a fully working PulseAudio configuration.

1. Backup (and then delete) your previous configuration files:

$ mkdir ~/pulse-backup && cp -r ~/.pulse ~/.asound* /etc/asound.conf /etc/pulse -t ~/pulse-backup/
$ sudo rm -r ~/.pulse ~/.asound* /etc/asound.conf

(i) Note: Don't worry if some of these files did not exist on your system.

2. Ensure you have Adobe Flash & the necessary PulseAudio libraries and configuration utilities installed:

$ sudo apt-get install libasound2-plugins padevchooser libao-pulse libsdl1.2debian-pulseaudio flashplugin-nonfree

3. Ensure the evil "libflashsupport" library is not installed:

$ sudo apt-get remove --purge libflashsupport flashplugin-nonfree-extrasound

4.

Open System/Preferences/Sound. In the Devices section, ensure that all "Sound playback" options are set to Autodetect. Set the "Sound capture" item to "PulseAudio". Close the application when you're finished.

5.

Open the PulseAudio Volume Control application ("pavucontrol", or you can launch "Applications/Sound & Video/!PulseAudio Device Chooser" and select Volume Control from this applet's menu). In the Output Devices section you will see a listing of the playback devices available on your system. Right-click on the entry that you desire to be made the default playback device on your system and enable the "Default" checkmark. Similarly, navigate to Input Devices, then right-click on the device you wish to set as your default input device (microphone), and ensure the "Default" setting is checked. Close the application when you're finished.

(i) Note: If you are greeted with the error "Connection failed: Connection refused", manually launch PulseAudio before opening the PulseAudio Volume Control application:

$ pulseaudio & pavucontrol

6.

Continue to Part B if you are running Hardy Heron (8.04), or Part C if you are running Intrepid Ibex (8.10).

Part B: Hardy Heron (8.04)

Follow the steps in this section only if you are running the Hardy Heron release. Disclaimer: My PPA contains the necessary packages backported from Intrepid for: PulseAudio, ALSA, Flash 10 and nspluginwrapper. If you upgrade to a newer distribution, or Hardy receives official updates for any of these packages, you will not experience any issues.

0. 64-bit users only: Install "getlibs" and some extra 32-bit libraries that are required for Flash 10 & Skype to function properly:

$ wget http://www.boundlesssupremacy.com/Cappy/getlibs/getlibs-all.deb && sudo dpkg -i getlibs-all.deb && rm getlibs-all.deb
$ sudo getlibs -p libnss3-1d libnspr4-0d libcurl3 libasound2-plugins

1. Edit /etc/apt/sources.list:

$ gksudo gedit /etc/apt/sources.list

If they don't already exist, add the following lines to the end of this file and save:

# PulseAudio Fixes - http://ubuntuforums.org/showthread.php?t=789578
deb http://ppa.launchpad.net/psyke83/ppa/ubuntu hardy main
deb-src http://ppa.launchpad.net/psyke83/ppa/ubuntu hardy main
  • # (風流塵)原文の↓の記述を
    deb http://ppa.launchpad.net/psyke83/ubuntu hardy main
    deb-src http://ppa.launchpad.net/psyke83/ubuntu hardy main
    PPAの仕様変更(http://forums.ubuntulinux.jp/viewtopic.php?id=3989)にあわせて修正してみました。

2. Update your repositories and upgrade packages:

$ sudo apt-get update && sudo apt-get dist-upgrade

(i) Note: You may be warned that some packages cannot be authenticated - that's normal. Simply press "y" to confirm installation of unsigned packages.

3. Enable the PulseAudio ALSA plugins:

$ asoundconf set-pulseaudio

(i) Note: Please wait until you have upgraded packages in the previous step before running this command. My packages have a patch for "asoundconf" to ensure it enables the PulseAudio plugins correctly.

4.

Log out & back in for changes to take effect!

Part C: Intrepid Ibex (8.10)

Follow the steps in this section only if you are running the Intrepid Ibex release. Disclaimer: Currently there are no updated packages for Intrepid in my PPA (except for an updated nspluginwrapper package for i386 users). I have decided to keep this step in the guide in case I upload any important updates that will not make it into the official repositories. I will never upload any "risky" packages (i.e. highly untested backports), only upgrades that seem compelling and relatively stable.

1. Edit /etc/apt/sources.list:

$ gksudo gedit /etc/apt/sources.list

If they don't already exist, add the following lines to the end of this file and save:

# PulseAudio Fixes - http://ubuntuforums.org/showthread.php?t=789578
deb http://ppa.launchpad.net/psyke83/ppa/ubuntu intrepid main
deb-src http://ppa.launchpad.net/psyke83/ppa/ubuntu intrepid main
  • # (風流塵)原文の↓の記述を
    deb http://ppa.launchpad.net/psyke83/ubuntu intrepid main
    deb-src http://ppa.launchpad.net/psyke83/ubuntu intrepid main
    PPAの仕様変更(http://forums.ubuntulinux.jp/viewtopic.php?id=3989)にあわせて修正してみました。

2. Update your repositories and upgrade packages:

$ sudo apt-get update && sudo apt-get dist-upgrade

(i) Note: You may be warned that some packages cannot be authenticated - that's normal. Simply press "y" to confirm installation of unsigned packages.

3. Ensure that your sound card's PCM mixer is not muted or set to 0% volume (this appears to be a bug in Intrepid):

$ alsamixer -Dhw

(i) Note: When the PulseAudio ALSA plugins are active, you must explicitly specify your hardware device in alsamixer (marked in blue above), otherwise it will open the PulseAudio mixer.

4.

Log out & back in for changes to take effect!

Appendix A - General Troubleshooting

This section will outline some general troubleshooting steps you can perform to help identify your problem, and the information I need to help with your issues:

  1. Close all applications that may be accessing the sound card.
  2. Open the "PulseAudio Device Chooser" from Applications/Sound & Video. Click on the applet icon, and click "Volume Control...". Click on the "Playback" tab.

  3. Launch the application you wish to test and allow it to play sound.
  4. Check PulseAudio Volume Control's Playback tab and see if the application displays an entry while the application is (or should be) playing audio.

Here are the possible results within the PulseAudio Volume Control's Playback tab:

  1. The application does plays audio and does list an entry in the Playback tab;

    • - the application is using PulseAudio correctly.

  2. The application does plays audio and does not list an entry in the Playback tab;

    • - the application is either accessing your sound card directly or playing sound via ALSA's dmix device. This will prevent PulseAudio from working correctly & cause audio mixing errors.

  3. The application does not play audio and does list an entry in the Playback tab;

    • - the application is using PulseAudio but there is a problem, such as: a bug in PulseAudio, a problem with your ALSA kernel module or libraries, or your PCM/Master volume is muted.

  4. The application does not play audio and does not list an entry in the Playback tab;

    • - the application is trying either to access your sound card directly or to play sound via ALSA's dmix device, but the sound card is already in use. This is the opposite case to result B, which will also cause mixing errors.

  5. The PulseAudio Volume Control application displays the error: "Connection failed: Connection refused";

    • - the PulseAudio daemon is not running.

  6. Other (please specify).

(i) Note: Unless the application you are testing is known to be incompatible with PulseAudio, you should always expect result "A" on a properly configured system.

If you require assistance with a particular application - or simply cannot get PulseAudio to work - provide the following information:

  1. Your distribution version and architecture (e.g. Hardy Heron i386, Intrepid Ibex amd64, etc.).
  2. A listing of your sound devices:
    • $ aplay -l
  3. The verbose output from pulseaudio on your system:
    • $ pkill pulseaudio; sleep 2; pulseaudio -vv
  4. If you are having a problem only with a specific application, specify the application's name and result you received from the instructions above (A-F).

Appendix B: Advanced PulseAudio Configuration

This appendix will explain some of the more advanced/technical features of PulseAudio.

Q. Where are the PulseAudio configuration utilities?

A. Providing you've followed this guide, you can gain access to all the utilities by launching "Applications/Sound & Video/!PulseAudio Device Chooser". The applet's icon will appear in your notificiation tray - left-click to see the options.

The main applications you will want to check are the Manager (to see the current server status) and Volume Control (to manipulate the volume and stream settings).

(i) Note: Please don't mess with any of the options until you have established a working configuration by following this guide - otherwise it'll be a nightmare to isolate your problem.

Q. How can I tell if an application is using PulseAudio successfully?

A. The application will give you result "A" from the troubleshooting steps of Appendix A.

Q. How can I change the default playback and/or recording device for my system?

A. Refer to Part A, Step 5.

Q. Is it possible to change to a different playback and/or recording device for an individual application?

A. Yes. Launch the desired application and play some sound (or begin recording), and open the PulseAudio Volume Control. Click the Playback or Recording tab (depending on which you want to change) and right-click on the desired application's entry. Choose the option "Move Stream..." and select the desired output device.

(i) Note: The volume level, sink (playback) and source (recording) settings will be saved automatically for every application you run, so PulseAudio should remember your settings. If you wish to view or delete these saved settings, they're stored in the file "~/.pulse/volume-restore.table".

Q. If I plug in my USB/Bluetooth headset, my external speakers no longer work!

A. This is normal behaviour, as PulseAudio supports "hotplugging" of audio devices. If you plug in a new device, PulseAudio may choose it as the default sink (audio device). Also see Part A, Step 5.

Q. PulseAudio is working correctly, but I am noticing some stuttering on my system. Is there anything I can do to help?

A. Edit the file /etc/pulse/daemon.conf:

$ gksudo gedit /etc/pulse/daemon.conf

Find the following lines (usually at the bottom):

default-fragments = 8
default-fragment-size-msec = 10

Try experimenting with different values for both of these entries. I can't tell you what values are optimal for your system, as each sound card has different buffer sizes and characteristics - therefore you'll need to use trial & error. The default fragment amount and size used by an untweaked PulseAudio installation is 4 and 25, respectively.

(i) Note 1: you must restart pulseaudio for any configuration changes to take effect.

(i) Note 2: If your system was stuttering in versions of Ubuntu prior to Hardy, then you could be suffering from an ALSA kernel issue - these instructions probably won't help.

Q. I'm unhappy about the audio quality / CPU usage of PulseAudio. How do I change this?

A. For the record, PulseAudio should offer superior quality audio playback than ALSA's by default, as PulseAudio uses a higher quality audio resampler. This also means that PulseAudio may use more CPU usage compared to ALSA, unfortunately. If you wish to change the resampler:

Edit /etc/pulse/daemon.conf:

$ gksudo gedit /etc/pulse/daemon.conf

Find the following line:

resample-method = speex-float-1

You can change the resampler to any of the following, listed in descending order, from highest quality to lowest quality (and therefore, CPU usage):

src-sinc-best-quality, src-sinc-medium-quality, src-sinc-fastest, speex-float-{10-0}, speex-fixed-{10-0}, ffmpeg, src-zero-order-hold, src-linear, trivial

Appendix C: Application Compatibility Guide

This appendix will explain how to configure specific applications that may require manual configuration to work with PulseAudio.

OSS applications:

You need to launch the application using the "padsp" wrapper. For more information, see "man padsp".

Skype:

Open Skype's Options, then go to Sound Devices. You need to set "Sound Out" and "Ringing" to the "pulse" device, and set "Sound In" to the hardware definition of your microphone. For example, my laptop's microphone is defined as "plughw:I82801DBICH4,0".

WINE:

Open the Wine Configuration application ("winecfg"). On the Audio tab, choose the ALSA driver, and leave everything else to default. If your sound stutters, choose the OSS driver instead, and use the "padsp" wrapper to launch the wine executable (via the terminal, or edit your shortcuts).

Audacity (updated 11/12):

From the PerfectSetup page:

Audacity has now been packaged with a proper "alsa: pulse" device listed, in a ppa for ubuntu intrepid. See https://launchpad.net/~diwic/+archive/ppa
  • # (風流塵)原文の↓の記述を
    https://launchpad.net/~diwic/+archive
    PPAの仕様変更(http://forums.ubuntulinux.jp/viewtopic.php?id=3989)にあわせて修正してみました。

Everything else:

refer to the Third Party Applications section of the upstream PerfectSetup wiki page.

(i) Note: Many of the instructions on the PerfectSetup page are either outdated, too distro-agnostic to work on Ubuntu, or have been obsoleted by the fixes in this guide. You should ignore the advice for: ALSA applications, Flash, ESOUND, GNOME, GStreamer Applications, SDL, and Skype.

Appendix D: System-Wide Equalizer

In this section, we will configure PulseAudio to use equalized output, which is especially useful for laptops speakers which have very poor frequency response. If your sound is "tinny" or distorted at high ranges, then this will most likely enhance the quality of your audio.

Warning /!\ Warning 1: Do not attempt to set up the equalizer until you have followed the other parts of this guide and verified that PulseAudio works correctly using "unmodified" output.

Warning /!\ Warning 2: The equalizer may not work on 64 bit systems, as extra 32-bit libraries could be required. If it doesn't work, simply revert the changes you made.

1. Install the required LADSPA plugins and tools:

$ sudo apt-get install swh-plugins ladspa-sdk

2. Edit ~/.asoundrc:

$ gedit ~/.asoundrc

Append the following text to the bottom of this file and save:

pcm.equalized {
  type plug
  slave.pcm "equalizer";
}

pcm.equalizer {
  type ladspa

  # The output from the EQ can either go direct to a hardware device
  # (if you have a hardware mixer, e.g. SBLive/Audigy) or it can go
  # to the software mixer shown here.
  slave.pcm "plughw"
  #slave.pcm "plug:dmix"

  # Sometimes you may need to specify the path to the plugins,
  # especially if you've just installed them.  Once you've logged
  # out/restarted this shouldn't be necessary, but if you get errors
  # about being unable to find plugins, try uncommenting this.
  path "/usr/lib/ladspa"

  plugins [
    {
      label mbeq
      id 1197
      input {
       #this setting is here by example, edit to your own taste
       #bands: 50hz, 100hz, 156hz, 220hz, 311hz, 440hz, 622hz, 880hz, 
       #       1250hz, 1750hz, 25000hz, 50000hz, 10000hz, 20000hz
       #range: -70 to 30
        controls [ -1 -1 -1 -1 -5 -10 -20 -17 -12 -7 -6 -5 -5 0 0 ]
      }
    }
  ]
}

(i) Note 1: If you are on Intrepid, this file will not exist - that's ok. Simply paste into the new file and save normally.

(i) Note 2: If you have multiple sound cards, the section of this text marked in blue may need to be modified slightly. If you have problems, ask in the thread.

3. Edit /etc/pulse/default.pa:

$ gksudo gedit /etc/pulse/default.pa

Find the line "#load-module module-alsa-sink":

### Load audio drivers statically (it's probably better to not load
### these drivers manually, but instead use module-hal-detect --
### see below -- for doing this automatically)
#load-module module-alsa-sink
#load-module module-alsa-source device=hw:1,0
#load-module module-oss device="/dev/dsp" sink_name=output source_name=input

Change the line "#load-module module-alsa-sink" to the following, and save:

  • # (風流塵)
    Find the following line marked in blue: を Find the line "#load-module module-alsa-sink": に、 Change the line in blue を Change the line "#load-module module-alsa-sink" に変えました。

load-module module-alsa-sink device=equalized

(i) Note: Be sure to also remove the comment (#) at the beginning of the line.

4.

Log out & back in for changes to take effect!

That's all folks!

Changelog
Any notable changes to the guide will be mentioned here.
v4.0 - 13/11/08 - Complete re-write. Completely reorganized; Hardy & Intrepid guides merged. Yes, I know it's ridiculously long
v4.1 - 16/11/08 - Corrected some errors in the equalizer section, re-arranged guide to avoid problems with enabling ALSA plugins. Hardy users who followed the earlier revision of this guide: please run "asoundconf set-pulseaudio" to resolve any issues.
v4.2 - 23/11/08 - Added a step in Part C; due to a bug in Intrepid, users should verify their PCM volume is not muted.
v4.3 - 11/12/08 - Added a small note for OSSv4 users & information regarding PulseAudio-compatible Audacity packages available for testing.
v4.4 - 06/01/09 - Fixed typo in Skype configuration section.
v4.5 - 21/03/09 - Added note for Jaunty users.

  • v4.6 - 01/04/09 - Note added to Part A, Step 4.
  • v4.7 - 23/04/09 - Added Jaunty support.
  • v4.8 - 12/05/09 - Note added regarding the equalizer for Jaunty users.
  • v4.9 - 19/05/09 - Added instructions to add repository key, to prevent authentication warnings.
  • ↑v4.6以降の変更分まだ本文に適用出来てません。

UbuntuJapaneseWiki: UbuntuTips/Application/HowToConfigurePulseAudio (最終更新日時 2012-01-10 11:49:17 更新者 匿名)