First off, big thanks to @chrisys and @alexgg - this is my first time working with this level of Linux display configuration & issues, so your comments & help is greatly appreciated.
Side note - really loving all of the balena ecosystem - awesome stuff!
tl;dr - I’ve got it working now. It isn’t completely ideal, but it works for this PoC that I’m working on. If we roll out further, I may need to investigate why some of this stuff works the way it is right now.
On to the technical ramble…
Interesting…so I tried a different monitor, and it works on the Pi 4. So somehow, I was able to find a monitor that works with the Pi 3 on balenaOS, but not the Pi 4 (just to clarify, this monitor works fine with Raspbian on both devices).
Just to elaborate, though. When I have the monitor hooked up to the Pi 4 and boot it, the monitor displays back-lit-black, then a few seconds later, it switches to a ‘cable not detected’ screen. If I reboot, the ‘cable not detected’ screen goes away and the monitor shows back-lit-black for a bit. At no point have I gotten the balenaOS splash on this monitor (an old Acer X233H) with a Pi 4 running balenaOS.
However, (thanks to all your help!) I finally got dual screen working on the Pi 4. For anyone who stumbles across this, here are the gory details:
Currently, balenaOS sets:
automatically for Pi 4. Disabling either of theses (currently) causes balenaOS to not boot. However, with the config that I had working on the Pi 3, attempting to run
startx results in this error:
/usr/lib/xorg/Xorg: symbol lookup error: /usr/lib/xorg/modules/drivers/fbturbo_drv.so: undefined symbol: shadowUpdatePackedWeak
I ultimately decided to try disabling the
Option "fbdev" "/dev/fb*"
settings in my xorg.conf due to the
fbturbo_drv.so in that error. Apparently
vc4-fkms-v3d is some kind of simple wrapper that leverages the standard Linux display drivers, so fbturbo is no longer necessary (working?) on the Pi 4.
vc4-fkms-v3d causes the Pi to have a single fb (
/dev/fb0) which means that now, both of my monitors are displaying the same image. Luckily, the fb is sized correctly such that it’s width is correct - the width of both monitors combined.
In order to get around this, I can use a command like
xrandr --output HDMI-1 --pos 800x0 to force the HDMI monitor to start displaying from position 800x0 from the framebuffer and voila, it works.
This is definitely not ideal, but it is working for now. Bonus points - the Pi 4 is plenty fast for smooth 1080 video playback through Electron/chromium. I’ll definitely look at your colleagues project though and see what is going on. Being able to use Pi 3’s would be nice too.