Page MenuHomeSolus

limits.conf Realtime scheduling issue
Open, NormalPublic

Description

The limits.conf provided by the jack-audio-connection package doesn't work.

The one provided in the package has extra spaces that borkes RT.

By using the amount of spaces stated here I got it to work as expected after I logged out and logged back in.

I also noticed that back in 12-30-18 the spacing was correct.

Event Timeline

Interesting. I swear I've used JACK with RT without issues in the past.

Interesting. I swear I've used JACK with RT without issues in the past.

Really?

I've always had to do some tinkering to get it to work on Solus.
This just so happen to be the fix for me rn.

DataDrake triaged this task as Needs More Info priority.Jan 12 2021, 7:00 AM
DataDrake edited projects, added Software; removed Lacks Project.
DataDrake added a subscriber: DataDrake.

How exactly are you causing this? I can't seem to make this fail for jackd directly or through qjackctl and I verified everything with ulimit -a. The issue last time was tabs, not spaces.

I replicated my issue by downloading this file and copying it into /etc/security/limits.d/audio.conf
I had to reboot my system for the changes to take effect. Logout and login was not enough. I thought I was going crazy ?

Confirmed with this command that JACK was not allowed RT scheduling

jackd -d alsa -d hw:CODEC,0 -p512 -n3 -r44100

Also pic of error

Screenshot from 2021-01-11 23-50-27.png (1×1 px, 208 KB)

I'm assuming if I copy the audio.conf from my original post and logout and login it will work.
Will try now

Just confirmed that it works again.

@TeenCorn The best way of testing it (in my opinion) is by opening a project session in Ardour and use JACK. It is going to error and won't be usable if realtime isn't working.

@Jacalz I should have stated that's how I found out about the errorv m
n
j
b
nchfclj.n
lluut

There's got to be something else at play here. I'm using the file from us and it's working fine. Do you have an /etc/security/limits.d/audio.conf.newconfig or some other config file there?

Sorry. Phone in pocket before posting.

But yeah, there is most likely something else at play. When Solus didn't have jack2 as the default jack package I built my own jack2 eopkg. So that could be the error point, extra files still on the system for example.

And no I don't have an audio.conf.newconfig

My JACK installation was broke at some point and I was pretty sure that it was because of https://dev.getsol.us/T9378. I had pretty much given up, and accepted that as to why it was broken, after all the time I spent trying to get it working. Seems strange that the limits.conf file would be the issue, given that I know that I tested that in what feels like 100 times, but if it is, I will happily accept that :)

Well, looks like this issue can be closed ?

I just did a fresh Solus install on another machine and JACK works as expected.

So it turns out my machine is weird. Though I can't figure out why changing the spacing would fix the issue on the machine that was having problems. Probably a rogue file I forgot about is my guess.

Ok... I've figured out the problem. An hour of my time not being a complete waste ?

It turns out that the spacing, like you said, doesn't matter; as long as it not tabs.

What caused the issue was modifying the /etc/security/limits.d/audio.conf. When this file is modified and you reboot the system, ulimit -r returns 0. If you modify the file, you must logout and login for the changes to take effect.

On the machine where I experienced the issue, I have automatic login turned on. So, if I want the changes to take effect I must reboot then logout and login. Very dumb ?

So, my guess is whenever JACK got the current limits.conf that file replaced the one I had there and I rebooted and had no issue. Mainly because I haven't opened Ardour until 2 days ago. That's when I noticed.

Steps to replicate

Automatic Login: On -> modify /etc/security/limits.d/audio.conf (ex: deleted a space) -> reboot -> Run ulimit -r (returns 0) -> Logout and Login -> Run ulimit -r (returns <rt-value>)

This assumes ulimit -r returns a <rt-value> starting off.

My guess is that this is a PAM issue. The password is needed at the lightdm login, but since I got autologin on limits get borked.

Looking at lightdm-autologin, it's definitely never loading pam_limits so that makes sense.

Is it intentional for it not load the pam_limits?

DataDrake raised the priority of this task from Needs More Info to Normal.Mar 12 2022, 11:41 PM
DataDrake moved this task from Backlog to System and Configuration Fixes on the Software board.

lightdm-autologin should load pam_limits.