1 |
On 10/12/05, Matt Garman <garman@××××××××××.net> wrote: |
2 |
> On Thu, Oct 06, 2005 at 10:39:44AM -0700, Mark Knecht wrote: |
3 |
> > 1) First, let's determine whether you need a new kernel. su to |
4 |
> > ... |
5 |
> > jackd -R -dalsa -r44100 -dhw -p128 -n2 |
6 |
> > alsaplayer -o jack |
7 |
> > ... |
8 |
> > longer test. Any skipping? |
9 |
> |
10 |
> Nope, not when running jackd+alsaplayer as root. |
11 |
> |
12 |
> However, when running jackd+alsaplayer as a regular user, I get lots |
13 |
> of skipping. |
14 |
> |
15 |
> > If you have skipping at this point then you most likely need a |
16 |
> > real-time kernel. My 32-bit machines do not. They run fine with |
17 |
> > gentoo-sources, but my amd64 doesn't run well and needed a new |
18 |
> > realtime kernel to work right. |
19 |
> |
20 |
> FWIW, before posting this message, I followed a jack howto (can't |
21 |
> remember the exact source), which walked me through recompiling my |
22 |
> kernel (with "[*] Enable different security models" and "<M> |
23 |
> Default Linux Capabilities"), as well as installing and setting |
24 |
> realtime-lsm up correctly... |
25 |
> |
26 |
> > 2) Assuming that your tests as root go well, then emerge |
27 |
> > realtime-lsm. This may require a new kernel if you don't have the |
28 |
> > right Linux Securities stuff enabled: |
29 |
> |
30 |
> ...but because I'm error-prone, I double-check my configuration. As |
31 |
> far as I can tell, I have everything set up correctly. |
32 |
> |
33 |
> From what I can tell, it appears that when I run jackd and |
34 |
> alsaplayer as a non-root user, they automatically get nice'ed, and I |
35 |
> believe this is what is causing the skipping. |
36 |
> |
37 |
> For example, as root: |
38 |
> |
39 |
> # ps ax | grep jack |
40 |
> 9430 pts/1 SLl 0:08 jackd -R -dalsa -r44100 -dhw -p128 -n2 |
41 |
|
42 |
This is good but expected since root canalways access the capabilities |
43 |
required to run realtime...but... |
44 |
|
45 |
> 9434 pts/1 SLl 0:09 alsaplayer -o jack |
46 |
|
47 |
...alsaplayer requires that you say you want to use realtime capabilities: |
48 |
|
49 |
alsaplayer -r -o jack |
50 |
|
51 |
This should work better. Give it a try. man alsaplayer for more |
52 |
options and info.) |
53 |
|
54 |
> |
55 |
> # top |
56 |
> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND |
57 |
> 9430 root 18 0 28196 27m 2344 S 2.3 2.7 0:08.68 jackd |
58 |
> 9434 root 15 0 61852 60m 9336 S 2.0 6.0 0:09.89 alsaplayer |
59 |
> |
60 |
> But as a regular user: |
61 |
> |
62 |
> # ps ax | grep jack |
63 |
> 9661 pts/11 SNLl 0:00 jackd -R -dalsa -r44100 -dhw -p128 -n2 |
64 |
> 9665 pts/11 SNLl 0:00 alsaplayer -o jack |
65 |
> |
66 |
> # top |
67 |
> |
68 |
> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND |
69 |
> 9665 garman 20 5 61868 60m 9336 S 2.0 6.0 0:00.86 alsaplayer |
70 |
> 9661 garman 22 5 28200 27m 2344 S 1.7 2.7 0:00.82 jackd |
71 |
> |
72 |
> Notice the "N" (nice) flag for ps, and the niceness value of 5 in |
73 |
> top? |
74 |
|
75 |
Nice should not be necessary. |
76 |
|
77 |
> |
78 |
> I even tried invoking jackd with the nice program (e.g. "nice -n 0 |
79 |
> jackd ..."), but still got stuck the result above. |
80 |
> |
81 |
> Hopefully I'm missing something simple... any thoughts? |
82 |
> |
83 |
|
84 |
Yeah, just the -r most likely. Also, depending on your sound card |
85 |
128/2 might be a bit tight, but let's try for it and see what happens. |
86 |
|
87 |
- Mark |
88 |
|
89 |
-- |
90 |
gentoo-user@g.o mailing list |