Random audio stutter since March 1st snapshot

On Sunday, March 3rd, I ran updates and got the March 1st Tumbleweed snapshot. After the update, I started experiencing random audio stutter. It happened on YouTube, Facebook, and Twitch in both Firefox and Chrome, as well as with Kaffeine when playing local MP3s. The stutter is kind of like (if anyone is old enough to remember) the stutter of a broken vinyl record.

I have the Packman repository enabled, and it was suggested on Discord that it may be a package from that. On Wednesday I figured out that the ffmpeg-4 package from Packman had been updated on Sunday, so I thought that might be it. But the package was updated again today, and I’m still having the problem. So either it’s not fixed, or there’s something else.

Is there anything I can do to fix this, or am I just at the mercy of the ffmpeg developers and/or the Packman packagers? Or is there a chance it’s a package provided by openSUSE?

Installed some 100 versions of ffmpeg since 2016 and never experienced any problem. Make sure packages are from Packman and up to date:


erlangen:~ # zypper dup --allow-vendor-change --from Packman
Loading repository data...
Reading installed packages...
Computing distribution upgrade...

Nothing to do.
erlangen:~ # 

List of packages:

erlangen:~ # zypper se --installed-only --repo Packman|grep -i ffmpeg
i  | chromium-ffmpeg-extra             | Extra ffmpeg codecs for browsers based on Chromium                   | package
i+ | ffmpeg-4                          | Library for working with various multimedia formats                  | package
i+ | gstreamer-plugins-libav           | A ffmpeg/libav plugin for GStreamer                                  | package
i+ | libavcodec56                      | FFmpeg codec library                                                 | package
i+ | libavcodec57                      | FFmpeg codec library                                                 | package
i+ | libavcodec58                      | FFmpeg codec library                                                 | package
i+ | libavdevice57                     | FFmpeg device library                                                | package
i+ | libavdevice58                     | FFmpeg device library                                                | package
i+ | libavfilter6                      | FFmpeg audio and video filtering library                             | package
i+ | libavfilter7                      | FFmpeg audio and video filtering library                             | package
i+ | libavformat56                     | FFmpeg's stream format library                                       | package
i+ | libavformat57                     | FFmpeg's stream format library                                       | package
i+ | libavformat58                     | FFmpeg's stream format library                                       | package
i+ | libavresample3                    | FFmpeg alternate audio resampling library                            | package
i+ | libavresample4                    | FFmpeg alternate audio resampling library                            | package
i+ | libavutil54                       | FFmpeg's utility library                                             | package
i+ | libavutil55                       | FFmpeg's utility library                                             | package
i+ | libavutil56                       | FFmpeg's utility library                                             | package
i+ | libpostproc53                     | FFmpeg post-processing library                                       | package
i+ | libpostproc54                     | FFmpeg post-processing library                                       | package
i+ | libpostproc55                     | FFmpeg post-processing library                                       | package
i+ | libswresample1                    | FFmpeg software resampling library                                   | package
i+ | libswresample2                    | FFmpeg software resampling library                                   | package
i+ | libswresample3                    | FFmpeg software resampling library                                   | package
i+ | libswscale4                       | FFmpeg image scaling and colorspace/pixel conversion library         | package
i+ | libswscale5                       | FFmpeg image scaling and colorspace/pixel conversion library         | package
erlangen:~ # 

Try to kill pulseaudio, and see if it works later, I randomly have the noise that I solve only killing pulseaudio

pulseaudio -k

I’ve been using Tumbleweed since around mid-January, and one of the first things I did was add the Packman repository and run the vendor-change command. So the packages are coming from the Packman repo. I haven’t had any audio problems, either, until Sunday the 3rd.

I have no idea if it’s actually ffmpeg-4, but it’s the only lead I currently have. Even though I’ve been using Linux as my desktop for over twelve years, I’m not necessarily that good with diagnosing problems. So, any help is appreciated.

I used Arch from September through January, and as such, when I switched to Tumbleweed, I applied a fix for PulseAudio to fix an audio crackling issue I had experienced in Arch, since I expected it to exist in Tumbleweed as well. https://wiki.archlinux.org/index.php/PulseAudio/Troubleshooting#Glitches,_skips_or_crackling Again, I had no problems with Pulse after applying the fix, and no audio bugs at all until I applied that update on Sunday.

As far as killing PulseAudio goes, I’ve rebooted multiple times this past week, so I’m not sure if killing Pulse in my current session would do any good. My problem isn’t extra noise. It’s the sound stuttering. But I have no idea which package is causing it, and zypper doesn’t seem to be set up to cache package files, so I can’t roll back.

@lordude: Just a suggestion from me - try creating a new user account and then login as that user. Test the audio behaviour in that environment. Any different?

Okay, I created a new user account, logged out of my main account, logged into the test account, opened Firefox, and went to YouTube. About 11 minutes into a YouTube video, the audio stuttered. It did so again a few minutes later. So I would assume it isn’t related to any config files in my main account.

Good to know.

What about running the current live system?

https://download.opensuse.org/tumbleweed/iso/

Well, I downloaded the Tumbleweed KDE Live ISO from the link. Using that, I tried YouTube in Firefox, and I also mounted one of my partitions from within the live OS so I could play a local MP3 file in VLC.

Both tests still produced audio bugs, though there were some new ones I don’t experience in my install. For example, a couple times the audio dropped out for half a second, and another time for a full second. There was a slight stutter at one point, though not to the extent I’ve had on my install.

I have no idea if that may be related to it being a live OS, though. Loading programs in a live OS on a USB2 drive takes quite a bit longer to get things cached, so I don’t know if that impacts anything once the application is up and running. I do not have a USB3 drive.

Also, I don’t know if it’s relative, but my PC has an Intel Core i5-7500 CPU (3.4GHZ), 8GB of RAM, and a GeForce GTX 1050 Ti (4GB VRAM). I do have the 418.43 driver from the NVIDIA repository.

Any information might be relevant:

erlangen:~ # inxi -zFxx
System:    Host: erlangen Kernel: 4.20.13-1-default x86_64 bits: 64 compiler: gcc v: 8.2.1 Console: tty 0 wm: kwin_x11 
           dm: SDDM Distro: openSUSE Tumbleweed 20190307 
Machine:   Type: Desktop Mobo: ASRock model: Z170 Pro4S serial: <filter> UEFI: American Megatrends v: P3.50 date: 06/23/2016 
CPU:       Topology: Quad Core model: Intel Core i7-6700K bits: 64 type: MT MCP arch: Skylake-S rev: 3 L1 cache: 256 KiB 
           L2 cache: 8192 KiB L3 cache: 8192 KiB 
           flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 64128 
           Speed: 4082 MHz min/max: 800/4200 MHz Core speeds (MHz): 1: 3233 2: 2983 3: 3187 4: 2731 5: 2953 6: 2545 7: 2439 
           8: 2623 
Graphics:  Device-1: Intel HD Graphics 530 vendor: ASRock driver: i915 v: kernel bus ID: 00:02.0 chip ID: 8086:1912 
           Display: server: X.Org 1.20.4 driver: intel unloaded: fbdev,modesetting,vesa compositor: kwin_x11 
           resolution: 1920x1200~60Hz 
           OpenGL: renderer: Mesa DRI Intel HD Graphics 530 (Skylake GT2) v: 4.5 Mesa 18.3.4 compat-v: 3.0 direct render: Yes 
Audio:     Device-1: Intel 100 Series/C230 Series Family HD Audio vendor: ASRock driver: snd_hda_intel v: kernel 
           bus ID: 00:1f.3 chip ID: 8086:a170 
           Sound Server: ALSA v: k4.20.13-1-default 
Network:   Device-1: Intel Ethernet I219-V vendor: ASRock driver: e1000e v: 3.2.6-k port: f040 bus ID: 00:1f.6 
           chip ID: 8086:15b8 
           IF: enp0s31f6 state: down mac: <filter> 
           Device-2: Qualcomm Atheros AR9287 Wireless Network Adapter driver: ath9k v: kernel port: f040 bus ID: 03:00.0 
           chip ID: 168c:002e 
           IF: wlp3s0 state: up mac: <filter> 
Drives:    Local Storage: total: 4.56 TiB used: 1.87 TiB (41.1%) 
           ID-1: /dev/nvme0n1 vendor: Samsung model: SSD 950 PRO 512GB size: 476.94 GiB speed: 31.6 Gb/s lanes: 4 
           serial: <filter> temp: 36 C 
           ID-2: /dev/sda vendor: Western Digital model: WD40EZRX-22SPEB0 size: 3.64 TiB speed: 6.0 Gb/s serial: <filter> 
           ID-3: /dev/sdb vendor: Samsung model: SSD 850 EVO 500GB size: 465.76 GiB speed: 6.0 Gb/s serial: <filter> 
Partition: ID-1: / size: 31.37 GiB used: 17.80 GiB (56.7%) fs: ext4 dev: /dev/nvme0n1p2 
           ID-2: /home size: 406.34 GiB used: 206.02 GiB (50.7%) fs: ext4 dev: /dev/nvme0n1p3 
           ID-3: swap-1 size: 32.00 GiB used: 4.0 MiB (0.0%) fs: swap dev: /dev/sda2 
Sensors:   System Temperatures: cpu: 51.5 C mobo: N/A 
           Fan Speeds (RPM): N/A 
Info:      Processes: 375 Uptime: 09:10:46  up 2 days  2:35,  5 users,  load average: 0.44, 0.51, 0.62 Memory: 31.11 GiB 
           used: 7.02 GiB (22.6%) Init: systemd v: 239 runlevel: 5 target: graphical.target Compilers: gcc: 8.2.1 alt: 7/8 
           clang: 7.0.1 Shell: bash v: 5.0.2 running in: konsole inxi: 3.0.32 
erlangen:~ # 

What is your’s?

inxi -zFxx
System:    Host: db-pc Kernel: 4.20.13-1-default x86_64 bits: 64 compiler: gcc v: 8.2.1 Desktop: KDE Plasma 5.15.2 
           tk: Qt 5.12.0 wm: kwin_x11 dm: SDDM Distro: openSUSE Tumbleweed 20190307 
Machine:   Type: Desktop Mobo: ASRock model: B250M-HDV serial: <filter> UEFI: American Megatrends v: P2.50 date: 02/23/2018 
CPU:       Topology: Quad Core model: Intel Core i5-7500 bits: 64 type: MCP arch: Kaby Lake rev: 9 L2 cache: 6144 KiB 
           flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 27264 
           Speed: 800 MHz min/max: 800/3800 MHz Core speeds (MHz): 1: 800 2: 800 3: 800 4: 800 
Graphics:  Device-1: NVIDIA GP107 [GeForce GTX 1050 Ti] vendor: Micro-Star MSI driver: nvidia v: 418.43 bus ID: 01:00.0 
           chip ID: 10de:1c82 
           Display: x11 server: X.Org 1.20.4 driver: nvidia unloaded: fbdev,modesetting,nouveau,vesa alternate: nv 
           compositor: kwin_x11 resolution: 1920x1080~60Hz 
           OpenGL: renderer: GeForce GTX 1050 Ti/PCIe/SSE2 v: 4.6.0 NVIDIA 418.43 direct render: Yes 
Audio:     Device-1: Intel 200 Series PCH HD Audio vendor: ASRock driver: snd_hda_intel v: kernel bus ID: 00:1f.3 
           chip ID: 8086:a2f0 
           Device-2: NVIDIA GP107GL High Definition Audio vendor: Micro-Star MSI driver: snd_hda_intel v: kernel 
           bus ID: 01:00.1 chip ID: 10de:0fb9 
           Sound Server: ALSA v: k4.20.13-1-default 
Network:   Device-1: Intel Ethernet I219-V vendor: ASRock driver: e1000e v: 3.2.6-k port: f000 bus ID: 00:1f.6 
           chip ID: 8086:15b8 
           IF: enp0s31f6 state: up speed: 1000 Mbps duplex: full mac: <filter> 
           Device-2: Realtek RTL8812AE 802.11ac PCIe Wireless Network Adapter driver: rtl8821ae v: kernel port: d000 
           bus ID: 02:00.0 chip ID: 10ec:8812 
           IF: wlp2s0 state: down mac: <filter> 
Drives:    Local Storage: total: 931.51 GiB used: 571.26 GiB (61.3%) 
           ID-1: /dev/sda vendor: Western Digital model: WD10EZEX-08WN4A0 size: 931.51 GiB speed: 6.0 Gb/s serial: <filter> 
Partition: ID-1: / size: 19.74 GiB used: 12.54 GiB (63.5%) fs: ext4 dev: /dev/sda6 
           ID-2: /home size: 95.15 GiB used: 49.17 GiB (51.7%) fs: ext4 dev: /dev/sda7 
           ID-3: swap-1 size: 8.65 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/sda12 
Sensors:   System Temperatures: cpu: 33.0 C mobo: N/A gpu: nvidia temp: 39 C 
           Fan Speeds (RPM): N/A gpu: nvidia fan: 35% 
Info:      Processes: 228 Uptime: N/A Memory: 7.75 GiB used: 1.88 GiB (24.2%) Init: systemd v: 239 runlevel: 5 
           target: graphical.target Compilers: gcc: 8.2.1 alt: 8 clang: 7.0.1 Shell: bash v: 5.0.2 running in: konsole 
           inxi: 3.0.32

I’ve had this computer since August 2017, and I haven’t had any problems with the audio in Manjaro, Arch, or openSUSE up until last Sunday. Well, other than the audio glitches that I fixed using what the Arch Wiki detailed, as mentioned in an earlier post.

Uptime out put is missing:

erlangen:~ # uptime
 09:56:13  up 2 days  3:21,  5 users,  load average: 0.78, 0.38, 0.39
erlangen:~ # 

Any processes generating high load, especially during audio stutter?

uptime
 05:04:02  up   1:10,  2 users,  load average: 0.10, 0.22, 0.46

I haven’t watched ksysguard to see if anything spikes. And even then, I don’t think I’d be able to tell as there are so many processes. Is there an easier way to monitor for load spikes?

Running top in a terminal is fine.

You may run pulseaudio -k and filter the journal appropriately:

erlangen:~ # journalctl -b |grep 11:02|grep pulseaudio
Mar 10 11:02:03 erlangen plasmashell[21213]: org.kde.plasma.pulseaudio: context kaput
Mar 10 11:02:03 erlangen plasmashell[21213]: org.kde.plasma.pulseaudio: No object for name "alsa_output.pci-0000_00_1f.3.analog-stereo"
Mar 10 11:02:03 erlangen plasmashell[21213]: org.kde.plasma.pulseaudio: No object for name "alsa_output.pci-0000_00_1f.3.analog-stereo.monitor"
Mar 10 11:02:03 erlangen rtkit-daemon[2387]: Successfully made thread 3852 of process 3852 (/usr/bin/pulseaudio) owned by '1000' high priority at nice level -11.
Mar 10 11:02:03 erlangen rtkit-daemon[2387]: Successfully made thread 3855 of process 3852 (/usr/bin/pulseaudio) owned by '1000' RT at priority 5.
Mar 10 11:02:03 erlangen dbus-daemon[1031]: [system] Activating via systemd: service name='org.bluez' unit='dbus-org.bluez.service' requested by ':1.339' (uid=1000 pid=3852 comm="/usr/bin/pulseaudio --start --log-target=syslog ")
Mar 10 11:02:03 erlangen plasmashell[21213]: org.kde.plasma.pulseaudio: No object for name "alsa_output.pci-0000_00_1f.3.analog-stereo.monitor"
Mar 10 11:02:03 erlangen rtkit-daemon[2387]: Successfully made thread 3862 of process 3862 (/usr/bin/pulseaudio) owned by '1000' high priority at nice level -11.
Mar 10 11:02:03 erlangen plasmashell[21213]: org.kde.plasma.pulseaudio: No object for name "alsa_output.pci-0000_00_1f.3.analog-stereo.monitor"
Mar 10 11:02:03 erlangen pulseaudio[3862]: [pulseaudio] pid.c: Daemon already running.
Mar 10 11:02:04 erlangen rtkit-daemon[2387]: Successfully made thread 3864 of process 3864 (/usr/bin/pulseaudio) owned by '1000' high priority at nice level -11.
Mar 10 11:02:04 erlangen pulseaudio[3864]: [pulseaudio] pid.c: Daemon already running.
erlangen:~ # 

I ran “top” while listening to a song in Kaffeine. There was a slight stutter, and I noticed wpa_supplicant spiked. I don’t remember turning it on, but the wireless on the Network Manager was on. My PC is wired via ethernet, so I never needed the Wi-Fi. So I turned it off, and I had no further problems. I rebooted just to make sure it wasn’t because I did the pulseaudio -k hours ago, but I listened to the song in Kaffeine again for a couple loops, and no audio bugs.

So, that may have fixed it. Since it seemed to be a random thing, though, I don’t know for absolute certainty yet, but I am cautiously optimistic.

Thanks for the help!

Deleting the interface will prohibit accidential activation, e.g. /etc/sysconfig/network/ifcfg-wlp3s0

That file is only responsible for wicked configuration of the interface concerned. For NetworkManager, it’s best just to configure the wifi not to start automatically in the first place, or remove its connection profile.

Path name is e.g. /etc/NetworkManager/system-connections/FRITZ!Box.nmconnection

Yes, correct (when using NetworkManager).

I’d like to add something to this thread. I found another solution for the stuttering problem by the purest of serendipity. It may not be (probably isn’t) a solution for everybody, but it works for me on my desktop.

Until a month ago, I had never used a wifi connection, always an ethernet connection. But a month ago I installed a wifi card to try wifi out. The card was immediately recognized, and I had no problem with the wifi. I could easily switch from wired to wifi, and vice versa, via NetworkManager. But when on the wired connection the sound stutter problem arose.

First of all, I think the OP is correct. The problem arises when you have, what we might call, a chimerical system: a system with both a wifi and a wired connection. And the culprit, as the OP suggested, is wpa_supplicant, which will periodically hog the cpu. (If you google ‘wpa_supplicant hogs cpu’, you will see a number of bugs lodged against wpa_supplicant for this problem.) The stutter (really more of a short-lived flutter) occurs when you use the wired connection and the wifi connection is still active. I never experience it when I am using the wifi connection. The suggestion to prevent the wifi connection starting via NetworkManager, while it worked in preventing the flutter when on the wired connection, presented its own problem: When I started out on the wired connection, then wanted to use the wifi connection, I could switch to it, but then, if I switched back to the wired connection, the wifi connection was still active, and I had the flutter problem. Not being very knowledgeable about wifi connections (but I’m learning), I didn’t know how to deactivate the wifi connection. Now, here comes the serendipitously found solution.

Months before the sound problem, I had another problem on my system. I like to plug my cellphone into a usb port in the morning for a slow charge (it’s a new Pixel). But a few months ago, I began having problems mounting the phone. It would mount-dismount rapidly. Sometimes it would charge, sometimes it wouldn’t. I solved this problem by installing tlp on my system and configuring it (in /etc/defautl/tlp) to exclude usb devices from autosuspend:



# Set to 0 to disable, 1 to enable USB autosuspend feature.
USB_AUTOSUSPEND=0


(In what was probably over-kill, I went through and excluded all usb devices individually).

Of course, none of that is really germane to the sound flutter problem, but I just thought I’d record it here. The solution to the sound problem via tlp is this: tlp has two commands you can run nonroot in a terminal:

wifi off
wifi on

When I run** wifi off**, if I look in NetworkManager, I do not see any wifi connections at all. None. All I see is my wired connection. I don’t know how tlp does this (cuts power to the wifi card?), but it’s as if the card isn’t there any more. Thereafter with the wired connection, no sound flutter. If I want to use my wifi connection, I just run wifi on, and there it is in NetworkManager (with all my neighbors’ connections). If I want to switch back to my wired connection, I just run wifi off again.

I hope someone finds this useful.