"cannot lock down memory for RT thread"

I’m trying to set up a real time environment using Linux rlimits with PAM on my Gentoo-box. When I run qjackctl I get these messages:

JACK: unable to mlock() port buffers: Cannot allocate memory
JACK: unable to mlock() port buffers: Cannot allocate memory
cannot use real-time scheduling (FIFO at priority 20) [for thread 1091053904, from thread 1091053904] (1: Operation not permitted)
cannot lock down memory for RT thread (Cannot allocate memory)

What do they mean exactly? And what can I do about it?

Looks like you don’t have permission for real-time operations.

Have a look here:
http://freebob.sourceforge.net/index.php/Realtime_scheduling_for_non-root_users

Thanks, that link helped tremendously!

Until now I’d only followed the Gentoo documentation for enabling realtime for multimedia applications and didn’t realize I had to set the memlock and nice values in addition rtprio. Quite a “D’oh!” moment. :wink:

Everything works fine now.