I realize there are many threads about not being able to start jackd, but none of the solutions provided have been able to cure my issue.

pi@raspberrypi / $ jackd -v -d alsa
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 10
Cannot lock down 82278944 byte memory area (Cannot allocate memory)
Jack: JackPosixThread::StartImp : create non RT thread
Jack: JackPosixThread::ThreadHandler : start
Jack: JackDriver::Open capture_driver_name = hw:0
Jack: JackDriver::Open playback_driver_name = hw:0
Jack: Check protocol client = 8 server = 8
Jack: JackEngine::ClientInternalOpen: name = system
Jack: JackEngine::AllocateRefNum ref = 0
Jack: JackPosixSemaphore::Allocate name = jack_sem.1000_default_system val = 0
Jack: JackEngine::NotifyAddClient: name = system
Jack: JackGraphManager::SetBufferSize size = 1024
Jack: JackConnectionManager::DirectConnect first: ref1 = 0 ref2 = 0
Jack: JackGraphManager::ConnectRefNum cur_index = 0 ref1 = 0 ref2 = 0
Jack: JackDriver::SetupDriverSync driver sem in flush mode
control device hw:0
control device hw:0
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 : Audio0 error : Invalid argument
Audio device hw:0 cannot be acquired...
Jack: ~JackDriver
Cannot initialize driver
Jack: no message buffer overruns
Jack: JackPosixThread::Stop
Jack: JackPosixThread::ThreadHandler : exit
JackServer::Open failed with -1
Jack: Succeeded in unlocking 82278944 byte memory area
Jack: JackShmMem::delete size = 0 index = 0
Jack: ~JackDriver
Jack: Succeeded in unlocking 1040 byte memory area
Jack: JackShmMem::delete size = 0 index = 1
Jack: Cleaning up shared memory
Jack: Cleaning up files
Jack: Unregistering server `default'
Failed to open server

That's the output after a fresh reboot, running as root. Any suggestions are greatly appreciated.

  • Does aplay -D hw:0 something.wav work? – CL. Oct 18 '16 at 6:44
  • It does. Strangely aplay something.wav (without declaring the device) has to be run with sudo though. – rob-gordon Oct 18 '16 at 13:28
  • Show the output of jackd -v -d alsa. – CL. Oct 18 '16 at 15:08
  • @CL. replaced question with verbose log – rob-gordon Oct 18 '16 at 15:20
  • Execute export DISPLAY=:0 before your command. – vaha Oct 18 '16 at 15:35

The message Unable to autolaunch a dbus-daemon without a $DISPLAY for X11 in the first verbose log means that your DISPLAY variable is not set properly.

Before your command, to set it properly just execute:

# export DISPLAY=:0 

The message Autolaunch error: X11 initialization failed in the second vebose log means that jackd cannot init an X client. I guess you are working on a raspi which does not have a running X server.

If X Window System is installed on your raspi, just start X Server before your command:

# startx

If you don't want X Window System installed on your raspi:

(While being unsure) you can try the followings:

  1. If you are on a ssh terminal (not the console), start your ssh with -X or -Y argument (i.e. ssh -X root@your_raspi_ip) and do not forget to execute export ... command mentioned above before your command. It is required that X server is running on your local.

  2. If you are on the console, try to start jackd without X client as suggested at Start JACK without X. You may need to install jackdbus in addition.

    Before your command, execute:

    export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/dbus/system_bus_socket

  • Method 1, returns a very slightly different error. gist.github.com/rob-gordon/94417801ffcf811b22a8e6ce04b119ab - I don't think X is running despite the ssh flag. I was only able to make it run after running startx ultimately :\ I'm marking this correct, however, because I think it will help people in the future. – rob-gordon Oct 18 '16 at 20:51
  • Haha, I assumed you are using a Linux machine, but I see it is a Mac. I don't know if Macs have a running X server on them. ssh -X or ssh -Y simply provides X client of raspi to connect to X server of your Linux machine, it does not start X server on the raspi. – vaha Oct 18 '16 at 21:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.