Gentoo Archives: gentoo-user

From: Mark Knecht <markknecht@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] bad jack(?) performance
Date: Thu, 13 Oct 2005 12:12:13
Message-Id: 5bdc1c8b0510130506j6a376407w6daaa31e22f99fd8@mail.gmail.com
In Reply to: Re: [gentoo-user] bad jack(?) performance by Matt Garman
1 On 10/12/05, Matt Garman <garman@××××××××××.net> wrote:
2 > On Wed, Oct 12, 2005 at 06:48:48PM -0700, Mark Knecht wrote:
3 > > ...alsaplayer requires that you say you want to use realtime
4 > > capabilities:
5 > > alsaplayer -r -o jack
6 > > ...
7 > > Yeah, just the -r most likely. Also, depending on your sound card
8 > > 128/2 might be a bit tight, but let's try for it and see what happens.
9 >
10 > Unfortunately, adding the -r had no effect as far as I can tell.
11 >
12 > According to the alsaplayer manpage,
13 >
14 > -r, --realtime
15 > Enable realtime scheduling. To use this as a normal
16 > user, alsaplayer must be SUID root.
17 >
18 > So I tried setting alsaplayer SUID root:
19 >
20 > # chmod u+s `which alsaplayer`
21 >
22 > Then as a regular (non-root) user:
23 >
24 > # alsaplayer -r -o jack &
25 > Gtk-WARNING **: This process is currently running setuid or setgid.
26 > This is not a supported use of GTK+. You must create a helper
27 > program instead. For further details, see:
28 >
29 > http://www.gtk.org/setuid.html
30 >
31 > Refusing to initialize GTK+.
32 > [2] + exit 1 alsaplayer -r -o jack
33 >
34 > I'm guessing that most folks don't have to worry about the whole
35 > SUID root thing (or creating a "help program")?
36
37 No. None of that is required for me on any kernel - Gentoo or Vanilla.
38 I just set up realtime-lsm and then run with realtime capabilites. I
39 would suggest that you use QJackCtl to run Jack as it will save your
40 settings nicely for you and give you patch bay access to hooking Jack
41 apps up to the server.
42
43 Note that I use pretty expensive RME cards. They work exceedingly well
44 for me. There are a lot of people out there that report they never go
45 faster than 128/2 or 256/2. 256/2 is about as good as any of my
46 Windows systems have every worked, and better then Pro Tools worked
47 when I owned it. You should not think that going a bit slower is
48 necessarily a problem. If you cannot hear the latency it doesn't
49 matte, and even if you can hear it, you can nudge recorded tracks
50 after recording to get a better sound if you can lay down a good
51 track.
52
53 >
54 > Any more thoughts?
55
56 Yes, but not sure you're going to like them... ;-)
57
58 The first one is easy. Try some different Jack settings. Instead of
59 128/2 try 64/4, or 128/3, etc., and see if some other setting works.
60 You might get the same latency, or you might have to go a bit slower.
61 The only time I actually use low latency is when recording. It's never
62 needed for playback only. Most of the time I run 512/2 just to ensure
63 no xruns causing clicks in my work.
64
65 On my 32-bit machines I've always been able to run Jack the standard
66 Gentoo-sources kernel and get good realtime results. I have had to be
67 careful about what options I choose, and on a couple of machines
68 different kernel options have caused xruns (such as networking) but
69 I've always managed to get it to work and work well. Sometimes it has
70 taken some time, but it has worked. Maybe we need to look at how you
71 are configuring the kernel. Possibly send your config file off list or
72 I'll send you one of mine.
73
74 That said, on my new AMD64 machine gentoo-sources just doesn't cut it.
75 I had to go to a custom kernel to get realtime to work. I first tried
76 ck-sources, which lots of people report as working for them, but that
77 did not work for me, so I went with Ingo's realtime preempt patches
78 and I'm getting pretty good results. I get a few xruns/day at 64/2,
79 none so far at 128/2 running 20 track sessions in Ardour. I'm using
80 2.6.14-rc4-rt1. Here's the patches required to do that, should you
81 choose to go there:
82
83 http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.13.tar.bz2
84 http://kernel.org/pub/linux/kernel/v2.6/testing/patch-2.6.14-rc4.bz2
85 http://redhat.com/~mingo/realtime-preempt/patch-2.6.14-rc4-rt1
86
87 (This one is VERY new. There are more stable, tested versions out
88 there based on 2.6.13. I needed this due to AMD64)
89
90 Once this is up and running you get access to setting priorities for
91 all devices and things work pretty well. (I.e. - don't be disappointed
92 if it doesn't do any better the first time you boot it.)
93 Unfortunately, since Gentoo doesn't support an 'audio kernel' yet you
94 and I would have to manage updates on our own. That said, this is the
95 way most people interested in good realtime performance have gone.
96 Maybe I've just been excessively lucky up until now.
97
98 It's probably worth it to review how you've set up realtime-lsm one
99 more time, just in case, and possibly to look at your hardware setup a
100 bit.
101
102 lspci
103 lsmod
104 cat /proc/asound/cards
105
106 >
107 > Thank you for all your help!
108
109 Wish it was more successful. We should just keep plugging away.
110
111 What audio stuff are you going to use this machine for, BTW?
112
113 - Mark
114
115 --
116 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] bad jack(?) performance Mark Knecht <markknecht@×××××.com>
Re: [gentoo-user] bad jack(?) performance Matt Garman <garman@××××××××××.net>