Re: [Agnula-Developers] Tuning the system for jackd
>>>>> "Free" == Free Ekanayaka <free@agnula.org> writes:
> I'm re-styling the demudi tasks packages, which I'd like to
> upload to Debian in the near future. One of them it's called
> demudi-config and it's haevily based on the debian-edu-config
> package. It uses cfengine to customize configuration files in a
> consistent manner.
Great (I think skolelinux does this too, at least at installation
time).
> 1) Turn on low latency:
> echo 1 > /proc/sys/kernel/lowlatency
> This assumes a patched 2.4 kernel, which AFAIK is not the
> case of the official Debian kernel.
Assuming a 2.4 kernel (which can be easily checked via uname,
/proc/version or any other hackish or not-so-hackish way) you simply
need to check whether that /proc file exists. If it does not, don't
enable it (and maybe put a warning on the screen that jack is not
going to be very useful on such a system).
Wait - while I was writing it came to my mind that (de)activation of
low latency via /proc is a kernel option. You can't rely on such file
to be present, but that doesn't mean your kernel is *not* lowlat
enable.
I don't know any mean to check whether the kernel is lowlat enabled if
the /proc interface is not enabled - any ideas?
> 2) Setuid the jackstart binary. This can be accomplished via
> dpkg-statoverride (as suggested in the README.Debian of jackd),
> but I'm not sure whether the best solution is:
> a. Add debconf support to the jackd package and ask a
> question, for example "Do you want jackstart setuid?", if the
> the answer is positive the postinst script takes care of running
> dpkg-statoverride. In this case the demudi-config package would
> just inject the appropriate value in the debconf database.
> b. Do a. but through the demudi-config package, maybe
> without the question, as we assume a positive answer.
I wouldn't assume a positive/negative answer to anything (just put the
question at a very low priority if you don't want users to be asked
too often, and provide a sensible default which in this case is
`yes'). I know that debconf-izing jackd is on the TODO list for the
package, so we might better off providing a patch for that.
> c. Do not setuid the jackstart binary, but rather prepare a
> 2.6 kernel for DeMuDi (I'm assuming that Debian is not going to
> adopt such patch in the short term), using the Jack O'Quin's
> kernel module. The demudi-config package could make sure that
> such module is loaded in the correct way and ask which users
> should belong to the audio group.
I don't think 2.4 is going away any time soon (i.e. not before 2.6
reaches 4 or 5, and even after that a lot of people will be using 2.4
anyway because they know its insides and outs - switching always has a
cost). Providing a 2.6 kernel looks like a good idea to me, but we
should always test for a 2.4 kernel and configure the system correctly
for that.
> 3) Mount /tmp as a tmpfs, adding the line
> none /tmp tmpfs defaults 0 0
> to fstab. Again this can be accomplished both inside
> demudi-config and inside jackd and I'm not sure which place is
> better.
I think this is a matter of what debian-multimedia people think about
it. If it's a good thing to have in stock debian, let's put it into
jackd. Otherwise, let's put it into demudi-config.
> 4) Write a ~/.asoundrc file (for users in the audio group). I
> don't know if this is really necessary, but it can be
> accomplished by demudi-config.
The last time we discussed this on PlanetCCRMA it looked like this is
not really necessary - or rather, nobody came up with a reasonable
"default" configuration that would actually provide any advantage over
base ALSA. This doesn't mean such a "default" doesn't exist, of
course.
bye,
--
Andrea Glorioso andrea.glorioso@agnula.org
AGNULA Technical Manager http://www.agnula.org/
M: +39 333 820 5723 F: +39 (0)51 930 31 133
"Libre Audio, Libre Video, Libre Software: AGNULA"
Reply to: