LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   qjackctl - "Could not connect to JACK server as client" (https://www.linuxquestions.org/questions/linux-software-2/qjackctl-could-not-connect-to-jack-server-as-client-567108/)

oskar 07-06-2007 08:48 AM

qjackctl - "Could not connect to JACK server as client"
 
I've had this problem since Feisty... I think it was herd5. Can't pin it down exactly.

What happens is, when I start jackd through qjackctl with the standard settings, it will start. The default buffer settings are too low for my soundcard (soundblaster live value) though. So i have to increase buffers. But once I change any of the settings I get this in the qjackctl message window, when I try to start jackd again:

Code:

jackd 0.102.20
Copyright 2001-2005 Paul Davis and others.
jackd 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 compiled with System V SHM support.
loading driver ..
apparent rate = 44100
creating alsa driver ... hw:0|hw:0|1024|4|44100|0|0|nomon|swmeter|-|32bit
control device hw:0
configuring for 44100Hz, period = 1024 frames, buffer = 4 periods
ALSA: final selected sample format for capture: 16bit little-endian
ALSA: got smaller periods 2 than 4 for capture
ALSA: cannot configure capture channel
cannot load driver module alsa
no message buffer overruns
15:26:03.136 JACK was stopped successfully.
15:26:03.139 Post-shutdown script...
15:26:03.142 killall jackd
jackd: no process killed
15:26:03.380 Post-shutdown script terminated with exit status=256.
15:26:05.089 Could not connect to JACK server as client. Please check the messages window for more info.

This is what I get on the command line when I start qjackctl:

Code:

qjackctl
X Error: BadDevice, invalid or uninitialized input device 170
  Major opcode:  148
  Minor opcode:  3
  Resource id:  0x0
Failed to open device
X Error: BadDevice, invalid or uninitialized input device 170
  Major opcode:  148
  Minor opcode:  3
  Resource id:  0x0
Failed to open device
Warning: no locale found: /usr/share/locale/qjackctl_en_US.UTF-8.qm

Just to show you it works, I started it with the default settings, but this time I got xruns immediately. I can't remember that ever happening before:

Code:

jackd 0.102.20
Copyright 2001-2005 Paul Davis and others.
jackd 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 compiled with System V SHM support.
loading driver ..
apparent rate = 44100
creating alsa driver ... hw:0|hw:0|256|2|44100|0|0|nomon|swmeter|-|32bit
control device hw:0
configuring for 44100Hz, period = 256 frames, buffer = 2 periods
ALSA: final selected sample format for capture: 16bit little-endian
ALSA: use 2 periods for capture
ALSA: final selected sample format for playback: 16bit little-endian
ALSA: use 2 periods for playback
15:27:58.357 Server configuration saved to "/home/roman/.jackdrc".
15:27:58.361 Statistics reset.
15:27:58.368 Client activated.
15:27:58.371 Audio connection change.
15:27:58.406 Audio connection graph change.
15:28:02.001 XRUN callback (1).
**** alsa_pcm: xrun of at least 0.746 msecs
**** alsa_pcm: xrun of at least 1.772 msecs
**** alsa_pcm: xrun of at least 6.816 msecs
**** alsa_pcm: xrun of at least 1.252 msecs
**** alsa_pcm: xrun of at least 1.206 msecs


My workaround so far has been to start jackd with a script I copied off the internet. I have no idea what it does, and I have no idea what the syntax is. And frankly, I don't have great ambition to learn it:

Code:

$ jackreaper
jackd 0.102.20
Copyright 2001-2005 Paul Davis and others.
jackd 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 compiled with System V SHM support.
loading driver ..
apparent rate = 44100
creating alsa driver ... hw:0|hw:0|4096|2|44100|2|2|nomon|swmeter|-|16bit
control device hw:0
configuring for 44100Hz, period = 4096 frames, buffer = 2 periods
ALSA: final selected sample format for capture: 16bit little-endian
ALSA: use 2 periods for capture
ALSA: final selected sample format for playback: 16bit little-endian
ALSA: use 2 periods for playback

Code:

$ cat jackreaper
/usr/bin/jackd  -t10000 -dalsa -dhw:0 -r44100 -p4096 -n2 -D -Chw:0 -S -i2 -o2 -I170 -O170

This works, but the buffers are still set too low, and I don't know how to change that.

I'm this close to just reinstalling Feisty and hoping it will get magically solve. Help much appreciated.

studioj 07-06-2007 03:02 PM

the only value you need to play with is -p
from the man page
Quote:

-p, --period int
Specify the number of frames between JACK process() calls. The default is 1024. If you need
low latency, set -p as low as you can go without seeing xruns. A larger period size yields
higher latency, but makes xruns less likely. The JACK capture latency in seconds is --period
divided by --rate.
in the second example you set -n4 thats no good leave -n at 2

you shouldn't be having so much trouble with xruns though
good to not use qjackctl because it takes resources drawing to the screen
i have sb live and use
jackd -R -P70 -dalsa -dhw:0 -r44100 -p512 -n2
without problems
there may be more/other tweeks to do

oskar 07-09-2007 09:51 PM

thanks!

That will do. I don't get xruns when I run it from the command line. Qjackctl would be nice for the routing and peak meters though.


All times are GMT -5. The time now is 03:15 AM.