Discussion:
[LAD] Jackd & Real Time Kernel
Benny Alexandar
2018-01-12 16:37:22 UTC
Permalink
Hi,

I'm using ubuntu PC runs on Intel Core i7, 16 GB RAM.
I downloaded the latest JACK audio server tarball and built successfully,
and started using it. My requirement is to analyze input audio from
line-in and do some processing and send to output.

I just compiled simple_client.c and things starts to work.
My doubt is do I need to install linux real-time kerel update for JACK.

How do I know if jack is running real time, is it by checking for xruns ?

-ben
Paul Davis
2018-01-12 16:46:31 UTC
Permalink
http://jackaudio.org/faq/realtime_vs_realtime_kernel.html

On Fri, Jan 12, 2018 at 11:37 AM, Benny Alexandar <***@outlook.com>
wrote:

> Hi,
>
> I'm using ubuntu PC runs on Intel Core i7, 16 GB RAM.
> I downloaded the latest JACK audio server tarball and built successfully,
> and started using it. My requirement is to analyze input audio from
> line-in and do some processing and send to output.
>
> I just compiled simple_client.c and things starts to work.
> My doubt is do I need to install linux real-time kerel update for JACK.
>
> How do I know if jack is running real time, is it by checking for xruns ?
>
> -ben
>
> _______________________________________________
> Linux-audio-dev mailing list
> Linux-audio-***@lists.linuxaudio.org
> https://lists.linuxaudio.org/listinfo/linux-audio-dev
>
>
Len Ovens
2018-01-12 16:57:02 UTC
Permalink
On Fri, 12 Jan 2018, Benny Alexandar wrote:

> I just compiled simple_client.c and things starts to work.
> My doubt is do I need to install linux real-time kerel update for JACK.

It depends... personally, I use the lowlatency kernel with no problems
using an ice1712 based PCI card audio interface. Your situation may
differ.

> How do I know if jack is running real time, is it by checking for xruns ?

Jack runs in real time mode by default. If you are running jackd2 (version
1.9*) then check ~/.log/jack/jackdbus.log

for the line:
Thu Dec 28 10:38:26 2017: JACK server starting in realtime mode with
priority 10

Otherwise the same line will appear in jackd terminal output when started.

Do note that part of the jackd instalation process sometimes gets missed
by some installers. There should be a file
/etc/security/limits.d/audio.conf If this is missing or named as disabled,
you may not be able to get jackd to start in realtime mode. The two lines
of importance in that file are:
@audio - rtprio 95
@audio - memlock unlimited
Depending on your distro the group may be other than audio. Whatever that
group is, your user needs to be a part of it. Most audio distributions get
this right already (even ubuntustudio), but non-audio distros generally
need this to be fixed. After adding yourself to the audio (or whatever)
group you will need to logout and back in before that will have any
effect.

--
Len Ovens
www.ovenwerks.net
Benny Alexandar
2018-01-13 14:58:28 UTC
Permalink
Hi Len,

I'm using jackdmp 1.9.12. I checked the file /etc/security/limits.d/audio.conf, and is
named as audio.conf.disabled. How to enable this ?

When I run my jack client standalone program, I could see the prints as follows,

------------------
jackdmp 1.9.12

JACK server starting in realtime mode with priority 10
self-connect-mode is "Don't restrict self connect requests"
Cannot lock down 82280346 byte memory area (Cannot allocate memory)
creating alsa driver ... hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit
configuring for 48000Hz, period = 1024 frames (21.3 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/10)(1: Operation not permitted)
AcquireSelfRealTime error
Cannot lock down 82280346 byte memory area (Cannot allocate memory)
JACK server started
Cannot use real-time scheduling (RR/5)(1: Operation not permitted)
JackClient::AcquireSelfRealTime error
-----------------------------------

-ben



________________________________
From: Len Ovens <***@ovenwerks.net>
Sent: Friday, January 12, 2018 10:27 PM
To: Benny Alexandar
Cc: linux-audio-***@lists.linuxaudio.org
Subject: Re: [LAD] Jackd & Real Time Kernel

On Fri, 12 Jan 2018, Benny Alexandar wrote:

> I just compiled simple_client.c and things starts to work.
> My doubt is do I need to install linux real-time kerel update for JACK.

It depends... personally, I use the lowlatency kernel with no problems
using an ice1712 based PCI card audio interface. Your situation may
differ.

> How do I know if jack is running real time, is it by checking for xruns ?

Jack runs in real time mode by default. If you are running jackd2 (version
1.9*) then check ~/.log/jack/jackdbus.log

for the line:
Thu Dec 28 10:38:26 2017: JACK server starting in realtime mode with
priority 10

Otherwise the same line will appear in jackd terminal output when started.

Do note that part of the jackd instalation process sometimes gets missed
by some installers. There should be a file
/etc/security/limits.d/audio.conf If this is missing or named as disabled,
you may not be able to get jackd to start in realtime mode. The two lines
of importance in that file are:
@audio - rtprio 95
@audio - memlock unlimited
Depending on your distro the group may be other than audio. Whatever that
group is, your user needs to be a part of it. Most audio distributions get
this right already (even ubuntustudio), but non-audio distros generally
need this to be fixed. After adding yourself to the audio (or whatever)
group you will need to logout and back in before that will have any
effect.

--
Len Ovens
www.ovenwerks.net<http://www.ovenwerks.net>
Joakim Hernberg
2018-01-13 15:21:02 UTC
Permalink
Try renaming it to audio.conf and relogin.

On Sat, 13 Jan 2018 14:58:28 +0000
Benny Alexandar <***@outlook.com> wrote:

> Hi Len,
>
> I'm using jackdmp 1.9.12. I checked the
> file /etc/security/limits.d/audio.conf, and is named as
> audio.conf.disabled. How to enable this ?
>
> When I run my jack client standalone program, I could see the prints
> as follows,
>
> ------------------
> jackdmp 1.9.12
>
> JACK server starting in realtime mode with priority 10
> self-connect-mode is "Don't restrict self connect requests"
> Cannot lock down 82280346 byte memory area (Cannot allocate memory)
> creating alsa driver ...
> hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit configuring for
> 48000Hz, period = 1024 frames (21.3 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/10)(1: Operation not
> permitted) AcquireSelfRealTime error
> Cannot lock down 82280346 byte memory area (Cannot allocate memory)
> JACK server started
> Cannot use real-time scheduling (RR/5)(1: Operation not permitted)
> JackClient::AcquireSelfRealTime error
> -----------------------------------
>
> -ben
>
>
>
> ________________________________
> From: Len Ovens <***@ovenwerks.net>
> Sent: Friday, January 12, 2018 10:27 PM
> To: Benny Alexandar
> Cc: linux-audio-***@lists.linuxaudio.org
> Subject: Re: [LAD] Jackd & Real Time Kernel
>
> On Fri, 12 Jan 2018, Benny Alexandar wrote:
>
> > I just compiled simple_client.c and things starts to work.
> > My doubt is do I need to install linux real-time kerel update for
> > JACK.
>
> It depends... personally, I use the lowlatency kernel with no problems
> using an ice1712 based PCI card audio interface. Your situation may
> differ.
>
> > How do I know if jack is running real time, is it by checking for
> > xruns ?
>
> Jack runs in real time mode by default. If you are running jackd2
> (version 1.9*) then check ~/.log/jack/jackdbus.log
>
> for the line:
> Thu Dec 28 10:38:26 2017: JACK server starting in realtime mode with
> priority 10
>
> Otherwise the same line will appear in jackd terminal output when
> started.
>
> Do note that part of the jackd instalation process sometimes gets
> missed by some installers. There should be a file
> /etc/security/limits.d/audio.conf If this is missing or named as
> disabled, you may not be able to get jackd to start in realtime mode.
> The two lines of importance in that file are:
> @audio - rtprio 95
> @audio - memlock unlimited
> Depending on your distro the group may be other than audio.
> Whatever that group is, your user needs to be a part of it. Most
> audio distributions get this right already (even ubuntustudio), but
> non-audio distros generally need this to be fixed. After adding
> yourself to the audio (or whatever) group you will need to logout and
> back in before that will have any effect.
>
> --
> Len Ovens
> www.ovenwerks.net<http://www.ovenwerks.net>
>



--

Joakim
Tim
2018-01-13 16:01:30 UTC
Permalink
On 01/13/2018 09:58 AM, Benny Alexandar wrote:
> Hi Len,
>
> I'm using� jackdmp 1.9.12.� I checked the file
> /etc/security/limits.d/audio.conf, and is
> named as audio.conf.disabled. How to enable this ?


Try installing a package, I think it's called ubuntu studio controls.
It adds a start menu item for one-click easy setup of several
real time audio settings like this one. No file editing required.

Also you might want to actually install package ubuntu studio.
It installs several audio related packages for audio production.
It saves you the task of manually installing them all.

Tim.

>
> When I run my jack client standalone program, I could see the prints as
> follows,
>
> ------------------
> jackdmp 1.9.12
>
> JACK server starting in realtime mode with priority 10
> self-connect-mode is "Don't restrict self connect requests"
> Cannot lock down 82280346 byte memory area (Cannot allocate memory)
> creating alsa driver ... hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit
> configuring for 48000Hz, period = 1024 frames (21.3 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/10)(1: Operation not permitted)
> AcquireSelfRealTime error
> Cannot lock down 82280346 byte memory area (Cannot allocate memory)
> JACK server started
> Cannot use real-time scheduling (RR/5)(1: Operation not permitted)
> JackClient::AcquireSelfRealTime error
> -----------------------------------
>
> -ben
>
>
>
> ------------------------------------------------------------------------
> *From:* Len Ovens <***@ovenwerks.net>
> *Sent:* Friday, January 12, 2018 10:27 PM
> *To:* Benny Alexandar
> *Cc:* linux-audio-***@lists.linuxaudio.org
> *Subject:* Re: [LAD] Jackd & Real Time Kernel
> On Fri, 12 Jan 2018, Benny Alexandar wrote:
>
>> I just compiled simple_client.c and things starts to work.
>> My doubt is do I need to install linux real-time kerel update for JACK.
>
> It depends... personally, I use the lowlatency kernel with no problems
> using an ice1712 based PCI card audio interface. Your situation may
> differ.
>
>> How do I know if jack is running real time, is it by checking for xruns ?
>
> Jack runs in real time mode by default. If you are running jackd2 (version
> 1.9*) then check ~/.log/jack/jackdbus.log
>
> for the line:
> Thu Dec 28 10:38:26 2017: JACK server starting in realtime mode with
> priority 10
>
> Otherwise the same line will appear in jackd terminal output when started.
>
> Do note that part of the jackd instalation process sometimes gets missed
> by some installers. There should be a file
> /etc/security/limits.d/audio.conf If this is missing or named as disabled,
> you may not be able to get jackd to start in realtime mode. The two lines
> of importance in that file are:
> @audio�� -� rtprio���� 95
> @audio�� -� memlock��� unlimited
> � Depending on your distro the group may be other than audio. Whatever
> that
> group is, your user needs to be a part of it. Most audio distributions get
> this right already (even ubuntustudio), but non-audio distros generally
> need this to be fixed. After adding yourself to the audio (or whatever)
> group you will need to logout and back in before that will have any
> effect.
>
> --
> Len Ovens
> www.ovenwerks.net <http://www.ovenwerks.net>
>
>
>
> _______________________________________________
> Linux-audio-dev mailing list
> Linux-audio-***@lists.linuxaudio.org
> https://lists.linuxaudio.org/listinfo/linux-audio-dev
>
Benny Alexandar
2018-01-13 16:02:54 UTC
Permalink
I have this doubt on invoking the jack server. When I built the example app and executed on command line without starting the jack server separately using qjackctl, I could see the example app started invoking the jack server and prints the default buffer size, period etc. But if I start first the qjackctl by setting the buffer, period etc, then the app shows those settings. How does the app selects the jack server settings. what is the correct way of running client app ?


________________________________
From: Benny Alexandar <***@outlook.com>
Sent: Saturday, January 13, 2018 8:28 PM
To: Len Ovens
Cc: linux-audio-***@lists.linuxaudio.org
Subject: Re: [LAD] Jackd & Real Time Kernel

Hi Len,

I'm using jackdmp 1.9.12. I checked the file /etc/security/limits.d/audio.conf, and is
named as audio.conf.disabled. How to enable this ?

When I run my jack client standalone program, I could see the prints as follows,

------------------
jackdmp 1.9.12

JACK server starting in realtime mode with priority 10
self-connect-mode is "Don't restrict self connect requests"
Cannot lock down 82280346 byte memory area (Cannot allocate memory)
creating alsa driver ... hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit
configuring for 48000Hz, period = 1024 frames (21.3 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/10)(1: Operation not permitted)
AcquireSelfRealTime error
Cannot lock down 82280346 byte memory area (Cannot allocate memory)
JACK server started
Cannot use real-time scheduling (RR/5)(1: Operation not permitted)
JackClient::AcquireSelfRealTime error
-----------------------------------

-ben



________________________________
From: Len Ovens <***@ovenwerks.net>
Sent: Friday, January 12, 2018 10:27 PM
To: Benny Alexandar
Cc: linux-audio-***@lists.linuxaudio.org
Subject: Re: [LAD] Jackd & Real Time Kernel

On Fri, 12 Jan 2018, Benny Alexandar wrote:

> I just compiled simple_client.c and things starts to work.
> My doubt is do I need to install linux real-time kerel update for JACK.

It depends... personally, I use the lowlatency kernel with no problems
using an ice1712 based PCI card audio interface. Your situation may
differ.

> How do I know if jack is running real time, is it by checking for xruns ?

Jack runs in real time mode by default. If you are running jackd2 (version
1.9*) then check ~/.log/jack/jackdbus.log

for the line:
Thu Dec 28 10:38:26 2017: JACK server starting in realtime mode with
priority 10

Otherwise the same line will appear in jackd terminal output when started.

Do note that part of the jackd instalation process sometimes gets missed
by some installers. There should be a file
/etc/security/limits.d/audio.conf If this is missing or named as disabled,
you may not be able to get jackd to start in realtime mode. The two lines
of importance in that file are:
@audio - rtprio 95
@audio - memlock unlimited
Depending on your distro the group may be other than audio. Whatever that
group is, your user needs to be a part of it. Most audio distributions get
this right already (even ubuntustudio), but non-audio distros generally
need this to be fixed. After adding yourself to the audio (or whatever)
group you will need to logout and back in before that will have any
effect.

--
Len Ovens
www.ovenwerks.net<http://www.ovenwerks.net>
Len Ovens
2018-01-13 16:49:45 UTC
Permalink
On Sat, 13 Jan 2018, Benny Alexandar wrote:

> I'm using  jackdmp 1.9.12.  I checked the file /etc/security/limits.d/audio.conf,
> and is
> named as audio.conf.disabled. How to enable this ?

sudo mv /etc/security/limits.d/audio.conf.disabled /etc/security/limits.d/audio.conf

If the above is true you also need to add your user to the audio group.
(assuming the last few lines in the above file start with @audio)

--
Len Ovens
www.ovenwerks.net
Loading...