Retropie Screen Priority

June 6, 2024, 20:44

bree_liance

Dear raspberry pi Community, I'm reaching out to you to get some help with my retropie Project and maybe should make clear that I have no expertise in IT whatsoever, that's why a really detailed answer would be highly appreciated. So currently I have a Raspberry 4 Model B set up to Run retropie, everything runs fine. But I plan on changing the current casing to a 7" Touchscreen - Wimaxit M728 (connected via Adapter to one of the HDMI ports) And that is what leads me to the question: how can I configure the pi so that it just uses the 2nd HDMI Channel once it's connected to another Monitor? (The "Main" Screen should not be used at all if both are in use, it's supposed to be a purely portable solution). I imagine I could simply remove the HDMI adapter when plugging it into a TV but I'm hoping for a more elegant solution. Thanks in advance ❤️

bree_liance

Bump

eric_44794

A more elegant solution could be to set the preferred HDMI port via software configuration. The Raspberry Pi firmware supports forcing the selection of a specific HDMI port. You can do this by adding a line of code in the config.txt file. Here are the steps: Open a terminal window in your Raspberry Pi or by connecting Raspberry via SSH. Enter the command to edit the config file: sudo nano /boot/config.txt Add the following line at the end of the file: hdmi_preferred_port=2 This will make the second HDMI output port as the default one whenever it is connected. Save the file (Ctrl+O) and exit (Ctrl+X). Reboot your Raspberry Pi for changes to take effect: sudo reboot Remember to replace the number '2' with '1' if you want to switch back to the first HDMI port.

bree_liance

definetly gonna try this, thanks for the help