LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-09-2010, 12:03 PM   #1
2handband
Member
 
Registered: Jan 2009
Location: Alexandria, Minnesota
Distribution: Manjaro
Posts: 837

Rep: Reputation: 96
Lost realtime privileges


I'm using set_rlimits to assign realtime privileges to users, but for some reason after a reboot today none of my users have rt access. I have the following line in /etc/set_rtlimits.conf:

Code:
@audio  /usr/local/bin/jackd  nice=-1  rtprio=95
That should equal all users that are part of the audio group getting rt privileges.
 
Old 12-09-2010, 02:05 PM   #2
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,097

Rep: Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174
I'm using this way to have jackd with rt capabilities
http://permalink.gmane.org/gmane.com...o.jackit/22168
 
Old 12-09-2010, 02:06 PM   #3
granth
Member
 
Registered: Jul 2004
Location: USA
Distribution: Slackware64
Posts: 212

Rep: Reputation: 55
From http://slackbuilds.org/repository/13...onnection-kit/:

jackd has to run with realtime priviledges. One way to do this on Slackware
would be to use set_rlimits. Since 12.2 there's another way. If you have
a filesystem that supports posix capabilities (reiserfs does not), you
can grant jackd the rights to run in realtime mode, even when started as
normal user with the following command:

setcap cap_ipc_lock,cap_sys_nice=ep /usr/bin/jackd
 
Old 12-09-2010, 03:00 PM   #4
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
The start of this thread got me wondering, as I run jack with RT privileges all the time, how I was doing it. The follow ups gave the answer.

I don't remember running setcap but it was some time ago and my memories not as good as once! Anyway, when I check with /sbin/getcap /usr/bin/jackd I get returned /usr/bin/jackd=cap_ipc_lock,cap_sys_nice+ep so I take it I must have set the file capabilites at some stage and that explains why it works for me.

I think I'll have to start making notes about all these little setups to help my failing recollection . Thanks for the reminder! I'm sure there's a moral here somewhere!

Anyway, I recomend taking the advice and just using setcap as it works for me and the others.
 
Old 12-09-2010, 03:18 PM   #5
2handband
Member
 
Registered: Jan 2009
Location: Alexandria, Minnesota
Distribution: Manjaro
Posts: 837

Original Poster
Rep: Reputation: 96
I'll probably do that, but I still want to know why set_rlimits failed... I HATE loose ends.
 
Old 12-09-2010, 03:52 PM   #6
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
Quote:
I'll probably do that, but I still want to know why set_rlimits failed... I HATE loose ends.
Ok, I'm with you on that so why not try running set_rlimits with the "-d" option and seeing if that gives any useful information. I have downloaded the source and set_rlimits.c is only 829 lines and just one source file involved. If you really want to get to the bottom of this you could try the debug output option and even strace'ing or gdb'ing the executable, (after debug compiling), to see what's going on. If you really want to know what's failing that's the way to do it but as there's a good alternative option I'd just use what works, to be honest. Also, I don't really like that set_rlimit appears to need setuid root privileges which always make me a bit nervous.
 
Old 12-09-2010, 05:42 PM   #7
2handband
Member
 
Registered: Jan 2009
Location: Alexandria, Minnesota
Distribution: Manjaro
Posts: 837

Original Poster
Rep: Reputation: 96
Quote:
Originally Posted by bgeddy View Post
Ok, I'm with you on that so why not try running set_rlimits with the "-d" option and seeing if that gives any useful information. I have downloaded the source and set_rlimits.c is only 829 lines and just one source file involved. If you really want to get to the bottom of this you could try the debug output option and even strace'ing or gdb'ing the executable, (after debug compiling), to see what's going on. If you really want to know what's failing that's the way to do it but as there's a good alternative option I'd just use what works, to be honest. Also, I don't really like that set_rlimit appears to need setuid root privileges which always make me a bit nervous.
That's what I wound up doing... I simply don't have time to troubleshoot this right now; not when there's an easy workaround. Thanks, guys.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
64Studio realtime kernel and debian lenny realtime module buid error? stratotak Linux - Newbie 0 01-30-2009 10:57 PM
Lost privileges in mysql, after changes kenpeter Programming 0 01-07-2008 05:09 AM
realtime programming gaihua Linux - Kernel 5 08-11-2007 02:59 AM
xmms - realtime curmudgeon42 Linux - Software 1 01-29-2005 11:58 AM
Lost privileges for MySQL !!! davidgordon Linux - Newbie 2 01-09-2003 07:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration