Re: [LAU] Trying to run jackd from udev

From: Jeremy Jongepier <jeremy@email-addr-hidden>
Date: Mon Apr 01 2013 - 00:05:17 EEST

On 03/22/2013 11:51 PM, Jeremy Jongepier wrote:
> I'm trying to run jackd from a script that is triggered by udev. But
> when I try to do so jackd complains:
>
> jackd 0.122.0
> ...
> JACK is running in realtime mode, but you are not allowed to use
> realtime scheduling.
> ...
>
> But the user trying to run jackd (pi) is a member of the audio group.
> The udev rule looks like this:
>
> ATTRS{idVendor}=="0218", ATTRS{idProduct}=="0001", ACTION=="change",
> RUN+="/usr/bin/sudo -u pi -s /home/pi/bin/drumpad"
>
> Is this maybe related to using sudo? I'd like to get this working, the
> idea is that whenever I plug in my drumpad the udev rule and thus the
> script gets executed. The script checks if jackd is already started and
> then moves on starting up jalv with the drumkv1 plug-in. The script
> itself works fine, it's just the udev part that got me puzzled.
>
> Thanks!
>
> Jeremy

The script works now except for one thing, the JACK connections do not
get set up when I boot with the drumpad attached. After having logged in
I still can't set up the connections because either jack_connect and
aj-snapshot complain that JACK is not running while it does run and it
runs as the user I'm logged in with.
This is the script I've fabricated:
https://raw.github.com/AutoStatic/scripts/rpi/rpi/drumpad
I've attached a JACK log of booting with the drumpad attached. JACK
starts successfully, so do all clients but the connections are not set
up. If I then log in and do a jack_lsp -c I get the following back:
pi@email-addr-hidden-rpi ~ $ jack_lsp -c
JACK server not running

Something similar happens when I boot without the drumpad attached and
attach the drumpad when booted. Then I have to wait a while before I can
make the connections (hence the sleep 10 command before calling
aj-snapshot). It'd be nice if I could check somehow if JACK is ready to
make connections.

Anyone any idea? Thanks in advance.

Jeremy

_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-user

Received on Mon Apr 1 00:15:01 2013

This archive was generated by hypermail 2.1.8 : Mon Apr 01 2013 - 00:15:01 EEST