Dyerelog
Posts: 1
Joined: Tue Jan 29, 2019 9:37 am

Re: run the HDMI and TFT screen simultaneously

Tue Jan 29, 2019 9:45 am

Hello, do you have any new information?

I want to activate both simultaneously but currently only the HDMI screen works. The touch screen works and moves the mouse but it is black, the display does not work. Do you have solutions to "extend" the screens and that the display works on both.

Thank you in advance

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

Re: run the HDMI and TFT screen simultaneously

Mon Jun 24, 2019 1:01 pm

Hi Jamesh, all

So while I am aware of the newer related post about driving multiple screens, I wanted to try the advice here by Jamesh:
sudo raspi-config
select advanced options and find the graphics driver option. Select KMS option. (not fake KMS)
Now it should start up with the display running on HDMI and DSI.

It did not work for me, and when I wanted to revert to the state before this changes the only option I could find is to select 'G3 Legacy' option however it does not work the same as before at all. Is there a better way to revert changes before I edited raspi-config in the way above?

Thank you

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

Re: run the HDMI and TFT screen simultaneously

Tue Jul 02, 2019 9:42 am

topguy wrote:
Wed Dec 20, 2017 11:28 am
galelio wrote:
Tue Dec 19, 2017 3:57 pm
i guess you are right, its probably a firmware problem, am writing a software where you can manage it from the TFT screen and gets the output on the hdmi (not mirroring), but so far am not able to do that. hopefully there will be an update to the firmware where it supports 2 framebuffers.
We have verified that both "Kivo" (Python) and "Qt5" (C++) are able to use the second screen, so if your "output" can be presented using any of those frameworks you could achieve this today.
@topguy, reading back through this thread, I noticed your reply above. I am sure that when you said 'Kivo' you actually meant 'Kivy'.
I am actually trying to do exactly what you said above you verified back in 2017...I am developing a Kivy GUI that make use of the touchscreen but I would like for the GUI to use both the touchscreen and the HDMI output. Do you mind to tell us how did you verify this? or point us to some links?
Thank you

User avatar
topguy
Posts: 5668
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: run the HDMI and TFT screen simultaneously

Tue Jul 02, 2019 11:34 am

You are absolutely right, I meant Kivy.

What was tested was not that one app were using both screens at the same time, but that you could have desktop on one screen and the Kivy app was showing on the other. This was done by setting an environment variable called VC_DISPLAY. ( I saw it first mentioned here :https://www.raspberrypi.org/forums/view ... p?t=126156 )

So setting VC_DISPLAY=6 should get Kivy to show on official 7" display regardless of what is chosen for desktop. ( For any other type of touch display this will proobably not work. )
And I think then using the value 4 or 5 redirects to the HDMI..
So ONE Kivy app can not use both screens at the same time, but TWO Kivy apps started with different values of VC_DISPLAY should show on different screens.

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

Re: run the HDMI and TFT screen simultaneously

Tue Jul 02, 2019 12:13 pm

I haven't checked it recently, but I thought Eric had the 7" DSI panel working under Full KMS based on https://github.com/anholt/linux/wiki/Ra ... lay-panels. It will not be automatic as it's configured from device tree, and I can't see an appropriate overlay at present.

Fake KMS will now support multiple displays on all Pi flavours. Add "max_framebuffers=2" to /boot/config.txt, and the firmware should instantiate two displays under DRM if they are connected, one for HDMI and one for 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.

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

Re: run the HDMI and TFT screen simultaneously

Thu Jul 04, 2019 9:59 am

Thank you @topguy for the clarification. I am actually looking for mirroring screen in both DSI and HDMI output so the two Kivy process option is not optimal. It is difficult to believe that this is so difficult to achieve.

@6by9 when you said 'Fake KMS will now support multiple displays' you mean for the latest version of Raspbian released with RPi4? Because that is a whole new story...I had trouble updating to the latest version so that is also not an option for now.

User avatar
topguy
Posts: 5668
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: run the HDMI and TFT screen simultaneously

Fri Jul 05, 2019 11:03 pm

I am actually looking for mirroring screen in both DSI and HDMI output ...
You didnt mention "mirroring" in your first post, that changes things.
So you want the HDMI screen and touchscreen to show the same thing, always ?

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

Re: run the HDMI and TFT screen simultaneously

Sat Jul 06, 2019 7:06 am

bs_pi wrote:
Thu Jul 04, 2019 9:59 am
@6by9 when you said 'Fake KMS will now support multiple displays' you mean for the latest version of Raspbian released with RPi4? Because that is a whole new story...I had trouble updating to the latest version so that is also not an option for now.
The kernel drivers are common to both Stretch and Buster, however Mesa (the layer above) is hideously out of date on Stretch and may well cause 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.

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

Re: run the HDMI and TFT screen simultaneously

Mon Jul 08, 2019 4:36 pm

@topguy, sorry for not replying earlier...yes I want to have mirror images in DSI touchscreen and the HDMI output all the time. Have you found a way of doing this in Stretch and RPi 3?

User avatar
topguy
Posts: 5668
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: run the HDMI and TFT screen simultaneously

Tue Jul 09, 2019 1:16 pm

I have only ideas, not final solution...

Like 6by9 suggested I've also maybe seen a thread for the experimental OpenGL drivers for Stretch where you could maybe define extended desktop or something. I dont know if mirroring was possible.
James mentioned it here:
https://www.raspberrypi.org/forums/view ... 1#p1248877
And also big thread here:
https://www.raspberrypi.org/forums/view ... 3&t=216399


The second idea is that there are tools called "rpi-fbcp" and "raspi2fb" which purpose is to copy image from one screen to another.
-- https://www.raspberrypi.org/forums/view ... 6&start=25
-- https://github.com/AndrewFromMelbourne/raspi2fb

Problem is that those tools are mainly used to copy from HDMI to a small LCD/TFT screen connected on SPI for example. And I dont think someone made a version for the 7" screen.

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

Re: run the HDMI and TFT screen simultaneously

Tue Jul 09, 2019 2:07 pm

Thank you @topguy. I was aware of 'raspi2fb' but last time I tried (months ago) I encountered issues. Never tried the experimental Open GL drivers but it does not sound like a solid option.

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

Re: run the HDMI and TFT screen simultaneously

Tue Jul 09, 2019 2:09 pm

bs_pi wrote:
Tue Jul 09, 2019 2:07 pm
Thank you @topguy. I was aware of 'raspi2fb' but last time I tried (months ago) I encountered issues. Never tried the experimental Open GL drivers but it does not sound like a solid option.
They are much less experimental now - for example, they are the default on the Pi4. Worth a try. Should be able to do mirrored display very easily with the GUI setup tool.
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: run the HDMI and TFT screen simultaneously

Tue Jul 09, 2019 3:26 pm

Thank you @jamesh, but if I understand correctly, you are refering to Buster not Stretch, unfortunately I cannot update to Buster on my RPi 3 project due to libraries issues on the code I use.

Return to “Graphics programming”