Pulseaudio

It happens to me sometimes with Plasma that the sound is a bit confused and I have to kill pulseaudio, after which it works, with Gnome it did not happen, I already tried to delete the various configuration files of pulseaudio, but the defect reoccurs … is there something that escapes me, and can I do something to avoid killing the pulseaudio process?

Can you elaborate a bit more about this issue? Otherwise we’re left to speculate.

I would like to be clearer, but the problem is random, the audio works fine but occasionally it has an annoying background noise, a rustle, which I solve only by killing pulseaudio, after which it resumes working well.

It’s not due to an unmuted microphone perhaps?

When it happens again, examine active sources…

pacmd list-sources|grep active
pacmd list source-outputs|grep active
amixer -c0

Just in case the following diagnostic guide is useful to you…
https://wiki.archlinux.org/index.php/PulseAudio/Troubleshooting#Enable_Echo.2FNoise-Cancelation

Yesterday I did some tests of stress, starting a video on youtube, and two tracks in my / home, but it went well, I closed everything and after a while I started a video on Youtube again and began to rustle, I took a screen

https://i.postimg.cc/XZ0S5b4G/Screenshot-20190224-000102.png](https://postimg.cc/XZ0S5b4G)

enziosavio@linux-area51:~> pacmd list-sources|grep active
        active port: <analog-input-mic>
enziosavio@linux-area51:~> pacmd list source-outputs|grep active
        active port: <analog-output-lineout>
        active port: <analog-input-mic>
        active profile: <off>
        active profile: <input:analog-mono>
        active profile: <output:analog-stereo>
enziosavio@linux-area51:~> amixer -c0
Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 42
  Mono: Playback 34 [81%] -12.00dB] [on]
Simple mixer control 'Headphone',0
  Capabilities: pswitch
  Playback channels: Front Left - Front Right
  Mono:
  Front Left: Playback [off]
  Front Right: Playback [off]
Simple mixer control 'PCM',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 255
  Mono:
  Front Left: Playback 253 [99%] -0.40dB]
  Front Right: Playback 253 [99%] -0.40dB]
Simple mixer control 'Front',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 42
  Mono:
  Front Left: Playback 42 [100%] [0.00dB] [on]
  Front Right: Playback 42 [100%] [0.00dB] [on]
Simple mixer control 'Front Mic',0
  Capabilities: pvolume pswitch cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Playback channels: Front Left - Front Right
  Capture channels: Mono
  Limits: Playback 0 - 31
  Mono: Capture [on]
  Front Left: Playback 0 [0%] -34.50dB] [off]
  Front Right: Playback 0 [0%] -34.50dB] [off]
Simple mixer control 'Front Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 3 [100%] [30.75dB]
  Front Right: 3 [100%] [30.75dB]
Simple mixer control 'Surround',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 42
  Mono:
  Front Left: Playback 42 [100%] [0.00dB] [on]
  Front Right: Playback 42 [100%] [0.00dB] [on]
Simple mixer control 'Center',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 42
  Mono: Playback 42 [100%] [0.00dB] [on]
Simple mixer control 'LFE',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 42
  Mono: Playback 42 [100%] [0.00dB] [on]
Simple mixer control 'Side',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 42
  Mono:
  Front Left: Playback 42 [100%] [0.00dB] [on]
  Front Right: Playback 42 [100%] [0.00dB] [on]
Simple mixer control 'Line',0
  Capabilities: pvolume pswitch cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Playback channels: Front Left - Front Right
  Capture channels: Mono
  Limits: Playback 0 - 31
  Mono: Capture [off]
  Front Left: Playback 0 [0%] -34.50dB] [off]
  Front Right: Playback 0 [0%] -34.50dB] [off]
Simple mixer control 'IEC958',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'IEC958 Default PCM',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 31
  Front Left: Capture 31 [100%] [30.00dB] [on]
  Front Right: Capture 31 [100%] [30.00dB] [on]
Simple mixer control 'Auto-Mute Mode',0
  Capabilities: enum
  Items: 'Disabled' 'Enabled'
  Item0: 'Enabled'
Simple mixer control 'Dynamic Power-Control',0
  Capabilities: enum
  Items: 'Disabled' 'Enabled'
  Item0: 'Disabled'
Simple mixer control 'Loopback Mixing',0
  Capabilities: enum
  Items: 'Disabled' 'Enabled'
  Item0: 'Disabled'
Simple mixer control 'Rear Mic',0
  Capabilities: pvolume pswitch cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Playback channels: Front Left - Front Right
  Capture channels: Mono
  Limits: Playback 0 - 31
  Mono: Capture [off]
  Front Left: Playback 0 [0%] -34.50dB] [off]
  Front Right: Playback 0 [0%] -34.50dB] [off]
Simple mixer control 'Rear Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]
Simple mixer control 'Stereo Mix',0
  Capabilities: cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Capture channels: Mono
  Mono: Capture [off]

linux-area51:/home/enziosavio # lspci
00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] RS780 Host Bridge
00:02.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] RS780 PCI to PCI bridge (ext gfx port 0)
00:07.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] RS780/RS880 PCI to PCI bridge (PCIE port 3)
00:0a.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] RS780/RS880 PCI to PCI bridge (PCIE port 5)
00:11.0 SATA controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode]
00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
00:12.1 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0 USB OHCI1 Controller
00:12.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller
00:13.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
00:13.1 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0 USB OHCI1 Controller
00:13.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 SMBus Controller (rev 3c)
00:14.1 IDE interface: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 IDE Controller
00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 Azalia (Intel HDA)
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 LPC host controller
00:14.4 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 PCI to PCI Bridge
00:14.5 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI2 Controller
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h Processor Function 0
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h Processor Function 1
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h Processor Function 2
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h Processor Function 3
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h Processor Function 4
00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h Processor Function 5
01:00.0 VGA compatible controller: NVIDIA Corporation GF119 [GeForce GT 610] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GF119 HDMI Audio Controller (rev a1)
02:00.0 USB controller: ASMedia Technology Inc. ASM1042A USB 3.0 Host Controller
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 09)

linux-area51:/home/enziosavio # aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: SB [HDA ATI SB], device 0: VT1708S Analog [VT1708S Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: SB [HDA ATI SB], device 3: VT1708S Digital [VT1708S Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

enziosavio@linux-area51:~> ps aux | grep pulse
enziosa+  1627  0.0  0.1 1286420 14420 ?       S<l  18:16   0:00 /usr/bin/pulseaudio --start --log-target=syslog
enziosa+  1728  0.0  0.0  14376  5260 ?        S    18:16   0:00 /usr/lib/pulse/gconf-helper
enziosa+  2515  0.0  0.0   6220   788 pts/0    S+   18:34   0:00 grep --color=auto pulse

┌───────────────────────────────────────── AlsaMixer v1.1.8 ──────────────────────────────────────────┐
│ Card: PulseAudio                                                            F1:  Help               │
│ Chip: PulseAudio                                                            F2:  System information │
│ View: F3:[Playback] F4: Capture  F5: All                                    F6:  Select sound card  │
│ Item: Master                                                                Esc: Exit               │
│                                                                                                     │
│                                                                                                     │
│                                                ┌──┐                                                 │
│                                                │  │                                                 │
│                                                │  │                                                 │
│                                                │  │                                                 │
│                                                │  │                                                 │
│                                                │  │                                                 │
│                                                │▒▒│                                                 │
│                                                │▒▒│                                                 │
│                                                │▒▒│                                                 │
│                                                │▒▒│                                                 │
│                                                │▒▒│                                                 │
│                                                │▒▒│                                                 │
│                                                │▒▒│                                                 │
│                                                │▒▒│                                                 │
│                                                ├──┤                                                 │
│                                                │OO│                                                 │
│                                                └──┘                                                 │
│                                               62<>62                                                │
│                                             < Master >                                              │
│                                                                                                     │
│                                                                                                     │
└─────────────────────────────────────────────────────────────────────────────────────────────────────

Well the amixer settings show the microphones off so I guess background noise is being introduced from some other unintentional “source”. I recommend using pavucontrol to check the configuration tab and make sure that the profile is set as expected, and that no unwanted input devices are set (or at least muted).

The problem is that it’s random, now I’m listening to music on youtube and it’s perfect, I’ve also enabled pulseaudio-equalizer and the sound is perfect, only that sometimes it starts to rustle and I have to kill pulseaudio :frowning:

Yes, it could be tedious to diagnose, but perhaps worth monitoring the output when pulseaudio is running from a terminal as described here…

The output of pulseaudio -vvvvv, run on the command line, is often helpful. To provide this correctly, first configure PulseAudio not to respawn itself automatically when it dies, by creating a file ~/.pulse/client.conf with this content:
autospawn = no
Then kill the existing server, with the command pulseaudio -k. Now launch pulseaudio -vvvvv from a console, and reproduce your problem. Provide the whole set of messages from the console where you ran pulseaudio.

Hopefully, when the problem next occurs while running pulseaudio like this you’ll be able to capture something meaningful.

Reference:
https://fedoraproject.org/wiki/How_to_debug_PulseAudio_problems#General_advice

I did not have time to read this answer that the problem occurred, I stopped the music video, I opened yast> sound> click on the sound card> edit> and I reconfigured the tab> restarted and no longer rustles, … … it seems that it loses the configuration, if it occurs again I feel like you said

Nothing to do I can not solve, after a while I’m listening to the music the sound deteriorates and you hear a rustle that disappears only after killing Pulseaudio, I tried the recommended solution, but it does not work :frowning:

Did you try the diagnostic approach (post #8) of running pulseaudio from a terminal to gather some output?

I’ve tried both when it works and when it starts to rustle, and the output is the same
I see now that the file created, last line, does not work

enziosavio@linux-area51:~> pulseaudio -vvvvv
I: [pulseaudio] main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operazione non permessa
I: [pulseaudio] main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operazione non permessa
D: [pulseaudio] core-rtclock.c: Timer slack is set to 50 us.
D: [pulseaudio] core-util.c: RealtimeKit worked.
I: [pulseaudio] core-util.c: Successfully gained nice level -11.
I: [pulseaudio] main.c: This is PulseAudio 12.2-rebootstrapped
D: [pulseaudio] main.c: Compilation host: x86_64-suse-linux-gnu
D: [pulseaudio] main.c: Compilation CFLAGS: -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g -fPIE -W -Wextra -pipe -Wno-long-long -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter -ffast-math -fno-common -fdiagnostics-show-option -fdiagnostics-color=auto
D: [pulseaudio] main.c: Running on host: Linux x86_64 4.20.10-1-default #1 SMP PREEMPT Tue Feb 19 06:34:39 UTC 2019 (08d0345)
D: [pulseaudio] main.c: Found 4 CPUs.
I: [pulseaudio] main.c: Page size is 4096 bytes
D: [pulseaudio] main.c: Compiled with Valgrind support: no
D: [pulseaudio] main.c: Running in valgrind mode: no
D: [pulseaudio] main.c: Running in VM: no
D: [pulseaudio] main.c: Optimized build: yes
D: [pulseaudio] main.c: FASTPATH defined, only fast path asserts disabled.
I: [pulseaudio] main.c: Machine ID is 416e54e38e484816933a4b75f87fc77b.
I: [pulseaudio] main.c: Session ID is 2.
I: [pulseaudio] main.c: Using runtime directory /run/user/1000/pulse.
I: [pulseaudio] main.c: Using state directory /home/enziosavio/.config/pulse.
I: [pulseaudio] main.c: Using modules directory /usr/lib64/pulse-12.2/modules.
I: [pulseaudio] main.c: Running in system mode: no
E: [pulseaudio] pid.c: Daemon already running.
E: [pulseaudio] main.c: pa_pid_file_create() non riuscita.

The output you posted suggests that you didn’t stop the pulseaudio daemon (as explained in the Fedora guide). The first setp is to disable autospawning…

The output of pulseaudio -vvvvv, run on the command line, is often helpful. To provide this correctly, first configure PulseAudio not to respawn itself automatically when it dies, by creating a file ~/.pulse/client.conf with this content: autospawn = no

The second step is to kill pulseaudio with

pulseaudio -k

then run pulseaudio from a terminal and monitor…

pulseaudio -vvvvv

Sorry but when I kill pulseaudio, even with the created file it regenerates immediately

Ok, do this

sudo setup-pulseaudio --disable

then run

pulseaudio -vvvvv

When you’re done with testing pulseaudio can be enabled to start automatically again…

sudo setup-pulseaudio --enable

BTW, the ‘setup-pulseaudio’ script writes to /etc/pulse/client.conf.d/50-system.conf, and when disabled the following entry is present

autospawn = no

When enabled…

autospawn = yes

It is set to autospawn = no and the output of pulseaudio -vvvvv is very long

It will be, and you may want to capture it to file for later analysis. For now I would leave it running via the terminal, and when you next get the “rustling” issue examine the output for clues (if any).

Mha, I do not want to talk too soon, but I installed Gstreamer Plugins and since yesterday the audio does not deteriorate and nothing more rustles, if it continues to work, then I also write the plugins I installed;)

Unfortunately pulseaudio does as it seems … assuming he is the problem, leaving pulseaudio disabled at boot and then starting it with pulseaudio -vvvvv always works well, without rustling