PulseAudio/Troubleshooting
See PulseAudio for the main article.
Getting debug output from pulseaudio
It can be useful to stop the pulseaudio.socket
and pulseaudio.service
user units, and start manually in a terminal during debugging:
$ pulseaudio -v
Add v
s to increase verbosity.
Volume
Here you will find some hints on volume issues and why you may not hear anything.
Auto-Mute Mode
Auto-Mute Mode is a configurable setting from amixer
. For more information, see ALSA#Disabling auto mute on startup.
Muted audio device
If one experiences no audio output via any means while using ALSA, attempt to unmute the sound card. To do this, launch alsamixer
and make sure each column has a green 00
under it (this can be toggled by pressing m
):
$ alsamixer -c 0
To troubleshoot via CLI only, install pamixer and check the output of the following command:
$ pamixer --get-volume-human
If the output says muted
, run pamixer -u
to unmute. If it displays a low percentage value, you can run pamixer -i 10
several times to turn up the volume gradually.
Output stuck muted while Master is toggled
In setups with multiple outputs (e.g. 'Headphone' and 'Speaker') using plain amixer to toggle Master can trigger PulseAudio to mute the active output too, but it does not necessarily unmute it when Master is toggled back to be unmuted. [1] To resolve this, amixer must have the device flag set to 'pulse':
$ amixer -D pulse sset Master toggle
This will cause amixer to ask PulseAudio to do the toggling rather than toggling it directly. Because of this, PulseAudio will correctly unmute Master as well as any applicable output.
Muted application
If a specific application is muted or low while all else seems to be in order, it may be due to individual sink-input
settings. With the offending application playing audio, run:
$ pacmd list-sink-inputs
Find and make note of the index
of the corresponding sink input
. The properties:
application.name
and application.process.binary
, among others, should help here. Ensure sane settings are present, specifically those of muted
and volume
.
If the sink is muted, it can be unmuted by:
$ pacmd set-sink-input-mute <index> false
If the volume needs adjusting, it can be set to 100% by:
$ pacmd set-sink-input-volume <index> 0x10000
pacmd
reports 0 sink input(s)
, double-check that the application is playing audio. If it is still absent, verify that other applications show up as sink inputs.Volume adjustment does not work properly
Check /usr/share/alsa-card-profile/mixer/paths/analog-output.conf.common
.
If the volume does not appear to increment/decrement properly using alsamixer
or amixer
, it may be due to PulseAudio having a larger number of increments (65537 to be exact). Try using larger values when changing volume (e.g. amixer set Master 655+
).
Per-application volumes change when the Master volume is adjusted
This is because PulseAudio uses flat volumes by default, instead of relative volumes, relative to an absolute master volume. If this is found to be inconvenient, asinine, or otherwise undesireable, relative volumes can be enabled by disabling flat volumes in the PulseAudio daemon's configuration file:
/etc/pulse/daemon.conf or ~/.config/pulse/daemon.conf
flat-volumes = no
and then restarting PulseAudio by executing
$ pulseaudio -k $ pulseaudio --start
Volume gets louder every time a new application is started
Per default, it seems as if changing the volume in an application sets the global system volume to that level instead of only affecting the respective application. Applications setting their volume on startup will therefore cause the system volume to "jump".
Fix this by disabling flat volumes, as demonstrated in the previous section. When Pulse comes back after a few seconds, applications will not alter the global system volume anymore but have their own volume level again.
~/.config/pulse/default.pa
or ~/.pulse/default.pa
which can also cause maximized volume trouble. Comment that out as needed.Sound output is only mono on M-Audio Audiophile 2496 sound card
Add the following:
/etc/pulseaudio/default.pa
load-module module-alsa-sink sink_name=delta_out device=hw:M2496 format=s24le channels=10 channel_map=left,right,aux0,aux1,aux2,aux3,aux4,aux5,aux6,aux7 load-module module-alsa-source source_name=delta_in device=hw:M2496 format=s24le channels=12 channel_map=left,right,aux0,aux1,aux2,aux3,aux4,aux5,aux6,aux7,aux8,aux9 set-default-sink delta_out set-default-source delta_in
No sound below a volume cutoff or Clipping on a particular output device
Known issue (will not fix): https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/223133
If sound does not play when PulseAudio's volume is set below a certain level, or if you hear clipping on output even at low volume (including bluetooth devices), try setting 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.
Low volume for internal microphone
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 (a.k.a. volume jumps to 100% after running application)
If changing the volume in specific applications or simply running an application changes the master output volume this is likely due to flat volumes mode of pulseaudio. Before disabling it, KDE users should try lowering their system notifications volume in System Settings -> Application and System Notifications -> Manage Notifications under the Player Settings tab to something reasonable. Changing the Event Sounds volume in KMix or another volume mixer application will not help here. This should make the flat-volumes mode work out as intended, if it does not work, some other application is likely requesting 100% volume when its playing something. If all else fails, you can try to disable flat-volumes:
/etc/pulse/daemon.conf
flat-volumes = no
Then restart PulseAudio daemon:
# pulseaudio -k # pulseaudio --start
No sound after resume from suspend
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
followed by pulseaudio --start
), because it does not break already running applications.
If the above fixes your problem, you may wish to automate it, by creating a systemd service file.
Create the template service file in
/etc/systemd/system/[email protected]
[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
Enable it for your user account (i.e. resume-fix-pulseaudio@YOUR_USERNAME_HERE.service
)
Do a 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
Then restart the pulseaudio.service
user unit.
Volume resets to 50% every few seconds
Install alsa-tools and use:
$ hdajackretask
Set "Not Connected" to everything but the ports you are using. It seems the other unused audio ports on the motherboard interfere with the used ones. Then if you want use the Boot Override to save this change between reboots. There is a possibility it is the Front Green Headphone that is causing the bug, if you need it override the Front Microphone to Headphone and the Front Green Headphone to "Not Connected" and use the Front Microphone port as your headphone port.
More info about this problem: [2].
Volume low/too quiet on analog headphones/speakers
If you added the ignore_dB=1
option earlier to the load-module module-udev-detect
line in your /etc/pulse/default.pa
, try removing it.
Delay when changing volume using media keys
Edit /etc/pulse/daemon.conf
and set enable-deferred-volume = no
. This might cause some sound crackles when changing volume, in that case you might want to leave that option enabled and tweak the deferred-volume-safety-margin-usec
and deferred-volume-extra-delay-usec
options instead.
Microphone
Microphone not detected by PulseAudio
Determine the card and device number of your mic:
$ arecord -l
**** List of CAPTURE Hardware Devices **** card 0: PCH [HDA Intel PCH], device 0: ALC269VC Analog [ALC269VC Analog] Subdevices: 1/1 Subdevice #0: subdevice #0
In hw:CARD,DEVICE
notation, you would specify the above device as hw:0,0
.
Then, edit /etc/pulse/default.pa
and insert a load-module
line specifying your device as follows:
load-module module-alsa-source device=hw:0,0 # the line above should be somewhere before the line below .ifexists module-udev-detect.so
Finally, restart pulseaudio to apply the new settings:
$ pulseaudio -k ; pulseaudio -D
If everything worked correctly, you should now see your mic show up when running pavucontrol
(under the Input Devices
tab).
PulseAudio uses wrong microphone
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.
No microphone on ThinkPad T400/T500/T420
Run:
$ alsamixer -c 0
Unmute and maximize the volume of the "Internal Mic".
Once you see the device with:
$ arecord -l
you might still need to adjust the settings. The microphone and the audio jack are duplexed. Set the configuration of the internal audio in pavucontrol to Analog Stereo Duplex.
No microphone input on Acer Aspire One and Lenovo Ideapad 310-15ISK/330-15ARR
Install pavucontrol, unlink the microphone channels and turn down the left one to 0.
Some applications (e.g. chromium) can change microphone levels causing the same issue, a workaround is to remap stereo input to mono and use the remapped device as default.
Static noise in microphone recording
If we are getting static noise in Skype, gnome-sound-recorder, arecord, etc.'s recordings, then the sound card sample rate is incorrect. That is why there is static noise in Linux microphone recordings. To fix this, we need to set the sampling rate in /etc/pulse/daemon.conf
for the sound hardware.
In addition to the guide below, since PulseAudio 11 it is possible to set avoid-resampling = yes
in daemon.conf.
Determine sound cards in the system (1/5)
This requires alsa-utils and related packages to be installed:
$ arecord --list-devices
**** List of CAPTURE Hardware Devices **** card 0: Intel [HDA Intel], device 0: ALC888 Analog [ALC888 Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: Intel [HDA Intel], device 2: ALC888 Analog [ALC888 Analog] Subdevices: 1/1 Subdevice #0: subdevice #0
The sound card is hw:x,y
where x
is the card number and y
is the device number. In the above example, it is hw:0,0
.
Determine sampling rate of the sound card (2/5)
We aim to find the highest sample rate supported by the hw:0,0
sound card using a trial-and-error procedure starting from a low value. When the top value is reached, we got a warning message:
arecord -f dat -r 60000 -D hw:0,0 -d 5 test.wav
"Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 60000 Hz, Stereo Warning: rate is not accurate (requested = 60000Hz, got = 44100Hz) please, try the plug plugin
observe, the got = 44100Hz
. This is the maximum sampling rate of our card.
Setting the sound card's sampling rate into PulseAudio configuration (3/5)
The default sampling rate in PulseAudio:
$ grep "default-sample-rate" /etc/pulse/daemon.conf
; default-sample-rate = 48000
48000
is disabled and needs to be changed to 44100
:
# sed 's/; default-sample-rate = 48000/default-sample-rate = 44100/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 a microphone for, say, 10 seconds. Make sure the microphone 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.
Another Possible Cause
Another possible cause is that your mic has two channels but only one channel can provide a valid sound signal. Some information can be found here. The solution is to remap the stereo input to a mono input:
1. Find your source name from the following command; mine is alsa_input.pci-0000_00_1f.3.analog-stereo
pacmd list-sources | grep 'name:.*input'
2. Edit /etc/pulse/default.pa
and add the following lines, where INPUT_NAME is name of the input source from above step:
load-module module-remap-source source_name=record_mono master=INPUT_NAME master_channel_map=front-left channel_map=mono set-default-source record_mono
3. Restart PulseAudio:
$ pulseaudio -k $ pulseaudio --start
Now arecord
hopefully works. You may still need to change the RecordStream from
setting to Remapped Built-in Audio Analog Stereo
of a specific application in the Recording
tab of pavucontrol
.
If using a USB microphone
Try plugging it into a different port (eg: ports at the back rather than front).
No microphone on Steam or Skype with enable-remixing = no
When you set enable-remixing = no
on /etc/pulse/daemon.conf
you may find that your microphone has stopped working on certain applications like Skype or Steam. This happens because these applications capture the microphone as mono only and because remixing is disabled, Pulseaudio will no longer remix your stereo microphone to mono.
To fix this you need to tell Pulseaudio to do this for you:
1. Find the name of the source
# pacmd list-sources
Example output edited for brevity, the name you need is in bold:
index: 2 name: <alsa_input.pci-0000_00_14.2.analog-stereo> driver: <module-alsa-card.c> flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
2. Add a remap rule to /etc/pulse/default.pa
, use the name you found with the previous command, here we will use alsa_input.pci-0000_00_14.2.analog-stereo as an example:
/etc/pulse/default.pa
### Remap microphone to mono load-module module-remap-source master=alsa_input.pci-0000_00_14.2.analog-stereo master_channel_map=front-left,front-right channels=2 channel_map=mono,mono
3. Restart Pulseaudio
# pulseaudio -k
# pulseaudio --start
Microphone distorted due to automatic adjustment
If your microphone volume creeps up automatically and causes the sound to be distorted, you can fix it by disabling mic boost:
In all files /usr/share/alsa-card-profile/mixer/paths/analog-input*.conf
,
- Under
[Element Capture]
setvolume
tozero
- Under
[Element Internal Mic Boost]
setvolume
tozero
. - Under
[Element Int Mic Boost]
setvolume
tozero
. - Under
[Element Mic Boost]
setvolume
tozero
.
including all variations such as [Element Headphone Mic Boost]
and [Element Mic Boost (+20dB)]
Then restart PulseAudio:
# pulseaudio -k
Microphone crackling with Realtek ALC892
Sometimes ALC892 chips have crackling sound while recording using a microphone. Some Pulseaudio configuration changes may help:
/etc/pulse/daemon.conf
resample-method = src-sinc-best-quality default-sample-format = s16le default-sample-rate = 48000
and add the use_ucm
option to
/etc/pulse/default.pa
load-module module-udev-detect use_ucm=0 tsched=0
then restart pulseaudio.
Microphone crackling with Azalia chipsets
Some Azalia based chips have popping/crackling noise and distortion while recording using a microphone with PulseAudio. This can be fixed by loading the snd-hda-intel
module with position_fix
set to an appropriate value. This tells the module to use various DMA pointer fixes. Use trial and error to determine which value works for you. (source)
Create a new modprobe.d
config:
/etc/modprobe.d/azalia-microphone.conf
options snd-hda-intel position_fix=1
Valid values for position_fix
are:
-
0
= Auto -
1
= None -
2
= POSBUF -
3
= FIFO size
then reload your modules.
Echo test
If you are unsure about your microphone setup, you can hear the input from the microphone in real-time by enabling the loopback module (source):
$ pactl load-module module-loopback
The module will show up in the Recording tab of the pavucontrol program, where the source and volume can be configured. While latency should be low, it should be sufficient to get a feeling of the sound quality as you will hear yourself speak in the microphone. To make the change permanent, add the following pulseaudio configuration:
/etc/pulse/default.pa
load-module module-loopback
Watch out for feedback! Be ready to lower all volumes in case the microphone picks up the output from the loudspeakers. Naturally, it is better to run such a test with headphones.
Audio quality
Glitches, skips or crackling
The newer implementation of the PulseAudio sound server uses 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.
If you are using Intel's IOMMU and experience glitches and/or skips, add intel_iommu=igfx_off
to your kernel command line.
Some Intel audio cards using the snd-hda-intel
module need the options vid=8086 pid=8ca0 snoop=0
. In order to set them permanently, create/modify the following file including the line below.
/etc/modprobe.d/sound.conf
options snd-hda-intel vid=8086 pid=8ca0 snoop=0
Please report any such cards to PulseAudio Broken Sound Driver page
Static noise when using headphones
Time-based scheduling may be causing this, disable it as explained in #Glitches, skips or crackling.
Another reason you are encountering static noise in your headphone jack could be ALSA's loopback mixing.
Make sure you have alsa-utils installed, launch alsamixer
, then select your audio device (pressing F6
), navigate all the way left using the left arrow
, and stop on Loopback, if Enabled disable it using the down arrow
. This should not impact audio playback or microphone recording negatively, unless you require loopback mixing.
Some notebook models, like Dell XPS 13 9360, suffer from continuous hissing sound when a headphone is plugged in.
Yet another reason for this symptom could be the power-saving mode of your audio device.[3] If you followed Power management#Audio, revert the changes and check if it solves the problem.
Setting the default fragment number and buffer size in PulseAudio
Disabling timer-based scheduling
By default, PulseAudio uses timer-based scheduling. In this mode, fixed-size fragments are not used at all, and so the default-fragments and default-fragment-size-msec parameters are ignored.
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
Decide on audio device parameters
Instructions below will cause PulseAudio to use a fixed size and number for audio fragments. These settings directly affect latency and power consumption. The latency is determined as default-fragments * default-fragment-size-msec
, and the interrupt rate (i.e. how often the application is notified that some sound has indeed been played) is 1000 / default-fragment-size-msec
. The considerations are:
- The total number of fragments must be within the limits accepted by the hardware. Most sound cards are OK with two or more fragments, but some require three or more.
- Giving the sound card more fragments than strictly necessary increases the latency, does not change power consumption, and does not remove the load from the scheduler. Therefore, it is advised only in the cases when the interrupts are not reliably delivered to the CPU, and one extra fragment beyond the minimum required should always be enough.
- Giving the sound card bigger fragments increases latency and decreases power consumption.
- Some applications (games and VoIP) request low latency and produce glitches when PulseAudio cannot fulfill their request.
- Setting the latency too low will put a lot of stress on the scheduler, also resulting in glitches.
If one does not care about excessive power consumption, then 2 or 3 fragments, 5 ms each, are a reasonable choice.
Modify PulseAudio's configuration file
/etc/pulse/daemon.conf
default-fragments = 3 default-fragment-size-msec = 5
See if it helps
Restart the pulseaudio.service
user unit.
Run your applications, listen to the sounds they produce, inspect the journal.
If the skips/pops/glitches are occasional and mostly correlated to the system being highly loaded: this is a scheduler problem, the latency needs to be increased.
If there is metallic sound with the wrong speed from all applications: the most common reason is that you are trying to configure the fragment size which is way too small, like 1 ms. Do not do this.
If some, but not all, applications produce a constant stream of glitches: this is an application that assumes a low-latency setup. So the fragment size must be decreased so that the application request becomes valid.
Choppy sound with analog surround sound setup
The low-frequency effects (LFE) or Subwoofer channel is not remixed per default. To enable it the following needs to be set in /etc/pulse/daemon.conf
:
/etc/pulse/daemon.conf
remixing-produce-lfe = yes remixing-consume-lfe = yes
You should also consider to set a proper crossover frequency for the LFE- channel. The crossover frequency is the frequency up to which the audio signal is rerouted to the LFE sink. The optimal crossover frequency in Hz depends on the size of all your speakers.
/etc/pulse/daemon.conf
lfe-crossover-freq = <40-200>
Laggy sound
This issue is due to incorrect buffer sizes. First verify that the variables default-fragments
and default-fragment-size-msec
are not being set to non default values in the file /etc/pulse/daemon.conf
. If the issue is still present, try setting them to the following values:
/etc/pulse/daemon.conf
default-fragments = 5 default-fragment-size-msec = 2
Choppy/distorted sound
This can result from an incorrectly set sample rate. Try the following setting:
/etc/pulse/daemon.conf
avoid-resampling = yes #(Needs PA11 or higher) default-sample-rate = 48000
and restart the PulseAudio server.
If one experiences choppy sound in applications using OpenAL, change the sample rate in /etc/openal/alsoft.conf
:
/etc/openal/alsoft.conf
frequency = 48000
Setting the PCM volume above 0 dB can cause clipping. Running alsamixer
will allow you to see if this is the problem and if so fix it. Note that ALSA may not correctly export the dB information to PulseAudio. Try the following:
/etc/pulse/default.pa
load-module module-udev-detect ignore_dB=1
and restart the PulseAudio server. See also #No sound below a volume cutoff or Clipping on a particular output device.
Sound stuttering when streaming over network
When streaming over Wi-Fi using module-native-protocol-tcp you can experience periodic sound stuttering with buffer underruns. As a workaround you can try to use rtp protocol. On sender side create rtp sink:
/etc/pulse/default.pa
load-module module-null-sink sink_name=rtp load-module module-rtp-send source=rtp.monitor
and switch to it:
/etc/pulse/default.pa
set-default-sink rtp
On receiver side load rtp module:
/etc/pulse/default.pa
load-module module-rtp-recv
Pops when starting and stopping playback
PulseAudio can suspend sinks after a period of inactivity. This can make an audible noise (like a crack/pop/scratch). Sometimes even when move the slider volume, or open and close windows (KDE4). This behavior is enabled in default configuration files:
/etc/pulse/default.pa
load-module module-suspend-on-idle
/etc/pulse/system.pa
load-module module-suspend-on-idle
Commenting that line in relevant file fixes that issue. A better solution is to add the following file:
~/.config/pulse/default.pa
.include /etc/pulse/default.pa .nofail unload-module module-suspend-on-idle .fail
For some devices (eg. Bose Quietcomfort 35 II) setting high enough volume of the device (usually via physical buttons or a slider) eliminates the audible noise after stopping playback.
Hardware and Cards
No HDMI sound output after some time with the monitor turned off
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 is 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 VT and back again. If that does not work, try: turn off your monitor, switch to another VT, turn on your monitor, and switch back. This problem has been reported by ATI/Nvidia/Intel users.
Another workaround could be to disable the switch-on-port-available module by commenting it in /etc/pulse/default.pa [4]:
/etc/pulse/default.pa
... ### Should be after module-*-restore but before module-*-detect #load-module module-switch-on-port-available ...
No HDMI sound using a headless server
You might want to use HDMI audio with your a/v receiver but no display. HDMI requires a video signal, which we have from the virtual terminal.
By default, this signal is turned off after 600 seconds, thus the audio sink gets lost as well.
To prevent screen blanking, add consoleblank=0
to the kernel command line.
No cards
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.
Starting an application interrupts other app's sound
If you have trouble with some applications (such as TeamSpeak or Mumble) interrupting sound output of already running applications (such as Deadbeaf), you can solve this by commenting out the line load-module module-role-cork
in /etc/pulse/default.pa
like shown below:
/etc/pulse/default.pa
### Cork music/video streams when a phone stream is active # load-module module-role-cork
Then restart pulseaudio by using your normal user account with
$ pulseaudio -k $ pulseaudio --start
The only device shown is "dummy output" or newly connected cards are not detected
If the only playback device is the Dummy Output, PulseAudio cannot access your sound devices. It is possible there is an issue with logind giving permissions, see General troubleshooting#Session permissions for more information.
An application might also not have been configured to work with PulseAudio. This happens with FluidSynth for example. To see which application is responsible for a direct access to the sound card via alsa, run the following command:
# fuser -v /dev/snd/*
Try to close these applications. pulseaudio, if running, should take again precedence over these applications and all the applications relying on pulseaudio should work again like expected.
If the above does not work, try to restart pulseaudio.service
.
Restarting pulseaudio.service
can also be useful if pulseaudio fails to detect any hardware after resuming from hibernate or suspend.
No HDMI 5/7.1 Selection for Device
If you are unable to select 5/7.1 channel output for a working HDMI device, then turning off "stream device reading" in /etc/pulse/default.pa
might help.
See #Fallback device is not respected.
Failed to create sink input: sink is suspended
If you do not have any output sound and receive dozens of error messages related to a suspended sink from running journalctl -b
as root, then backup first and then delete your user-specific pulse folders:
$ rm -r ~/.pulse ~/.pulse-cookie ~/.config/pulse
Simultaneous output to multiple sound cards / devices
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 does not 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 sound card can output to both Analog and S/PDIF at the same time and PulseAudio does not have this option in its profiles in pavucontrol, or veromix then you probably need to create a configuration file for your sound card.
More in detail you need to create a profile-set for your specific sound card. This is done in two steps mostly.
- Create udev rule to make PulseAudio choose your PulseAudio configuration file specific to the sound card.
- Create the actual configuration.
Create a pulseaudio udev rule.
/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"
Now, create a configuration file. If you bother, you can start from scratch and make it 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.
asus-xonar-essence-stx.conf
also includes all code/mappings from default.conf
./usr/share/alsa-card-profile/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
Some profiles like SPDIF are not enabled by default on the card
Some profiles like IEC-958 (i.e. S/PDIF) may not be enabled by default on the selected sink. Each time the system starts up, the card profile is disabled and the pulseaudio daemon cannot select it. You have to add the profile selection to you default.pa file. Verify the card and profile name with :
$ pacmd list-cards
Then edit the configuration to add the profile
~/.config/pulse/default.pa
## Replace with your card name and the profile you want to activate set-card-profile alsa_card.pci-0000_00_1b.0 output:iec958-stereo+input:analog-stereo
Pulse audio will add this profile the pool of available profiles
Only S/PDIF output available
This might happen if PulseAudio use the wrong output device. Firstly, set up proper card profile:
$ pacmd set-card-profile alsa_card.pci-0000_00_1f.3 output:analog-stereo
or
$ pacmd set-card-profile alsa_card.pci-0000_00_1f.3 output:analog-stereo+input:analog-stereo
Replace alsa_card.pci-0000_00_1f.3
with your card, and output:analog-stereo
or output:analog-stereo+input:analog-stereo
with your profile, remember to choose the profile with analog. Using shell auto completion could help you a lot. One could also use check available cards and profiles with:
$ pacmd list-cards
One might also need to set sink port by:
$ pacmd set-sink-port alsa_output.pci-0000_00_1f.3.analog-stereo analog-output-headphones
Check available sink ports with:
$ pacmd list-sinks
To keep these setting, add them to PulseAudio's configuration file default.pa
.
~/.config/pulse/default.pa
.include /etc/pulse/default.pa set-card-profile alsa_card.pci-0000_00_1f.3 output:analog-stereo+input:analog-stereo set-sink-port alsa_output.pci-0000_00_1f.3.analog-stereo analog-output-headphones
Crackling or popping USB sound issues
Although not related to PulseAudio, it is also possible that the card is not powered properly by it's USB port, or that it does not provide enough bandwidth.
Try connecting the USB DAC directly to your computer's USB ports, avoiding any hubs or docks.
Bluetooth
See Bluetooth headset#Troubleshooting.
Applications
Audacity
To work with PulseAudio, Audacity requires the pulseaudio-alsa is installed. This provides the pulse:...
playback and recording devices.
When starting Audacity you may find that your headphones no longer work. This can be because Audacity is trying to use them as a recording device. To fix this, open Audacity, then set its recording device to pulse:Internal Mic:0
.
Under some circumstances, playback may be distorted, very fast, or freeze, as discussed in the Audacity Wiki's Linux Issues page.
The solution proposed in this page may work: start Audacity with:
$ env PULSE_LATENCY_MSEC=30 audacity
If the solution above does not fix this issue, one may wish to temporarily disable pulseaudio while running Audacity by using the pasuspender
command:
$ pasuspender -- audacity
Then, be sure to select the appropriate ALSA input and output devices in Audacity.
See also #Setting the default fragment number and buffer size in PulseAudio.
OpenAL
Some games may prevent you from switching the output device. Trying to move the sink with pactl
gives the following error:
pactl move-sink-input 11 alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1 Failure: Invalid argument
OpenAL needs to be configured to allow moving the sink:
~/.alsoftrc
[pulse] allow-moves = true
Other Issues
Cannot update configuration of sound device in 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.
Failed to create sink input: sink is suspended
If you do not have any output sound and receive dozens of error messages related to a suspended sink from running journalctl -b
as root, then backup first and then delete your user-specific pulse folders:
$ rm -r ~/.pulse ~/.pulse-cookie ~/.config/pulse
Pulse overwrites ALSA settings
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 has 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 &
Daemon startup failed
Try resetting PulseAudio:
$ rm -rf /tmp/pulse* ~/.pulse* ~/.config/pulse $ pulseaudio -k $ pulseaudio --start
- Check that options for sinks are set up correctly.
- If you configured in default.pa to load and use the OSS modules then check with lsof that
/dev/dsp
device is not used by another application. - Set a preferred working resample method. Use
pulseaudio --dump-resample-methods
to see a list with all available resample methods you can use. - To get details about currently appeared unfixed errors or just get status of daemon use commands like
pax11publish -d
andpulseaudio -v
wherev
option can be used multiple time to set verbosity of log output equal to the--log-level[=LEVEL]
option where LEVEL is from 0 to 4. See the #Outputs by PulseAudio error status check utilities section.
See also man pages for pax11publish(1) and pulseaudio(1) for more details.
Outputs by PulseAudio error status check utilities
If the pax11publish -d
shows error like:
N: [pulseaudio] main.c: User-configured server at "user", refusing to start/autospawn.
then run pax11publish -r
command then could be also good to logout and login again.
If the pulseaudio -vvvv
command shows error like:
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.
This can be resolved temporary by:
$ echo 100000 > /proc/sys/fs/inotify/max_user_watches
For permanent use save settings in the 99-sysctl.conf file:
/etc/sysctl.d/99-sysctl.conf
# Increase inotify max watchs per user fs.inotify.max_user_watches = 100000
See also
- proc_sys_fs_inotify and dnotify, inotify- more details about inotify/max_user_watches
- reasonable amount of inotify watches with Linux
- inotify(7) - man page
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.
Subwoofer stops working after end of every song
Known issue: https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/494099
To fix this, enable-lfe-remixing = yes
must be set as described in #Choppy sound with analog surround sound setup.
Unable to select surround configuration other than "Surround 4.0"
If you are unable to set 5.1 surround output in pavucontrol because it only shows "Analog Surround 4.0 Output", open the ALSA mixer and change the output configuration there to 6 channels. Then restart pulseaudio, and pavucontrol will list many more options.
Realtime scheduling
If rtkit does not work, you can manually set up your system to run PulseAudio with real-time 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
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%
.
Fallback device is not respected
PulseAudio does not have a true default device. Instead it uses a "fallback", which only applies to new sound streams. This means previously run applications are not affected by the newly set fallback device.
gnome-control-center, mate-media and paswitchAUR handle this gracefully. Alternatively:
1. Move the old streams in pavucontrol manually to the new sound card.
2. Stop Pulse, erase the "stream-volumes" in ~/.config/pulse
and/or ~/.pulse
and restart Pulse. This also resets application volumes.
3. Disable stream device reading. This may be not wanted when using different soundcards with different applications.
/etc/pulse/default.pa
load-module module-stream-restore restore_device=false
RTP/UDP packet flood
In some cases the default configuration might flood the network with UDP packets.[5]
To fix this problem, launch paprefs
and disable "Multicast/RTP Sender".[6]
New audio source streams auto-select to "blank" stream instead of BT headphones
Example scenario: Restarting, stopping, fast forwarding a Youtube video on Firefox 68.0.1 on KDE + Arch might set the "sink" associated with it in PulseAudio to a blank state, and then output sound over laptop speakers. Inconsistently reproducible on Dell 9360.
Fix seems to be to kill and restart pulseaudio
.
pulseaudio -k pulseaudio --start