Jack does not start with real time scheduling

Bug #108718 reported by Carlo Capocasa
16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
jack-audio-connection-kit (Ubuntu)
Triaged
Wishlist
Unassigned

Bug Description

Jack reports, on running with the -R parameter:

cannot use real-time scheduling (FIFO at priority 10) [for thread -1210643584, from thread -1210643584] (1: Operation not permitted)
cannot create engine

Using Feisty with xubuntu desktop and ubuntustudio-audio installed.

Revision history for this message
Lucas Alberto Santos (lucasa) wrote :

Hi,
I got this from: https://help.ubuntu.com/community/UbuntuStudioPreparation

Real-Time Support

Now you need to set up real-time access for your applications.

All you have to do for this is give your audio group permissions to access the rtprio, nice, and memlock limits. To do this, you just need to run these commands:

 sudo su -c 'echo @audio - rtprio 99 >> /etc/security/limits.conf'
 sudo su -c 'echo @audio - memlock 250000 >> /etc/security/limits.conf'
 sudo su -c 'echo @audio - nice -10 >> /etc/security/limits.conf'

Revision history for this message
Carlo Capocasa (carlotheman) wrote : Re: [Bug 108718] Re: Jack does not start with real time scheduling

Hi,

thanks for your help. My point is that doing this could be a
showstopper for even for intermediate users, and an inconveniece even
for experienced users. I would like to see real time support work out
of the box.

Otherwise... I'm having the time of my life with UbuntuStudio.

Carlo

Zitat von Lucas Alberto Santos <email address hidden>:

> Hi,
> I got this from: https://help.ubuntu.com/community/UbuntuStudioPreparation
>
> Real-Time Support
>
> Now you need to set up real-time access for your applications.
>
> All you have to do for this is give your audio group permissions to
> access the rtprio, nice, and memlock limits. To do this, you just need
> to run these commands:
>
> sudo su -c 'echo @audio - rtprio 99 >> /etc/security/limits.conf'
> sudo su -c 'echo @audio - memlock 250000 >> /etc/security/limits.conf'
> sudo su -c 'echo @audio - nice -10 >> /etc/security/limits.conf'
>
> --
> Jack does not start with real time scheduling
> https://bugs.launchpad.net/bugs/108718
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Lucas Alberto Santos (lucasa) wrote :

Yes, I hope that the Studio team will work on that.

2007/5/31, carlotheman <email address hidden>:
> Hi,
>
> thanks for your help. My point is that doing this could be a
> showstopper for even for intermediate users, and an inconveniece even
> for experienced users. I would like to see real time support work out
> of the box.
>
> Otherwise... I'm having the time of my life with UbuntuStudio.
>
> Carlo
>
>
> Zitat von Lucas Alberto Santos <email address hidden>:
>
> > Hi,
> > I got this from: https://help.ubuntu.com/community/UbuntuStudioPreparation
> >
> > Real-Time Support
> >
> > Now you need to set up real-time access for your applications.
> >
> > All you have to do for this is give your audio group permissions to
> > access the rtprio, nice, and memlock limits. To do this, you just need
> > to run these commands:
> >
> > sudo su -c 'echo @audio - rtprio 99 >> /etc/security/limits.conf'
> > sudo su -c 'echo @audio - memlock 250000 >> /etc/security/limits.conf'
> > sudo su -c 'echo @audio - nice -10 >> /etc/security/limits.conf'
> >
> > --
> > Jack does not start with real time scheduling
> > https://bugs.launchpad.net/bugs/108718
> > You received this bug notification because you are a direct subscriber
> > of the bug.
> >
>
> --
> Jack does not start with real time scheduling
> https://bugs.launchpad.net/bugs/108718
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Daniel T Chen (crimsun) wrote :

Note that we cannot assume that jackd will be installed on an Ubuntu Studio system (which, purportedly, will have the RT PAM settings configured by default). For this reason, jackd is compiled with RT support disabled by default (but can be enabled at runtime via cli parameter).

Changed in jack-audio-connection-kit:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Endolith (endolith) wrote :

"All you have to do for this is give your audio group permissions to access the rtprio, nice, and memlock limits."

Shouldn't this be done by default? This isn't the kind of thing that Ubuntu users want to mess with.

"For this reason, jackd is compiled with RT support disabled by default (but can be enabled at runtime via cli parameter)."

What does that mean? If I click the "realtime" checkbox in JACK Control, it won't work? Because it doesn't. I get the "cannot use real-time scheduling (FIFO at priority 10)" error. I'm using Hardy.

Revision history for this message
Endolith (endolith) wrote :

Does anyone know why the memlock line was taken out of the documentation page for Hardy?

https://help.ubuntu.com/community/UbuntuStudioPreparation?action=diff&rev2=21&rev1=20

I didn't add this line, and I'm getting the "cannot lock down memory" error. Should I add it?

All of these settings should be taken care of automatically.

Revision history for this message
Daniel T Chen (crimsun) wrote :

Part of the problem with modifying limits.conf for all Ubuntu [not Ubuntu Studio, per se] users concerns sane security defaults, which means preventing one user from unduly tying up system resources. This approach opposes what the ubuntustudio-default-settings package does.

Please note that installing the ubuntustudio-default-settings package modifies limits.conf as per necessary. A user can then create a ~/.jackdrc including the appropriate jackd invocation with the realtime option.

Changed in jack-audio-connection-kit:
status: Confirmed → Triaged
Revision history for this message
John Seales (jseales) wrote :

I tried these commands, nothing changed.

sudo su -c 'echo @audio - rtprio 99 >> /etc/security/limits.conf'
 sudo su -c 'echo @audio - memlock 250000 >> /etc/security/limits.conf'
 sudo su -c 'echo @audio - nice -10 >> /etc/security/limits.conf'

Is Jack really something people use?
It seems like very few people can actually get it running.

Revision history for this message
Thomas E Jenkins (thomas-jenkins) wrote :

Did you try ubuntustudio-controls? It was made to provide an easy way to configure things like realtime access.

Revision history for this message
Ben Shadwick (benshadwick) wrote :

I've just started using Ubuntu 9.10 x64. I'm having the same issue as that listed in the bug report. I tried installing ubuntustudio-controls, but it only sets the memlock option (it has a GUI setting for the nice option but selecting it does not add the entry in limits.conf).

I tried adding the rtprio and nice options to limits.conf myself and then rebooting, but I still get the error. This is maddening.

Revision history for this message
Ben Shadwick (benshadwick) wrote :

Update: Looks like I didn't know I needed to add my account to the audio usergroup.

Revision history for this message
AndyDap (gate2a) wrote :

I´m no linux expert by any stretch but the ´sudo´ commands mentioned above appear wrong to me (John Seales refers to them).

As I understand it, the command is invoking superuser/root authority (sudo) and then doing it again with su (super user). It should be one or the other. The -c has something to do with applying some sort of user parameter, rather than roots (not sure on that). The ´echo´ command normally just ´echoes´ whatever you type on the keyboard back to standard output, normally your PCs monitor. The ´>>´ changes that to appending that echo to the end of the two files in /etc/security.

So, correct me if I´m wrong but I think this would work:

sudo echo ´@audio - rtprio 99´ >> /etc/security/limits.conf
sudo echo ´@audio - memlock 250000´ >> /etc/security/limits.conf
sudo echo ´@audio - nice -10´ >> /etc/security/limits.conf

but it would be easier if you just used:

sudo gedit

... then just added the lines

@audio - rtprio 99
@audio - memlock 250000
@audio - nice -10

... at the end.

Please, correct me if I´m wrong. Ubuntu Studio controls didn´t seem to have a spot to add the rtprio switch, so I just added them all with gedit.

I still have to switch jack on and off, depending on what application I´m using and whether it needs jack, alsa, pulseaudio, etc. Real pain, but at least jack is working now.

Revision history for this message
Endolith (endolith) wrote :

"Looks like I didn't know I needed to add my account to the audio usergroup."

Why does the user have to do any of these things?

Is Ubuntu Studio meant for musicians or for computer scientists?

Revision history for this message
Paul Perkins (catmatist) wrote :

Computers are flexible, if you do not tell the computer what you want, it will do something else instead.
Computers are stupid, they only understand what they understand.
Ubuntu Studio always seems to have a reach that is far beyond its grasp, resulting in much spilled milk.
No one listen to Zathras...

Instructions are currently hidden at:
https://help.ubuntu.com/community/Ubuntu%20Studio%20Upgrade%20from%20Ubuntu
under the heading "Configuration Modifications".

See also the Jack FAQ: http://jackaudio.org/faq

Note the Jack FAQ omits messing with "nice". AFAICT the idea that messing with niceness was relevant to latency is one of those baseless rumors that spreads like wildfire around the Internet from time to time.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.