Strange jackd problem

192 views
Skip to first unread message

david...@oca.ac.uk

unread,
Mar 25, 2021, 3:13:55 PM3/25/21
to jacktri...@googlegroups.com

Hi Jacktrip folks

 

I have a strange issue with jackd when I try to run it as jacktrip rather than as root:

 

As jacktrip….

 

root@nanopiair:~# sudo -u jacktrip jackd -dalsa -dhw:Codec --rate 0 --period 128

jackdmp 1.9.12

Copyright 2001-2005 Paul Davis and others.

Copyright 2004-2016 Grame.

Copyright 2016-2017 Filipe Coelho.

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

self-connect-mode is "Don't restrict self connect requests"

Failed to connect to session bus for device reservation: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11

 

To bypass device reservation via session bus, set JACK_NO_AUDIO_RESERVATION=1 prior to starting jackd.

 

Audio device hw:Codec cannot be acquired...

Cannot initialize driver

JackServer::Open failed with -1

Failed to open server

root@nanopiair:~#

 

 

As root…

 

root@nanopiair:~# jackd -dalsa -dhw:Codec --rate 0 --period 128

jackdmp 1.9.12

Copyright 2001-2005 Paul Davis and others.

Copyright 2004-2016 Grame.

Copyright 2016-2017 Filipe Coelho.

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

self-connect-mode is "Don't restrict self connect requests"

creating alsa driver ... hw:Codec|hw:Codec|128|2|0|0|0|nomon|swmeter|-|32bit

configuring for 0Hz, period = 128 frames (inf ms), buffer = 2 periods

ALSA: final selected sample format for capture: 32bit integer little-endian

ALSA: use 2 periods for capture

ALSA: final selected sample format for playback: 32bit integer little-endian

ALSA: use 2 periods for playback

 

 

 

I looked at permissions for jacktrip and it is in group “audio” so that’s OK…

 

Any ideas where else to look?  My guess is it’s a permissions problem but I don’t know where.


David

Marcin Pączkowski

unread,
Mar 25, 2021, 3:32:46 PM3/25/21
to jacktri...@googlegroups.com
Hello David,

Generally Jack2 needs dbus service to run, AFAIU, which is provided by X11. It seems that the problem with running as a different user stems from dbus here... though I might be wrong.
Supposedly setting env variable JACK_NO_AUDIO_RESERVATION=1 aims to solve the issue with dbus. Have you tried that?

Is there a reason you're not logged in as jacktrip and using a sudo instead? (not sure if that makes a difference here, just curious)

Best,
Marcin


--
You received this message because you are subscribed to the Google Groups "jacktrip-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jacktrip-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacktrip-users/00a001d721aa%24fe3ebb80%24fabc3280%24%40oca.ac.uk.

david...@oca.ac.uk

unread,
Mar 25, 2021, 4:05:15 PM3/25/21
to jacktri...@googlegroups.com

Hi

 

This is on a RasberryPI lookalike. I have exports JACK_NO_AUDIO_RESERVATION=1 – it fails on both root and jacktrip if I try and start without that so I don’t think it’s X windows this time.

 

The reason that I need to start it with jacktrip is because that is what the jacktrip-agent starts the process as – strange thing is that this works perfectly on another Debian based ARM system; this is Ubuntu based and fails.

 

This seems to be an alsa-driver issue but I can’t see where…


David

Marcin Pączkowski

unread,
Mar 25, 2021, 4:17:16 PM3/25/21
to jacktri...@googlegroups.com
Thanks for the response.
My question was why not log in as jacktrip instead of sudo-ing into it?
Also, it seems that sudo starts a new environment by default, unless you pass -E supposedly. Maybe that env var was not there?
Marcin


david...@oca.ac.uk

unread,
Mar 25, 2021, 5:48:03 PM3/25/21
to jacktri...@googlegroups.com

Hi

 

Jacktrip is just a dummy noshell account with no login.  But thanks for the pointer to passing the env var – that WORKED!

Marcin Pączkowski

unread,
Mar 25, 2021, 6:07:11 PM3/25/21
to jacktri...@googlegroups.com

david...@oca.ac.uk

unread,
Mar 27, 2021, 12:58:18 PM3/27/21
to jacktri...@googlegroups.com

Spoke too soon.

 

I am building a NanoPiAir with on-board audio card.  It appears as:

 

**** List of PLAYBACK Hardware Devices ****

card 0: Codec [H3 Audio Codec], device 0: CDC PCM Codec-0 [CDC PCM Codec-0]

  Subdevices: 0/1

  Subdevice #0: subdevice #0

[1]+  Terminated              journalctl -f

root@nanopiair:/etc/systemd/system# arecord -l

**** List of CAPTURE Hardware Devices ****

card 0: Codec [H3 Audio Codec], device 0: CDC PCM Codec-0 [CDC PCM Codec-0]

  Subdevices: 0/1

  Subdevice #0: subdevice #0

root@nanopiair:/etc/systemd/system#

 

When I start jackd, everything looks OK:

 

jacktrip  2662     1  9 16:55 ?        00:00:06 /usr/bin/jackd -dalsa -dhw:Codec --rate 48000 --period 128

 

 

But jacktrip is failing to start:

 

root@nanopiair:/etc/systemd/system# /usr/local/bin/jacktrip -t -z -n 2 -C jacktrip.lake.to --peerport 4464 --bindport 4464 --clientname hubserver --remotename 704a0e153cd0 -q auto -Oio

Setting buffers to zero when underrun...

---------------------------------------------------------

Cannot connect to server socket err = No such file or directory

Cannot connect to server request channel

jackdmp 1.9.12

Copyright 2001-2005 Paul Davis and others.

Copyright 2004-2016 Grame.

Copyright 2016-2017 Filipe Coelho.

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

self-connect-mode is "Don't restrict self connect requests"

creating alsa driver ... hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit

 

 

ATTENTION: The playback device "hw:0" is already in use. Please stop the application using it and run JACK again

JackTemporaryException : now quits...

Cannot initialize driver

JackServer::Open failed with -1

Failed to open server

Cannot connect to server socket err = No such file or directory

Cannot connect to server request channel

Cannot connect to server socket err = No such file or directory

Cannot connect to server request channel

Cannot connect to server socket err = No such file or directory

Cannot connect to server request channel

Cannot connect to server socket err = No such file or directory

Cannot connect to server request channel

^C

Shutting Down...

Cannot connect to server socket err = No such file or directory

Cannot connect to server request channel

jack server is not running or cannot be started

JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock

JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock

Unable to connect to JACK server

ERROR:

Maybe the JACK server is not running?

Exiting JackTrip...

 

 

I don’t understand where “hw:0” is coming from – this should be hw:Codec.

 

And nothing else is already using it….

Reply all
Reply to author
Forward
0 new messages