LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 07-06-2007, 08:48 AM   #1
oskar
Senior Member
 
Registered: Feb 2006
Location: Austria
Distribution: Ubuntu 12.10
Posts: 1,138

Rep: Reputation: 49
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.

Last edited by oskar; 07-06-2007 at 08:50 AM.
 
Old 07-06-2007, 03:02 PM   #2
studioj
Member
 
Registered: Oct 2006
Posts: 460

Rep: Reputation: 31
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
 
Old 07-09-2007, 09:51 PM   #3
oskar
Senior Member
 
Registered: Feb 2006
Location: Austria
Distribution: Ubuntu 12.10
Posts: 1,138

Original Poster
Rep: Reputation: 49
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot connect to X11 window server using ":).0" as DISPLAY variable cclack Linux - Newbie 4 09-06-2007 09:32 PM
"sudo -u user ssh server" fails to connect oudoubah Linux - Security 3 06-21-2007 06:45 AM
Rosegarden, jack, qjackctl error: "can't connect to server as client" deep_inda_jungl Mandriva 3 02-20-2007 11:45 PM
winxp says "unable to connect..." to server attached printer linuxlimbo Linux - Networking 1 09-20-2006 10:39 PM
"Cannot connect to X server" whilest telnetting to another UNIX system Sroys Linux - General 3 05-25-2004 02:31 PM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration