FS#3729 - rlimits doesn't appear to work
Attached to Project:
Arch Linux
Opened by Lou (cmf) - Sunday, 08 January 2006, 13:47 GMT
Last edited by Jan de Groot (JGC) - Monday, 21 July 2008, 06:45 GMT
Opened by Lou (cmf) - Sunday, 08 January 2006, 13:47 GMT
Last edited by Jan de Groot (JGC) - Monday, 21 July 2008, 06:45 GMT
|
Details
Hi,
I'm trying to get realtime audio working for normal users in the 'audio' group. When trying to setup rlimits on my machine it doens't seem to take effect. My user recieves numerous xruns that root doesn't recieve, indicating my user doesn't have realtime capabilities. /etc/security/limits.conf: * - rtprio 0 * - nice 0 @audio - rtprio 80 @audio - nice -10 @audio - memlock 250000 This is using kernel26 2.6.15-2 Any suggestions/help? Thanks Lou |
This task depends upon
Closed by Jan de Groot (JGC)
Monday, 21 July 2008, 06:45 GMT
Reason for closing: Duplicate
Additional comments about closing: See bug 10374
Please don't reopen very old bugs that are already covered by others.
Monday, 21 July 2008, 06:45 GMT
Reason for closing: Duplicate
Additional comments about closing: See
Please don't reopen very old bugs that are already covered by others.
I'm a little stumped by this one. AFAICT, it *should* be working. Neri originally set up the rtprio stuff in PAM, but he's in inter-continental transit right now, so we can't ask him.
For the time being, I've been using this workaround with qjackctl/jackd. I've attached the PKGBUILD.
1. In /etc/security/limits.conf, I moved the default rules for the bottom of the file, since the documentation of pam_limits says that the first rule that matches the current user will be used. So, the default (*) must be the last, for the particular cases to be trapped first.
2. I am using KDE, with KDM to login. As the /opt/kde/share/doc/kdm/README says, the default service name that KDM uses when the pam support is active is kde, but in the /etc/pam.d directory there is only a file named kde-np, that instructs kdm to use pam_limits for the session part of the authentication. So, I did, as root:
ln -s /etc/pam.d/kde-np /etc/pam.d/kde
And it worked. The problem is that kdm was not finding the configuration file for PAM and so it couldn't use the pam_limits to change limits for the logged user. The real solution to this is to change the package that owns kde-np (witch is kde-common). Either change the file kde-np to kde or recompile kdm (witch is in kdebase) to read the pam configuration from kde-np.
I deeply hope that this helps to solve this problem.
As I said, I must confirm this first. But I think that it doesn't do this. I am using arch for audio with no problems. Jack is runing in realtime and a lot of others applications run fine, including Ardour, Muse, Hexter, Om-synth and ZynAddSubFx. No problems at all...
And for the realtime part of the problem, my /etc/security/limits.conf is like this:
@audio - rtprio 99
@audio - nice -20
@audio - memlock 40000
* - rtprio 0
* - nice 0
And I can use realtime for audio without any problems. Take a note on the rtprio and nice values. I took this from the Linux Audio User list.
session required pam_limits.so
This really should be added to kde-common package.