techmasterjoe
Posts: 11
Joined: Thu Nov 02, 2017 2:40 pm

Pi4 + 7in touch + hdmi

Sat Aug 03, 2019 7:43 am

I'm building a little project but not sure this will work
Will the new os with the new multi monitor support work with a pi touch and a hdmi
I don't really want the desktop on the hdmi screen i just want to push video to it and use the touchscreen (full screen web browser)
As a menu

I know this was not possible before i have all the hardware to test it just short time.

I made a fake window that uses a pi camera to track people as the walk by and apply a fake parallax effect when only one person is seen. It uses a google edge tpu for tracking.

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

Re: Pi4 + 7in touch + hdmi

Sat Aug 03, 2019 3:25 pm

The new driver will detect your DSI 7in + HDMI monitor and show the desktop on both. Use the screen configuration tool to align them as needed.

The legacy driver also supports dual display but you need to make some steps yourself as it's not working out of the box. See here for a how to - https://www.raspberrypi.org/forums/view ... 4#p1504644

techmasterjoe
Posts: 11
Joined: Thu Nov 02, 2017 2:40 pm

Re: Pi4 + 7in touch + hdmi

Sat Aug 03, 2019 5:57 pm

aBUGSworstnightmare wrote:
Sat Aug 03, 2019 3:25 pm
The new driver will detect your DSI 7in + HDMI monitor and show the desktop on both. Use the screen configuration tool to align them as needed.

The legacy driver also supports dual display but you need to make some steps yourself as it's not working out of the box. See here for a how to - https://www.raspberrypi.org/forums/view ... 4#p1504644
Kool
Project is 3d printed ITX pc case i will let you guess from there.
I did get something like this to work before it was a pain i was thinking the new driver and screen tools will make life easy.

blindcat
Posts: 6
Joined: Fri Nov 29, 2013 3:43 pm

Re: Pi4 + 7in touch + hdmi

Sat Aug 31, 2019 3:44 pm

Hm. Okay,
Hi Guys, similar problem. I have a Raspi 4, 7" Touch and want to connect a TV as a second display.
I connected 7" Touch to Raspi4 and started it with a fresh SD with a 1,9 MB Raspian Image without modifications. The display was recognized as primary display and the desktop was there. So far so good.
I want to run that configuration with the TV as a second, independent, display. Thats why I was so happy when the Raspi 4 was released. I observed the last changes of jamesh before buster, and with the 4 and buster it seems to get a stable dual headed display option with CEC etc.
To make it short before, I can't run that combination with my TV.

It is a Samsung UE55MU8009 4K TV. Maybe this one is a problem. In a german forum one reports a problem with that TV and the raspi 4 on 19. August. There was one answer on 19. August but not another answer from the Threadstarter, if that helped. So I think it helped him. I tried the tipps, and they didn't solve the problem.
The problem is as follows. When I boot the Raspi with the DSI display, everything is fine, DSI shows the desktop and works. When I plug the white HDMI Cable of the Raspian Foundation to HDMI 0 (beside the USB C Power Port) in the Raspi and then in the HDMI 2 or 3 connector at the TV and do a reboot then, the reboot is made and I sit in front of two black displays. The Raspi can only be reached over SSH.
I tried a lot of different combinations in the /boot/config.txt file now (with Editor or raspi-config in desktop or console version), but I wasn't able to get ONE display working, while the HDMI cable is connected.

That is something, that makes me wonder most. I can understand, that there are problems with the HDMI connection, but the DSI Device should ALWAYS be the default display (as long as not stated otherwise in the config.txt, as far as I have learned), and if the HDMI Device is displaying something or not, the desktop should display and be be accessable on the DSI Device. But no, both screens stay (nearly) black.

In fact I observed some different phaenomens in different combinations of HDMI parameters in config.txt. The DSI Device for example, shows most of the time a blinking cursor underline in the upper left corner. But it not reacts on any input on the direct attached usb keyboard. VNC Server is unreachable. In one or two of the combinations the DSI screen stayed complete black. Most of the tests showed the rainbow screen, and the four raspberrys and the splash on the DSI display before the described behaviour appeared.
On the TV side, there was one situation, where I observed the rainbow pattern on the TV, too! But after that, everything stayed black again. The TV switched in some tests to the correct HDMI port, but stayed there black. That means, I was on Tv input source cable-TV and had a Show running. When the Raspi rebooted the TV switched to HDMI 2. So something was happening on the cable, but no image was displayed.
I tried safe mode, group 1 and 2, mode 2, mode 82, force hotplug, 4K dis/enabled and nothing helped.
I checked /opt/vc/bin/tvservice -m (CEA and DMT), they always list 0 modes. -s only shows the DSI resolution at 60 hz, but without having the desktop on the DSI.

Btw I tried in config.txt
display_default_display=1
1 is not documentated, only 0 to ignore the DSI. But that didn't help to have the desktop on the DSI while a HDMI cable was connected to the TV.

Someone any idea? I was hoping on (controlable)dual head with the TV and the 7" DSI display.
Greetings,
Frankie

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

Re: Pi4 + 7in touch + hdmi

Sat Aug 31, 2019 4:02 pm

Wow ... Lot if text :shock:

DSI is working fine, but what if only your 55in is connected? Is it recognized correctly and working(btw what is the resolution of that TV)?

Start with DSI and make sure to configure it as your primary screen (screen configuration tool). Then shut diwn, connectthe HDMI0 display and reboot.

Tip: enable VNC. Then you are able to access screen configuration tool and adjust the display positions.

blindcat
Posts: 6
Joined: Fri Nov 29, 2013 3:43 pm

Re: Pi4 + 7in touch + hdmi

Sun Sep 01, 2019 9:05 am

Okay, thanks for your answer, I can report progress!
Fail: Unfortuantly I have printed case for the touchscreen and the raspi. It would take a long while to unconnect them, to try a hdmi only solution.
Progress: As you said, I used the Screen Configuration tool. I booted with the HDMI unconnected, started the screen config tool. A HDMI 1 (?) symbol was there. It was placed on the same place as the DSI symbol. So I moved the HDMI to free space on the right (could someone explain me the grey bar on the right of the DSI symbol? Is this marking the main screen? I cant place the HDMI direct right to the DSI, the the bar moves to the HDMI symbol (rect). Then I plugged the HDMI cable in the TV while the raspi was on. When I switched to the source input on the TV the extended screen of the raspi was displayed. In this state, the screen configuration tool is not starting again, the mouse shows a sandclock and then nothing happens.
Before, in the screen configuration tool I was able to select resolutions for the HDMI screen up to 1024 x 768. My goal is 4K, 30hz would be allright (if the TV can handle it).
Unfortuantly this success configuration is not surviving a reboot. If I reboot, I end up with a black screen on the raspi with the blinking cursor again (the TV switches to the raspi input but stays blank/black, too).
Its a bit blackmagic to me in this situation. But seeing an image on the TV for the first time was a success, that tells, that it is possible to run them as I wish. I just dont know which are the correct switches right now.
Which is configuration file for the screen configuration?
Frankie
PS: VNC was always on, but is not working in the black screen state.
Edit: When I boot with HDMI cable unplugged, I get the VNC in the dual head mode with both screens. When I start the Screen Configuration tool and try to change the resolution of the second screen (hdmi) from 800x480 (that is what works now sometimes) to 1024 x 768 I get the following error message:
XRandR fehlgeschlagen:
XRandR returned error code 1: X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 140 (RANDR)
Minor opcode of failed request: 7 (RRSetScreenSize)
Serial number of failed request: 27
Current serial number in output stream: 28
BTW: When I plug the cable into the TV, and the second screen is displayed there, opt/vc/bin/tvservice -m CEA and DMT show still 0 modes. -s shows [LCD] 800x480 at 60hz.

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

Re: Pi4 + 7in touch + hdmi

Sun Sep 01, 2019 11:34 am

Hmm ... Too bad that you don't provide all details

Be sure to have 'hdmi_enable_4kp60=1' added to your config.txt
And, click rhe green check box (apply button) when you changed something in screen configuration tool

'ignore_lcd=1' added to config.txt will have the same result as disconnecting DSI (
https://www.raspberrypi.org/documentati ... t/video.md)

And... As you're lacy to do certain checks folks here might become lazy to support..

blindcat
Posts: 6
Joined: Fri Nov 29, 2013 3:43 pm

Re: Pi4 + 7in touch + hdmi

Sun Sep 01, 2019 12:57 pm

Hi bugsworstnightmare, (See bottom for short version ... the rest could be helpfull information for somebody else)
wouldn't call it lazy, cause I am still active. My wife would like that different on the last summerday here.
ignore-lcd is a good hint here. I will check this further.
Having hdmi_enable_4kp60=1 is not really neccessary, because I only need 30hz, and 60hz is reported to increase heat. But of course I had tested that yesterday to check if it would make it run. Currently it is active. hdmi_safe is active, too. Trying these two right now.
hdmi safe disabled, hdmi_4k_60 enabled = booting into two blank screens without any blinking cursors.
hdmi safe disabled, hdmi_4k_60 disabled = booting into two blank screens without any blinking cursors.
hdmi safe enabled, hdmi_4k_60 disabled = booting into two blank screens without any blinking cursors.
The other hdmi settings in config.txt are not activated during this (mode, group etc.)

In fact I am coming closer. I have a stable image on the TV under some conditions. Condition is: HDMI cable only plugged in after boot. Then I have a 848 x 480 display upscaled on the TV.

xrandr was a good hint. I can use xrandr -q on the console and get all supported resolutions and rates for DSI-1 and HDMI-1. A

xrandr --output DSI-1 --primary --mode FIXED_MODE --rate 60.05 --output HDMI-1 --mode 3840x2160 --rate 30.00 --right-of DSI-1

will not work and gives the same error I reported above. It is the configuration I would like to have. I guess its the FIXED_HOME constant, that caused the error. But this one is listed as written here with the xrandr -q command. It is the same as 800x480. When I write 800x480, xrandr reports that this mode is not supported. This numerical written mode is also not listed in the xrandr -q data. So I tried to change only the second output:

xrandr --output HDMI-1 --mode 3840x2160 --rate 30.00 --right-of DSI-1

This one gives an error, but something happens. The resolution is changed to 4K on the TV, but only the 800x480 quad in the left upper corner is displayed on the TV. So its native resolution, not scaled anymore, but not completley used. The size of the framebuffer is not changed accordingly?
So I am looking for a way to expand the framebuffer, too.

lxrandr

starts a graphical interface of xrandr. It shows _only_ the HDMI, but it will not resize the framebuffer, too. It throws an error. RRSetSecreenSize misses. But I think it created an entry in /home/pi/.config/autostart/lxrandr-autostart.desktop that only sets the hdmi resolution. hm. Rebooting with cable leads to two blank screens (DSI and HDMI) with blinking cursor in each left upper corner. SSH still possible.
After unplugged reboot, cable plugging when running, TV shows the scaled 800x480 desktop.
...
DONE...
Dear bugsworstnightmare,
problem solved. During the test on top of this message (hdmi safe 4K on/off etc) ... I rebooted a lot of times. I had splashscreen boot on. The four raspberrys where only displayed with three lines of text for some time under a second. But I read there '...couldn't reserve...'
So I went into raspi-config. Before I choosed the max value for memory split, because I have this 4GB Raspi 4. Now I set it to 512 MB. After that I rebooted with HDMI cable plugged in, and what do I get? The second screen, completley in 4K on the TV. It runs with 30Hz (4Kp60 isnt activated in config.txt). Perfect! You brought me to that rebooting orgy :-) So that helped, when I saw the word reserve :-)

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

Re: Pi4 + 7in touch + hdmi

Sun Sep 01, 2019 2:16 pm

Hmm, you should not require to change the ammount of RAM available to the GPU when usimg FMKS driver

One question: your TV is connected to HDMI0, the output close to USB-C?

blindcat
Posts: 6
Joined: Fri Nov 29, 2013 3:43 pm

Re: Pi4 + 7in touch + hdmi

Sun Sep 01, 2019 3:13 pm

Hm, I changed it, because I think it fall back to 16 MB or something when it couldnt set the max 8xx MB. After setting this to 512 it worked immediatly. No other change I guess. I tried it after the reboot of the third hdmi parameter setting as a single reboot with only that change. Some more reboots since then, all stable with the 4K image on TV (and the main display on the touchscreen).
The cable is connected to the HDMI port directly beside the USB C port. It is HDMI 0, it is printed on the board HDMI 0, no confusion. xrandr names it HDMI 1, but it also names the DSI port DSI-1, what should be 0. /opt/vc/bin/tvservice -m still reports 0 modes when the TV shows the 4K image.
Edit: The Desktop Settings for selecting a background image e.g. names the displays HDMI-1 and DSI-1, too

Radek102
Posts: 1
Joined: Wed Jan 08, 2020 8:40 pm

Re: Pi4 + 7in touch + hdmi

Wed Jan 08, 2020 8:46 pm

Is there some way to automatically deactivate touch screen on DSI and swith output on two hdmi monitors? (without disconnecting the cables, but eg with the possibility to switch off some wires from the dsi manually- ie hw touch display switch, disconect power on dsi cable...)???

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

Re: Pi4 + 7in touch + hdmi

Thu Jan 09, 2020 8:03 am

Radek102 wrote:
Wed Jan 08, 2020 8:46 pm
Is there some way to automatically deactivate touch screen on DSI and swith output on two hdmi monitors? (without disconnecting the cables, but eg with the possibility to switch off some wires from the dsi manually- ie hw touch display switch, disconect power on dsi cable...)???
7in DSI display needs 5V power supply which is not routed via the DSI connector.
By default the Raspberry Pi LCD display is used when it is detected on the I2C bus. ignore_lcd=1 will skip this detection phase, and therefore the LCD display will not be used
full details: https://www.raspberrypi.org/documentati ... t/video.md

Never tested this myself, but you may want to try and connect 2 HDMI + DSI to your system,boot and check which screens are active.
Now add 'ignore_lcd=1' to config.txt and reboot. DSI should be off after the reboot.

Sorry, but as DSI is probed during boot phase you will have to reboot if you want to change your screen layout.
Most likely your desktop will have to be rearranged...

Return to “Official Foundation Display”