User avatar
procount
Posts: 1651
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: Multiple Frame buffer beta testers wanted

Fri Sep 07, 2018 9:17 am

@JamesH - Please don't forget to test it in a version of Raspbian that is installed by NOOBS/PINN because it didn't work for me
(https://www.raspberrypi.org/forums/view ... 5#p1336631).
Also the overscan behaviour with start_x needs restoring to the original behaviour.
(https://www.raspberrypi.org/forums/view ... 5#p1336653)
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

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

Re: Multiple Frame buffer beta testers wanted

Fri Sep 07, 2018 9:29 am

jamesh wrote:
Fri Sep 07, 2018 9:00 am

DSI1 is the only DSI port exported on the standard Pi's. Only the CM exposes DSI0. I am actually not sure whether this will work with two displays on a CM3, never tried it. I suppose I should! DPI+DSI doesn't work due to a HW limitation but two DSI should be OK.
I know that DSI1 is the display port on standard Pi's and DSI0 will be available on CM based solutions only. I'm pretty sure you have two 7in modules on hand for a quick trial.

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

Re: Multiple Frame buffer beta testers wanted

Fri Sep 07, 2018 9:37 am

aBUGSworstnightmare wrote:
Fri Sep 07, 2018 9:29 am
jamesh wrote:
Fri Sep 07, 2018 9:00 am

DSI1 is the only DSI port exported on the standard Pi's. Only the CM exposes DSI0. I am actually not sure whether this will work with two displays on a CM3, never tried it. I suppose I should! DPI+DSI doesn't work due to a HW limitation but two DSI should be OK.
I know that DSI1 is the display port on standard Pi's and DSI0 will be available on CM based solutions only. I'm pretty sure you have two 7in modules on hand for a quick trial.
That won't work without driver changes. The driver currently has various static structures in it that will cause "interesting effects" should you try instantiating two of them (which the framework currently won't do either).

Also note that the dt-blob defines are DISPLAY_I2C_PORT, DISPLAY_SDA, DISPLAY_SCL. You'd need at least DISPLAY_1_[I2C_PORT|SDA|SCL] to allow configuration of the second display otherwise you have a clash of I2C addresses for the bridge chips and touchscreens. Compare that to the camera config where you already have CAMERA_0_ and CAMERA_1_ defines.
And don't ask me how the two touchscreen interfaces co-exist - that gets too scary!

Never say never, but the Linux drivers may be the more sensible thing to look into should you want dual DSI.
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.

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

Re: Multiple Frame buffer beta testers wanted

Fri Sep 07, 2018 9:50 am

There's also an issue with the touchscreen driver only allows one instantiation. No idea why it wasn't done 'properly' when first writen - I guess the concept of multiple displays and hence multi touchscreens was not yet gestating and anything else seemed a waste of time.
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: 1338
Joined: Tue Jun 30, 2015 1:35 pm

Re: Multiple Frame buffer beta testers wanted

Fri Sep 07, 2018 10:07 am

Thanks guys! Did not think of the dt-blob thing with two displays (as well as other related topics)..
So, best to forget this question was ever asked :oops:

Let's take what we know is working and forget about the rest for now.

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

Re: Multiple Frame buffer beta testers wanted

Mon Sep 10, 2018 1:26 pm

This is a slightly newer version of start_x.elf

https://drive.google.com/open?id=1sT902 ... gRGAjrjrWA

It now supports a "max_framebuffers" item in config.txt, can bet set to 1 or 2. Defaults to one, so you will need to set to 2 to get multi framebuffer support. This is to make things a bit more backwards compatible.

Also, when you have two displays, the desktop display will default to the LCD (fb0) which I think makes it a bit more backwards compatible to the single FB firmware, but open to comments on that one.
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: 1338
Joined: Tue Jun 30, 2015 1:35 pm

Re: Multiple Frame buffer beta testers wanted

Mon Sep 10, 2018 1:46 pm

Hi jamesh,

thanks for the update! Will it work on 4.14.68-v7+ (latest kernel after rpi-update)?

Would it be possible to select the display which gets assigned to fb0 (Desktop) as this defaults to LCD atm.?

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

Re: Multiple Frame buffer beta testers wanted

Mon Sep 10, 2018 1:52 pm

aBUGSworstnightmare wrote:
Mon Sep 10, 2018 1:46 pm
Hi jamesh,

thanks for the update! Will it work on 4.14.68-v7+ (latest kernel after rpi-update)?

Would it be possible to select the display which gets assigned to fb0 (Desktop) as this defaults to LCD atm.?
I think so, I haven't made any changes that will affect the kernel side. I hope!

I was wondering about somehow specifying which goes to fb0, I'll think some more.
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."

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

Re: Multiple Frame buffer beta testers wanted

Mon Sep 10, 2018 3:15 pm

OK, try this one. https://drive.google.com/open?id=1sT902 ... gRGAjrjrWA

Added another config.txt entry

framebuffer_priority=x

where x = 0 for LCD, 2 for HDMI. 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
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: 1338
Joined: Tue Jun 30, 2015 1:35 pm

Re: Multiple Frame buffer beta testers wanted

Tue Sep 11, 2018 9:04 am

Hi jamesh,

just made a test on my DSI + HDMI unit which I always used for testing.
Made

Code: Select all

sudo apt-get update
sudo apt-get upgrade
sudo rpi-update
to give me the latest status, then copied your 'start_x.elf' into /boot.

Added below to my 'config.txt'

Code: Select all

# defaults to 1. Set to 2 for dual-display
max_framebuffers=2

#  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
which should give me 2 frame buffers and the desktop on HDMI monitor.

Rebooted, both displays show rainbow screen, but I only have one frame buffer created.
fb0 is on HDMI,

Code: Select all

ls /dev/fb*
shows that only fb0 9s created. Rainbow screen stays on DSI display.

Any idea what I've missed here?

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

Re: Multiple Frame buffer beta testers wanted

Tue Sep 11, 2018 9:18 am

Hmm, dunno. Will test it here although that is a combination I tried.
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."

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

Re: Multiple Frame buffer beta testers wanted

Tue Sep 11, 2018 1:41 pm

aBUGSworstnightmare wrote:
Tue Sep 11, 2018 9:04 am
Hi jamesh,

just made a test on my DSI + HDMI unit which I always used for testing.
Made

Code: Select all

sudo apt-get update
sudo apt-get upgrade
sudo rpi-update
to give me the latest status, then copied your 'start_x.elf' into /boot.

Added below to my 'config.txt'

Code: Select all

# defaults to 1. Set to 2 for dual-display
max_framebuffers=2

#  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
which should give me 2 frame buffers and the desktop on HDMI monitor.

Rebooted, both displays show rainbow screen, but I only have one frame buffer created.
fb0 is on HDMI,

Code: Select all

ls /dev/fb*
shows that only fb0 9s created. Rainbow screen stays on DSI display.

Any idea what I've missed here?
Just tried that and it worked fine, so not sure what is going on.
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: 1338
Joined: Tue Jun 30, 2015 1:35 pm

Re: Multiple Frame buffer beta testers wanted

Tue Sep 11, 2018 2:44 pm

Hi,
just used the kernel7.img from here - https://www.raspberrypi.org/forums/view ... 0#p1351325 - and got it back working

'uname -a' then gives me 4.14.61

Code: Select all

Linux raspberrypi 4.14.61-v7+ #315 SMP Fri Aug 10 10:20:01 BST 2018 armv7l GNU/Linux
before using the kernel7.img it was 4.14.62 - which did not work.

'framebuffer_priority=x' works smoothly (as you can see from the screenshots). Screens in use are 7in DSI and Full-HD on HDMI
2018-09-11-163841_2720x1080_scrot.jpg
framebuffer_priority=2
2018-09-11-163841_2720x1080_scrot.jpg (40.68 KiB) Viewed 2290 times
2018-09-11-163726_2720x1080_scrot.jpg
framebuffer_priority=0
2018-09-11-163726_2720x1080_scrot.jpg (54.33 KiB) Viewed 2290 times
Will be able to do more extensive testings with HDMI+DPI by Friday (waiting for new PCBs to arrive which will give me dual-channel LVDS from DPI).

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

Re: Multiple Frame buffer beta testers wanted

Tue Sep 11, 2018 2:50 pm

Cool, thanks for all the testing you are doing, much appreciated.

James
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."

bs_pi
Posts: 22
Joined: Tue May 16, 2017 9:26 am

Re: Multiple Frame buffer beta testers wanted

Thu Sep 13, 2018 9:07 pm

Hi Jamesh, aBUGs

Thank you for your amazing work on this multiple screens feature.
I was wondering what the configuration should be in order to get clone screens both at HDMI and Touchscreen, instead of extended desktop.

thank you.

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

Re: Multiple Frame buffer beta testers wanted

Fri Sep 14, 2018 9:28 am

bs_pi wrote: Hi Jamesh, aBUGs

Thank you for your amazing work on this multiple screens feature.
I was wondering what the configuration should be in order to get clone screens both at HDMI and Touchscreen, instead of extended desktop.

thank you.
All the flowers go to jamesh! He's coding this at RPi foundation and bringing the idea of multiple frame buffer forward.
I'm only doing some testing here at my end...

Which applications would you want to used when 'cloned'?
Keep in mind that this would be possible only for apps which are using frame buffer. Any OMXplayer output i.e. can't be cloned!

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

Re: Multiple Frame buffer beta testers wanted

Fri Sep 14, 2018 9:50 am

bs_pi wrote:
Thu Sep 13, 2018 9:07 pm
Hi Jamesh, aBUGs

Thank you for your amazing work on this multiple screens feature.
I was wondering what the configuration should be in order to get clone screens both at HDMI and Touchscreen, instead of extended desktop.

thank you.
Hi, I've been wondering about cloned screens, need to talk to some people and have a think.
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: 6864
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Multiple Frame buffer beta testers wanted

Fri Sep 14, 2018 10:36 am

jamesh wrote:
Fri Sep 14, 2018 9:50 am
bs_pi wrote:
Thu Sep 13, 2018 9:07 pm
Hi Jamesh, aBUGs

Thank you for your amazing work on this multiple screens feature.
I was wondering what the configuration should be in order to get clone screens both at HDMI and Touchscreen, instead of extended desktop.

thank you.
Hi, I've been wondering about cloned screens, need to talk to some people and have a think.
Cloning the frame buffer shouldn't be too bad as it is only the single buffered entity that is added to the display list.
Cloning overlays from omxplayer etc is going to be nasty as the displays could be running at different refresh rates, so co-ordinating when you release the image resources around vsyncs is going to be a nightmare.
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.

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

Re: Multiple Frame buffer beta testers wanted

Fri Sep 14, 2018 10:45 am

6by9 wrote:
Fri Sep 14, 2018 10:36 am
jamesh wrote:
Fri Sep 14, 2018 9:50 am
bs_pi wrote:
Thu Sep 13, 2018 9:07 pm
Hi Jamesh, aBUGs

Thank you for your amazing work on this multiple screens feature.
I was wondering what the configuration should be in order to get clone screens both at HDMI and Touchscreen, instead of extended desktop.

thank you.
Hi, I've been wondering about cloned screens, need to talk to some people and have a think.
Cloning the frame buffer shouldn't be too bad as it is only the single buffered entity that is added to the display list.
Cloning overlays from omxplayer etc is going to be nasty as the displays could be running at different refresh rates, so co-ordinating when you release the image resources around vsyncs is going to be a nightmare.
We were discussing this earlier, vsyncs are problamatic, but using the same linux framebuffer as the source for the displays lists should be possible, although there might be tearing issues.

As you say, video overlays are not pleasant, but simply 'cloning' the Linux fb might be OK.
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: 1338
Joined: Tue Jun 30, 2015 1:35 pm

Re: Multiple Frame buffer beta testers wanted

Sat Sep 15, 2018 8:04 am

Hi jamesh,

hit a strange problem today. I'm using RPI3 + DSI + HDMI platform. It boots to CLI and I'm starting it with

Code: Select all

startx -- -layout Multihead
.

So far nothing special.
But today I've encountered a problem with my USB keyboard (standard QWERTZ USB keyboard): disconnecting the keyboard leads the RPi3 to close the desktop and go to console.
DSI screen is frozen with old content.

I can restart desktop, but every time I try to disconnect the keyboard this issue happens.
Tested with other USB devices (mouse, USB sticks) --> all fine.

I'm pretty sure I've disconnected the keyboard many times before without this issue to occur (as I'm using VNC when working on the units; no space for tons of keyboards on my desk).

As I only have one wired USB keyboard at home I need to wait until next week to test it with another one.

Others following this thread should test as well and report back.

bs_pi
Posts: 22
Joined: Tue May 16, 2017 9:26 am

Re: Multiple Frame buffer beta testers wanted

Tue Sep 18, 2018 1:43 pm

Hi,
I do not mean to clone an application but the whole screen. Actually it would be a Kivy GUI that fills the whole screen. I would like to have it both on the touchscreen and also on any HDMI monitor plugged to the RPi.

Thank you

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

Re: Multiple Frame buffer beta testers wanted

Tue Sep 18, 2018 3:11 pm

bs_pi wrote:
Tue Sep 18, 2018 1:43 pm
Hi,
I do not mean to clone an application but the whole screen. Actually it would be a Kivy GUI that fills the whole screen. I would like to have it both on the touchscreen and also on any HDMI monitor plugged to the RPi.

Thank you
After discussion with the team here, this is not an easy thing to do efficiently. Only thing I can suggest for the moment is copying the frame buffers, but that's not very helpful if they are different resolutions.

If I have time I might try and figure out how to reuse one framebuffer over two displays, but that not high on my list. It would be automatically scaled though. Won't work with OMXplayer output, just the desktops.

I wonder if there is a way with the new graphics driver, which might support cloned desktops, but I don't know anything about that.
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."

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

Re: Multiple Frame buffer beta testers wanted

Tue Sep 18, 2018 3:11 pm

aBUGSworstnightmare wrote:
Sat Sep 15, 2018 8:04 am
Hi jamesh,

hit a strange problem today. I'm using RPI3 + DSI + HDMI platform. It boots to CLI and I'm starting it with

Code: Select all

startx -- -layout Multihead
.

So far nothing special.
But today I've encountered a problem with my USB keyboard (standard QWERTZ USB keyboard): disconnecting the keyboard leads the RPi3 to close the desktop and go to console.
DSI screen is frozen with old content.

I can restart desktop, but every time I try to disconnect the keyboard this issue happens.
Tested with other USB devices (mouse, USB sticks) --> all fine.

I'm pretty sure I've disconnected the keyboard many times before without this issue to occur (as I'm using VNC when working on the units; no space for tons of keyboards on my desk).

As I only have one wired USB keyboard at home I need to wait until next week to test it with another one.

Others following this thread should test as well and report back.
That's....weird.

Any X logs?
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: 1338
Joined: Tue Jun 30, 2015 1:35 pm

Re: Multiple Frame buffer beta testers wanted

Tue Sep 18, 2018 8:53 pm

jamesh wrote:Any X logs?
an you point me to where to find them?

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

Re: Multiple Frame buffer beta testers wanted

Wed Sep 19, 2018 8:44 am

aBUGSworstnightmare wrote:
Tue Sep 18, 2018 8:53 pm
jamesh wrote:Any X logs?
an you point me to where to find them?
/var/log/Xorg.log IIRC,.
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."

Return to “General discussion”