Catch.Rahul
Posts: 6
Joined: Sun Jul 07, 2019 9:37 am

Pi4 - custom dual display configuration

Fri Jul 12, 2019 4:31 pm

Hello All,
I am fairly new to the Raspberry Pi world. I wanted to achieve dual display using Pi4 and the usage is as follows:

- hdmi0 to be used to connect a 2K LCD panel via adapter board
- hdmi1 port to be connected to 7" capacity touch interface via adapter board with custom UI interface programmed in Kivy.

Can this be achieved and kindly advice on the steps that are required to achieve this.


Earlier, I was on Pi3 and config.txt (below) worked like charm for 2k display and used Nextion display for custom UI interface:

Code: Select all

dmi_pixel_encoding=2
start_x=1
gpu_mem=128
disable_camera_led=1 
# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
disable_overscan= 1
# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=-16
#overscan_right=-16
#overscan_top=-16
#overscan_bottom=-16

#uncomment to force a console size. By default it will be display's size minus
# overscan.
framebuffer_width=1440
framebuffer_height=2560
max_framebuffer_width=1440 
max_framebuffer_height=2560

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
config_hdmi_boost=4 

# uncomment to force a specific HDMI mode (this will force VGA)
hdmi_group=2 
hdmi_mode=87

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
hdmi_drive=2
hdmi_cvt=1440 2560 48
hdmi_pixel_freq_limit=500000000
hdmi_ignore_edid=0xa5000080

# uncomment if hdmi display is not detected and composite is being output
hdmi_force_hotplug=1

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

hvs_priority=0x32ff
display_rotate=0x10000 
force_turbo=1 
enable_uart=1
disable_overscan=1 
framebuffer_depth=24
framebuffer_ignore_alpha=1

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6895
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Pi4 - custom dual display configuration

Sat Jul 13, 2019 9:57 am

Does your monitors have valid edids for the relevant modes? If so then it should just work.
Pi4 is using the Linux kernel standard drm/kms interface now for display mode setup, and it has far more comprehensive edid parsing than the firmware does. If the edid describes the mode correctly, then it should drive it directly.

If your display doesn't have a valid edid, then you can add a mode via xrandr if using X. There are similar low level calls to update the framebuffer size if not running X, but I can't quote them off the top of my head.

I am working on piping the settings through from tne firmware hdmi_timings into fkms, but it's not quite ready yet.
You will see some people recommending disabling the "dtoverlay=vc4-fkms-v3d" line from config.txt. You can do that, and then hdmi_timings= and hdmi_timings:1= will work to set up your two displays, however you will lose all hardware 3d support. Doing it though drm/kms is the better solution.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

aBUGSworstnightmare
Posts: 1358
Joined: Tue Jun 30, 2015 1:35 pm

Re: Pi4 - custom dual display configuration

Sun Jul 14, 2019 8:06 am

6by9 wrote:
Sat Jul 13, 2019 9:57 am
Does your monitors have valid edids for the relevant modes? If so then it should just work.
Pi4 is using the Linux kernel standard drm/kms interface now for display mode setup, and it has far more comprehensive edid parsing than the firmware does. If the edid describes the mode correctly, then it should drive it directly.

If your display doesn't have a valid edid, then you can add a mode via xrandr if using X. There are similar low level calls to update the framebuffer size if not running X, but I can't quote them off the top of my head.

I am working on piping the settings through from tne firmware hdmi_timings into fkms, but it's not quite ready yet.
You will see some people recommending disabling the "dtoverlay=vc4-fkms-v3d" line from config.txt. You can do that, and then hdmi_timings= and hdmi_timings:1= will work to set up your two displays, however you will lose all hardware 3d support. Doing it though drm/kms is the better solution.
hi 6by9,
Any schedule for these changes?
And, is there any dual display support for all other Pis (except Pi4) when using legacy driver?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6895
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Pi4 - custom dual display configuration

Sun Jul 14, 2019 8:46 am

aBUGSworstnightmare wrote:
Sun Jul 14, 2019 8:06 am
hi 6by9,
Any schedule for these changes?
And, is there any dual display support for all other Pis (except Pi4) when using legacy driver?
Adding new modes via xrandr should work now.
Plumbing from Hdmi_timings should be this week depending on interruptions.
All of the changes made to fkms for pi4 should also work on earlier Pis in fkms mode. Whether it is practical on pi0/1 I don't know.

Legacy driver has all the changes that James did to expose multiple /dev/fbN nodes. That'll also work on pi4 but you'll have no gl support. What other changes were you expecting?
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

aBUGSworstnightmare
Posts: 1358
Joined: Tue Jun 30, 2015 1:35 pm

Re: Pi4 - custom dual display configuration

Sun Jul 14, 2019 11:09 am

6by9 wrote:
Sun Jul 14, 2019 8:46 am
aBUGSworstnightmare wrote:
Sun Jul 14, 2019 8:06 am
hi 6by9,
Any schedule for these changes?
And, is there any dual display support for all other Pis (except Pi4) when using legacy driver?
Adding new modes via xrandr should work now.
Plumbing from Hdmi_timings should be this week depending on interruptions.
All of the changes made to fkms for pi4 should also work on earlier Pis in fkms mode. Whether it is practical on pi0/1 I don't know.

Legacy driver has all the changes that James did to expose multiple /dev/fbN nodes. That'll also work on pi4 but you'll have no gl support. What other changes were you expecting?
Well, as said, I'm not talking about Pi4 for dual-display! I have a baseboard for CM3L which worked fine with the dual-framebuffer beta by James, but no longer works with official Buster (latest release 10/07/19). But displays on their own work fine, but when I try using them together I only have HDMI.

Problem that I see is that both framebuffers were created, but only HDMI is active; DPI display has no data

Code: Select all

pi@raspberrypi:~ $ ls /dev/fb*
/dev/fb0  /dev/fb1
pi@raspberrypi:~ $ 
and

Code: Select all

pi@raspberrypi:~ $ tvservice -l
2 attached device(s), display ID's are : 
Display Number 0, type Main LCD
Display Number 2, type HDMI 0
pi@raspberrypi:~ $ 

aBUGSworstnightmare
Posts: 1358
Joined: Tue Jun 30, 2015 1:35 pm

Re: Pi4 - custom dual display configuration

Sun Jul 14, 2019 11:45 am

aBUGSworstnightmare wrote:
Sun Jul 14, 2019 11:09 am
6by9 wrote:
Sun Jul 14, 2019 8:46 am
aBUGSworstnightmare wrote:
Sun Jul 14, 2019 8:06 am
hi 6by9,
Any schedule for these changes?
And, is there any dual display support for all other Pis (except Pi4) when using legacy driver?
Adding new modes via xrandr should work now.
Plumbing from Hdmi_timings should be this week depending on interruptions.
All of the changes made to fkms for pi4 should also work on earlier Pis in fkms mode. Whether it is practical on pi0/1 I don't know.

Legacy driver has all the changes that James did to expose multiple /dev/fbN nodes. That'll also work on pi4 but you'll have no gl support. What other changes were you expecting?
Well, as said, I'm not talking about Pi4 for dual-display! I have a baseboard for CM3L which worked fine with the dual-framebuffer beta by James, but no longer works with official Buster (latest release 10/07/19). But displays on their own work fine, but when I try using them together I only have HDMI.

Problem that I see is that both framebuffers were created, but only HDMI is active; DPI display has no data

Code: Select all

pi@raspberrypi:~ $ ls /dev/fb*
/dev/fb0  /dev/fb1
pi@raspberrypi:~ $ 
and

Code: Select all

pi@raspberrypi:~ $ tvservice -l
2 attached device(s), display ID's are : 
Display Number 0, type Main LCD
Display Number 2, type HDMI 0
pi@raspberrypi:~ $ 
EDIT:
let me add to this: both displays are identical (10in WXGA resolution); EDID data can be found here (that's the file which I'm using https://drive.google.com/open?id=1ITc_e ... 420KWPr4vq
Bildschirmfoto 2019-07-14 um 13.31.49_small.png
disrupted 'framebuffer' when enabling FMKS on CM3L
Bildschirmfoto 2019-07-14 um 13.31.49_small.png (64.17 KiB) Viewed 705 times
When trying to use FKMS VNC shows me a totally disrupted 'framebuffer' https://drive.google.com/open?id=1ZsWDR ... nu0mMuY4LB

while the displays show this https://drive.google.com/open?id=1AFfkV ... URwsfV1Pii
IMG_1005_small.jpg
real display
IMG_1005_small.jpg (45.5 KiB) Viewed 694 times
here is my config.txt

Code: Select all

# ---------------------------------------------
# 2019/07/14 - LVDS3CM3L
# ---------------------------------------------

disable_overscan=1

#hdmi_force_hotplug=1
hdmi_ignore_edid=0xa5000080

hdmi_drive=1

dtoverlay=hifiberry-dac
dtoverlay=i2c0-bcm2708,pins_44_45
dtoverlay=i2s-gpio28-31
dtoverlay=i2s-mmap

gpu_mem=208

# ---------------------------------------------
# custom HDMI mode
# ---------------------------------------------
hdmi_group=2
hdmi_mode=87
framebuffer_depth=32

# ---------------------------------------------
# DPI timing definitions LQ101K1LW02
# ---------------------------------------------
hdmi_timings=1280 0 160 48 48 800 0 23 6 8 0 0 0 60 0 71100000 5
dpi_timings=1280 0 160 48 48 800 0 23 6 8 0 0 0 60 0 71100000 5
dpi_output_format=458791

#dtoverlay=dpi24
gpio=0-27=a2,np
enable_dpi_lcd=1
dpi_group=2
dpi_mode=87

hdmi_edid_file=1

enable_uart=0

[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
dtoverlay=vc4-fkms-v3d
max_framebuffers=2

[all]
dtoverlay=vc4-fkms-v3d
max_framebuffers=2
Note: as reported already 'dtoverlay=dpi24' is not working with FMKS driver, regardless of the platform (Rpi3 or Rpi4); I need to use GPIO command for configuring DPI interface

Code: Select all

#dtoverlay=dpi24
gpio=0-27=a2,np
Working with the disrupted screen is impossible; screen configuration tools fans to change alignment/placement of the displays. DSI display is always primary; size shown in config tool is different for both screens (again;: both are the same)

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 22724
Joined: Sat Jul 30, 2011 7:41 pm

Re: Pi4 - custom dual display configuration

Sun Jul 14, 2019 12:27 pm

If you do

Code: Select all

cat /dev/urandom > /dev/fb0 
cat /dev/urandom > /dev/fb1
do they both display something random?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

aBUGSworstnightmare
Posts: 1358
Joined: Tue Jun 30, 2015 1:35 pm

Re: Pi4 - custom dual display configuration

Sun Jul 14, 2019 12:32 pm

jamesh wrote: If you do

Code: Select all

cat /dev/urandom > /dev/fb0 
cat /dev/urandom > /dev/fb1
do they both display something random?
Yes (did this test with FMKS disabled); screens are filled entirely with random data.

under FMKS 'cat /dev/urandom > /dev/fb0' fills both displays with random data (as expected)

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 22724
Joined: Sat Jul 30, 2011 7:41 pm

Re: Pi4 - custom dual display configuration

Mon Jul 15, 2019 10:11 am

So the framebuffers are working correctly.

What is not actually working?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6895
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Pi4 - custom dual display configuration

Mon Jul 15, 2019 10:12 am

Please keep the two threads separate

Thread title:"Pi4 - custom dual display configuration"
First post: "I wanted to achieve dual display using Pi4 "
Fifth post: "Well, as said, I'm not talking about Pi4 for dual-display"
??!?!

So now I have no idea whether any of your posts are for Pi3 or Pi4, at which point I drop out of providing support.

Keep this thread to Pi4 dual displays, and start a new thread with full details of your Pi3/CM3 issues.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

aBUGSworstnightmare
Posts: 1358
Joined: Tue Jun 30, 2015 1:35 pm

Re: Pi4 - custom dual display configuration

Mon Jul 15, 2019 10:23 am

jamesh wrote:
Mon Jul 15, 2019 10:11 am
So the framebuffers are working correctly.

What is not actually working?
There is no display on the second framebuffer! Yes, I can write random data to it but that's of no particular use.

To me it looks like the code from 'dual framebuffer testing' is either ported incomplete or no longer working.
6by9 wrote: Please keep the two threads separate

Thread title:"Pi4 - custom dual display configuration"
First post: "I wanted to achieve dual display using Pi4 "
Fifth post: "Well, as said, I'm not talking about Pi4 for dual-display"
??!?!

So now I have no idea whether any of your posts are for Pi3 or Pi4, at which point I drop out of providing support.

Keep this thread to Pi4 dual displays, and start a new thread with full details of your Pi3/CM3 issues.
There is a thread for this by me already (https://www.raspberrypi.org/forums/view ... 0#p1486670) but nobody was answering so far... To me it looks like with release of RPi4 all issues related to Rpi3 get's abandoned
I do exactly what you're prposing here https://www.raspberrypi.org/forums/view ... 0#p1486790 - means using EDID.dat file - but that's doesn't solve the problem as you can see from my recent postings here

Please explain to me why VNC shows the same disruppted framebuffer as I see on my screens and how you guys can tell 'all fine'!

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 22724
Joined: Sat Jul 30, 2011 7:41 pm

Re: Pi4 - custom dual display configuration

Mon Jul 15, 2019 10:36 am

aBUGSworstnightmare wrote:
Mon Jul 15, 2019 10:23 am
jamesh wrote:
Mon Jul 15, 2019 10:11 am
So the framebuffers are working correctly.

What is not actually working?
There is no display on the second framebuffer! Yes, I can write random data to it but that's of no particular use.

To me it looks like the code from 'dual framebuffer testing' is either ported incomplete or no longer working.
6by9 wrote: Please keep the two threads separate

Thread title:"Pi4 - custom dual display configuration"
First post: "I wanted to achieve dual display using Pi4 "
Fifth post: "Well, as said, I'm not talking about Pi4 for dual-display"
??!?!

So now I have no idea whether any of your posts are for Pi3 or Pi4, at which point I drop out of providing support.

Keep this thread to Pi4 dual displays, and start a new thread with full details of your Pi3/CM3 issues.
There is a thread for this by me already (https://www.raspberrypi.org/forums/view ... 0#p1486670) but nobody was answering so far... To me it looks like with release of RPi4 all issues related to Rpi3 get's abandoned
I do exactly what you're prposing here https://www.raspberrypi.org/forums/view ... 0#p1486790 - means using EDID.dat file - but that's doesn't solve the problem as you can see from my recent postings here

Please explain to me why VNC shows the same disruppted framebuffer as I see on my screens and how you guys can tell 'all fine'!
So, the frame buffers are working, both in legacy and FKMS but you do not have the desktop on it? This is not done by default on older devices in legacy mode (unlike pi4, where using FKMS means it all works out of the box). You will need to set up X to use multiple displays. This is described in the previous dual display thread, I'll try and dig it up.

But I would expect when using FKMS that the desktop would be extended over both displays. What does the screen configuration utility do?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

aBUGSworstnightmare
Posts: 1358
Joined: Tue Jun 30, 2015 1:35 pm

Re: Pi4 - custom dual display configuration

Mon Jul 15, 2019 10:43 am

jamesh wrote: So, the frame buffer is working, but you do not have the desktop on it? This is not done by default on older devices (unlike pi4, where using FKMS means it all works out of the box). You will need to set up X to use multiple displays. This is described in the previous dual display thread, I'll try and dig it up.
Exactly. Well ... I was under the impression that this will work now because of this statement by 6by9
Legacy driver has all the changes that James did to expose multiple /dev/fbN nodes. That'll also work on pi4 but you'll have no gl support. What other changes were you expecting?
If some 'adjustments' need to be made then it will not work on Pi4 with legacy driver either, right?

This would explain why legacy driver doesn't work as expected, but still doesn't explain why new FMKS/DRM driver - with custom resolution and timing from EDID file - fails to work (doesn't work 'out of the box' on old devices when new driver is enabled).

aBUGSworstnightmare
Posts: 1358
Joined: Tue Jun 30, 2015 1:35 pm

Re: Pi4 - custom dual display configuration

Mon Jul 15, 2019 12:11 pm

jamesh wrote:
Mon Jul 15, 2019 10:36 am
But I would expect when using FKMS that the desktop would be extended over both displays. What does the screen configuration utility do?
well, there is some desktop , but neither correct not extended entirely (!) over both displays.

The screen configuration utility fails (as described in the post above); the picture and screenshot were showing 'my FMKS desktop'. Using the system is impossible, either from it's own desktop nor via a VNC session.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6895
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Pi4 - custom dual display configuration

Mon Jul 15, 2019 1:11 pm

aBUGSworstnightmare wrote:
Mon Jul 15, 2019 10:43 am
jamesh wrote: So, the frame buffer is working, but you do not have the desktop on it? This is not done by default on older devices (unlike pi4, where using FKMS means it all works out of the box). You will need to set up X to use multiple displays. This is described in the previous dual display thread, I'll try and dig it up.
Exactly. Well ... I was under the impression that this will work now because of this statement by 6by9
Legacy driver has all the changes that James did to expose multiple /dev/fbN nodes. That'll also work on pi4 but you'll have no gl support. What other changes were you expecting?
If some 'adjustments' need to be made then it will not work on Pi4 with legacy driver either, right?
You've followed the old thread. X has never had native support for writing to multiple /dev/fbN devices, you have to use xinerama or similar. That will never change. If you thought it would then that was a big assumption on your part.

All the work done by James to expose multiple /dev/fbN nodes is merged and should be working. (By the sounds of it it is, as you can cat /dev/urandom to the framebuffer).
aBUGSworstnightmare wrote:This would explain why legacy driver doesn't work as expected, but still doesn't explain why new FMKS/DRM driver - with custom resolution and timing from EDID file - fails to work (doesn't work 'out of the box' on old devices when new driver is enabled).
I could expend the time downloading your EDIDs to try to replicate thereby delaying implementing propagation of hdmi_timings, or you can run "xrandr" for yourself to see where X is dumping the displays.
For me on a Pi4 with a 4k and a 1080p screen attached and configured as 4k to the left of the 1080p, I get:

Code: Select all

pi@raspberrypi:~ $ DISPLAY=:0 xrandr
Screen 0: minimum 320 x 200, current 5760 x 2160, maximum 7680 x 7680
HDMI-1 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 609mm x 349mm
   3840x2160     30.00*   30.00    25.00    25.00    24.00    24.00    29.97    23.98  
   2560x1440     59.95  
   2048x1280     59.99  
   2048x1080     24.00  
   1920x1080     60.00    60.00    50.00    59.94    30.00    25.00    24.00    29.97    23.98  
   1600x1200     60.00  
   1600x900      60.00  
   1280x1024     75.02    60.02  
   1152x864      75.00  
   1280x720      60.00    50.00    59.94  
   1024x768      75.03    60.00  
   800x600       75.00    60.32  
   720x576       50.00    50.00  
   720x480       60.00    60.00    59.94    59.94  
   640x480       75.00    60.00    59.94    59.94  
   720x400       70.08  
HDMI-2 connected 1920x1080+3840+0 (normal left inverted right x axis y axis) 527mm x 296mm
   1920x1080     60.00*+  60.00    50.00    59.94  
   1600x1200     60.00  
   1280x1024     75.02    60.02  
   1152x864      75.00  
   1280x720      60.00    60.00    50.00    59.94  
   1024x768      75.03    60.00  
   800x600       75.00    60.32  
   720x576       50.00    50.00  
   720x480       60.00    60.00    59.94    59.94    59.94  
   640x480       75.00    60.00    59.94    59.94  
   720x400       70.08  
HDMI-1 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 609mm x 349mm
HDMI-2 connected 1920x1080+3840+0 (normal left inverted right x axis y axis) 527mm x 296mm
The resolution is <width>x<height>+<xoffset>+<yoffset>
So what is your configuration?

Pi3 is not being ignored, but there are a lot of balls in the air at present to expose more functionality on all platforms. Forum threads get attention as and when time allows, and some will occasionally get missed.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

aBUGSworstnightmare
Posts: 1358
Joined: Tue Jun 30, 2015 1:35 pm

Re: Pi4 - custom dual display configuration

Mon Jul 15, 2019 4:32 pm

6by9 wrote: All the work done by James to expose multiple /dev/fbN nodes is merged and should be working. (By the sounds of it it is, as you can cat /dev/urandom to the framebuffer).
Yes, two frame buffers are generated - I've never denied that (refer to my post above; there you can see display #0 and #2 are connected.
I can also use 'framebuffer_priority' command for switching them, but I never get a desktop on both of them!
6by9 wrote: I could expend the time downloading your EDIDs to try to replicate thereby delaying implementing propagation of hdmi_timings, or you can run "xrandr" for yourself to see where X is dumping the displays.
For me on a Pi4 with a 4k and a 1080p screen attached and configured as 4k to the left of the 1080p, I get:
Which EDID did you use? The problem is with 2x 10.1in WXGA resolution displays, one is connected to HDMI, the other one to DPI. Both displays are the same, EDID data of the display is this one https://drive.google.com/open?id=1ITc_e ... 420KWPr4vq
6by9 wrote: Pi3 is not being ignored, but there are a lot of balls in the air at present to expose more functionality on all platforms. Forum threads get attention as and when time allows, and some will occasionally get missed.
You may know that I did a lot of testing of the dual-framebuffer beta, posting my findings and helping others to get it running.
I've pointed out this issue several times already but all that has been suggested isn't working (i.e. using EDID.dat file to get FMKS running with custom timing). There is an issue with the dpi24 overlay doing nothing (also reported).
What I will do tomorrow is a test to see if EDID.dat file on a Rpi4 (with one WXGA display connected to DPI) is working.

Nevertheless, before adding 'more functionality' it might be a good idea to get the existing one working correctly. By the time when I started to ask for dual display support I was given the answer by some foundations members 'might be a pretty edge use case' and now a RPI offers exactly that possibility.

As you still 'claim all is running' what about showing it to us? You guys at RPi foundation have a Adafruit kippah and ton's of monitors. So why not test - lets say with a Full-HD monitor on HDMI and the DPI display connected - to a RPI3 with legacy driver as well as with FMKS and post the evidence (and the config file used) here. Then I can replicate and report back, rather then hearing 'it should be working'! You either no it works or know it doesn't, but saying 'it should' is equal to 'I don't know'.

aBUGSworstnightmare
Posts: 1358
Joined: Tue Jun 30, 2015 1:35 pm

Re: Pi4 - custom dual display configuration

Mon Jul 15, 2019 4:55 pm

So, I would say the pottation of dual framebuffer support with legacy driver is incomplete!

when I look at

Code: Select all

nano /usr/share/X11/xorg.conf.d/99-fbturbo.conf
I only see below, but not what we've used in the testing (https://www.raspberrypi.org/forums/view ... 5#p1416171)

Code: Select all

# This is a minimal sample config file, which can be copied to
# /etc/X11/xorg.conf in order to make the Xorg server pick up
# and load xf86-video-fbturbo driver installed in the system.
#
# When troubleshooting, check /var/log/Xorg.0.log for the debugging
# output and error messages.
#
# Run "man fbturbo" to get additional information about the extra
# configuration options for tuning the driver.

Section "Device"
        Identifier      "Allwinner A10/A13 FBDEV"
        Driver          "fbturbo"
        Option          "fbdev" "/dev/fb0"

        Option          "SwapbuffersWait" "true"
EndSection

Do I still need to use 'startx -- -layout Multihead' to get dual framebuffer on RP3? Will it work on Zero an other devices as well? What is the new assignment of the screens (I think 7 is now HDMI1 on Rpi4, right) for accessing the frame buffers (also valid for OMXplayer i.e.) as there is no documentation of 'framebuffer_priority' command.

Code: Select all

#  desktop display will default to the LCD (fb0)
# This will force the specified display to be the first in the list, i.e. /dev/fb0
# Actually this is the full set:
# MAIN_LCD 0
# AUX_LCD 1
# HDMI 2
# SDTV 3
framebuffer_priority=2
And - why do you have

Code: Select all

[all]
#dtoverlay=vc4-fkms-v3d
max_framebuffers=2
In a standard config file if it doesn't work with only specifying number of framebuffers to be created?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6895
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Pi4 - custom dual display configuration

Mon Jul 15, 2019 5:09 pm

I've just noticed that the OP is not aBUGSworstnightmare, therefore he's hijacked the original request and that has lead to a load of my confusion.
aBUGSworstnightmare wrote:
Mon Jul 15, 2019 4:32 pm
6by9 wrote: I could expend the time downloading your EDIDs to try to replicate thereby delaying implementing propagation of hdmi_timings, or you can run "xrandr" for yourself to see where X is dumping the displays.
For me on a Pi4 with a 4k and a 1080p screen attached and configured as 4k to the left of the 1080p, I get:
Which EDID did you use? The problem is with 2x 10.1in WXGA resolution displays, one is connected to HDMI, the other one to DPI. Both displays are the same, EDID data of the display is this one https://drive.google.com/open?id=1ITc_e ... 420KWPr4vq
The ones provided by the monitors.
I have also had an VGA666 hooked up and happily driving HDMI0 and DPI. VGA666 needed dpi_group=1, dpi_mode=16, and gpio=2-21=a2. Tested on both Pi3 and Pi4.
aBUGSworstnightmare wrote:
6by9 wrote: Pi3 is not being ignored, but there are a lot of balls in the air at present to expose more functionality on all platforms. Forum threads get attention as and when time allows, and some will occasionally get missed.
You may know that I did a lot of testing of the dual-framebuffer beta, posting my findings and helping others to get it running.
For which we are very grateful.
aBUGSworstnightmare wrote:I've pointed out this issue several times already but all that has been suggested isn't working (i.e. using EDID.dat file to get FMKS running with custom timing).
We haven't the resource to debug each and every EDID issue.
aBUGSworstnightmare wrote:I've pointed out this issue several times already but all that has been suggested isn't working (i.e. using EDID.dat file to get FMKS running with custom timing). There is an issue with the dpi24 overlay doing nothing (also reported).
Reported on a forum post in Troubleshooting, and no apparent further action from you when recommended that the Device Tree subforum was the better bet, or raise it on Github.
aBUGSworstnightmare wrote:What I will do tomorrow is a test to see if EDID.dat file on a Rpi4 (with one WXGA display connected to DPI) is working.

Nevertheless, before adding 'more functionality' it might be a good idea to get the existing one working correctly. By the time when I started to ask for dual display support I was given the answer by some foundations members 'might be a pretty edge use case' and now a RPI offers exactly that possibility.
So do you want to be able to provide custom timings via config.txt, or don't you?
On a Pi3 it was (and still is) an edge case. On Pi4 the majority are using dual HDMI which is working happily except with dodgy EDIDs.
aBUGSworstnightmare wrote:As you still 'claim all is running' what about showing it to us? You guys at RPi foundation have a Adafruit kippah and ton's of monitors. So why not test - lets say with a Full-HD monitor on HDMI and the DPI display connected - to a RPI3 with legacy driver as well as with FMKS and post the evidence (and the config file used) here. Then I can replicate and report back, rather then hearing 'it should be working'! You either no it works or know it doesn't, but saying 'it should' is equal to 'I don't know'.
I tested on the Pi3 before the Buster release.
I haven't necessarily tested on the absolute latest firmware/kernel, regressions happen therefore I will not 100% guarantee it will still work, therefore "should" is a very appropriate word.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

aBUGSworstnightmare
Posts: 1358
Joined: Tue Jun 30, 2015 1:35 pm

Re: Pi4 - custom dual display configuration

Mon Jul 15, 2019 6:56 pm

I know how to deal with custom timings and how to create EDID data, so I'm fine with both. I also have a EDID EEPROM on my board, but why should I bother myself with programming it if uisng the file fails to configure the driver correctly.

Custom hdmi timings is what is documented here, there is nothing on EDID. As there are lots of examples on the forum for hdmi_timings as well I surely want to keep it.

O.k. I will stop hijacking this post and take the time for some testing tomorrow. I will be using an HDMI monitor which requires custom timing, a Adafruit 5in Kippah (settings posted at bottom of this page https://www.raspberrypi.org/documentati ... /README.md) and test with Rpi3 and Rpi4 and then open a new thread. Let me know which sub-forum suits best.
I will start with a freshly downloaded image because that's all what 'the average Joe' has.

Will also take a camera with me for recording some footage.

Catch.Rahul
Posts: 6
Joined: Sun Jul 07, 2019 9:37 am

Re: Pi4 - custom dual display configuration

Tue Jul 16, 2019 6:50 am

As suggested initially to add new mode via xrandr incase EDID was unavailable. I am facing some issues in adding a new mode below is the error I face. Can you please help me resolve this.

Note: Modeline was generated using gtf command.

Code: Select all

~$ sudo -E xrandr --verbose --newmode "1440x2560_48.00"  250.46  1440 1552 1712 1984  2560 2561 2564 2630  -HSync +Vsync

X Error of failed request:  BadRequest (invalid request code or no such operation)
  Major opcode of failed request:  146 (RANDR)
  Minor opcode of failed request:  25 (RRGetScreenResourcesCurrent)
  Serial number of failed request:  11
  Current serial number in output stream:  11
Also, can you please let me know when direct piping from config file via hdmi_timing will be made available. Thanks!

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6895
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Pi4 - custom dual display configuration

Tue Jul 16, 2019 3:20 pm

hdmi_timing/hdmi_group/hdmi_mode in FKMS changes ready, but need to got through the process to be released into the wild.
Kernel side is https://github.com/raspberrypi/linux/pull/3082, but it's not going to do much without the firmware side.

Pi4, DPI (via VGA666) @ 1080p, HDMI0 @ 1080p.
https://drive.google.com/file/d/1sVpM_a ... sp=sharing

Code: Select all

max_framebuffers=2
dtoverlay=vc4-fkms-v3d
enable_dpi_lcd=1
dpi_group=1
dpi_mode=16
gpio=0-21=a2
(I haven't used Phil's updated dpi18 overlay yet).

I'm rebuilding for Pi3 to confirm that the hdmi_timing/hdmi_group/hdmi_mode changes work there too, and will do the same test.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6895
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Pi4 - custom dual display configuration

Tue Jul 16, 2019 5:01 pm

OK, Pi3 V3D does appear to have a rendering issue, but only because the maximum resolution isn't being clipped to 2048x2048. I need to check why the conditional at https://github.com/raspberrypi/linux/bl ... kms.c#L432 isn't altering the max render area.
I had forgotten that restriction applied on Pi3 (It's nominally 8k x 8k on Pi4, but something goes squiffy at the very top end, hence 7680x7680).

Code: Select all

pi@raspberrypi:~ $ DISPLAY=:0 xrandr
Screen 0: minimum 320 x 200, current 1920 x 1440, maximum 7680 x 7680 <<<<<<
DSI-1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   FIXED_MODE    60.00*+
HDMI-1 connected primary 1920x1080+0+360 (normal left inverted right x axis y axis) 527mm x 296mm
   1920x1080     60.00*+  60.00    50.00    59.94  
   1600x1200     60.00  
   1280x1024     75.02    60.02  
   1152x864      75.00  
   1280x720      60.00    60.00    50.00    59.94  
   1024x768      75.03    60.00  
   800x600       75.00    60.32  
   720x576       50.00    50.00  
   720x480       60.00    60.00    59.94    59.94    59.94  
   640x480       75.00    60.00    59.94    59.94  
   720x400       70.08  
That maximum should be reading 2048 x 2048 for vc4.

Dropping the DPI and HDMI resolutions down to XGA, and I can do side by side fine.
On WXGA (1366x768, hdmi_group=2, hdmi_mode=81), you'll be able to run them as top and bottom, but not side by side. If X has started and messed things up, then "DISPLAY=:0 xrandr --output HDMI-1 --same-as DSI-1" should be able to reset the two displays to being duplicates.
https://drive.google.com/file/d/1YzLgSk ... sp=sharing
(The right monitor showing as 4:3 is because the monitor doesn't auto switch aspect ratio and I had it set to 4:3).
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

aBUGSworstnightmare
Posts: 1358
Joined: Tue Jun 30, 2015 1:35 pm

Re: Pi4 - custom dual display configuration

Tue Jul 16, 2019 7:16 pm

Thanks for letting us know!

On the RPI3 I could operate two WXGA (1280*800) side by side.
Will test updated DPI24 overlay tomorrow (no time for doing it today).

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6895
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Pi4 - custom dual display configuration

Wed Jul 17, 2019 9:06 am

aBUGSworstnightmare wrote:
Tue Jul 16, 2019 7:16 pm
On the RPI3 I could operate two WXGA (1280*800) side by side.
I'm assuming you mean Rpi3 with legacy drivers (I'm also running on a RPi3).
That would have been using Xinerama and have had no hardware acceleration using the 3D hardware. Xinerama also has to do a load of extra work as objects get dragged between the two windows.

If you wish to use legacy mode then that is still there and you'll need all the configuration options you needed before.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

aBUGSworstnightmare
Posts: 1358
Joined: Tue Jun 30, 2015 1:35 pm

Re: Pi4 - custom dual display configuration

Wed Jul 17, 2019 9:18 am

6by9 wrote:
Wed Jul 17, 2019 9:06 am
aBUGSworstnightmare wrote:
Tue Jul 16, 2019 7:16 pm
On the RPI3 I could operate two WXGA (1280*800) side by side.
I'm assuming you mean Rpi3 with legacy drivers (I'm also running on a RPi3).
That would have been using Xinerama and have had no hardware acceleration using the 3D hardware. Xinerama also has to do a load of extra work as objects get dragged between the two windows.

If you wish to use legacy mode then that is still there and you'll need all the configuration options you needed before.
Well, which driver to be used would depend on the screen resolution (combined for both displays) to be driven.

I ran the legacy driver (in dual framebuffer beta) on the Rpi3 with a FHD and WXGA screen (don't had a second FHD available at the time of doing that test), so what is the limit of the new driver then? Is it really 2048x2048pixels for the new driver? If that's the case than two XGA modules (side by side) would be max. A WXGA (1280x800) + SVGA (800x480) in landscape would fail, rotating it to portrait should work.

Hmm, will have to see in operation...

Return to “General discussion”