Hey!
Before I upgraded Ubuntu to 20.04 LTS jack worked fine. After updating it seems that RT scheduling does not have in its plans to work. Anyone can help me? I could use ALSA instead but I’m translating ardour6 and I can’t use that option. Here’s my logs.
ardour6 says:
ERROR: JACK: Cannot create thread res = 1
Found nothing along /home/stefano/.config/ardour6/templates:/usr/local/share/ardour6/templates
JackTemporaryException : now quits...
Jack main caught signal 2
Released audio card Audio1
audio_reservation_finish
while jackd says:
Cannot create RT messagebuffer thread: Operation not permitted (1)
Retrying messagebuffer thread without RT scheduling
Messagebuffer not realtime; consider enabling RT scheduling for user
no message buffer overruns
I have already added my user to group audio:
stefano@stefanoASUS:~$ groups stefano
stefano : stefano adm disk cdrom sudo audio dip plugdev input lpadmin lxd sambashare docker
and also allowed RT and memory lock in /etc/security/limits.conf (and also /etc/security/limits.d/audio.conf):
That’s strange.
I booted the xubuntu 20.04 live USB, added the default xubuntu user to the audio group, added the limits.conf lines and logged out and in again.
Then I checked with ulimit -a , which said “real-time prio 95” and “max locked mem unlimited” as expected.
What does ulimit -r and ulimit -l say in your case?
It’s a long shot but maybe you should remove either the /etc/security/limits.d/audio.conf or the lines in limits.conf.
You had ulimit -r = 95 before you did the change which set it back to zero, so if you undo that last change you have the right premises for running RT-enabled jack.
JACK server starting in realtime mode with priority 95
self-connect-mode is "Don't restrict self connect requests"
audio_reservation_init
Acquire audio card Audio1
creating alsa driver ... hw:PCH,0|hw:PCH,0|1024|2|44100|0|0|nomon|swmeter|-|32bit
configuring for 44100Hz, period = 1024 frames (23.2 ms), buffer = 2 periods
ALSA: final selected sample format for capture: 32bit integer little-endian
ALSA: use 2 periods for capture
ALSA: final selected sample format for playback: 32bit integer little-endian
ALSA: use 2 periods for playback
Cannot use real-time scheduling (RR/95)(1: Operation not permitted)
AcquireSelfRealTime error
Because the “Cannot use real-time scheduling (RR/95)(1: Operation not permitted)” error is what I get when I try to run jack at a higher level than I have permission to.
My ulimit -r says 95 and if I use -P 99 I get a (RR/99) error, which is as expected.
So it seems that the user you’re using to start jack does not have real-time = 95 permission.
Run grep rtprio -R /etc/security/* and see if you have multiple rtprio entries competing with each other.
Like if your audio group has 95 but you have an entry for the stefano group, for example, which has something lower, and that ulimit for some reason chooses one and jack the other.
If that’s not the case then I’ve got no clue why it doesn’t work for you.
You could also try running the jackd command, start with -P 0 and then increase the value to see what jack thinks your max prio is.
I have the same. When you look at the Ubuntu Kernel changelog, you will find:
2020-04-20 - Andrea Righi andrea.righi@canonical.com linux (5.4.0-26.30) focal; urgency=medium 5.4.0-24.28 does not seem to apply rtprio, whereas -21 does. (LP: #1873315) - [Config] lowlatency: turn off RT_GROUP_SCHED *
That means with the current Generic Kernel rtprio cannot be set. Hope they will put it back into the next Kernel update.
Thanks for that info. Checking
grep -e “CONFIG_IRQ_FORCED_THREADING=y” -e “CONFIG_PREEMPT=y” /boot/config-uname -r
gives me: CONFIG_IRQ_FORCED_THREADING=y
Also I added threadirq to the grub. It is not loaded.
Checking the Kernel config file in /boot, I cannot find these
CONFIG_HZ_1000=y
CONFIG_HZ=1000
CONFIG_PREEMPT_RT_FULL=y
CONFIG_PREEMPT=y
Probably not.
The CONFIG_PREEMPT_RT seems to come from the RT patch, so if you’re running -generic you’re not supposed to have that line.
-generic has CONFIG_HZ=250
The thing is; I’m using the 20.04 Xubuntu Live USB, with the default 5.4.0-26-30-generic kernel, and I’m not having any problems running jack at rtprio 95.