Hi,
ich bräuchte mal bitte eure Hilfe. Komme mit meinem Kentnissstand und endlosem Suchen und Probieren einfach nicht weiter.
Ziel: Beim Systemstart soll Jackd automatisch gestartet werden und alle Connections, Plugins etc gesetzt werden. Das ganze ohne Desktop-Umgebung, als grafische Oberfläche läuft quasi XBMC.
Problem: In einem Terminal über eine ssh-Verbindung habe ich alles schon erfolgreich hinbekommen. Sobalt es automatisch starten soll, startet bereits Jackd nicht.
Mein Vorgehen über Terminal/ssh:
Eintrag in /etc/security/limits.conf
@audio - rtprio 99 @audio - memlock unlimited #@audio - nice -19
Eintrag in /etc/dbus-1/system.conf
<policy user="xbmc"> <allow own="org.freedesktop.ReserveDevice1.Audio0"/> <allow own="org.freedesktop.ReserveDevice1.Audio-1"/> </policy>
Eintrag in /etc/environment
DBUS_SESSION_BUS_ADDRESS="unix:path=/run/dbus/system_bus_socket"
(Die beiden Einträge waren für den Start von Jackd2 auf einem headless-System nötig.)
Ändern der automatischen Prozessor-Taktung:
1 2 3 4 | sudo sed -i 's/ondemand/performance/g' /etc/init.d/ondemand sudo update-rc.d ondemand disable sudo cp /etc/init.d/ondemand /etc/init.d/performance sudo update-rc.d performance enable |
Und Jackd läuft:
1 | jackd -R -P 90 -p 32 -S -d alsa -P hw:NVidia,9 -o 6 -p 512 -n 2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | jackdmp 1.9.9 Copyright 2001-2005 Paul Davis and others. Copyright 2004-2012 Grame. jackdmp comes with ABSOLUTELY NO WARRANTY This is free software, and you are welcome to redistribute it under certain conditions; see the file COPYING for details JACK server starting in realtime mode with priority 90 control device hw:0 ALSA lib conf.c:4571:(parse_args) Unknown parameter 1 ALSA lib conf.c:4704:(snd_config_expand) Parse arguments error: No such file or directory ALSA lib control.c:951:(snd_ctl_open_noupdate) Invalid CTL hw:NVidia,9 control open "hw:NVidia,9" (No such file or directory) audio_reservation_init Acquire audio card Audio0 Acquire audio card Audio-1 creating alsa driver ... hw:NVidia,9|-|512|2|48000|0|6|nomon|swmeter|-|32bit ALSA lib conf.c:4571:(parse_args) Unknown parameter 1 ALSA lib conf.c:4704:(snd_config_expand) Parse arguments error: No such file or directory ALSA lib control.c:951:(snd_ctl_open_noupdate) Invalid CTL hw:NVidia,9 control open "hw:NVidia,9" (No such file or directory) configuring for 48000Hz, period = 512 frames (10.7 ms), buffer = 2 periods ALSA: final selected sample format for playback: 32bit integer little-endian ALSA: use 2 periods for playback |
Es folgt das importieren von Alsa-Ports, das Starten eines Plugins und das setzen der Verbindungen. Alles ohne Probleme.
Und hier mein aktueller Autostart-Versuch über ein Upstart-Job:
Erstellen der Datei /etc/init/jackd.conf
description "JACK Jack Audio Connection Kit" start on runlevel [2345] stop on runlevel [!2345] respawn setuid xbmc env JOPT="-R -P 90 -p 32 -S -d alsa -P hw:NVidia,9 -o 6 -p 512 -n 2" env JLOG="/home/xbmc/jack.log" pre-start script echo "===============================" > $JLOG echo "Starte Jack ..." >> $JLOG echo "===============================" >> $JLOG while (!(pgrep xbmc.bin)) do echo "Warte auf xbmc ..." >> $JLOG sleep 1 done echo "===============================" >> $JLOG end script #exec start-stop-daemon --start -c xbmc --exec /usr/bin/jackd -- $JOPT >> $JLOG$ exec /usr/bin/jackd $JOPT >> $JLOG 2>&1 #post-start script # jack connections #end script
Habe sowohl den Weg über "setuid" als auch über "start-stop-daemon" versucht. Mit dem gleichen Ergebnis im Logfile:
=============================== Starte Jack ... =============================== =============================== Cannot create thread 1 Operation not permitted Cannot create thread 1 Operation not permitted Cannot create thread 1 Operation not permitted jackdmp 1.9.9 Copyright 2001-2005 Paul Davis and others. Copyright 2004-2012 Grame. jackdmp comes with ABSOLUTELY NO WARRANTY This is free software, and you are welcome to redistribute it under certain conditions; see the file COPYING for details JACK server starting in realtime mode with priority 90 Cannot lock down 14129370 byte memory area (Cannot allocate memory) control device hw:0 control open "hw:0" (No such file or directory) ALSA lib conf.c:4571:(parse_args) Unknown parameter 1 ALSA lib conf.c:4704:(snd_config_expand) Parse arguments error: No such file or directory ALSA lib control.c:951:(snd_ctl_open_noupdate) Invalid CTL hw:NVidia,9 control open "hw:NVidia,9" (No such file or directory) Failed to connect to session bus for device reservation Unable to autolaunch a dbus-daemon without a $DISPLAY for X11 Failed to acquire device name : Audio-1 error : Invalid argument Audio device hw:0 cannot be acquired... Cannot initialize driver JackServer::Open failed with -1 Failed to open server
Jackd läuft einfach nicht!
Meine Vermutung war das es Probleme beim Starten von Jackd als Root gab. Daher wollte ich einen Autostart als Nutzer "xbmc" verwenden. Hatte auch schon ein init.d-Skript probiert mit genau dem selben Ergebnis - Jackd startet nicht. Und wenn ich mir die drei Fehlermeldungen anschaue...
Cannot lock down 14129370 byte memory area (Cannot allocate memory) ... Failed to connect to session bus for device reservation Unable to autolaunch a dbus-daemon without a $DISPLAY for X11 ... Failed to acquire device name : Audio-1 error : Invalid argument
... dann sieht es so aus als ob die am Anfang gemachten Änderungen/Einträge zwar für den Nutzer xbmc im Terminal über ssh funktionieren, nicht aber in den Autostart-Skripten. Warum Ist das so? Ignoriert Upstart die Angaben zum Nutzer? Oder werden die Einstellungen erst später für den Nutzer aktiviert?
Würde mich freuen wenn mir jemand helfen könnte. Die Verzweiflung naht. Wenn ihr noch irgendetwas wissen wollt oder ich was probieren soll - immer raus damit.
Vielen Dank schonmal.
kalle