SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
but when I stert jack the error "Cannot use real-time scheduling" persist... How can I fix this? I want to setup things most optimal with stock kernel.
All text in qjackctl messages window:
Code:
10:30:44.683 Statistics reset.
10:30:44.685 ALSA connection change.
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
10:30:44.724 ALSA connection graph change.
10:30:58.485 JACK is starting...
10:30:58.485 /usr/bin/jackd -dalsa -r44100 -p256 -n2 -D -Chw:CODEC -Phw:CODEC
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
10:30:58.491 JACK was started with PID=2384.
jackdmp 1.9.14
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
Copyright 2016-2019 Filipe Coelho.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK server starting in realtime mode with priority 10
self-connect-mode is "Don't restrict self connect requests"
audio_reservation_init
Acquire audio card Audio2
creating alsa driver ... hw:CODEC|hw:CODEC|256|2|44100|0|0|nomon|swmeter|-|32bit
configuring for 44100Hz, period = 256 frames (5.8 ms), buffer = 2 periods
ALSA: final selected sample format for capture: 16bit little-endian
ALSA: use 2 periods for capture
ALSA: final selected sample format for playback: 16bit little-endian
ALSA: use 2 periods for playback
Cannot use real-time scheduling (RR/10) (1: Operation not permitted)
AcquireSelfRealTime error
10:31:00.568 JACK connection change.
10:31:00.568 Server configuration saved to "/home/anze/.jackdrc".
10:31:00.569 Statistics reset.
10:31:00.572 Client activated.
10:31:00.572 Patchbay deactivated.
10:31:00.582 JACK connection graph change.
Some additional info: when i run guitarix this error occurs:
Code:
Pitch Tracker *** Error creating realtime thread - tuner not started
Did you compile jack, qjackctl and guitarix yourself? If so, where did you get the SlackBuild scripts? Works for me, using my own packages on Slackware64-current.
Code:
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
11:37:24.308 ALSA verbindingen aangepast.
Tue Mar 31 11:37:24 2020: Starting jack server...
Tue Mar 31 11:37:24 2020: JACK server starting in realtime mode with priority 10
Tue Mar 31 11:37:24 2020: self-connect-mode is "Don't restrict self connect requests"
Tue Mar 31 11:37:24 2020: Acquired audio card Audio0
Tue Mar 31 11:37:24 2020: creating alsa driver ... hw:0|hw:0|256|2|44100|0|0|nomon|swmeter|soft-mode|32bit
Tue Mar 31 11:37:24 2020: configuring for 44100Hz, period = 256 frames (5.8 ms), buffer = 2 periods
Tue Mar 31 11:37:24 2020: ALSA: final selected sample format for capture: 32bit integer little-endian
Tue Mar 31 11:37:24 2020: ALSA: use 2 periods for capture
Tue Mar 31 11:37:24 2020: ALSA: final selected sample format for playback: 32bit integer little-endian
Tue Mar 31 11:37:24 2020: ALSA: use 2 periods for playback
Tue Mar 31 11:37:24 2020: graph reorder: new port 'system:capture_1'
Tue Mar 31 11:37:24 2020: New client 'system' with PID 0
Tue Mar 31 11:37:24 2020: graph reorder: new port 'system:capture_2'
Tue Mar 31 11:37:24 2020: graph reorder: new port 'system:playback_1'
Tue Mar 31 11:37:24 2020: graph reorder: new port 'system:playback_2'
Tue Mar 31 11:37:24 2020: New client 'PulseAudio JACK Sink' with PID 1725
Tue Mar 31 11:37:24 2020: Connecting 'PulseAudio JACK Sink:front-left' to 'system:playback_1'
Tue Mar 31 11:37:24 2020: Connecting 'PulseAudio JACK Sink:front-right' to 'system:playback_2'
Tue Mar 31 11:37:24 2020: New client 'PulseAudio JACK Source' with PID 1725
Tue Mar 31 11:37:24 2020: Connecting 'system:capture_1' to 'PulseAudio JACK Source:front-left'
Tue Mar 31 11:37:24 2020: Connecting 'system:capture_2' to 'PulseAudio JACK Source:front-right'
Tue Mar 31 11:37:25 2020: Saving settings to "/home/eha/.config/jack/conf.xml" ...
11:37:26.530 JACK verbindingen aangepast.
Then logoff and login back. Now jackd should be starting with real-time priority. This is the way I'm using it (and jackdbus is my default server, with pulseaudio running as a jack client).
As far as I remember (but I could be wrong) I used to use "ulimit -Hl" and "ulimit -Hr" to set the hardware limits. But I then switched to PAM so I'm not sure if this is going to fix you problem.
Hope this helps,
andrea
EDIT: for the solution I'm suggesting the user must belong to the audio group.
EDIT II: did you set the capabilities of /usr/bin/jackd? (that was implicit in AlienBOB's question):
Did you compile jack, qjackctl and guitarix yourself? If so, where did you get the SlackBuild scripts? Works for me, using my own packages on Slackware64-current.
Yes, slackbuilds from SlackBuilds.org but even when I installed your packages the result is the same...
Yes, slackbuilds from SlackBuilds.org but even when I installed your packages the result is the same...
Are you using a PAM enabled slackware installation? If so you need to use the "/etc/security/limit.d/audio.conf" solution. setcap doesn't work with PAM.
EDIT II: did you set the capabilities of /usr/bin/jackd? (that was implicit in AlienBOB's question):
Yes -> slackbuild takes care of that
Code:
if [ -x /sbin/setcap ]; then
# Give all binaries in the package realtime capabilities:
JACKBINS=( $(cd $PKG/usr/bin ; find . -type f -printf '%P\n') )
for EXE in \${JACKBINS[@]}; do
/sbin/setcap cap_ipc_lock,cap_sys_nice=ep usr/bin/\$EXE
done
fi
Quote:
Are you using a PAM enabled slackware installation?
No, if it is not necessary I don't want install additional software...
No, if it is not necessary I don't want install additional software...
It is not necessary but handy, otherwise you'll have to use setcap for every jack client (and some, like pulseaudio, ardour or carla, are tricky).
Anyway the last thing I can think about is that maybe you are using a file system which does not support capabilities, but ext4, the slackware default, should.
I had a real-time kernel on my machine for audio work but I was curious so I played around with getting the generic kernel to work in a non-PAM system. With 'threadirqs' and an initscript setting 'ulimit -l unlimited' and 'ulimit -r 90' I was getting the same error as you.
I found that webpage after some digging. Slackware's kernel does have the config option CONFIG_RT_GROUP_SCHED=y so I tried solution 1, editing /etc/cgconfig.conf and running '/etc/rc.d/rc.cgconfig start'. This seems to have gotten rid of that error and realtime starts normally now.
cgroups are an unneeded complication I think, but I tried this solution and I found it was working nicely... I'm not sure it is working any longer since ConsoleKit2 is no longer linked to cgmanager (I'm sure about the PAM enabled version, but not about the version included in current), but I could be wrong. See my post here:
After thinking a bit about it I recalled that I didn't use "ulimit -r" in my /etc/initscript, because setcap does the job. I only used "ulimit -Hl unlimited" for memory locking. Try removing "ulimit -r".
I really suggest you to go the PAM way if you are using your system for music production. Everything is in "testing" and you need just to change a line in /etc/slackpkg/slackpkg.con:
Code:
PRIORITY=( patches %PKGMAIN extra pasture testing )
to
PRIORITY=( testing patches %PKGMAIN extra pasture )
You need to manually install cracklib libpwquality pam,then slackpkg upgrade-all and you are done. No need to mess with setcap, and everything works really smootly.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.