Zynthian on Pi4 with dual screen?

I would like to use the second HDMI output on the Pi4 as a second screen.
Ideal setup:
HDMI port 1 => Touchscreen with usual Zynthian display (that’s what I have at the moment)
HDMI port 2 => Generic X output for Synthesizer UIs (Zynaddsubfx, etc).
Is this possible and how ?

2 Likes

Currently the HDMI outputs are not configured for Zynthian workflows (unless you are using HDMI for the main display like you describe). It is an aspiration of some of us to expose more functionality via HDMI displays but I don’t think this has been progressed yet. Some issues to resolve include:

  • HDMI or SPI may be used as main display and Pi 3 has a single HDMI so there may be different quantity of outputs available
  • What do we want to display?
  • How do we share input devices, e.g. mouse and keyboard?
  • Some builds use USB input devices, e.g. touchscreen, mouse, etc.

We could offer a mechanism to expose a KVM experience with full screen apps/ modules displayed and dedicated input devices, maybe defined by specified USB port.

I would love to see the ability to plug in a screen, mouse and keyboard and perform various extended operations but don’t want a wild west approach.

I have eaten my tea and replete, I now plan to answer some of my own questions:

  • Zynthian can know the hardware it is running on and the configuration so can know how many spare HDMI outputs are available. Extra functionality can be based on this, i.e. Pi 3 using HDMI for main display will offer no extra functionality whereas Pi 4 using SPI for main output could offer functionality based on up to two external displays
  • External display(s) could run a panel / windows manager which provided a bar for launching / selecting applications
  • All applications could be made to run full screen for simplicity of UI
  • Synth engines with GUI, e.g. ZynAddSubFX could display this on the external monitor
  • It may be advantageous to configure whether engine GUI is displayed - it can add overhead to resource usage (memory / cpu)
  • External display could be automatically enabled when HDMI monitor detected - this may also allow automatic option for engine GUI display
  • Mouse / keyboard input could be directed to external display window manager if external display is detected or a keyboard shortcut could be used to swap between external and main display, similar to a KVM switch
  • A selection of useful applications could be available to launch from the panel manager, e.g. web browser access to webconf, patchage, zynmixer, remote display for zynseq, etc.
  • I don’t think we should provide a full desktop environment (like KDE) but something more contained. It should feel like an extension to the Zynthian UI, not a desktop operating system
  • We could host LV2 GUI on external display, maybe again with an option to enable

Started discussion here ahead of possible feature request on GitHub.

2 Likes

My 2 cents, I’d rather see the range of cuia commands greatly extended. This way a remote wireless screen (Android, iOS device) could be used as an advanced control surface for Zynthian. A two way connection using a custom OSC.

I’ve actually been working on this a few days at this point myself and I have the network end of things working to the point where I’m able to use my phone’s screen to operate my Zynthian wire free. It works great, I just need to design and build a UI that makes use of all the cuia commands that are available as right now. If that range of commands were extended, then the App I’m building could grow to make use of all that.

I’m writing all this with Unity 3D so I can also extend it to offer access to WebConfig from inside the app, or whatever is needed.

Regards
James

1 Like

@ronsum and I have done some work on Android remote access using OSC. We use DAWOSC as the Android client and use some features in the zynmixer branch of Zynthian.

I took a quick look at window managers today. A WM may not be required for such a simple requirement but I couldn’t find something which just fills the available space. I looked at a Python based WM but it isn’t packaged for Raspbian. I spent some time using bspwm which is a tiling window manager. It could be suitable. It handles multiple screen s (I haven’t tested that yet) and has a pipe for control so Zynthian could connect and control the WM. I’ll continue playing…

Did some experiments today and after learning a lot about the workings of xorg.conf finally got it working :smiley:: Dual framebuffers, two X-Servers, a working touchscreen and Zynaddsubfx, Qjackctl and other X stuff on an external HDMI display with it’s own trackball connected.
I have no time now but will post a howto with details soon.

6 Likes

More experiments this morning.
I am struggling with the starting order of the xservers. The problem is that when I start the second server AFTER zynthian.service, no synth guis are displayed because there is no X-display available at that time unless I restart zynthian.service manually. The other way round - starting the second server BEFORE zynthian - does not work as zynthian.service kills the second X-server.

Is there a command that allows restarting the zynthian audio backend (synth engines etc.) without restarting the X-Server ? This might help to get a Zynaddsubfx gui even after the zynthian ui has started.

The other option would be to configure the Zynthian UI that it does not kill an already running X-Server. Looking at the complexity of the scripts I do not know where to start.
Because I start the second server with the -sharevts -novtswitch options it does not kill the Zynthian UI. So getting these options into the zynthian.service start might be a way forward.

Am very interested in these possible enhancements - I have an external 15" touch monitor (HDMI and USB-C) ready and waiting.