Solved pulseaudio weak starting sound output

Solved issue

CaffeineAddict

Well-Known Member
Joined
Jan 21, 2024
Messages
1,655
Reaction score
1,153
Credits
13,701
I have this problem since some week ago, when some sound is played first second or so of it is barely heard.

There is "Test" sound in KDE shown in the screenshot below.
When I click on "Front Left" for instance, it says "front left", out of this I barely hear "front" it's like muted, while "left" is heard normally.

This is not specific to this test but to any audio, I'm attaching the screenshot to better explain what it happens in any audio, be it in web browser watching YouTube or playing some game it doesn't matter.

After this first almost muted audio the rest of audio then works normally, but only for a couple of minutes or until some audio is done with the output, and then again which ever audio is played again first few second or two are barely heard.

And so on it resets until some sound plays.


test.png


Restarting pulseaudio with systemctl --user restart pulseaudio works.
Killing pulseaudio with pulseaudio -k also works as explained here https://www.linux.org/threads/how-to-easily-fix-problems-with-pulseaudio-for-newbies.22729/

However this only works for couple of minutes until it's back to almost muted first few seconds.
I have no clue how to fix this.

I've also reinstalled pulseaudio with the following steps but that didn't fix anything:

Bash:
sudo apt purge pulseaudio
Will also purge:
  • pulseaudio-module-gsettings
  • pulseaudio
  • plasma-pa
  • pulseaudio-module-bluetooth

Will then also install:
  • pipewire-pulse
  • pipewire
  • pipewire-bin
  • libpipewire-0.3-modules
  • wireplumber
  • libwireplumber-0.4-0

Bash:
systemctl reboot
rm -r ~/.config/pulse
sudo apt install pulseaudio plasma-pa pulseaudio-module-bluetooth pulseaudio-module-gsettings
sudo apt purge pipewire pipewire-pulse pipewire-bin libpipewire-0.3-modules wireplumber libwireplumber-0.4-0
systemctl reboot
 
Last edited:


strange situation. I have seen some sound issues as of late. In fedora 40 one on my systems will be muted on all audio unless I adjust the volume even just one click, then all sound works.

In your situation I would want to know what the sound chip is and then look to see if there is something no longer supported on it. Might be obsoleted. it does happen. Might just need additional support for the sound now also.
 
In your situation I would want to know what the sound chip is and then look to see if there is something no longer supported on it. Might be obsoleted.

This is my inxi output:

System:
Kernel: 6.10.6+bpo-amd64 arch: x86_64 bits: 64 compiler: N/A
Desktop: KDE Plasma v: 5.27.5 tk: Qt v: 5.15.8 wm: kwin_x11 dm: SDDM
Distro: Debian GNU/Linux 12 (bookworm)
Machine:
Type: Desktop System: Micro-Star product: MS-7B29 v: 1.0 serial: N/A
Mobo: Micro-Star model: H310M PRO-VDH (MS-7B29) v: 1.0 serial: <filter>
UEFI: American Megatrends v: 1.D0 date: 10/12/2022
Battery:
ID-1: hidpp_battery_0 charge: 90% condition: N/A volts: 4.1 min: N/A
model: Logitech G703 LIGHTSPEED Wireless Gaming Mouse w/ HERO
serial: <filter> status: discharging
CPU:
Info: quad core model: Intel Core i3-8100 bits: 64 type: MCP
arch: Coffee Lake rev: B cache: L1: 256 KiB L2: 1024 KiB L3: 6 MiB
Speed (MHz): avg: 800 min/max: 800/3600 cores: 1: 800 2: 800 3: 800 4: 800
bogomips: 28800
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
Device-1: NVIDIA TU106 [GeForce GTX 1650] vendor: InnoVISION driver: nvidia
v: 560.35.03 arch: Turing pcie: speed: 5 GT/s lanes: 16 ports: active: none
off: HDMI-A-1 empty: DP-1,DP-2,DP-3 bus-ID: 01:00.0 chip-ID: 10de:1f0a
Display: x11 server: X.Org v: 1.21.1.7 with: Xwayland v: 22.1.9
compositor: kwin_x11 driver: X: loaded: nvidia gpu: nvidia,nvidia-nvswitch
display-ID: :0 screens: 1
Screen-1: 0 s-res: 1920x1080 s-dpi: 101
Monitor-1: HDMI-A-1 mapped: HDMI-0 note: disabled model: Acer V226HQL
res: 1920x1080 dpi: 102 diag: 547mm (21.5")
API: OpenGL v: 4.6.0 NVIDIA 560.35.03 renderer: NVIDIA GeForce GTX
1650/PCIe/SSE2 direct-render: Yes
Audio:
Device-1: Intel Cannon Lake PCH cAVS vendor: Micro-Star MSI
driver: snd_hda_intel v: kernel bus-ID: 00:1f.3 chip-ID: 8086:a348
Device-2: NVIDIA TU106 High Definition Audio vendor: InnoVISION
driver: snd_hda_intel v: kernel pcie: speed: 8 GT/s lanes: 16
bus-ID: 01:00.1 chip-ID: 10de:10f9
API: ALSA v: k6.10.6+bpo-amd64 status: kernel-api
Server-1: PulseAudio v: 16.1 status: active (root, process)
Network:
Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
vendor: Micro-Star MSI RTL8111/8168/8211/8411 driver: r8169 v: kernel pcie:
speed: 2.5 GT/s lanes: 1 port: 3000 bus-ID: 02:00.0 chip-ID: 10ec:8168
IF: enp2s0 state: down mac: <filter>
Device-2: Realtek RTL8188RU 802.11n WLAN Adapter type: USB
driver: rtl8192cu bus-ID: 1-7:3 chip-ID: 0bda:817f
IF: wlx00c0ca52bf8e state: up mac: <filter>
IF-ID-1: ovs-system state: down mac: <filter>
IF-ID-2: ovsbr0 state: unknown speed: N/A duplex: N/A mac: <filter>
Bluetooth:
Device-1: TP-Link TP%Link UB500 Adapter type: USB driver: btusb v: 0.8
bus-ID: 1-8:4 chip-ID: 2357:0604
Report: hciconfig ID: hci0 rfk-id: 2 state: down
bt-service: enabled,running rfk-block: hardware: no software: yes
address: <filter>
Drives:
Local Storage: total: 1.36 TiB lvm-free: 1.05 GiB used: 760.74 GiB (54.4%)
ID-1: /dev/sda vendor: Toshiba model: DT01ACA100 size: 931.51 GiB
speed: 6.0 Gb/s serial: <filter>
ID-2: /dev/sdb vendor: Crucial model: CT500MX500SSD1 size: 465.76 GiB
speed: 6.0 Gb/s serial: <filter>
Partition:
ID-1: / size: 433.37 GiB used: 99.19 GiB (22.9%) fs: ext4 dev: /dev/dm-1
mapped: msi--vg-root
ID-2: /boot size: 447.1 MiB used: 197 MiB (44.1%) fs: ext4 dev: /dev/sdb2
ID-3: /boot/efi size: 511 MiB used: 6 MiB (1.2%) fs: vfat dev: /dev/sdb1
Swap:
ID-1: swap-1 type: partition size: 22.36 GiB used: 0 KiB (0.0%) priority: -2
dev: /dev/dm-2 mapped: msi--vg-swap
Sensors:
System Temperatures: cpu: 46.0 C pch: 64.0 C mobo: N/A gpu: nvidia
temp: 57 C
Fan Speeds (RPM): N/A gpu: nvidia fan: 0%
Info:
Processes: 258 Uptime: 6h 52m Memory: 15.44 GiB used: 3.25 GiB (21.1%)
Init: systemd v: 252 target: graphical (5) default: graphical Compilers:
gcc: 12.2.0 alt: 12 Packages: pm: dpkg pkgs: 3226 Shell: Sudo v: 1.9.13p3
running-in: konsole inxi: 3.3.26

Apparently I use Device-1 from Audio section, Nvidia Audio is disabled according to initial screenshot.
 
you are running nvidia audio? not sure which one is used. but if it is nvidia now I see the issue. just like the video they are not well supported. But they just made a change to support linux. I am convinced the issue is driver related unless you are experiencing other motherboard issues.
 
Although just i won't get involved with the alphabet soup it's certainly reminding me of having to deal with TWO slides, and one can be set all the way up to 150 % if i use the mouse pointer but not via my keyboard's speaker keys.
 
you are running nvidia audio? not sure which one is used. but if it is nvidia now I see the issue. just like the video they are not well supported. But they just made a change to support linux. I am convinced the issue is driver related unless you are experiencing other motherboard issues.
Nvidia audio card is disabled, I use onboard one, labeled as "Device-1" in inxi output.
But now I'll test enabling Nvidia and see if that's the problem.

Although just i won't get involved with the alphabet soup it's certainly reminding me of having to deal with TWO slides, and one can be set all the way up to 150 % if i use the mouse pointer but not via my keyboard's speaker keys.
I've read somewhere there are methods to make audio output go beyond 100% but this would only make it louder all together not fix the initial few seconds.
 
Nvidia audio card is disabled, I use onboard one, labeled as "Device-1" in inxi output.
But now I'll test enabling Nvidia and see if that's the problem.


I've read somewhere there are methods to make audio output go beyond 100% but this would only make it louder all together not fix the initial few seconds.
I use gnome-tweaks and there is an option it is called "over-amplification" and it is the setting needed to go over 100%

or use the command...

gsettings set org.gnome.desktop.sound allow-volume-above-100-percent true
 
gsettings set org.gnome.desktop.sound allow-volume-above-100-percent true
Sadly does not fix the problem.

And I'm not able to enable Nvidia audio card, profile is off and no option to enable it.

But I'm going to install pavucontrol which has UI settings for pulseaudio, perhaps something useful in there.
 
But I'm going to install pavucontrol which has UI settings for pulseaudio, perhaps something useful in there.
Sadly no option in pavucontrol fixes this.
I'll probably need to reinstall system at some point and then see if problem persist to rule out configuration issues.
 
I figured out what's the problem as follows:

Stop pulseaudio:

Bash:
systemctl --user stop pulseaudio.socket
systemctl --user stop pulseaudio.service

Run pulseaudio (not as daemon) to show verbose output
Bash:
pulseaudio -vv

At this point I've run audio test and here is the relevant portion of the output what's happening:

I: [pulseaudio] module-suspend-on-idle.c: Sink alsa_output.pci-0000_00_1f.3.analog-stereo idle for too long, suspending ...
I: [alsa-sink-ALC887-VD Analog] alsa-sink.c: Device suspended...
D: [pulseaudio] sink.c: alsa_output.pci-0000_00_1f.3.analog-stereo: suspend_cause: (none) -> IDLE
D: [pulseaudio] sink.c: alsa_output.pci-0000_00_1f.3.analog-stereo: state: IDLE -> SUSPENDED
D: [pulseaudio] source.c: alsa_output.pci-0000_00_1f.3.analog-stereo.monitor: suspend_cause: (none) -> IDLE
D: [pulseaudio] source.c: alsa_output.pci-0000_00_1f.3.analog-stereo.monitor: state: IDLE -> SUSPENDED
D: [pulseaudio] module-suspend-on-idle.c: State of monitor source 'alsa_output.pci-0000_00_1f.3.analog-stereo.monitor' has changed, checking state of monitored sink
D: [pulseaudio] core.c: Hmm, no streams around, trying to vacuum.
D: [pulseaudio] module-udev-detect.c: /dev/snd/controlC0 is accessible: yes
D: [pulseaudio] module-udev-detect.c: Resuming all sinks and sources of card alsa_card.pci-0000_00_1f.3.

What happens is that audio sink, goes to IDLE state and then from IDLE to SUSPENDED state.
As soon as it's in suspended state running a new audio test will reproduce the issue!

Reason why this is happening is in /etc/pulse/default.pa, there is a line which says:

load-module module-suspend-on-idle

What this module does is saving power:

module-suspend-on-idle​


Since 0.9.11. Disconnects sinks and sources from their backend after a predetermined amount of idle time. Idle time is accumulated when the sink/source in question is not connected to any streams.


Advantages: Saves power. ALSA uses considerably more CPU cycles when pulseaudio has to send empty data to the soundcard during idle. If you don't plan to have an active stream all the time, set the timer to a low value for best power savings.

I have commented out this line and re-started the test with pulseaudio -vv, now the new relevant output is:
D: [pulseaudio] sink.c: alsa_output.pci-0000_00_1f.3.analog-stereo: state: RUNNING -> IDLE
D: [pulseaudio] core.c: Hmm, no streams around, trying to vacuum.
t output looks like this:

And that's it, it goes to IDLE but not SUSPEND state, it's fixed but at the expense of not saving energy.
Apparently a timeout can be set when the sink goes to SUSPENDED state, but I'm clueless how to set it and whether I should set it?
 

Staff online

Members online


Latest posts

Top