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?
About this post
- Posted
- Archived
- Score
- 34 · 91% up
- Kind
- Text
- ID
- ps30ei
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.
Deleted before we saved it.
Normally pulseaudio gets realtime automatically (via rtkit-daemon), I think pipewire does as well. But much less sure about easyeffects.
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.
I did this a couple months ago, but probably should check if it's still configured properly, thanks for the reminder
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
ext4since you don't specficy otherwise. The default mount options forext4uses 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.I thought I did, but seems like not1,
htopdisplays "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
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.
Deleted before we saved it.
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?