How do I get lower latency audio and better utilize my cpu?

CosmicWanderer

New Member
Joined
Feb 17, 2026
Messages
14
Reaction score
12
Credits
137
I may not be the first one to ask this question, but the "Is this already being discussed?" field didn't give me anything about this. I have been dabbling lately with music production and I am noticing a delay between when I press a key on a midi keyboard and when audio plays. I would like to minimize that delay as much as possible, but I also want to use my system to stay just as good for other things. I am pretty new to the technical side of audio, I just know the very basics.

I found a few complicated online tutorials saying to install a different kernel, but I don't really want a dedicated audio system. I do a lot of other things with my computer and I don't want to sacrifice functionality in those other areas.

I found one helpful guide that told me how to decrease the buffer size, which I set to 256. It was great for a bit, but then my cpu, which has 16 cores, was unable to keep up when I played three of four tracks. I personally found a buffer size of 256 to be acceptable, and I don't know if it's actually insane and super hard on my cpu, but I thought it should be a little better than that with a higher end cpu.

I also added myself to the pipewire group, which had this file in /etc/security/limits.d
Code:
# This file was installed by PipeWire project for its libpipewire-module-rt.so

# It is up to the distribution/user to create the @pipewire group and to add the
# relevant users to the group.
#
# PipeWire will fall back to the RTKit DBus service when the user is not able to
# acquire RT priorities with rlimits.
#
# If the group is not automatically created, the match rule will never be true
# and this file will have no effect.
#
@pipewire   - rtprio  70
@pipewire   - nice    -19
@pipewire   - memlock 4194304

I use fedora 44 with 100% pipewire, is jack better? My cpu is an intel 13700k and I have 32gb of ddr5 ram.
 


If I'm not mistaken your music production program (you didn't say which one your using) should manage the time between when a key is pressed and the audio/sound actually begins.

From the reading I did online the sound server that Linux uses (Pipewire or Jack) thus you will have to configure the buffer size. I know you already did that however if you forgot to log out and log back this is why what you adjusted didn't take effect.

The DAW / Synthesizer (part of your production program) handles the delay by requesting a specific buffer size.
The DAW tells the Linux audio server how fast it needs to go.

Once you configure the buffer size your DAW will respect the parameters to sync the key press with the output.

Fedora from my reading, handles audio priorities through a package called realtime-prividgles.
1. Adding your user to the realtime group should help. According to AI.

Code:
sudo usermod -aG realtime $USER
2. Log out and log back in OR> reboot.

3. Then, launch your terminal and execute Reaper, Bitwig or what your using and it will over ride the buffer size.
Below is 'just and example'.
Code:
PIPEWIRE_LATENCY="128/48000" reaper

Replace reaper with your terminal command. 128 is the buffer size (lower the number means 'less' lag) and 48000 is a sample rate (48 kHZ).

HTH

Two of our members that come to mind that are well versed in running Fedora are @dos2unix and one of our Moderators @f33dm3bits.
 
Don't forget to make a copy of your default pipewire config file. Save to your /home directory.
Code:
cp /usr/share/pipewire/pipewire.conf ~/.config/pipewire/

Then in your text editor open your config change it, save it and then restart pipewire with the systemctl command.
Code:
systemctl --user restart pipewire pipewire-pulse wireplumber

 


Follow Linux.org

Members online


Top