zynthian / zynthian-issue-tracking

Centralized Issue Tracking for Zynthian Project
https://github.com/orgs/zynthian/projects/1
11 stars 3 forks source link

Restart jack dependancies when jack restarts #1006

Open riban-bw opened 3 months ago

riban-bw commented 3 months ago

Is your feature request related to a problem? Please describe. When jack2 services stops there are many other services that depend on it and behave badly. It would be advantageous to restart all dependant services when jack2 service restarts. This could be used to resolve issue #994.

Describe the solution you'd like Automatically restart all dependant services when jack2 service restarts.

Describe alternatives you've considered Reboot.

Additional context Adding PartOf=jack2.service to the [Unit] section of all dependant services will cause the service to stop or resetart when jack2.service is stopped or restarted. It does not start the dependant services when jack2 starts so does not supports stop then start of jack2 but this should be sufficient.

I believe the following services should be modifed:

This list should be validated. We also need to validate that services stop and restart properly. In earlier versions of Zynthian, restarting the zynthian service too quickly caused issues with modules not stopping properly and subsequent xruns. This might be resolved by adding RestartSec to [Service] section of jack2.service control file.

riban-bw commented 1 month ago

I think we should sort this out as it can be used to resolve the issue that Zynthian xruns after a restart due to jack clients not closing properly. This is a poor user experience, e.g. after updating zynthian and it restarting the device is left in an effectively broken state (regular xruns) requiring a reboot. We could restart jack2 service during the zynthian restart if all relevant services also restarted as appropriate.