Switching image from LCD to HDMI when connected
-
This is an english topic so please change back to english.
-
@coincoin so dualboot with raspbian?
Because on recalbox only, without another system, it seems not working! -
@paradadf sorry...thanks adrenaline!
-
@jidem just a question, how many gpio ports you used for the 7'', just 5v/GND as every online tutorial says ?
I used all 4, like described on the documentation you get with the screen. Maybe, those 2 more I have are command / data ports ?
-
@paradadf sorry.
I will edit and translate my posts soon. -
@coincoin good idea!
I use just 5V/GND but please tell me where I must plug the others gpio. -
@jidem mmm I can't find the doc and i don't want to tell you s**t stuff
-
@coincoin said in Switching image from LCD to HDMI when connected:
@jidem Bah ça boot avec la sortie HDMI si c'est branché, sinon, ça boot sur le LCD.
Je me prennais la tête franchement en me disant "mais si j'essaye, ça va sortir re-inversé verticalement" mais non !Donc il suffit de coller la ligne qui va bien pour inverser l'écran, et celle -là pour que ça marche parfaitement. Maintenant, le truc casse-pied, c'est le petit écran qui est allumé en noir pendant la sortie HDMI, je crois que je vais être obligé de bricoler un interrupteur comme toi, mais j'ai pas envie...
-edit- ah si : au début, y a NOOB qui sort àl'envers sur le 7''. Tu choisi recalbox et après ça sort en HDMI dans le bon sens.
==> translation because it seems I can't edit after one hour :
Well, it's booting with the HDMI output if it's plugged in, otherwise, it's booting on the LCD.
I was frankly thinking "but if I try, it's going to come out inverted vertically" but no!So all you have to do is paste the line that goes well to invert the screen, and this one will work perfectly. Now, the puzzling thing is the small screen that is lit in black during the HDMI output, I think I'm going to have to tinker with a switch like you, but I don't want to...
edit- oh yeah : at first, NOOB comes out upside down on the 7''. You choose recalbox and then it comes out in HDMI in the right direction.
-
@coincoin OK, I found it:
SCL to the third pin down on the left hand side, and
SDA to the second pin down on the left hand side.
Please can you try to boot without SDL et SDA wires connected to see what happens? If it doesn't work, I purchase 2 wires!
Thanks by advance! -
If the 7'' screen is in normal position on your table (HDMI output on top) :
- on the GPIO all thread are in a square shape :
- first line, from right to left, nothing / pin / pin / nothing / nothing / ... / nothing
- second line, from right to left, nothing / pin / pin / nothing / nothing / ... / nothing
Ok.
Now if you look this square shape : top left, I have yellow, top right blue, bottom left is black, then I have red.On the screen, there is 4 (if I remember ?) pins which are from left to right : black yellow green red. So yellow & green use the two spot between your typical 5v/GND (which if I done things right, are red / black in what I did).
I really can't find the documentation, but the color of these threads are typical of I/O lines (so that's why I'm telling this is it).
-
@jidem you're right, this is an easier test => well
"SDL and SDA wires" unplugged :
+HDMI plugged in :
- NOOBS boot on 7'' upside - down.
- Rasbian boot on HDMI with the good inversion
- Recalbox boot on HDMI with the good inversion
+HDMI not plugged :
- NOOBS boot on 7'' upside - down.
- Rasbian blackscreens
- Recalbox blackscreens
"SDL and SDA wires" plugged :
+HDMI plugged in :- NOOBS boot on 7'' upside - down.
- Rasbian boot on HDMI with the good inversion
- Recalbox boot on HDMI with the good inversion
+HDMI not plugged :
- NOOBS boot on 7'' upside - down.
- Rasbian blackscreens (in fact, it outputs on HDMI, because when I plugged it after boot, I see some sort of 4/3 desktop on my 1080p TV)
- Recalbox blackscreens (in fact, it outputs on HDMI... same. Same 4/3.)
Blackscreens with unwired should be the same I guess.
D**n. It's been two days I play on TV thinking this was a solved problem :3
-
@coincoin thanks for your tests!
And sorry for the results...
that's confirm my previous tests... -
Which are "display_default_lcd=0" disables LCD instead of making HDMI default ?
I must try removing those from the recalbox config file, and the rasbian config file, and only rely on the NOOBS config file.
I saw while browsing recalbox that some line are added by NOOBS... There should be a conflict somewhere (including @Nijate orignal problem).
This is really really bothering. We have all the commands that does things right, and none can be used there.
-
@jidem NOT YET, SNAKE, IT'S NOT OVER YET!!
I can make it boot with Rasbian on HDMI or 7'' whether the HDMI is plugged or not
I'm making more tests to be sure.
-
@jidem @Nijate and....... bingo.
I've got it, I'm so happy.First, you need to know what is the name of your HDMI screen. For that, plug HDMI, boot, then open console (for exemple in Rasbian) then type :
tvservice -n
(tvservice works too with a recalbox console : I say that because I'm a total noob in Linux and I think I'm not alone)=> this will give your TV name like that :
device_name=THIS_IS_YOUR_TV_NAMENote that name on paper (or take a photo : mine was SNY_SONY-TV, and never could remember if - was before _)
Then, open config.txt in Rasbian and on the very very top of the file, you put those 3 lines :
[EDID=THIS_IS_YOUR_TV_NAME]
display_default_lcd=0
[all]What will happen there is when the Raspi detect on boot the TV, then it will use the next lines in the config.
Then it found the [all] filter that is used by default when there is no filter.Therefor, display_default_lcd=0 will only be used when my TV is plugged on boot. Since that line happens to make the output on the HDMI, this is perfect : when HDMI is plugged, then the raspi will boot on HDMI else, it will boot on LCD.
Ok. This is not finished. This will only work with Rasbian.
You have to go in recalbox's /boot, and copy the same 3 lines on the very top of your config.txt file there so recalbox boot with the same behaviour.It s NOT finish... I know there is a config command to power off the lcd. If you find it, you can put this between the [EDID=...] and the [all] filter so it power off the LCD if you use the HDMI output.
I think this is the solution !
(also, @Substring if this is the real solution and that does not work only for me, this could be automated in recalbox ? before the boot, use tvservice to know if something is plugged and [EDID=that stuff] then [all] the rest of the config file)The solution was REALLY simple in fact. So simple that it's hard to notice just under our noses
-
I've been using the EDID trick with a geekworm DPI screen for months already ... The problem is that it's the only way to circumvent a flaw in the "bios" design : the Pi can't tell if a composite screen is plugged, or if a GPIO screen is plugged. So making LCD default firces the pi to display on it, no matter if a HDMI screen is available.
The EDID trick is not really satisfying too, because it statically links a screen to your pi. That's ok if ypu always plug your pi on the same screen. But this can not always be the case.
For a trick from within Recalbox : no. That would cause really too many bugs because we'd have to format the config.txt with EDID and all sections, which would then be tricky to debug for non lcd users. You know the trick, manually apply it by yourself
-
@Substring for the "plug'n play on any screen", I think I have a solution, but it would need to find a way to execute a bash script before the config.
So we could dynamically create an EDID= with the name of the HDMI screen obtained through tvservice -n (and also power off the lcd if tvservice give a result with other bsh commands)I don't even know if this is possible. I'm very noob there.
But I know it's possible to add sub config files with something like "include subconfig.txt", the idea there would be to tvservice -n then create a file with either
[EDID=tv_name_you_got_with_tvservice]
display_default_lcd=0
[all]Or either
[all]Name that toto.txt, then put include toto.txt on the top of your config.txt and that should output to any HDMI screen if an HDMI is plugged (and if possible, power off the LCD), or to your LCD if not.
About the stability / usability / speciality to put that in recalbox, I'd agree. The only thing is finding that info was VERY difficult (but once understood, it was so easy). It would be at least a good thing to put in the faq I think.
-
@coincoin it's all documented at raspberry's official website
-
@substring I agree but why do you say people need noob skills with recalbox then ? It's one or the other ?
-
@coincoin usng recalbox in a plain and standard way is easy for anyone. Switching between DPI and HDMI the way you'd expect it is beyond what Recalbox does and is, as i said earlier, a flaw in the firmware