Force HDMI port on Pi 5

I’m very new to Zynthian and raspberry pi use in general so please assume I don’t know anything. I have a raspberry pi 5 with a HiFiberry DAC hat running the stable oram release. I’m trying to run it headless but the real VNC viewer (installed as per Beginners Headless Zynthian Tutorial) will only display when the unit is booted with a display connected. I have tried to edit the config.txt in both the /boot/ and /boot/firmware directories to force HDMI on but this hasn’t work.
Any thoughts on this? Even better if you can suggest a way to make HDMI1 port active.
Otherwise I’m enjoying learning the zynthian!

Hi @RMunn! Welcome to the zynthian family.

First - DO NOT INSTALL VNC MANUALLY!!!

VNC is already installed on zynthian and installing another version will likely break it. To get VNC running on zynthian:

  • Install a fresh Oram image.
  • Boot and wait for reboot to complete.
  • Connect via network (direct or via hub) with browser to http://zynthian.local.
  • HARDWARE->Display: Select Generic HDMI/DSI Display then save.
  • INTERFACE->UI Options: Enable VNC Server then save
  • Reboot.

You should now have access to the zynthian UI via http://zynthian.local:6080/vnc.html.

Please try this and if it fails, come back and we can look at what may have broken recently. :wink:

[Edit] However… you are right that zynthian refuses to start without a display which seems to be a regression. Let’s look into that…

1 Like

This has been reported as issue 664 but not yet been progressed.

Micro hdmis are a nasty little connector.

1 Like

Thanks @riban I wil try and get the native VNC running on a fresh image.

So I loaded a fresh image and can access the native VNC as long as I boot with a display attached. Hopefully this can be fixed to allow headless use.

I can confirm this, I’ve managed to get an older oram working headlessly but not the new one, the older one was about a year ago maybe 10 months ago

I’m also having an issue getting this to work with oram… I’m pretty confident that this used to work

I agree it is broken and wonder whether it is a RPi5 thing? Has anyone experienced this with RPi4? It may be a Debian Bookworm change. We need more info on what hardware and software changes this stopped working.

I see yeah cause mine is also a pi 5, I was using an early oram before when it worked

I have just checked with a RPi4 and it does still work so this looks like a change of behaviour in the RPi5 compared with RPi4. Someone with some spare time should investigate further. This mode of operation is not required for the official kit, only for custom builds so I invite the community of custom builders to investigate further.

So I did found this page but I didn’t manage to get that to work, nor the old config.txt tricks for doing it

https://forums.raspberrypi.com/viewtopic.php?t=363503

I’m out of ideas on it but at least we have a reproducable error now, and know that its only pi5

@jofemodo I don’t remember if you roll your own kernel. If so, maybe kms is disabled?

@riban This does not only affect custom builders, but also potential new users trying out Zynthian on bare (raspi) metal (like me currently)…

I would expect most people testing zynthian to connect a HDMI monitor.

I have been doing some tests and have managed to get zynthian to run without a physical display connected… but it needs some consideration as to whether we want to take this approach as it would need some conditional logic that mustn’t interfere with normal operation.

I started an instance of vnc server, then an instance of novnc and then an instance of zynthian_main.

/usr/bin/vncserver -localhost no -rfbauth /root/.vnc/passwd :0cd /zynthian/zynthian-ui/ &
/zynthian/zynthian-sw/noVNC/utils/novnc_proxy --vnc localhost:5900 --listen 6080 &
DISPLAY=:0 ./zynthian_main.py &

This isn’t ideal. The UI is in a window in a desktop (but that is just config I haven’t looked at yet).

So, anything is possible… nothing is easy!

This really should have a ticket in the issue tracker. Anyone fancy raising one? How about you @RMunn as the OP? (I raise far too many tickets - I have my own loyalty card!)

I am thinking of a solutions where webconf, instead of having the current simple, enable VNC, has a dropdown that offers:

  • GUI displayed on DSI/HDMI 1 (Normal behaviour)
  • GUI displayed on DSI/HDMI 1 and VNC
  • GUI displayed on VNC only
  • GUI disabled (not yet possible but on our roadmap)

This would allow us to decide how the main UI is shown. We could have a checkbox or a dropdown to enable the desktop in a similar way, e.g.

  • Desktop disabled (default)
  • Desktop on DSI/HDMI 2
  • Desktop on DSI/HDMI 2 and VNC
  • Desktop on VNC only

We may wish to separate DSI and HDMI to seperate options to allow even more flexible use of video outputs and we should detect what outputs are available to display only those that are suitable.

Then it would be nice to have a hotkey to swap displays DSI/HDMI1 and DSI/HDMI2, so user could display native gui Desktop on the builtin screen to make adjustments using the touchscreen and then change back to Zynthian-UI.
Could be long-press Mix, instead of All Sounds Off, which is already available on long-press Stop/!.

Intersting idea. I am not sure how easy it would be to hot-swap displays. We don’t manage them with a single display manager like a desktop does and we write directly to the framebuffer for the main UI.

“I would expect most people testing zynthian to connect a HDMI monitor.”

I indeed have a HDMI connected, but it regularly shows the input from my main PC and I tend to access zynthian via SSH or VNC. This is sufficient for me for testing and also works with the laptop from the sofa… :wink:
Otherwise I’m a long-serving console junkie, so therefore I should not be considered a “standard new user”.

I looked at the /var/log/Xorg.0.log and it seems when not connected to an active display, we get an /dev/fb0 File not found, so I assume the problem starts during loading of Module fbdevhw.
Didn’t have time to investigate any further yet.

An hdmi monitor is a suitable lowest common denominator because without one you cannot find the ip address or name, which makes VNC & ssh access rather hit and miss. ( normally 20 minutes before the first song).

I like the idea of hdmi monitor selection, and @riban knows the feature request I’m thinking of.