HDMI Switching
-
Hey guys,
Im new the Linux/Raspberry Pi scene. Im just building my first RetroPie (Pi in general for that matter). Its going to be portable, which is exciting. I have next to 0 scripting experience, but after some googling I think I have a small bit of knowledge about making a directory and a script in it.
I bought a 5" TFP401 based 800x480 HDMI touch screen (like the 5" Adafruit backpack, Waveshare 5" all the same) for it.
Now because this display doesn't have any auto video scaling you have to manually force HDMI settings in Config of course. But I would like to be able to switch that back to default HDMI settings semi-on-the-fly so I can plug it into a 1080p TV or what not if Im at home or want to watch Kodi ect.
So after doing a bit of discovery then research with making shutdown buttons, perhaps I could make a GPIO switch that will control what HDMI setting to be in. Something like if the pin is bridged, "TV mode" and if it isn't bridged "On-board mode". or perhaps if X-pin is bridged then TV, if Y-pin is bridged then On-Board. Something along those lines. (Hardware wise, I'd like to make some sort of HDMI splitter so I don't have to keep plugging and unplugging the little odd adapter the screen comes with to avoid wear. Probably a switch with more then 2 pins so I can bridge GPIO at the same time.)
The only way I can think of doing it is having 2 config files. One for HDMI the other for the TFT. With the switch telling the Pi what one to load on boot. So the Pi would have to be shut off when switching, which isn't a big deal.
How would I go about running a script before boot to determine what config to use?
Or is that even a good way of doing it?
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.