Skip to content

When the disk (SSD) is under significant load (downloading a huge file on a fast connection), sound begins glitching quite frequently. Even with linux-zen. Is it just the state of things, or should I be able to fix it?

The sound usually works fine while I'm not downloading huge files; I'm certain that either network or disk I/O somehow causes audio glitching.

This happens with pipewire + easyeffects (which requires pipewire). I'm not sure if I should test without those, they're kind of mandatory with my devices, but for the sake of testing I can try if you think they can be relevant to the problem.

This happens both for an USB soundcard and for any Bluetooth audio device, so I'd guess it's not because of unlucky soundcard drivers.

I thought that linux-zen kernel is supposed to help against such problems, but it doesn't seem to provide any noticeable improvement. (I checked that I'm actually booting with linux-zen; I didn't just install it)

Any ideas what should I try to prevent audio glitches under I/O load?

34 points9 comments
Open on Reddit
About this post
Posted
Archived
Score
34 · 91% up
Kind
Text
ID
ps30ei

Author

7
posts
61
comments
1
media
View profile

13 comments

Hm, could be due to heavy CPU usage (which technically shouldn't be happening for file downloads, unless you're decompressing or verifying contents, or scanning it for malware).

IMO the audio server process should be given higher priority, and some real time privileges.

22 points
unknown author4 hidden

Deleted before we saved it.

9 points

Normally pulseaudio gets realtime automatically (via rtkit-daemon), I think pipewire does as well. But much less sure about easyeffects.

5 points

I've ran into similar issues in the past (not necessarily downloading files) and installing realtime-privileges +add-in the user to the real-time group fixed it: https://wiki.archlinux.org/title/PipeWire#Increasing_RLIMIT_MEMLOCK

Check the pipewire logs to see if there are any similar errors as mentioned in the wiki.

10 points

I did this a couple months ago, but probably should check if it's still configured properly, thanks for the reminder

2 points

Do you have swap set up? Even if you think you have enough RAM, swap is still useful to a properly running system.

I'm assuming you're using ext4 since you don't specficy otherwise. The default mount options for ext4 uses a 5 second interval to commit new changes to the disk, e.g. every 5 seconds the system runs a full sync operation. You could try increasing that commit interval from 5 secs to something like 60 secs.

6 points

I thought I did, but seems like not1, htop displays "0K/0K" for "Swp". Interesting suggestions, I'll try this soon and respond with results.

(1) must have been the other arch system, I dual boot between 2 setups

3 points

Turns out I didn't have swap initially, and then after I enabled it, this situation had improved. I haven't noticed any glitches ever since in the same network/disk usage scenarios as I described earlier. It's not certain that this is the reason, since the versions of everything had changed since 22d ago, but it seemed to help. So thank you again for suggestion.

1 points
unknown author1 hidden

Deleted before we saved it.

-7 points

i had the same problems with pulseaudio now whot?

Edit: The guy above writed that its all pipewire fault, its bad etc. i hate when people say something and then decide to delete it becouse others have diffrent opinion. just edit and say that you were wrong or smth?

2 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.