JACK: Cannot use real-time scheduling

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Post Reply
finotti
Established Member
Posts: 528
Joined: Thu Sep 01, 2011 9:07 pm
Has thanked: 88 times
Been thanked: 23 times

JACK: Cannot use real-time scheduling

Post by finotti »

Every once in a while I cannot start Ardour. It seems that the problem is real-time scheduling.

I have it configured as suggested in https://wiki.linuxaudio.org/wiki/system_configuration and it usually works fine. To fix when the problem happens, I usually have to reboot the computer, but then all works fine. It would be very nice if I could fix the problem without rebooting, or even better, find out what is causing it.

For more details, when I start Ardour I get:
Session "/home/finotti/Recordings/GTR_test (snapshot GTR_test)" did not load successfully.
Here is the what the terminal says:

Code: Select all

$ ardour5
bind txt domain [gtk2_ardour5] to /usr/share/ardour5/locale
Ardour5.12.0 (built using 1:5.12.0-1 and GCC version 7.2.0)
ardour: [INFO]: Your system is configured to limit Ardour to only 1048576 open files
ardour: [INFO]: Loading system configuration file /etc/ardour5/system_config
ardour: [INFO]: Loading user configuration file /home/finotti/.config/ardour5/config
ardour: [INFO]: CPU vendor: GenuineIntel
ardour: [INFO]: AVX-capable processor
ardour: [INFO]: CPU brand: Intel(R) Core(TM) i7-4771 CPU @ 3.50GHz
ardour: [INFO]: Using SSE optimized routines
ardour: [INFO]: Loading default ui configuration file /etc/ardour5/default_ui_config
ardour: [INFO]: Loading user ui configuration file /home/finotti/.config/ardour5/ui_config
Color shuttle bg not found
ardour: [INFO]: Loading color file /usr/share/ardour5/themes/dark-ardour.colors
ardour: [INFO]: Loading ui configuration file /etc/ardour5/clearlooks.rc
ardour: [INFO]: Loading ui configuration file /etc/ardour5/clearlooks.rc
Found 4 along /home/finotti/.config/ardour5/templates:/usr/share/ardour5/templates
run dialog
Error opening file /usr/local/lib/lv2/lsp-plugins-lv2-1.0.23-x86_64/manifest.ttl (No such file or directory)
lilv_world_load_file(): error: Error loading file `file:///usr/local/lib/lv2/lsp-plugins-lv2-1.0.23-x86_64/manifest.ttl'
lilv_world_load_bundle(): error: Error reading file:///usr/local/lib/lv2/lsp-plugins-lv2-1.0.23-x86_64/manifest.ttl
Scanning folders for bundled LV2s: /usr/lib/ardour5/LV2
Error opening file /usr/local/lib/lv2/lsp-plugins-lv2-1.0.23-x86_64/manifest.ttl (No such file or directory)
lilv_world_load_file(): error: Error loading file `file:///usr/local/lib/lv2/lsp-plugins-lv2-1.0.23-x86_64/manifest.ttl'
lilv_world_load_bundle(): error: Error reading file:///usr/local/lib/lv2/lsp-plugins-lv2-1.0.23-x86_64/manifest.ttl
Set cursor set to default
Editor didn't find Editor/start-range in editor
Editor didn't find Editor/finish-range in editor
Editor didn't find Editor/jump-backward-to-mark in editor
Editor didn't find Region/split-region in editor
Editor didn't find Editor/jump-forward-to-mark in editor
Editor didn't find Editor/add-location-from-playhead in editor
Editor didn't find Editor/alternate-add-location-from-playhead in editor
Editor didn't find Editor/start-punch-range in editor
Editor didn't find Editor/finish-punch-range in editor
Editor didn't find Editor/addExistingAudioFiles in editor
Editor didn't find Editor/remove-location-from-playhead in editor
Editor didn't find Editor/alternate-remove-location-from-playhead in editor
Editor didn't find Editor/alternate-jump-backward-to-mark in editor
Editor didn't find Editor/alt-finish-range in editor
Editor didn't find Editor/alternate-jump-forward-to-mark in editor
Editor didn't find Editor/alt-start-range in editor
Editor didn't find Editor/nudge-next-forward in editor
Editor didn't find Editor/nudge-next-backward in editor
Editor didn't find Editor/start-loop-range in editor
Editor didn't find Editor/finish-loop-range in editor
Editor didn't find Editor/nudge-playhead-backward in editor
Editor didn't find Editor/nudge-playhead-forward in editor
Editor didn't find Editor/playhead-backward-to-grid in editor
Editor didn't find Editor/playhead-forward-to-grid in editor
Editor didn't find Editor/start-range in editor
Editor didn't find Editor/finish-range in editor
Editor didn't find Editor/jump-backward-to-mark in editor
Editor didn't find Region/split-region in editor
Editor didn't find Editor/jump-forward-to-mark in editor
Editor didn't find Editor/add-location-from-playhead in editor
Editor didn't find Editor/alternate-add-location-from-playhead in editor
Editor didn't find Editor/start-punch-range in editor
Editor didn't find Editor/finish-punch-range in editor
Editor didn't find Editor/addExistingAudioFiles in editor
Editor didn't find Editor/remove-location-from-playhead in editor
Editor didn't find Editor/alternate-remove-location-from-playhead in editor
Editor didn't find Editor/alternate-jump-backward-to-mark in editor
Editor didn't find Editor/alt-finish-range in editor
Editor didn't find Editor/alternate-jump-forward-to-mark in editor
Editor didn't find Editor/alt-start-range in editor
Editor didn't find Editor/nudge-next-forward in editor
Editor didn't find Editor/nudge-next-backward in editor
Editor didn't find Editor/start-loop-range in editor
Editor didn't find Editor/finish-loop-range in editor
Editor didn't find Editor/nudge-playhead-backward in editor
Editor didn't find Editor/nudge-playhead-forward in editor
Editor didn't find Editor/playhead-backward-to-grid in editor
Editor didn't find Editor/playhead-forward-to-grid in editor

Errors/Messages:
ERROR: JACK: Cannot use real-time scheduling (RR/5)(1: Operation not permitted)
ERROR: JACK: JackClient::AcquireSelfRealTime error
WARNING: Ignoring LV2 plugin "AT1" because its buffer-size requirements cannot be satisfied.
WARNING: Ignoring LV2 plugin "Big Meter" because its buffer-size requirements cannot be satisfied.
WARNING: Ignoring LV2 plugin "BLS1" because its buffer-size requirements cannot be satisfied.
WARNING: Ignoring LV2 plugin "REV1 (Ambisonic)" because its buffer-size requirements cannot be satisfied.
WARNING: Ignoring LV2 plugin "REV1 (Stereo)" because its buffer-size requirements cannot be satisfied.
WARNING: Ignoring LV2 plugin "ZynAlienWah" because its buffer-size requirements cannot be satisfied.
WARNING: Ignoring LV2 plugin "ZynChorus" because its buffer-size requirements cannot be satisfied.
WARNING: Ignoring LV2 plugin "ZynDistortion" because its buffer-size requirements cannot be satisfied.
WARNING: Ignoring LV2 plugin "ZynDynamicFilter" because its buffer-size requirements cannot be satisfied.
WARNING: Ignoring LV2 plugin "ZynEcho" because its buffer-size requirements cannot be satisfied.
WARNING: Ignoring LV2 plugin "ZynPhaser" because its buffer-size requirements cannot be satisfied.
WARNING: Ignoring LV2 plugin "ZynReverb" because its buffer-size requirements cannot be satisfied.
WARNING: Ignoring LV2 plugin "Vex" because its buffer-size requirements cannot be satisfied.
WARNING: Ignoring duplicate Linux VST plugin simpverb
Ignoring duplicate Linux VST plugin fx_hallreverb
Ignoring duplicate Linux VST plugin fx_saturation
Ignored VST plugin which is newer than cache: '/usr/lib/vst/LinuxSampler.so' (cache: '/home/finotti/.cache/ardour5/vst/779437eebce16d89fce50a63d4e7f17a299e12cd.fsi64')
INFO: Re-Scan Plugins (Preferences > Plugins) to update the cache, also make sure your system-time is set correctly.
WARNING: Ignored VST plugin which is newer than cache: '/usr/lib/vst/StereoSourceSeparation.so' (cache: '/home/finotti/.cache/ardour5/vst/20b5110195eb041270ee0df7782ac95a86653816.fsi64')
INFO: Re-Scan Plugins (Preferences > Plugins) to update the cache, also make sure your system-time is set correctly.
WARNING: Ignored VST plugin which is newer than cache: '/usr/lib/vst/vex.so' (cache: '/home/finotti/.cache/ardour5/vst/c812ed63c2097db4c2e5962a9a9702137367b438.fsi64')
INFO: Re-Scan Plugins (Preferences > Plugins) to update the cache, also make sure your system-time is set correctly.
WARNING: Ignored VST plugin which is newer than cache: '/usr/lib/vst/JuceDemoPlugin.so' (cache: '/home/finotti/.cache/ardour5/vst/b609394c8632eaa690a22f8ba207bfacbd1bf10f.fsi64')
INFO: Re-Scan Plugins (Preferences > Plugins) to update the cache, also make sure your system-time is set correctly.
WARNING: Ignoring duplicate Linux VST plugin MaPitchshift
Ignored VST plugin which is newer than cache: '/usr/lib/vst/ReFine.so' (cache: '/home/finotti/.cache/ardour5/vst/15687fde822c90fe46b52107f62a13e91f59359e.fsi64')
INFO: Re-Scan Plugins (Preferences > Plugins) to update the cache, also make sure your system-time is set correctly.
WARNING: Ignoring duplicate Linux VST plugin MaFreeverb
Ignored VST plugin which is newer than cache: '/usr/lib/vst/Luftikus.so' (cache: '/home/finotti/.cache/ardour5/vst/44d52479222c8a8505ad38081c5865420850eb68.fsi64')
INFO: Re-Scan Plugins (Preferences > Plugins) to update the cache, also make sure your system-time is set correctly.
WARNING: Ignored VST plugin which is newer than cache: '/usr/lib/vst/HiReSam.so' (cache: '/home/finotti/.cache/ardour5/vst/e0da839d53bcb4a41455649a59602577c80031ea.fsi64')
INFO: Re-Scan Plugins (Preferences > Plugins) to update the cache, also make sure your system-time is set correctly.
WARNING: Ignoring duplicate Linux VST plugin MaGigaverb
Video-monitor 'xjadeo' was not found. Please install http://xjadeo.sf.net/ (a custom path to xjadeo can be specified by setting the XJREMOTE environment variable. It should point to an application compatible with xjadeo's remote-control interface 'xjremote').

see also http://manual.ardour.org/video-timeline/setup/

Install the 'ardour-video-timeline' Debian package!

INFO: Loading bindings from /home/finotti/.config/ardour5/ardour.keys
Loading menus from /etc/ardour5/ardour.menus
ERROR: JACK: Cannot create thread res = 1

run dialog
Cannot get session parameters.
I think the relevant parts are:

Code: Select all

ERROR: JACK: Cannot use real-time scheduling (RR/5)(1: Operation not permitted)
ERROR: JACK: JackClient::AcquireSelfRealTime error
The system is running Debian Sid (up to date) with KXStudio, although Ardour is from Debian (as it's newer):

Code: Select all

$ apt policy ardour
ardour:
  Installed: 1:5.12.0-1
  Candidate: 1:5.12.0-1
  Version table:
 *** 1:5.12.0-1 500
        500 http://httpredir.debian.org/debian sid/main amd64 Packages
        100 /var/lib/dpkg/status
     1:5.11.4-1kxstudio1v5 500
        500 http://kxstudio.linuxaudio.org/repo gcc5/free amd64 Packages
     1:5.11.4-1kxstudio1 500
        500 http://kxstudio.linuxaudio.org/repo stable/free amd64 Packages
But it also happened with KXStudio's version before and I don't think that Ardour is the problem.

The interface is a Focusrite 2i2 2nd generation. Here is more info on the system:

Code: Select all

$ inxi -A -v3
System:    Host: debian Kernel: 4.13.0-7.slh.1-aptosid-amd64 x86_64 bits: 64 gcc: 7.2.1
           Desktop: KDE Plasma 5.10.5 Distro: aptosid 2013-01 Ἑσπερίδες - kde-full - (201305050307)
Machine:   Device: desktop System: ASUS product: All Series serial: N/A
           Mobo: ASUSTeK model: Z87-PRO v: Rev 1.xx serial: N/A
           UEFI: American Megatrends v: 2103 date: 08/18/2014
CPU:       Quad core Intel Core i7-4771 (-HT-MCP-) arch: Haswell rev.3 cache: 8192 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 27981
           clock speeds: max: 3900 MHz 1: 3497 MHz 2: 3497 MHz 3: 3497 MHz 4: 3497 MHz 5: 3497 MHz 6: 3497 MHz
           7: 3497 MHz 8: 3497 MHz
Graphics:  Card: Intel Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller bus-ID: 00:02.0
           Display Server: x11 (X.Org 1.19.5 ) driver: intel Resolution: 1280x1024@75.02hz, 1920x1080@60.00hz
           OpenGL: renderer: Mesa DRI Intel Haswell Desktop version: 4.5 Mesa 17.2.3 Direct Render: Yes
Audio:     Card-1 Intel 8 Series/C220 Series High Definition Audio Controller bus-ID: 00:1b.0
           Card-2 Intel Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller bus-ID: 00:03.0
           Card-3 C-Media CMI8788 [Oxygen HD Audio] driver: snd_oxygen port: d000 bus-ID: 05:04.0                                    
           Card-4 Logitech QuickCam Communicate STX driver: USB Audio usb-ID: 001-005                                                
           Card-5 Focusrite-Novation driver: USB Audio usb-ID: 001-008                                                               
           Sound: Advanced Linux Sound Architecture v: k4.13.0-7.slh.1-aptosid-amd64                                                 
Network:   Card: Intel Ethernet Connection I217-V driver: e1000e v: 3.2.6-k port: f080 bus-ID: 00:19.0                               
           IF: eth0 state: up speed: 100 Mbps duplex: full mac: e0:3f:49:a3:4c:a6                                                    
Drives:    HDD Total Size: 9257.9GB (54.3% used)                                                                                     
           ID-1: model: WDC_WD10EALS                                                                                                 
           ID-2: model: Samsung_SSD_840                                                                                              
           ID-3: model: WDC_WD20EARX                                                                                                 
           ID-4: model: WDC_WD20EARX                                                                                                 
           ID-5: model: WDC_WD40EZRX                                                                                                 
Info:      Processes: 349 Uptime: 1 day Memory: 4906.9/15925.3MB Init: systemd runlevel: 5 Gcc sys: 7.2.0                            
           Client: Shell (bash 4.4.121) inxi: 2.3.40

Any ideas or suggestions? Even a way to fix it without rebooting would be great!

Thanks!
User avatar
briandc
Established Member
Posts: 1442
Joined: Sun Apr 29, 2012 3:17 pm
Location: Italy
Has thanked: 58 times
Been thanked: 28 times
Contact:

Re: JACK: Cannot use real-time scheduling

Post by briandc »

Does the problem only exist when using Ardour?
Also, I thought that realtime kernels had an "RT" in the name. ?


brian
Have your PC your way: use linux!
My sound synthesis biome: http://www.linuxsynths.com
finotti
Established Member
Posts: 528
Joined: Thu Sep 01, 2011 9:07 pm
Has thanked: 88 times
Been thanked: 23 times

Re: JACK: Cannot use real-time scheduling

Post by finotti »

Firstly, thanks for the reply!
briandc wrote:Does the problem only exist when using Ardour?
Ardour does not run at all. Muse3 (compiled myself) runs, but I can see some performance issues. I haven't tried any other DAW, but sound works otherwise.
briandc wrote: Also, I thought that realtime kernels had an "RT" in the name. ?


brian
Well, the kernel is NOT RT, but that is not the problem, as it runs fine anyway most of the times (without the error I showed). The problem, I think, is access to real-time clock (as seen here).

So, if I run realtimeconfigquickscan when I have the problem, I get:

Code: Select all

[snip]
Checking access to the real-time clock... not readable - not good
[snip]
I get "readable/good" in general... So, I assume, I need make it readable again. Rebooting fixes it, but I was wondering if I could fix it without rebooting...
User avatar
briandc
Established Member
Posts: 1442
Joined: Sun Apr 29, 2012 3:17 pm
Location: Italy
Has thanked: 58 times
Been thanked: 28 times
Contact:

Re: JACK: Cannot use real-time scheduling

Post by briandc »

In fact, you probably need to make a new "permissions.rules" file, as mentioned on the configuration webpage:
A simple chgrp might not be persistent across reboots - to make the change last, create a new 40-timer-permissions.rules file in /etc/udev/rules.d/ with the following lines:
KERNEL=="rtc0", GROUP="audio"
KERNEL=="hpet", GROUP="audio"
Also, check to see if there are other versions of Ardour available in your repos. I've had to use one of the earlier versions at times.

brian
Have your PC your way: use linux!
My sound synthesis biome: http://www.linuxsynths.com
finotti
Established Member
Posts: 528
Joined: Thu Sep 01, 2011 9:07 pm
Has thanked: 88 times
Been thanked: 23 times

Re: JACK: Cannot use real-time scheduling

Post by finotti »

briandc wrote:In fact, you probably need to make a new "permissions.rules" file, as mentioned on the configuration webpage:
A simple chgrp might not be persistent across reboots - to make the change last, create a new 40-timer-permissions.rules file in /etc/udev/rules.d/ with the following lines:
KERNEL=="rtc0", GROUP="audio"
KERNEL=="hpet", GROUP="audio"
I had already done that... And set the permissions and all. I don't know why it fails sometimes.
briandc wrote: Also, check to see if there are other versions of Ardour available in your repos. I've had to use one of the earlier versions at times.

brian
I've had the problem with the versions I have available (5.12 from Debian and 5.11 from KXStudio). But it seems that Ardour is not the problem, it simply shows the problem...

Thanks for the suggestions!
Pablo
Established Member
Posts: 1274
Joined: Thu Apr 17, 2008 9:57 pm
Been thanked: 3 times

Re: JACK: Cannot use real-time scheduling

Post by Pablo »

finotti
Established Member
Posts: 528
Joined: Thu Sep 01, 2011 9:07 pm
Has thanked: 88 times
Been thanked: 23 times

Re: JACK: Cannot use real-time scheduling

Post by finotti »

Pablo wrote:Do these threads help?

viewtopic.php?t=2979

viewtopic.php?t=2607
Thank you very much for the info. This problem is a bit sporadic, and haven't happened in a while, but I will give it a try after next time.

Thanks!!
asbak
Established Member
Posts: 897
Joined: Thu Sep 11, 2014 3:04 pm
Has thanked: 71 times
Been thanked: 64 times

Re: JACK: Cannot use real-time scheduling

Post by asbak »

This is how I set my rtc & hpet in Mint, it is a bit tricky to get the magic sauce. Debian is probably similar.

apt-get install -y sysfsutils

/etc/udev/rules.d/40-timer-permissions.rules
KERNEL=="rtc0", GROUP="audio"
KERNEL=="hpet", GROUP="audio"

/etc/sysfs.conf
class/rtc/rtc0/max_user_freq = 2048

/etc/sysctl.conf
dev.hpet.max-user-freq=2048

chmod 660 /dev/hpet /dev/rtc0
chgrp audio /dev/hpet /dev/rtc0
Some Focal / 20.04 audio packages and resources https://midistudio.groups.io/g/linuxaudio
finotti
Established Member
Posts: 528
Joined: Thu Sep 01, 2011 9:07 pm
Has thanked: 88 times
Been thanked: 23 times

Re: JACK: Cannot use real-time scheduling

Post by finotti »

asbak wrote:This is how I set my rtc & hpet in Mint, it is a bit tricky to get the magic sauce. Debian is probably similar.

apt-get install -y sysfsutils

/etc/udev/rules.d/40-timer-permissions.rules
KERNEL=="rtc0", GROUP="audio"
KERNEL=="hpet", GROUP="audio"

/etc/sysfs.conf
class/rtc/rtc0/max_user_freq = 2048

/etc/sysctl.conf
dev.hpet.max-user-freq=2048

chmod 660 /dev/hpet /dev/rtc0
chgrp audio /dev/hpet /dev/rtc0
Thanks for the reply! I've checked my setup and the only difference is that I have max_user_freq for hpet and rtc0 at 3072.

But, I have my fingers crossed it won't happen again, as it's been a while now. Thanks for the reply!
Post Reply