Running pulseaudio in real time mode

Hi there, and thx for reading and answering this post if you can.

I’m using a bluetooth headset, and to avoid sound clipping, I need to run pulseaudio with realtime priority.

  1. I installed kernel-rt
  2. I edited /etc/security/limits.conf and added
@audio          -       rtprio          99
@audio          -       nice            -20
@audio          -       memlock         4000000

@pulse-rt       -       rtprio          99
@pulse-rt       -       nice            -20
  1. my current user belongs to the pulse-rt group.
  2. edited /etc/sysconfig/security and changed
  1. rebooted

but nada. pulseaudio doesn’t run with rt.

Any idea ?

I also ran a

pkaction -v --action-id=org.pulseaudio.acquire-real-time

but the command returned:

No action with action id org.pulseaudio.acquire-real-time

Whereas it is defined in /etc/polkit-default-privs.restrictive selected with:


Did you tell pulseaudio to enable real time priority? See man pulseaudio, option --realtime.

yes, I both used --realtime and

realtime-scheduling = yes

in /etc/pulse/daemon.conf

This seems to be default and works without any special settings here on vanilla Leap 15.5:

bor@leap15:~> ps -cLp 1323
 1323  1323 TS   30 ?        00:00:00 pulseaudio
 1323  1350 RR   45 ?        00:00:00 null-sink

IO thread is real time.

I got this:

ps -cLp 2596
 2596  2596 TS   30 ?        00:00:05 pulseaudio
 2596  2604 RR   45 ?        00:00:00 alsa-sink-ALC12
 2596 12485 RR   45 ?        00:00:08 bluetooth

So where is the problem?

pulseaudio itself doesn’t seem to run in realtime, and my sound is still clipped

I expect that pulseaudio developers understand what they are doing when they use real time for threads dealing with actual data transfer.

But if you insist - chrt -r -p 5 PID-of-pulseaudio.

Remember, the purpose of my concern was to get a fluid audio output. I don’t care if it is real time or not. But let’s test your last proposal. Who knows…

So far, it seems to work… :slight_smile: So, stay tuned. More testing is needed but I think I’m on the right path.

Well, it’s far from being perfect, but watching, for example, a podcast on youtube in firefox, isn’t a real time process itself, hence possible conflicts, with e.g. tab and windows swapings, refocusing widgets, etc…

But this issue deserves to be addressed, with or without real time.

Thank you anyway to all who answered my post.

Ah, I forgot: nevertheless, I get far better results with the standard analog audio output. Almost no clipping if I stress the system, even if the audio output driver is pulseaudio no-realtime.
So, what’s the problem ?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.