Closed michelemaroni closed 2 weeks ago
It looks like the Jogg USB device is slow to appear. Maybe it has its own boot period which is slower than most, simple USB devices.
The jack2 service is configured to restart on failure every second. This quickly excedes the restarts permitted in the default period (5 in 5s). Once jack2 service has exceded this limit it stops attempting to restart. Zynthian is dependant on jack2 service, so it cannot operate. Extending the restart time to 2s does not significantly impact availability (zynthian's restart is 5s) and seems to resolve this issue because, when the USB device is available, jack2 finds it and starts then zynthian's next restart works. This may add a few seconds to startup if zynthian fails to start initially because of its 5s restart cycle. (We could probably reduce this to 2s.)
Try changing RestartSec=1
to RestartSec=2
in /etc/systemd/system/jack2.service
then reboot.
I emulated the problem by depowering a USB attached audio card (UMC1820) during boot then powering after zynthian error screen shows. This seems to work.
Please report if this fixes the problem, or at least works around it. If so we could make these changes to the system so that your (cornercase) scenario is resolved.
I have implemented this fix in Vangelis (testing) which should fix @michelemaroni's problem and also makes zynthian more robust. It should now recover from more jack related issues.
Thanks, I'll test it over the weekend and let you know the outcome.
I can confirm that the issue is now fixed, at least for me.
Wanted to share some reflections/info.
I'd close this issue with one proposal: Would it be possible/useful to implement a graceful behavior in the zynthia ui in regards of the audio system?
1) The user specify and configure a valid audio interface as usual. 2) If the device is available zynthia starts normally, else it starts with a fallback device which could be also a null device. 3) At startup the user receives a warning about the inavailability of the main audio device and that the fallback device is being used. The warning could be combined/replaced with stamp-like message in the zynthian mixer.
Thank you for fixing this!
Reopening to track through to release. (Currently only resolved in testing.)
There is a different development that is looking at hotplug audio. I will considered your suggestions in that development.
Describe the issue
HOTONE Jogg Audio interface not available on startup
To Reproduce
Steps to reproduce the behavior:
aplay -l
norlsusb
show the device in the list.jackd -P 70 -s -S -d alsa -d hw:Audio -r 48000 -p 256 -n 2 -X raw
Expected behaviour
The device should be detected, initialized, and activated on startup.
Actual behaviour
The device is not deteced and prevents zynthian-ui and serice from starting.
Screenshots
On startup:
After replugging:
Manually configuring the device as audio interface with
jackd
command after replugging:Additional info
This behavior does not occurs using modep . The device properly starts once configured in the first login wizard.
Configuration
Hardware
System
MIDI & UI
Software