Zynthian restarts itself after few seconds

Hi,

I’m facing restarts on my Zynthian as this. Zynhtian starts, I can play for few seconds, then it restarts UI (zynthian service/not reboot) on itself, then I can play again same amount (seem like same amount to me) of time and next restart and so on.

It happens on one USB audio interface (Topping NX4DSD) which resides under hw:1 under jack/alsa config. This was previously working without issues (some month ago when I tried Zynthian for the first time). There is no USB device disconnect in dmesg, switched cables, same issue.
When using different USB audio interface (Fiio M5) residing on hw:0, it stops restarting. Unfortunately, this interface is not usable for playing as it have too much internal latency [aaargh, if it wasn’t so, it would be the best solution as it is small as matchbox and sounds fantastic too].

Besides hw:0 vs hw:1 difference, all other jackd settings are the same

-P 70 -t 2000 -s -d alsa -d hw:1 -r 48000 -p 256 -n 3 -X raw

Anyone has any idea? It was working perfectly before, no custom things on this besides screen calibration. Anything to check? Any logs needed? Please help.

Hi,

it doesn’t correspond to these settings:

you can add a -v to the jackd parameters to get more verbosity from jack server messages.

OK, situation is this. If I start zynthian without MIDI keyboard, it works. If I start it with keyboard, it doesn’t . Card ID is different, then (aplay -l reports card 0), but it plays for some time anyway. When I connect MIDI keyboard after Zythian UI starts, it works as should.

Removed log as it wasn’t corespnding to errorneous state as I thought.

Sound like an issue that was fixed months ago. What version of Zynthian are you using?

Image is this

2020-05-16-zynthianos-buster-lite-1.0.0.img

and I have updated from Webconf during these tests.

OK. I’m thinking about this, but I could be completely off.

  1. there is some sequence of USB device enumeration according to USB device tree
  2. card id depends on when this card is enumerated
  3. this is USB port used dependent
  4. so when connecting to different port and restart, this could lead to new ID sequence
  5. as Audio device jackd config is dependent only on logical card ID within system, I don’t see any systematic solution without
  6. referencing Audio card by name and then finding it’s logical ID
  7. which probably need some kind of list box within webconf with list of connected audio interfaces, where user select one to use, then
  8. zynthian on start will try find this card by this Device Name and not on card logical ID
  9. start jackd with proper card ID

If you could send the UI log … this is quite useful in these cases :wink:

Regards,

I have put it away already. My musical inspiration has been burried by this issue. Maybe after few days I will turn it on again Meanwhile could you please check that list above if it not somehow related?

Without the logs is very difficult to diagnose and without a diagnostic, we can’t solve the problem.

Instead of using the card id you should be able to use the card name. E.g. for my uca222 i can use -d hw:CODEC, for my yeti mic -d hw:Microphone

Edit: Oh oh, it maybe this: Audio Setup

1 Like

ohhh yessss!! Good point. This should solve the problem :wink:

Oh and 3 periods for usb audio devices isn’t really needed any more. -n 2 will probably be fine and will lower the latency.

Yes, this could solve the problem using console :wink: But some straight forward setup from within UI/Webconf would be better for non-fiddlers. At least show the name of the card to not having to open up ssh console to find out.

At the risk of being divisive, the true non-fiddler would be better served by buying the official kit. :wink:

Also, we can add your card as a preset for future people, if you put your configuration in as an RFE https://github.com/zynthian/zynthian-issue-tracking

3 Likes