Re: Raspberry: problems with shell script launcher when booting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jeremy,

2013/7/13 Jeremy Jongepier <jeremy@xxxxxxxxxxxxxx>:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 07/13/2013 09:50 PM, Carlos sanchiavedraz wrote:
>> Hello, dear folks.
>>
>> I'm still (constantly) tweaking my raspberry here and there when I
>> can. I have some configurations/sessions that run ok, Looper
>> (jack+sooperlooper), Looper+Fx
>> (jack+sooperlooper+rakarrack/guitarrix). But I'm still having some
>> annoying problems that wanted to share with you:
>>
>> 1) Simple session script, Looper, runs quite well when launched
>> (via ssh -X or from console) logged as PI user. When I run it as a
>> boot/init script (simple launcher script placed in /etc/init.d and
>> then installed with "update-rc.d launcherscript defaults 99"),
>> almost in every first start there's crackles and noise and my loops
>> sound distorted, even with clean guitar; if I restart then it goes
>> well (2nd or 3d time).
>>
>
> Hi Carlos,
>
> Try resetting the JACK buffersize with jack_bufsize after starting
> your program. This does the trick for me on the RPi.

It seems it did my trick as well, great!
For the moment sound seems to be as clean as it can until the moment I
debug other inner noises (it sounds like that of physical hard drives
turning, but there's none in RPi (?)) when nothing is plugged in the
audio interface.

>
>> 2) Next step forward I added Rakarrack in charge of guitar FX
>> routed to the Looper. First, it happens almost same thing as
>> mentioned about noise. Well, I guess It should have something to do
>> with the signal path and things connected to the same power
>> supplier, so I'll have to reserve some time to debug and switch off
>> things until I get a cleaner signal and get rid of the hum and
>> crackles. But the main issue is that there's problems with
>> Rakarrack not been able to start because several problems with not
>> enough Jack ports and Jack and RT. I didn't have any of these
>> problems before.
>>
>> I got to solve the problem with ports changing -p16 to -p32 when
>> launching jack+sooperlooper (-p24 is enough for just Rakarrack).
>>
>> Then I made a launcher script LSB compliant (service script placed
>> in /etc/init.d and then installed with "update-rc.d servicescript
>> defaults", with LSB flags and functions for "start" and "stop", as
>> a proper newer Debian service, and configured to launch last in
>> boot phase) which then call the Jack-config+Rakarrack+Sooperlooper
>> session launcher script. I can see on screen in the init messages
>> this error:
>>
>> "JACK is running in realtime mode, but you are not allowed to use
>> realtime schedule..."
>>
>> But I know RT is already configured, so I guessed it was something
>> to do with the boot/init stage configuration and environment. I
>> tried using "su" with several different parameters to run the
>> launcher script as "pi" user, as It runs quite well when logged as
>> this user (calling just the script and even with "sudo
>> /etc/init.d/script start"). So, maybe you can't get RT in init
>> phase on RaspberryPI and you can only when you get to the login
>> prompt and everything is loaded and ready. But I think there's a
>> "Puredata on Raspberry PI" project that runs some scripts in the
>> init stage; and it seems that in order to get a headless FX+looper
>> station, running some configuration+apps-launcher at boot time is
>> an obvious choice.
>>
>> I'm sure something escapes me after so much try-error-code cicles.
>> Maybe you have some ideas.
>>
>
> http://lists.linuxaudio.org/pipermail/linux-audio-user/2013-March/091750.html

I implemented just the first part that solution: uncomment the line
"session required pam_limits.so"
in "/etc/pam.d/su".

Now my script and applicacionts run with "pi" user. Great again, Jeremy!

>
> Regards,
>
> Jeremy
>
>> Thanks as always.
>>
>>

Now, there's just a minimum issue, but I can live with it. Rackarrack
runs now as "pi" user and it should take its configuration from user's
$HOME, that is what it should be "/home/pi", but it seems that it
doesn't.
The difference between running the launcher script when logged in as
pi is that it takes the MIDI mapping configured in preferences, but
when launched automatically on init phase it takes the default MIDI
mapping.

I run the launcher script from the service script with:
    su -l -c $STARTPATH/launcherscript.sh pi

...and "-l" should load the pi environment (I checked it when
debugging). Maybe is something specific with Rakarrack.

Thanks so much, Jeremy.

-- 
Carlos sanchiavedraz
* Musix GNU+Linux
  http://www.musix.es
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@xxxxxxxxxxxxxxxxxxxx
http://lists.linuxaudio.org/listinfo/linux-audio-user




[Index of Archives]     [Linux Sound]     [ALSA Users]     [Pulse Audio]     [ALSA Devel]     [Sox Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux