info-beamer

Dual displays on rPi4

Has anyone been able to get this working? I’ve been strugling for days. I’m trying to drive dual 4K screens in the following configurations:
3840 2160 30 (Two 55 inch TCL Televisions)
2560 1080 60 (native resolution of two LG Ultra-Widescreen monitors)
1920 1080 60 (every combination and permutation of TCLs and LGs

Each one of these monitor/dual port configurations works fine with Raspberry Pi OS, requiring some tweaking of config.txt for most.

Used individually, each monitor works properly under IB on rPi4 using HDMI[0] alone.
Used individually, no monitor works properly under IB on rPi4 using HDMI[1] alone.
If I connect two monitors, one each to HDMI[0] and HDMI[1] I get no video output, and the rPi4 reboots periodically, presumably trying dofferent configurations. That is with any combination of ports, monitors, and confiuration parameters I’ve been able to come up with. My latest config params are:

hdmi_drive=2
disable_overscan=1
hdmi_group:0=2
hdmi_cvt:0=1920 1080 60
hdmi_mode:0=87
hdmi_group:1=2
hdmi_cvt:1=1920 1080 60
hdmi_mode:1=87

This setup will drive any of may monitors attached solo to HDMI:0 (port neaerst the power port). Under Raspberry Pi OS it will drive any combination of ports and monitors (with the possible exception of solo on HDMI:1).

Again, has anyone out there actually been able to drive dual monitors from and rPi4. Considering the cost and current scarcity of rPi4s this is a fairly important feature with my intended user base.

Any help, advice, words of encouragement, or, hell, even ridicule welcome at this point.

Thanks,

Jim Siler

Dual Full HD should work fine (I honestly didn’t try Dual 4K yet) and should not require manually modifying any configuration file. Instead you can use the dashboard device configuration editor and use one of the dual screen modes:

image

Can you try that?

Thanks again. I’m heading down to the basement to test. I’ll get back as soon as I have tried your suggestion and can report results.

Hi,
I tried 1080p 60Hz FullHD with no success (with both attached). I was able to do dual 1080P 50Hz from the web interface. That is marginally acceptable for my puposes, but not great. No way I could get dual 4K working. That’s a bit of a drag, but not huge.

Is there any way to get this to work with dual monitors of non-standard resolution? I tried with two LG 2516 x 1080 monitors and could get them to work mirrored, but not independently. I’m wondering if there is some magic to be done in the config files to tell IB the appropriate screen arangement as well as the monitor parameters.

I believe this has been asked before, but I’m unable to find the question now: is it possible to deal with the two monitors with some degree of independence. I know that it is possible to slice and dice the images to give the illusion, but it is awkward and an invitation to production errors.

Lastly (for now), the difference between


and

is less than obvious. I believe, based on trying them both, that the [1/2] one mirrors the screen while [1][2] spreads the image over HDMI:0 (left) and HDMI:1 (right). I think that a small legend on the screen would make things more friendly for the uninitiated.

Summary of questions:

  1. Is my assumption that the IB’s dual screen functionality on rPi4 is bandwidth limited to something in the neghborhood of 2 1920x1080 screens at 50 Hz or are there other things I should be trying?

  2. How can I get multiple (non-mirrored) screens to work with resolutions other than those in the web interface’s drop down list?

  3. Is there a strighforward way to use the two screens independently (e.g., send an image file to a specified monitor (possibly like the way desktop computers tend limit apps to a physical screen when displayed “full screen”.

And finally a suggestion to clarify the meanings of the various dual screen configuration icons.

Thanks much for your time, attention, and responses. I’m having an idecent amount of fun working with IB.

Jim Siler

There is. If you select any of the layout option other than mirrored, the device will have a file named /config/dual-layout.json with the following content:

{
    "dual_offset_x": 1920,
    "dual_offset_y": 0
}

The two values give the offset of the top-left corner of the second screen in relation to the top-left corner of the first screen. The above would place the second screen directly to the right of the first screen. I’ll see that this gets documented. I didn’t realize it’s not at the moment.

Would mouse over information help? It’s doing exactly what you guessed, but I can make it more clear.

I think I successfully ran it with 2xFullHD@60HZ. If it doesn’t work: I might take a look at this next week if you want. At least there should be an error message in the on device logs somewhere.

Create the custom resolution within /config/userconfig.txt and then use the dual-layout.json to place them.

Within lua there is a global array value in sys.displays. For two screens it contains two elements. Each is a table with x1, y1, x2 and y2 for the global coordinates of each screen. So if you want to place an image fully on the second screen you’d do:

image:draw(
    sys.displays[2].x1, sys.displays[2].y1,
    sys.displays[2].x2, sys.displays[2].y2,
)

Does that help?

Thanks Florian,
Your responsiveness and helpfulness are addictive :slight_smile: .
In order:
Q: “I’m wondering if there is some magic to be done in the config files …” + other configuration questions
Thanks, your answer is exactly what I was looking for.

Q: “Is my assumption that the IB’s dual screen functionality on rPi4 is bandwidth…”
It would be great to know if there is a way to greater resolution and/or refresh rates. If you have time to look, great. In general, my concern is that dual monitors may prove to be a major headache, requiring tweaks with every new hardware configuration.

FInally, A mouseover would be perfect, IMO. A generalized writeup on how to use rPi4 in dual-monitor mode would be very useful, and if I get far enough along with this I’s be happy to take a stab at it in a couple weeks.

Jim Siler

info-beamer - Digital Signage for the Raspberry Pi community forum - Imprint