Gentoo Archives: gentoo-user

From: meino.cramer@×××.de
To: Gentoo <gentoo-user@l.g.o>
Subject: [gentoo-user] problems granting realtime sched perms
Date: Sat, 04 Feb 2012 10:22:16
Message-Id: 20120204102052.GA3019@solfire
1 Hi,
2
3 to use jack I want to grant the user (me) the permission to
4 start tasks with realtime priority.
5
6 For that I set /etc/security/limits.conf to (commented lines removed)
7 * hard rtprio 0
8 * soft rtprio 0
9 @realtime - rtprio 99
10 @realtime - memlock unlimited
11
12 I am in the group 'ealtime'. I rebooted after the changed
13 mentioned above.
14
15 I am using Linux kernel 3.2.4 (vanilla). I read, that
16 scheduling groups could create problems, so the kernel is
17 conifgure as:
18
19 #
20 # CONFIG_SCHED_AUTOGROUP is not set
21 CONFIG_IOSCHED_NOOP=y
22 CONFIG_IOSCHED_DEADLINE=y
23 CONFIG_IOSCHED_CFQ=y
24 CONFIG_DEFAULT_IOSCHED="cfq"
25 CONFIG_SCHED_OMIT_FRAME_POINTER=y
26
27 # CONFIG_SCHED_SMT is not set
28 # CONFIG_SCHED_MC is not set
29 # CONFIG_IRQ_TIME_ACCOUNTING is not set
30 # CONFIG_PREEMPT_NONE is not set
31 # CONFIG_PREEMPT_VOLUNTARY is not set
32 CONFIG_PREEMPT=y
33 CONFIG_PREEMPT_COUNT=y
34 CONFIG_SCHED_HRTICK=y
35
36 The security model of the kernel is set to:
37
38 #
39 # Security options
40 #
41 # CONFIG_KEYS is not set
42 # CONFIG_SECURITY_DMESG_RESTRICT is not set
43 CONFIG_SECURITY=y
44 # CONFIG_SECURITYFS is not set
45 # CONFIG_SECURITY_NETWORK is not set
46 # CONFIG_SECURITY_PATH is not set
47 # CONFIG_SECURITY_TOMOYO is not set
48 # CONFIG_SECURITY_APPARMOR is not set
49 # CONFIG_IMA is not set
50 CONFIG_DEFAULT_SECURITY_DAC=y
51 CONFIG_DEFAULT_SECURITY=""
52 CONFIG_CRYPTO=y
53
54
55
56 As root there is no problem in executing
57 ionice -c 1 ls
58
59 As user instead I see with the same command:
60 ionice: ioprio_set failed: Operation not permitted
61 [1] 3070 exit 1 ionice -c 1 ls
62
63
64 How can I grant myself realtime scheduling permissions successfully?
65
66 Best regards,
67 mcc