Audio stops working

Hi, i am having a problem with the audio of my zynthian. Basically it stops emitting sounds some time after the zynthian starts(could be up to 15 minutes). Even the mpg123 test stops emitting sounds after it happens, and even in ssh. Any tips?

And here is the log file(part of it, it has 930KB of size, with sudo journalctl -u jack2.service > /echo.txt):

Feb 12 21:34:09 zynthian systemd[1]: Starting JACK2 Audio Server…
Feb 12 21:34:09 zynthian systemd[1]: Started JACK2 Audio Server.
Feb 12 21:34:10 zynthian jackd[452]: jackdmp 1.9.10
Feb 12 21:34:10 zynthian jackd[452]: Copyright 2001-2005 Paul Davis and others.
Feb 12 21:34:10 zynthian jackd[452]: Copyright 2004-2014 Grame.
Feb 12 21:34:10 zynthian jackd[452]: jackdmp comes with ABSOLUTELY NO WARRANTY
Feb 12 21:34:10 zynthian jackd[452]: This is free software, and you are welcome to redistribute it
Feb 12 21:34:10 zynthian jackd[452]: under certain conditions; see the file COPYING for details
Feb 12 21:34:10 zynthian jackd[452]: JACK server starting in realtime mode with priority 70
Feb 12 21:34:10 zynthian jackd[452]: self-connect-mode is “Don’t restrict self connect requests”
Feb 12 21:34:10 zynthian jackd[452]: audio_reservation_init
Feb 12 21:34:10 zynthian jackd[452]: Acquire audio card Audio1
Feb 12 21:34:10 zynthian jackd[452]: creating alsa driver … hw:UA1EX|hw:UA1EX|1024|2|44100|0|0|nomon|swmeter|-|16bit
Feb 12 21:34:10 zynthian jackd[452]: configuring for 44100Hz, period = 1024 frames (23.2 ms), buffer = 2 periods
Feb 12 21:34:10 zynthian jackd[452]: ALSA: final selected sample format for capture: 16bit little-endian
Feb 12 21:34:10 zynthian jackd[452]: ALSA: use 2 periods for capture
Feb 12 21:34:10 zynthian jackd[452]: ALSA: final selected sample format for playback: 16bit little-endian
Feb 12 21:34:10 zynthian jackd[452]: ALSA: use 2 periods for playback
Feb 12 21:34:10 zynthian jackd[452]: scan: added port hw:0,0,0 in-hw-0-0-0-Arduino-Due-MIDI-1
Feb 12 21:34:10 zynthian jackd[452]: scan: added port hw:0,0,0 out-hw-0-0-0-Arduino-Due-MIDI-1
Feb 12 21:34:10 zynthian jackd[452]: scan: opened port hw:0,0,0 in-hw-0-0-0-Arduino-Due-MIDI-1
Feb 12 21:34:10 zynthian jackd[452]: scan: opened port hw:0,0,0 out-hw-0-0-0-Arduino-Due-MIDI-1
Feb 12 21:34:17 zynthian jackd[452]: JackGraphManager::Disconnect not connected port_src = 9 port_dst = 6
Feb 12 21:34:19 zynthian jackd[452]: JackGraphManager::Connect already connected port_src = 5 port_dst = 10
Feb 12 21:34:19 zynthian jackd[452]: JackGraphManager::Connect already connected port_src = 7 port_dst = 10
Feb 12 21:34:19 zynthian jackd[452]: JackGraphManager::Disconnect not connected port_src = 9 port_dst = 6
Feb 12 21:34:19 zynthian jackd[452]: JackGraphManager::Connect already connected port_src = 9 port_dst = 8
Feb 12 21:34:21 zynthian jackd[452]: JackGraphManager::Connect already connected port_src = 5 port_dst = 10
Feb 12 21:34:21 zynthian jackd[452]: JackGraphManager::Connect already connected port_src = 7 port_dst = 10
Feb 12 21:34:21 zynthian jackd[452]: JackGraphManager::Disconnect not connected port_src = 9 port_dst = 6
Feb 12 21:34:21 zynthian jackd[452]: JackGraphManager::Connect already connected port_src = 9 port_dst = 8
Feb 12 21:34:22 zynthian jackd[452]: JackGraphManager::Connect already connected port_src = 5 port_dst = 10
Feb 12 21:34:22 zynthian jackd[452]: JackGraphManager::Connect already connected port_src = 7 port_dst = 10
Feb 12 21:34:22 zynthian jackd[452]: JackGraphManager::Disconnect not connected port_src = 9 port_dst = 6
Feb 12 21:34:22 zynthian jackd[452]: JackGraphManager::Connect already connected port_src = 9 port_dst = 8
Feb 12 21:34:22 zynthian jackd[452]: JackGraphManager::Connect already connected port_src = 11 port_dst = 3
Feb 12 21:34:23 zynthian jackd[452]: JackGraphManager::Connect already connected port_src = 5 port_dst = 10
Feb 12 21:34:23 zynthian jackd[452]: JackGraphManager::Connect already connected port_src = 7 port_dst = 10
Feb 12 21:34:23 zynthian jackd[452]: JackGraphManager::Connect already connected port_src = 9 port_dst = 13

And it goes on… The log stops growing only when i stop the service. And when i stop it:

Feb 12 22:26:07 zynthian jackd[452]: JackGraphManager::Disconnect not connected port_src = 9 port_dst = 6
Feb 12 22:26:07 zynthian jackd[452]: JackGraphManager::Connect already connected port_src = 9 port_dst = 8
Feb 12 22:26:09 zynthian jackd[452]: JackGraphManager::Connect already connected port_src = 5 port_dst = 10
Feb 12 22:26:09 zynthian jackd[452]: JackGraphManager::Connect already connected port_src = 7 port_dst = 10
Feb 12 22:26:09 zynthian jackd[452]: JackGraphManager::Disconnect not connected port_src = 9 port_dst = 6
Feb 12 22:26:09 zynthian jackd[452]: JackGraphManager::Connect already connected port_src = 9 port_dst = 8
Feb 12 22:26:30 zynthian jackd[452]: JackPosixProcessSync::LockedTimedWait error usec = 20000000 err = Connection timed out
Feb 12 22:26:30 zynthian jackd[452]: JackEngine::ClientDeactivate wait error ref = 2 name = ttymidi
Feb 12 22:26:50 zynthian jackd[452]: JackPosixProcessSync::LockedTimedWait error usec = 20000000 err = Connection timed out
Feb 12 22:26:50 zynthian jackd[452]: JackEngine::ClientDeactivate wait error ref = 3 name = Zynthian_autoconnect
Feb 12 22:26:50 zynthian jackd[452]: JackEngine::ClientKill ref = 3 cannot be removed from the graph !!
Feb 12 22:26:54 zynthian jackd[452]: JackPosixProcessSync::LockedTimedWait error usec = 4000000 err = Connection timed out
Feb 12 22:26:54 zynthian jackd[452]: JackEngine::ClientCloseAux wait error ref = 3
Feb 12 22:26:54 zynthian jackd[452]: Cannot write socket fd = 23 err = Broken pipe
Feb 12 22:26:54 zynthian jackd[452]: CheckRes error
Feb 12 22:26:54 zynthian jackd[452]: Could not write notification
Feb 12 22:26:54 zynthian jackd[452]: ClientNotify fails name = Zynthian_autoconnect notification = 1 val1 = 0 val2 = 0
Feb 12 22:27:14 zynthian jackd[452]: JackPosixProcessSync::LockedTimedWait error usec = 20000000 err = Connection timed out
Feb 12 22:27:14 zynthian jackd[452]: JackEngine::ClientDeactivate wait error ref = 4 name = Zyncoder
Feb 12 22:27:14 zynthian jackd[452]: JackEngine::ClientKill ref = 4 cannot be removed from the graph !!
Feb 12 22:27:18 zynthian jackd[452]: JackPosixProcessSync::LockedTimedWait error usec = 4000000 err = Connection timed out
Feb 12 22:27:18 zynthian jackd[452]: JackEngine::ClientCloseAux wait error ref = 4
Feb 12 22:27:18 zynthian jackd[452]: CheckSize error size = 32 Size() = 12
Feb 12 22:27:18 zynthian jackd[452]: CheckRead error
Feb 12 22:27:18 zynthian jackd[452]: CheckSize error size = -1 Size() = 4
Feb 12 22:27:18 zynthian jackd[452]: CheckRead error
Feb 12 22:27:18 zynthian jackd[452]: CheckSize error size = 0 Size() = 12
Feb 12 22:27:18 zynthian jackd[452]: CheckRead error
Feb 12 22:27:22 zynthian jackd[452]: JackPosixProcessSync::LockedTimedWait error usec = 4000000 err = Connection timed out
Feb 12 22:27:22 zynthian jackd[452]: JackEngine::ClientCloseAux wait error ref = 2
Feb 12 22:27:22 zynthian jackd[452]: CheckSize error size = 32 Size() = 12
Feb 12 22:27:22 zynthian jackd[452]: CheckRead error
Feb 12 22:27:22 zynthian jackd[452]: CheckSize error size = -1 Size() = 4
Feb 12 22:27:22 zynthian jackd[452]: CheckRead error
Feb 12 22:27:22 zynthian jackd[452]: CheckSize error size = 0 Size() = 12
Feb 12 22:27:22 zynthian jackd[452]: CheckRead error
Feb 12 22:27:22 zynthian systemd[1]: Stopping JACK2 Audio Server…
Feb 12 22:27:22 zynthian jackd[452]: Jack main caught signal 15
Feb 12 22:28:53 zynthian systemd[1]: jack2.service stop-sigterm timed out. Killing.
Feb 12 22:28:53 zynthian systemd[1]: jack2.service: main process exited, code=killed, status=9/KILL
Feb 12 22:28:53 zynthian systemd[1]: Stopped JACK2 Audio Server.
Feb 12 22:28:53 zynthian systemd[1]: Unit jack2.service entered failed state.

What hardware config are you using …?

Hi @wyleu , I’m using a Arduino DUE with the MIDIUSB library for keybed reading, and a Roland Edirol UA1-ex as a DAC.

Edit: I reinstalled zynthian, but the problem persists.

OBS: here is the jack log file(that’s all information it has):
– Logs begin at Sun 2019-02-17 16:42:38 GMT, end at Sun 2019-02-17 17:21:42 GMT. –
Feb 17 16:42:41 zynthian systemd[1]: Starting JACK2 Audio Server…
Feb 17 16:42:41 zynthian systemd[1]: Started JACK2 Audio Server.
Feb 17 16:42:42 zynthian jackd[384]: jackdmp 1.9.10
Feb 17 16:42:42 zynthian jackd[384]: Copyright 2001-2005 Paul Davis and others.
Feb 17 16:42:42 zynthian jackd[384]: Copyright 2004-2014 Grame.
Feb 17 16:42:42 zynthian jackd[384]: jackdmp comes with ABSOLUTELY NO WARRANTY
Feb 17 16:42:42 zynthian jackd[384]: This is free software, and you are welcome to redistribute it
Feb 17 16:42:42 zynthian jackd[384]: under certain conditions; see the file COPYING for details
Feb 17 16:42:42 zynthian jackd[384]: JACK server starting in realtime mode with priority 70
Feb 17 16:42:42 zynthian jackd[384]: self-connect-mode is “Don’t restrict self connect requests”
Feb 17 16:42:42 zynthian jackd[384]: audio_reservation_init
Feb 17 16:42:42 zynthian jackd[384]: Acquire audio card Audio1
Feb 17 16:42:42 zynthian jackd[384]: creating alsa driver … hw:UA1EX|hw:UA1EX|256|2|44100|0|0|nomon|swmeter|-|32bit
Feb 17 16:42:42 zynthian jackd[384]: configuring for 44100Hz, period = 256 frames (5.8 ms), buffer = 2 periods
Feb 17 16:42:42 zynthian jackd[384]: ALSA: final selected sample format for capture: 16bit little-endian
Feb 17 16:42:42 zynthian jackd[384]: ALSA: use 2 periods for capture
Feb 17 16:42:42 zynthian jackd[384]: ALSA: final selected sample format for playback: 16bit little-endian
Feb 17 16:42:42 zynthian jackd[384]: ALSA: use 2 periods for playback
Feb 17 16:42:42 zynthian jackd[384]: scan: added port hw:0,0,0 in-hw-0-0-0-Arduino-Due-MIDI-1
Feb 17 16:42:42 zynthian jackd[384]: scan: added port hw:0,0,0 out-hw-0-0-0-Arduino-Due-MIDI-1
Feb 17 16:42:42 zynthian jackd[384]: scan: opened port hw:0,0,0 in-hw-0-0-0-Arduino-Due-MIDI-1
Feb 17 16:42:42 zynthian jackd[384]: scan: opened port hw:0,0,0 out-hw-0-0-0-Arduino-Due-MIDI-1

What have you got in your various webconf settings?

I only had changed the -d hw:0 to -d hw:UA1EX in the hardware > audio part.
If i don’t do that, it can’t even start, with the Zynthian Screen showing the logo and Error. If i do the change, i can play the keyboard until the audio stops(typically 5 to 10 minutes).

well jack looks as thou’ its started. Can you ssh in and run qjackctl ?

Just a sec. I will check it now.

It is now open. What’s next.

does it show that jack is running?

It might be an idea to screenshot the base qjackctl window to show us what it’s doing… ( it also makes the threads less texty… :smiley: )

Not used journalctl as yet It should help :-d

Looks like it is not running, from the screenshot.

If you try to start it you should see something in the messages section . . .

It has failed.

But, at the same time, i checked the “service jack2 status” command output:
● jack2.service - JACK2 Audio Server
Loaded: loaded (/etc/systemd/system/jack2.service; enabled)
Active: active (running) since Sun 2019-02-17 17:47:21 GMT; 10min ago
Main PID: 493 (jackd)
CGroup: /system.slice/jack2.service
└─493 /usr/bin/jackd -P 70 -t 2000 -s -d alsa -d hw:UA1EX -r 44100 -p 256 -n 2 -X raw

Feb 17 17:50:59 zynthian jackd[493]: scan: added port hw:0,0,0 in-hw-0-0-0-Arduino-Due-MIDI-1
Feb 17 17:50:59 zynthian jackd[493]: scan: added port hw:0,0,0 out-hw-0-0-0-Arduino-Due-MIDI-1
Feb 17 17:50:59 zynthian jackd[493]: scan: opened port hw:0,0,0 in-hw-0-0-0-Arduino-Due-MIDI-1
Feb 17 17:50:59 zynthian jackd[493]: scan: opened port hw:0,0,0 out-hw-0-0-0-Arduino-Due-MIDI-1
Feb 17 17:51:31 zynthian jackd[493]: scan: deleted port hw:0,0,0 in-hw-0-0-0-Arduino-Due-MIDI-1
Feb 17 17:51:31 zynthian jackd[493]: scan: deleted port hw:0,0,0 out-hw-0-0-0-Arduino-Due-MIDI-1
Feb 17 17:51:31 zynthian jackd[493]: scan: added port hw:0,0,0 in-hw-0-0-0-Arduino-Due-MIDI-1
Feb 17 17:51:31 zynthian jackd[493]: scan: added port hw:0,0,0 out-hw-0-0-0-Arduino-Due-MIDI-1
Feb 17 17:51:31 zynthian jackd[493]: scan: opened port hw:0,0,0 in-hw-0-0-0-Arduino-Due-MIDI-1
Feb 17 17:51:31 zynthian jackd[493]: scan: opened port hw:0,0,0 out-hw-0-0-0-Arduino-Due-MIDI-1

is systemd lying to itself? either jack is up or it isn’t unless we’ve managed to convince it to run two instances of itself …? :smiley: .
I seem to remember actually fully stopping and removing jack from a zynth can be a bit of a pain. (most of the services are set to autorestart so sometimes they have to be beaten down with a stick.
I have to say I have cut out problems with a USB out which Im’ using more to test encoders, but it’s a right pain what with changing the etc/dbus settings. I’m not sure I could categorically describe a setup the starts reliably…
I often end up with a ticking at a second or so which I suspect might be a service or two restarting.

Just done it now.

  1. Kicked zynthian-nord.local up
  2. Ran to zynthian error screen.
  3. kill it from a ssh reboot
  4. didn’t die cleanly had to turn off pi ( loudspeakers thank me for that …)
  5. restart pi.
  6. Comes up working…
  7. change voice…
  8. changes voice to bossanova
  9. slight touch on ribbon cable (maybe a coincidence)
  10. outputs goes to repetitive one second clicks

The screenshot says, that it’s hw:0 again.maybe it switched back
And I would try 41000 instead of 48000

i ran the command “service jack2 stop” to stop it.

it took 3 minutes to die.

After that, i opened “qjackctl” and tried to start it, but hasn’t worked with hw:0, only when i changed to hw:UA1EX,0 it started.

The qjackctl messages log, when i finally started:
18:58:11.310 JACK is starting…
18:58:11.313 /usr/bin/jackd -dalsa -dhw:UA1EX,0 -r44100 -p1024 -n2 -Xraw
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
18:58:11.339 JACK was started with PID=13255.
jackdmp 1.9.10
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2014 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
self-connect-mode is “Don’t restrict self connect requests”
audio_reservation_init
Acquire audio card Audio1
creating alsa driver … hw:UA1EX,0|hw:UA1EX,0|1024|2|44100|0|0|nomon|swmeter|-|32bit
configuring for 44100Hz, period = 1024 frames (23.2 ms), 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
scan: added port hw:0,0,0 in-hw-0-0-0-Arduino-Due-MIDI-1
scan: added port hw:0,0,0 out-hw-0-0-0-Arduino-Due-MIDI-1
scan: opened port hw:0,0,0 in-hw-0-0-0-Arduino-Due-MIDI-1
scan: opened port hw:0,0,0 out-hw-0-0-0-Arduino-Due-MIDI-1
18:58:13.537 JACK connection change.
18:58:17.134 Server configuration saved to “/root/.jackdrc”.
18:58:17.137 Statistics reset.
18:58:17.165 Client activated.
18:58:17.209 JACK connection graph change.

But the problem persists.