]> git.parisson.com Git - jackd-init.git/commitdiff
add rpi tweaks
authorGuillaume Pellerin <yomguy@parisson.com>
Thu, 23 Oct 2014 18:10:20 +0000 (18:10 +0000)
committerGuillaume Pellerin <yomguy@parisson.com>
Thu, 23 Oct 2014 18:10:20 +0000 (18:10 +0000)
src/etc/init.d/jackd

index 4c2aa07fb48eb3e99e2483049afd0c48836d1fb0..97b093ae43bb96066039af0ac35a6c0f75ace12d 100755 (executable)
@@ -29,9 +29,52 @@ test -f $DAEMON || exit 0
 
 . /lib/lsb/init-functions
 
+rpi_init () {
+
+## increase SHM memory
+sudo mount -o remount,size=128M /dev/shm
+
+## Stop the ntp service
+sudo service ntp stop
+
+## Stop the triggerhappy service
+sudo service triggerhappy stop
+
+## Stop the dbus service. Warning: this can cause unpredictable behaviour when running a desktop environment on the RPi
+sudo service dbus stop
+
+## Stop the console-kit-daemon service. Warning: this can cause unpredictable behaviour when running a desktop environment on the RPi
+sudo killall console-kit-daemon
+
+## Stop the polkitd service. Warning: this can cause unpredictable behaviour when running a desktop environment on the RPi
+sudo killall polkitd
+
+## Only needed when Jack2 is compiled with D-Bus support (Jack2 in the AutoStatic RPi audio repo is compiled without D-Bus support)
+#export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/dbus/system_bus_socket
+
+## Remount /dev/shm to prevent memory allocation errors
+#sudo mount -o remount,size=128M /dev/shm
+
+## Kill the usespace gnome virtual filesystem daemon. Warning: this can cause unpredictable behaviour when running a desktop environment on the RPi
+killall gvfsd
+
+## Kill the userspace D-Bus daemon. Warning: this can cause unpredictable behaviour when running a desktop environment on the RPi
+#killall dbus-daemon
+
+## Kill the userspace dbus-launch daemon. Warning: this can cause unpredictable behaviour when running a desktop environment on the RPi
+#killall dbus-launch
+
+## Uncomment if you'd like to disable the network adapter completely
+#echo -n “1-1.1:1.0” | sudo tee /sys/bus/usb/drivers/smsc95xx/unbind
+
+## Set the CPU scaling governor to performance
+echo -n performance | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+}
+
 case "$1" in
        start)  
-               log_begin_msg "Starting jackd audio server:" "jackd"
+           log_begin_msg "Starting jackd audio server:" "jackd"
+            rpi-init
             echo $DAEMON $OPTIONS ' &' > $JACKDHOME/.jackdinit
             chmod +x $JACKDHOME/.jackdinit
             su -c $JACKDHOME/.jackdinit $USER > ${LOG}