Switching image from LCD to HDMI when connected
-
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
-
@substring I don't really understand.
I have maybe 2 full days of googling-fu this problem and nobody clearly wrote "hey guys, here is all the solutions for the dudes that bough the official 7'' screen, are total noobs at raspi, and also use recalbox".There is no flaw in the firmware. It's by design. The screen have been made by specialists ingeneers that perfectly understand how EDID & low-level drivers works. So to their eyes, it's working flawlessly. You can ouput to whatever thing you like, if you can program before config, the behaviour is like "boot'n play".
If I can find how to do event programing, find the plug HDMI event, threading that with a simple if each second, I could even make that plug'n play, at least in Rasbian. This is what plug'n play drivers does, the only difference is they use interupt drivers level but you can make that easely post-kernel too if you're a raspi noob like me.
(background info : studied electronics, then been in informatics for like 15 years)
-
@coincoin hey pal get a grip, no need to get on fire that quick.
- I've never read that thread until i posted a reply, although i had already given the trick on another topic
- https://www.raspberrypi.org/documentation/configuration/config-txt/video.md is what explains almost everything
- Not being able to fallback on LCD when HDMI is not available is a flaw in my vision of things. So of course i'm not saying raspberry engineers suck, their work is just amazing. And if you can't have lcd as default when there is no hdmi available must probably have some hardware reasons, i still believe this is a misconception, therefore a flaw.
Now regarding the small code block you're thinking about, i could give you some tips on how to write it, i'm just saying that this is a very particular case which i do not wish to be automatically managed. In other words : i won't work on it, but would gladly accept external contributions and even give a hand.
And my CV is not that different from yours you k ow
-
@substring hey
- I'm not "on fire", it's just I don't have as much vocabulary as I'd want in English + I use lots of shortcuts that do not sound very kind in English (but are ok in French). If I'd be "on fire", usually people knows
- I am NOT insisting on putting this in recalbox. I am insisting on writing a faq item (I'll write it if you want).
- I still don't see any flaw. Are you talking about hot fallback to LCD ? Or on boot fallback ? (which what happens). There is no driver, there : this behaviour is a software behaviour, not an hardware behaviour, so I still don't see any flaw in hardware design (which is where we agree), neither in firmware (that must stay compatible with other outputs).
I don't understand when you say it's a firmware pb : at much to me, it's a gpu driver problem that don't differentiate this screen from the others ? (which is an advantage, if you watch this with "no diff between screens" eyes).
-
@coincoin by firmware i mean either the bootcode.bin, or start.elf. one of these files (most probably the first one) is "the firmware", like a bios file, and does the initialization. The pi itself boots on GPU before CPU (yeah yeah, no mistake in what i wrote), the gpu loads the firmware from the sd card ...
Anyway as far as i remember, once you have booted, you can't switch to another display type, tvservice doesn't help, which is a pity.
-
If it boot on gpu, then everything is explained ?
"don't take any risk (see what I did there ?) with the booting chip" on top of "things must not be peripherical dependant" which combos in "booting chip must not be peripherical depending"This booting on gpu is surprising, but not totally from outer space when you considering pi's ARM nature
@SubstringI think it's possible to achieve what your usual computer does. There's no impossibility, but a lot to learn before doing that : to do this right, you must take this before kernel. I would have to document myself on that before coming with questions. IRQ is already little known territory to me, but ARM board IRQ may be very much alien space in my Windows guy's eyes : I learnt how from a pile of sand making something this is driven by hardware or asm drivers 20 years ago, there should be remains