Difference between revisions of "PulseAudio (日本語)"

From ArchWiki
Jump to: navigation, search
(ALSA/dmix でハードウェアデバイスを占有しない)
m (実行)
Line 27: Line 27:
  
 
{{Note|
 
{{Note|
* PulseAudio の動作には [[D-Bus]] が必要です。
+
* PulseAudio の動作には [[D-Bus (日本語)|D-Bus]] が必要です。
 
* およその X11 環境では、X11 セッションの起動時に pulseaudio が自動的に起動されます。
 
* およその X11 環境では、X11 セッションの起動時に pulseaudio が自動的に起動されます。
 
}}
 
}}

Revision as of 02:35, 3 February 2014

Template:Related articles start (日本語)

  • PulseAudio/Examples
  • </ul></div> PulseAudioGNOMEKDE などのデスクトップ環境で一般的に使われているサウンドサーバーです。ALSAOSS などの既存のカーネルサウンドコンポーネントを使うサウンドアプリケーションに対して代理として動作します。ALSA が Arch Linux にデフォルトで含まれているため、基本的には ALSA に PulseAudio を含めることになります。

    Contents

    インストール

    実行

    Warning: もし、ユーザーごとに設定ファイル (例えば client.confdaemon.confdefault.paのような)を ~/.config/pulse/ または ~/.pulse/ にコピーしたのならば、パッケージで提供される /etc/pulse/ 内のファイルの変更にも追随するようにしてください。そうしなければ、PulseAudio は設定エラーで起動しなくなるかもしれません。
    Note:
    • PulseAudio の動作には D-Bus が必要です。
    • およその X11 環境では、X11 セッションの起動時に pulseaudio が自動的に起動されます。

    X を起動した時に pulseaudio が自動で立ち上がらない場合は、次のコマンドで実行できます:

    $ pulseaudio --start
    

    次のコマンドで PulseAudio を停止できます:

    $ pulseaudio -k
    

    イコライザー

    pulseaudio の比較的新しいバージョンでは、統合された10帯域のイコライザーシステムが搭載されています。このイコライザーを有効にするためには、以下の作業が必要です。

    equalizer sink と dbus-protocol モジュールをロードする

    $ pactl load-module module-equalizer-sink
    $ pactl load-module module-dbus-protocol
    

    GUI フロントエンドをインストールして実行する

    python-pyqt4 をインストールし、以下を実行します。

    $ qpaeq
    
    Note: もし qpaeq が動作しなければ、 pavucontrol をインストールして、メディアプレイヤーの動作中に "ALSA Playback on" を "FFT based equalizer on ..."へ変更するとよいでしょう。

    起動時に イコライザーと dbus モジュールをロードする

    お好みのエディタで /etc/pulse/default.pa を開き、以下の行を追記します。

    ### Load the integrated pulseaudio equalizer and dbus module
    load-module module-equalizer-sink
    load-module module-dbus-protocol
    

    バックエンドの設定

    ALSA

    Note: この追加選択パッケージは、x86_64 環境で動作させる場合で、(Wineのような) 32 ビットプログラムでも音を鳴らすときには必要なものです。

    PulseAudio をサポートせず ALSA をサポートするアプリケーションのためには、ALSA のための PulseAudio プラグインをインストールすることが推奨されます。このパッケージは、ALSA に PulseAudio を利用させるために必要なファイル /etc/asound.conf も含んでいます。

    アプリケーションに ALSA の OSS エミュレーションをやめさせ PulseAudio を迂回させない(そうして、他のアプリケーションの音声出力を防ぐ)ためには、起動時に snd_pcm_oss モジュールがロードされないようにします。このモジュールが現在ロードされていたら(lsmod|grep oss で確認可能), 以下を実行してモジュールを無効にしましょう。

    # rmmod snd_pcm_oss
    

    ALSA/dmix でハードウェアデバイスを占有しない

    Note: This section describes alternative configuration, which is generally not recommended.

    ALSA を直接アプリケーションで使って他のアプリケーションも使えるようにしたいと思っているならば、同時に PulseAudio も必要になります。以下の手順で PulseAudio が ALSA のハードウェアデバイスの代わりに dmix を使うようにできます。

    • pulseaudio-alsa パッケージを削除してください、ALSA アプリケーションと PulseAudio の互換レイヤーが含まれています。削除した後、ALSA アプリは Pulse につかまることなく ALSA を直接使うようになります。
    • /etc/pulse/default.pa を編集してください。
    バックエンドドライバーをロードする行を探してアンコメントしてください。以下のように device パラメータを追加してください。それから autodetect モジュールをロードする行をコメントアウトしてください。
    load-module module-alsa-sink device=dmix
    load-module module-alsa-source device=dsnoop
    # load-module module-udev-detect
    # load-module module-detect
    
    • 任意: kdemultimedia-kmix を使っていてPulseAudio ボリュームのかわりに ALSA ボリュームを操作したい場合:
    $ echo export KMIX_PULSEAUDIO_DISABLE=1 > ~/.kde4/env/kmix_disable_pulse.sh
    $ chmod +x ~/.kde4/env/kmix_disable_pulse.sh
    
    • コンピュータを再起動して、alsa と pulseaudio のアプリケーションを同時に実行して見て下さい。同時に音声を鳴らすことができるはずです。
    PulseAudio ボリュームの操作が必要なときは pavucontrol を使って下さい。

    OSS

    There are multiple ways of making OSS-only programs play to PulseAudio:

    ossp

    Install ossp package and start ossp service.

    padsp ラッパー (PulseAudio の一部)

    Programs using OSS can work with PulseAudio by starting it with padsp:

    $ padsp OSSprogram
    

    A few examples:

    $ padsp aumix
    $ padsp sox foo.wav -t ossdsp /dev/dsp
    

    You can also add a custom wrapper script like this:

    /usr/local/bin/OSSProgram
    #!/bin/sh
    exec padsp /usr/bin/OSSprogram "$@"
    

    Make sure /usr/local/bin comes before /usr/bin in your PATH.

    GStreamer

    To make GStreamer use PulseAudio, you need to install gst-plugins-good or gstreamer0.10-good-plugins.

    OpenAL

    OpenAL Soft should use PulseAudio by default, but can be explicitly configured to do so:
    /etc/openal/alsoft.conf
    drivers=pulse,alsa

    libao

    Edit the libao configuration file:

    # /etc/libao.conf
    default_driver=pulse

    Be sure to remove the dev=default option of the alsa driver or adjust it to specify a specific Pulse sink name or number.

    Note: You could possibly also keep the libao standard of outputting to the alsa driver and its default device if you install pulseaudio-alsa since the ALSA default device then is PulseAudio.

    ESD

    PulseAudio is a drop-in replacement for the enlightened sound daemon (ESD). While PulseAudio is running, ESD clients should be able to output to it without configuration.

    デスクトップ環境

    X11

    Note: As mentioned previously, PulseAudio is very likely launched automatically via either /etc/X11/xinit/xinitrc.d/pulseaudio or the files in /etc/xdg/autostart/ if users have some DE installed.

    Check to see if PulseAudio is running:

    $ ps aux | grep pulse
     facade   1794  0.0  0.0 360464  6532 ?        S<l  15:33   0:00 /usr/bin/pulseaudio --start
     facade   1827  0.0  0.0  68888  2608 ?        S    15:33   0:00 /usr/lib/pulse/gconf-helper
    

    If Pulseaudio is not running and users are using X, the following will start PulseAudio with the needed the X11 plugins manually:

    $ start-pulseaudio-x11
    

    If you are not running Gnome, KDE or XFCE and your ~/.xinitrc does not source the scripts in /etc/X11/xinit/xinitrc.d (such as is done in the example file /etc/skel/.xinitrc) then you can launch PulseAudio on boot with:

    ~/.xinitrc
    /usr/bin/start-pulseaudio-x11
    

    GNOME

    As of GNOME 3, GNOME fully integrates with PulseAudio and no extra configuration is needed.

    KDE 3

    PulseAudio is not a drop-in replacement for aRts. Users of KDE 3 cannot use PulseAudio. However note, recent versions of PulseAudio may have eliminated the prohibition:

    See: http://www.pulseaudio.org/wiki/PerfectSetup KDE 3 uses the artsd sound server by default. However, artsd itself can be configured to use an Esound backend. Edit kcmartsrc (either in /etc/kde or /usr/share/config for global configuration or .kde/share/config to configure only one user) like this:

    [Arts]
    Arguments=\s-F 10 -S 4096 -a esd -n -s 1 -m artsmessage -c drkonqi -l 3 -f
    NetworkTransparent=true
    SuspendTime=1
    

    KDE Plasma ワークスペースと Qt4

    PulseAudio, it will be used by KDE/Qt4 applications. For more information see the KDE page in the PulseAudio wiki.

    PulseAudio support has been merged into KMix, the default KDE sound mixer.

    If the phonon-gstreamer backend is used for Phonon, GStreamer should also be configured to use PulseAudio by installing gstreamer0.10-good-plugins.

    One useful tidbit from that page is to add load-module module-device-manager to /etc/pulse/default.pa.

    Additionally, the kdeplasma-applets-veromixAUR is available in the AUR as a KDE alternative to KMix or pavucontrol.

    If KMix/Veromix fail to connect to PulseAudio at boot you may need to edit /etc/pulse/client.conf to include autospawn = yes instead of autospawn = no.

    Xfce

    Applications running under Xfce can take advantage of PulseAudio. To manage PulseAudio settings you can use pavucontrol.

    アプリケーション

    Audacious

    Audacious は PulseAudio にもともと対応しています。利用するためには、Audacious で 設定→オーディオ→出力プラグイン で「PulseAudio 出力」に設定しましょう。

    Java/OpenJDK 6

    Create a wrapper for the java executable using padsp as seen on the Java sound with Pulseaudio page.

    Music Player Daemon (MPD)

    configure MPD to use PulseAudio. See also MPD/Tips and Tricks#MPD and PulseAudio.

    MPlayer

    MPlayer natively supports PulseAudio output with the "-ao pulse" option. It can also be configured to default to PulseAudio output, in ~/.mplayer/config for per-user, or /etc/mplayer/mplayer.conf for system-wide:

    /etc/mplayer/mplayer.conf
    ao=pulse

    Skype (x86_64)

    Install lib32-libpulse, otherwise the following error will occur when trying to initiate a call: "Problem with Audio Playback".

    トラブルシューティング

    インストールしたあと音が鳴らない

    オーディオデバイスがミュートになっている

    もし、ALSAの利用中にどうやっても音が鳴らないならば、サウンドカードのミュート設定を外しましょう。そのためには、alsamixer を実行して、それぞれの列の下部が緑色の「00」になっているようにします( m キーを押すことで切り替えます):

    $ alsamixer -c 0
    
    Note: alsamixer は、どの再生デバイスがデフォルトになっているかを教えてくれません。インストール後に音が鳴らない理由としては、pulseaudio が異なる再生デバイスをデフォルトとして検出してしまったことが考えられます。pavucontrol をインストールして、.wav ファイルを再生しながら、どこかに出力されていないか pavucontrol パネルで確認しましょう。

    Auto-Mute モード

    Auto-Mute Mode may be enabled. It can be disabled using alsamixer.

    See http://superuser.com/questions/431079/how-to-disable-auto-mute-mode for more.

    設定ファイルが間違っている

    If after starting pulseaudio, the system outputs no sound, it may be necessary to delete the contents of ~/.pulse. Pulseaudio will automatically create new configuration files on its next start.

    Flash コンテンツ

    Since Adobe Flash does not directly support PulseAudio the recommended way is to configure ALSA to use the virtual PulseAudio soundcard.

    Alternatively you may try out libflashsupport-pulseAUR from the AUR.

    Note: This may invariably crash the flash plugin.

    カードが表示されない

    If PulseAudio starts, run pacmd list. If no cards are reported, make sure that the ALSA devices are not in use:

    $ fuser -v /dev/snd/*
    $ fuser -v /dev/dsp
    

    Make sure any applications using the pcm or dsp files are shut down before restarting PulseAudio.

    "dummy output" しかデバイスが表示されない

    This may be caused by different reasons, one of them being the .asoundrc file in $HOME is taking precedence over the systemwide /etc/asound.conf.

    The user file is modified also by the tool asoundconf or by its graphical variant asoundconf-gtk (the latter is named "Default sound card" in the menu) as soon as it runs. Prevent the effects of .asoundrc altogether by commenting the last line like this:

    .asoundrc
    # </home/yourusername/.asoundrc.asoundconf>
    

    Maybe some program is monopolizing the audio device:

    # fuser -v /dev/snd/*
                         USER       PID  ACCESS COMMAND
    /dev/snd/controlC0:  root        931 F....  timidity
                         bob        1195 F....  panel-6-mixer
    /dev/snd/controlC1:  bob        1195 F....  panel-6-mixer
                         bob        1215 F....  pulseaudio
    /dev/snd/pcmC0D0p:   root        931 F...m  timidity
    /dev/snd/seq:        root        931 F....  timidity
    /dev/snd/timer:      root        931 f....  timidity
    

    That means timidity blocks pulseaudio from accessing the audio devices. Just killing timidity will make the sound work again.

    Another reason is FluidSynth conclicting with pulseaudio as discussed in this thread. The solution is to remove FluidSynth:

    # pacman -Rnsc fluidsynth
    

    KDE Plasma ワークスペース

    It may be that another output device set as preferred in phonon. Make sure that every setting reflects the preferred output device at the top, and check the playback streams tab in kmix to make sure that applications are using the device for output.

    To see your default audio device, you can run:

    pactl stat
    

    To see available audio devices:

    pactl list
    

    To set your default audio device use "pacmd" or add to /etc/pulse/default.pa:

    set-default-sink alsa_output.analog-stereo
    

    Failed to create sink input: sink is suspended

    If you do not have any output sound and receive dozens of errors related to a suspended sink in your journalctl -b log, then backup first and then delete your user-specific pulse folders:

    $ rm -r ~/.pulse ~/.pulse-cookie
    

    モニターの電源を切ると HDMI のサウンド出力がなくなる

    The monitor is connected via HDMI/DisplayPort, and the audio jack is plugged in the headphone jack of the monitor, but pulseaudio insists that it's unplugged:

    pactl list sinks
    ...
    hdmi-output-0: HDMI / DisplayPort (priority: 5900, not available)
    ...
    

    This leads to no sound coming from HDMI output. A workaround for this is to switch to another TTY and back again. This problem has been reported by ATI/Nvidia/Intel users.

    pavucontrol でサウンドデバイスの設定を更新できない

    pavucontrol is a handy GUI utility for configuring pulseaudio. Under its 'Configuration' tab, you can select different profiles for each of your sound devices e.g. analogue stereo, digital output (IEC958), HDMI 5.1 Surround etc.

    However, you may run into an instance where selecting a different profile for a card results in the pulse daemon crashing and auto restarting without the new selection "sticking". If this occurs, use the other useful GUI tool, paprefs, to check under the "Simultaneous Output" tab for a virtual simultaneous device. If this setting is active (checked), it will prevent you changing any card's profile in pavucontrol. Uncheck this setting, then adjust your profile in pavucontrol prior to re-enabling simultaneous output in paprefs.

    複数のサウンドカード・デバイスの同時出力

    Simultaneous output to two different devices can be very useful. For example, being able to send audio to your A/V receiver via your graphics card's HDMI output, while also sending the same audio through the analogue output of your motherboard's built-in audio. This is much less hassle than it used to be (in this example, we are using GNOME desktop).

    Using paprefs, simply select "Add virtual output device for simultaneous output on all local sound cards" from under the "Simultaneous Output" tab. Then, under GNOME's "sound settings", select the simultaneous output you have just created.

    If this doesn't work, try adding the following to ~/.asoundrc:

    pcm.dsp {
       type plug
       slave.pcm "dmix"
    }
    

    Simultaneous output to multiple sinks on the same sound card not working

    This can be useful for users who have multiple sound sources and want to play them on different sinks/outputs. An example use-case for this would be if you play music and also voice chat and want to output music to speakers (in this case Digital S/PDIF) and voice to headphones. (Analog)

    This is sometimes auto detected by pulseaudio but not always. If you know that your soundcard can output to both Analog and S/PDIF at the same time and pulseaudio does not have this option in it's profiles in pavucontrol, or veromix then you probably need to create a configuration file for your soundcard.

    More in detail you need to create a profile-set for your specific soundcard. This is done in two steps mostly.

    • Create udev rule to make pulseaudio choose your pulseaudio configuration file specific to the soundcard.
    • Create the actual configuration.

    Create a pulseadio udev rule.

    Note: This is only an example for Asus Xonar Essence STX. Read udev to find out the correct values.
    Note: Your configuration file should have lower number than the original pulseaudio rule to take effect.
    /usr/lib/udev/rules.d/90-pulseaudio-Xonar-STX.rules
    ACTION=="change", SUBSYSTEM=="sound", KERNEL=="card*", \
    ATTRS{subsystem_vendor}=="0x1043", ATTRS{subsystem_device}=="0x835c", ENV{PULSE_PROFILE_SET}="asus-xonar-essence-stx.conf" 
    

    Create now a configuration file. If you bother you can start from scratch and make if saucy. However you can also use the default configuration file rename it and then add your profile there that you know works. Less pretty but also faster.

    To enable multiple sinks for Asus Xonar Essence STX you need only to add this in.

    Note: asus-xonar-essence-stx.conf also includes all code/mappings from default.conf.
    /usr/share/pulseaudio/alsa-mixer/profile-sets/asus-xonar-essence-stx.conf
    [Profile analog-stereo+iec958-stereo]
    description = Analog Stereo Duplex + Digital Stereo Output
    input-mappings = analog-stereo
    output-mappings = analog-stereo iec958-stereo
    skip-probe = yes
    

    This will auto-profile your Asus Xonar Essence STX with default profiles and add your own profile so you can have multiple sinks.

    You need to create another profile in the configuration file if you want to have the same functionality with AC3 Digital 5.1 output.

    See pulseaudio article about profiles

    Bluetooth サポートを無効にする

    If you do not use Bluetooth you may experience the following error in your journal:

    bluez5-util.c: GetManagedObjects() failed: org.freedesktop.DBus.Error.ServiceUnknown: The name org.bluez was not provided by any .service files
    

    To disable Bluetooth support in PulseAudio, make sure that the following lines are commented out in the configuration file in use (~/.config/pulse/default.pa or /etc/pulse/default.pa):

    ~/.config/pulse/default.pa
    ### Automatically load driver modules for Bluetooth hardware
    #.ifexists module-bluetooth-policy.so
    #load-module module-bluetooth-policy
    #.endif
    
    #.ifexists module-bluetooth-discover.so
    #load-module module-bluetooth-discover
    #.endif
    

    Bluetooth ヘッドセットの再生の問題

    Some user report huge delays or even no sound when the bluetooth connection does not send any data. This is due to the module-suspend-on-idle module, which automatically suspends sinks/sources on idle. As this can cause problems with headset, the responsible module can be deactivated.

    To disable loading of the module-suspend-on-idle module, comment out the following line in the configuration file in use (~/.config/pulse/default.pa or /etc/pulse/default.pa):

    ~/.config/pulse/default.pa
    ### Automatically suspend sinks/sources that become idle for too long
    #load-module module-suspend-on-idle
    

    Finally restart PulseAudio to apply the changes.

    Bluetooth や USB ヘッドセットの自動切り替え

    Add the following:

    /etc/pulse/default.pa
    # automatically switch to newly-connected devices
    load-module module-switch-on-connect
    

    Pulse が ALSA の設定を上書きする

    Pulseaudio usually overwrites the ALSA settings- for example set with alsamixer- at start up, even when the alsa daemon is loaded. Since there seems to be no other way to restrict this behaviour, a workaround is to restore the alsa settings again after pulseaudio had started. Add the following command to .xinitrc or .bash_profile or any other autostart file:

    restore_alsa() {
     while [ -z "$(pidof pulseaudio)" ]; do
      sleep 0.5
     done
     alsactl -f /var/lib/alsa/asound.state restore 
    }
    restore_alsa &
    

    Pulse が再起動するのを止める

    Sometimes you may wish to temporarily disable Pulse. In order to do so you will have to prevent Pulse from restarting after being killed.

    ~/.config/pulse/client.conf
    # Disable autospawning the PulseAudio daemon
    autospawn = no

    デーモンの起動が失敗する

    Try resetting PulseAudio:

    $ rm -rf /tmp/pulse* ~/.pulse*
    $ pulseaudio -k
    $ pulseaudio --start
    

    If there is no server running but pulseaudio fails to start with an error message "User-configured server at ... refusing to start/autospawn", the issue may be with PulseAudio settings from a previous login. Check to see if there are any stale properties attached to the X11 root window with pax11publish -d, and if there are, remove them with pax11publish -r before trying to start the server. This manual cleanup is always required when using LXDM because it does not restart the X server on logout; see LXDM#PulseAudio.

    inotify の問題

    If the previous fix doesn't work, see if you get an error like this:

    $ pulseaudio -vvvv
    E: [pulseaudio] module-udev-detect.c: You apparently ran out of inotify watches, probably because Tracker/Beagle took them all away. I wished people would do their homework first and fix inotify before using it for watching whole directory trees which is something the current inotify is certainly not useful for. Please make sure to drop the Tracker/Beagle guys a line complaining about their broken use of inotify.
    

    In which case you have run out of inotify watches.

    This can quickly be resolved by:

    # echo 100000 > /proc/sys/fs/inotify/max_user_watches
    

    To have it permanently changed, use:

    /etc/sysctl.d/99-sysctl.conf
    # Increase inotify max watchs per user
    fs.inotify.max_user_watches = 100000

    padevchooser

    If one cannot launch the PulseAudio Device Chooser, first restart the Avahi daemon (avahi-daemon).

    Glitches, skips or crackling

    The newer implementation of PulseAudio sound server uses a timer-based audio scheduling instead of the traditional interrupt-driven approach.

    Timer-based scheduling may expose issues in some ALSA drivers. On the other hand, other drivers might be glitchy without it on, so check to see what works on your system.

    To turn timer-based scheduling off add tsched=0 in /etc/pulse/default.pa:

    /etc/pulse/default.pa
    load-module module-udev-detect tsched=0
    

    Then restart the PulseAudio server:

    $ pulseaudio -k
    $ pulseaudio --start
    

    Do the reverse to enable timer-based scheduling, if not already enabled by default.

    Please report any such cards to PulseAudio Broken Sound Driver page

    Setting the default fragment number and buffer size in Pulseaudio

    More Information

    Finding out your audio device parameters (1/4)

    To find your sound card buffering settings:

    $ echo autospawn = no >> ~/.pulse/client.conf
    $ pulseaudio -k
    $ LANG=C timeout --foreground -k 10 -s kill 10 pulseaudio -vvvv 2>&1 | grep device.buffering -B 10
    $ sed -i '$d' ~/.pulse/client.conf
    

    For each sound card detected by Pulseaudio, you will see output similar to this:

    I: [pulseaudio] source.c:     alsa.long_card_name = "HDA Intel at 0xfa200000 irq 46"
    I: [pulseaudio] source.c:     alsa.driver_name = "snd_hda_intel"
    I: [pulseaudio] source.c:     device.bus_path = "pci-0000:00:1b.0"
    I: [pulseaudio] source.c:     sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
    I: [pulseaudio] source.c:     device.bus = "pci"
    I: [pulseaudio] source.c:     device.vendor.id = "8086"
    I: [pulseaudio] source.c:     device.vendor.name = "Intel Corporation"
    I: [pulseaudio] source.c:     device.product.name = "82801I (ICH9 Family) HD Audio Controller"
    I: [pulseaudio] source.c:     device.form_factor = "internal"
    I: [pulseaudio] source.c:     device.string = "front:0"
    I: [pulseaudio] source.c:     device.buffering.buffer_size = "768000"
    I: [pulseaudio] source.c:     device.buffering.fragment_size = "384000"
    

    Take note the buffer_size and fragment_size values for the relevant sound card.

    Calculate your fragment size in msecs and number of fragments (2/4)

    Pulseaudio's default sampling rate and bit depth are set to 44100Hz @ 16 bits.

    With this configuration, the bit rate we need is 44100*16 = 44100 is disabled and needs to be changed to 96000:

    # sed 's/; default-sample-rate = 44100/default-sample-rate = 96000/g' -i /etc/pulse/daemon.conf
    

    Restart pulseaudio to apply the new settings (4/5)

    $ pulseaudio -k
    $ pulseaudio --start
    

    Finally check by recording and playing it back (5/5)

    Let us record some voice using mic for say 10 seconds. Make sure the mic is not muted and all

    $ arecord -f cd -d 10 test-mic.wav
    

    After 10 seconds, let us play the recording...

    $ aplay test-mic.wav
    

    Now hopefully, there is no static noise in microphone recording anymore.

    Bluetooth デバイスをペアリングしても音が鳴らない

    See the article in Bluetooth section

    Starting from PulseAudio 2.99 and bluez 4.101 you should avoid using Socket interface. Do NOT use:

    /etc/bluetooth/audio.conf
    [General]
    Enable=Socket
    

    If you face problems with A2DP and PA 2.99 make sure you have sbc library.

    曲が終わるとサブウーファーが止まる

    Known issue: https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/494099

    To fix this, must edit: /etc/pulse/daemon.conf and enable enable-lfe-remixing :

    /etc/pulse/daemon.conf
    enable-lfe-remixing = yes
    

    Pulseaudio で間違ったマイクが使われる

    If Pulseaudio uses the wrong microphone, and changing the Input Device with Pavucontrol did not help, take a look at alsamixer. It seems that Pavucontrol does not always set the input source correctly.

    $ alsamixer
    

    Press F6 and choose your sound card, e.g. HDA Intel. Now press F5 to display all items. Try to find the item: Input Source. With the up/down arrow keys you are able to change the input source.

    Now try if the correct microphone is used for recording.

    Choppy Sound with Analog Surround Sound Setup

    The low-frequency effects (LFE) channel is not remixed per default. To enable it the following needs to be set in /etc/pulse/daemon.conf :

    /etc/pulse/daemon.conf
    enable-lfe-remixing = yes
    

    ボリュームのカットオフで音が鳴らない

    Known issue (won't fix): https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/223133

    If sound doesn't play when Pulseaudio's volume is set below a certain level, try ignore_dB=1 in /etc/pulse/default.pa:

    /etc/pulse/default.pa
    load-module module-udev-detect ignore_dB=1
    

    However, be aware that it may cause another bug preventing pulseaudio to unmute speakers when headphones or other audio devices are unplugged.

    内蔵マイクのボリュームが小さい

    If you experience low volume on internal notebook microphone, try setting:

    /etc/pulse/default.pa
    set-source-volume 1 300000
    

    Clients alter master output volume (aka volume jumps to 100% after running application)

    If changing volume in specific applications changes also master output volume you can try to diasble flat volumes. Set:

    /etc/pulse/daemon.conf
    flat-volumes = no
    

    Then restart Pulseaudio daemon:

    # pulseaudio -k
    # pulseaudio --start
    

    リアルタイムスケジューリング

    If rtkit doesn't work, you can manually set up your system to run PulseAudio with realtime scheduling, which can help performance. To do this, add the following lines to /etc/security/limits.conf:

    @pulse-rt - rtprio 9
    @pulse-rt - nice -11
    

    Afterwards, you need to add your user to the pulse-rt group:

    # gpasswd -a <user> pulse-rt
    

    サスペンドから復帰した後に音が鳴らない

    If audio generally works, but stops after resume from suspend, try "reloading" PulseAudio by executing:

    $ /usr/bin/pasuspender /bin/true
    

    This is better than completely killing and restarting it (pulseaudio -k && pulseaudio --start`), because it doesn't break already running applications.

    If the above fixes your problem, you may wish to automate it, by creating a systemd service file.

    1. Create the template service file in /etc/systemd/system/resume-fix-pulseaudio@.service:

    [Unit]
    Description=Fix PulseAudio after resume from suspend
    After=suspend.target
    
    [Service]
    User=%I
    Type=oneshot
    Environment="XDG_RUNTIME_DIR=/run/user/%U"
    ExecStart=/usr/bin/pasuspender /bin/true
    
    [Install]
    WantedBy=suspend.target
    

    2. Enable it for your user account

    # systemctl enable resume-fix-pulseaudio@YOUR_USERNAME_HERE.service
    

    3. Reload systemd

    # systemctl --system daemon-reload
    

    ALSA Channels Mute When Headphones Are Plugged/Unplugged Improperly

    If when you unplug your headphones or plug them in the audio remains muted in alsamixer on the wrong channel due to it being set to 0%, you may be able to fix it by opening /etc/pulse/default.pa and commenting out the line: load-module module-switch-on-port-available

    pactl "invalid option" error with negative percentage arguments

    pactl commands that take negative percentage arguments will fail with an 'invalid option' error. Use the standard shell '--' pseudo argument to disable argument parsing before the negative argument. e.g. pactl set-sink-volume 1 -- -5%.

    Daemon already running

    On some systems pulseaudio may be started multiple times. journalctl will report:

    [pulseaudio] pid.c: Daemon already running.
    

    Make sure to use only one method of autostarting applications. pulseaudio includes these files:

    • /etc/X11/xinit/xinitrc.d/pulseaudio
    • /etc/xdg/autostart/pulseaudio.desktop
    • /etc/xdg/autostart/pulseaudio-kde.desktop

    Also check user autostart files and directories, such as xinitrc, ~/.config/autostart/ etc.

    参照