• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
RetroPie forum home
  • Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

Force HDMI over Raspberry Pi Official LCD Screen

Scheduled Pinned Locked Moved Help and Support
hdmi
15 Posts 5 Posters 10.1k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C
    Centrosome
    last edited by 1 Jun 2017, 11:24

    Hi everyone,

    I'm new to the raspberry world so sorry in advance for my lack of knowledge.

    I'm building a semi-portable retropie setup. I want to be able to play on the tiny screen but also to play on a TV with friends.

    I bought a kit with a raspberry pi 3 model B and the official 7inch LCD screen.
    I Flashed the SD card and installed retropie on it.

    It's working like a charm on the 7inch screen.

    But when I connect the raspberry pi to my TV via HDMI It does not work.
    I think the TV recognises the input as it turns grey (and doesn't not show "no input signal") but i still get retropie on the small screen and nothing on the TV screen.

    Is there a way to force the raspberry to go through HDMI when an HDMI cable is connected? And when it's not to use the LCD screen by default.

    I found this thread
    https://retropie.org.uk/forum/topic/5527/raspberry-pi-official-lcd-screen-or-hdmi-option

    But it's quite hard to understand with my lack of knowledge.

    Thanks a lot in advance.

    1 Reply Last reply Reply Quote 0
    • L
      langy1987
      last edited by 1 Jun 2017, 14:09

      The response on that thread pretty much covers everything you need. You just need to follow it step by step as described.

      It can't hot swap between HDMI and LCD but if you set it up as described it will check on boot to see if HDMI is connected and update config.txt in the boot partition with a copy of config_hdmi.txt. If HDMI is not present it will change config.txt to match config_lcd.txt

      config_hdmi.txt and config_lcd.txt are essentially duplicates of config.txt but each tweaked with the specific settings for either the LCD display or HDMI output.

      Happy to try and help guide you through it but you should give it a go yourself. Best way to learn :)

      Langy

      1 Reply Last reply Reply Quote 0
      • C
        Centrosome
        last edited by 1 Jun 2017, 14:16

        Thanks,

        As I said I'm a noob.
        For the script, can I make it on script editor (mac os x) and changing the file extension to .sh ?
        I'll try this tonight.

        1 Reply Last reply Reply Quote 0
        • L
          langy1987
          last edited by langy1987 6 Jan 2017, 15:58 1 Jun 2017, 14:56

          You can use any text editor you prefer.

          If your doing it on the pi itself you can either do it within the Rasbian desktop in the text editor, or if you in the console you can type the following

          mkdir initDisplay
          cd initDisplay
          nano initDisplay.sh
          

          The first two lines create the folder we are going to put the script in and then changes to that folder

          The third will open up the console text editor called nano with any empty file named initDisplay.sh.

          nano is one of the go-to editors for modifying files within the console. There are others but I like it. :)

          Once you've finished typing the code press Ctrl+X to exit and when prompted press 'Y' to save.

          Langy

          1 Reply Last reply Reply Quote 0
          • C
            Centrosome
            last edited by 1 Jun 2017, 16:24

            Very useful thank you!

            I already used nano to modify config.txt but I did not know you could use it to write a script.

            I keep you updated asap (probably next week cause I'll be abroad this week end)
            Cheers

            1 Reply Last reply Reply Quote 0
            • C
              Centrosome
              last edited by 8 Jun 2017, 17:27

              So I tried but I was stuck.
              I created the two different config.txt file (HDMI and lcd)

              But I'm stuck in the end of the tutorial
              https://retropie.org.uk/forum/topic/5527/raspberry-pi-official-lcd-screen-or-hdmi-option

              It says to add the script in /etc/profil.d/10-*****.sh
              and to add this

              /home/pi/displayBoot/initDisplay.sh
              sleep 5

              before emulstation instruction.

              Could you explain that part for me cause I don't really understand. $
              I understand that this is to run the script before emulstation but I don't understand what to do.

              Thanks a lot in advance.

              L 1 Reply Last reply 12 Jun 2017, 11:21 Reply Quote 0
              • L
                langy1987 @Centrosome
                last edited by 12 Jun 2017, 11:21

                @Centrosome I'll have a look when I get home. I don't have access to my RetroPie atm.

                1 Reply Last reply Reply Quote 0
                • C
                  Centrosome
                  last edited by 14 Jun 2017, 18:14

                  Thanks Langy1987 did you figure out?
                  Thanks in advance

                  1 Reply Last reply Reply Quote 0
                  • S
                    sli4
                    last edited by 19 Mar 2018, 23:04

                    Centrosome, did you ever figure this out?
                    I too made the same script but can not figure out how to get it to run at startup. I've tried adding the file's path to several files but nothing seems to work.

                    J 1 Reply Last reply 8 Jul 2018, 13:05 Reply Quote 0
                    • J
                      JDMDingo
                      last edited by JDMDingo 7 Aug 2018, 05:52 8 Jul 2018, 02:33

                      anyone get this running?

                      If I power up the Pi with an HDMI cord attached the LCD display is flipped. If I run the script again it returns:

                      device_name=SNY-SONY_TV__00
                      
                      #lcd_rotate=2 
                      
                      

                      Without an HDMI plugged in the LCD is right side up. If I run the script again it returns:

                       [E] No device present 
                      

                      so the script is running but is not outputting the the TV. The TV detects the input and says raspberry but remains black.

                      Edit:

                      adding:

                      ignore_lcd=1

                      to the "config_hdmi.txt" file now turns off the LCD and switches to the TV.

                      1 Reply Last reply Reply Quote 0
                      • J
                        JDMDingo
                        last edited by 8 Jul 2018, 12:51

                        Also there is a typo in the original post. When you edit the /etc/profile.d/10-*****.sh, it should be:

                        # switch between LCD and HDMI
                        /home/pi/initDisplay/initDisplay.sh
                        sleep 5 
                        

                        instead of /home/pi/displayBoot/initDisplay.sh

                        S 1 Reply Last reply 6 Feb 2019, 04:00 Reply Quote 0
                        • J
                          JDMDingo @sli4
                          last edited by JDMDingo 7 Aug 2018, 14:07 8 Jul 2018, 13:05

                          @sli4 let me know if you got it running. Did you make the files (initDisplay.sh, config_hdmi.txt and config_lcd.txt, hdmi.name) in windows? Is so you need to convert them by using:

                          sudo apt-get install dos2unix
                          sudo dos2unix /home/pi/initDisplay/initDisplay.sh
                          

                          I also converted the config files, however that was probably not necessary.

                          Also the original post is not really clear about the configs. You copy all the text from config.txt and paste it into config_hdmi and config_lcd. Inside config_hdmi.txt scroll down untill you see “#hdmi_drive=2” and remove “#” then scroll to the bottom and add “ignore_lcd=1”. In config_lcd.txt scroll to the bottom and add “lcd_rotate=2”.

                          goobatroopaG 1 Reply Last reply 9 Feb 2019, 08:53 Reply Quote 1
                          • goobatroopaG
                            goobatroopa
                            last edited by goobatroopa 2 Mar 2019, 13:44 3 Feb 2019, 13:44

                            I'm gonna try and get this working. I have been using the old "pull out the GPIO pin cable" trick on my handheld unit and whilst it works a charm, its a bit lame to not try and get it sorted properly.

                            1 Reply Last reply Reply Quote 1
                            • S
                              sli4 @JDMDingo
                              last edited by 6 Feb 2019, 04:00

                              @JDMDingo said in Force HDMI over Raspberry Pi Official LCD Screen:

                              Also there is a typo in the original post. When you edit the /etc/profile.d/10-*****.sh, it should be:

                              # switch between LCD and HDMI
                              /home/pi/initDisplay/initDisplay.sh
                              sleep 5 
                              

                              instead of /home/pi/displayBoot/initDisplay.sh

                              I had not gotten it to work. When i boot up i now get a bunch of errors about initDisplay.
                              I'm going to try thes again when i have access to the pi. for now i'm doing what the poster above me was doing and just pulling out the gpio cables. :/

                              1 Reply Last reply Reply Quote 1
                              • goobatroopaG
                                goobatroopa @JDMDingo
                                last edited by 9 Feb 2019, 08:53

                                @JDMDingo said in Force HDMI over Raspberry Pi Official LCD Screen:

                                @sli4 let me know if you got it running. Did you make the files (initDisplay.sh, config_hdmi.txt and config_lcd.txt, hdmi.name) in windows? Is so you need to convert them by using:

                                sudo apt-get install dos2unix
                                sudo dos2unix /home/pi/initDisplay/initDisplay.sh
                                

                                I also converted the config files, however that was probably not necessary.

                                Also the original post is not really clear about the configs. You copy all the text from config.txt and paste it into config_hdmi and config_lcd. Inside config_hdmi.txt scroll down untill you see “#hdmi_drive=2” and remove “#” then scroll to the bottom and add “ignore_lcd=1”. In config_lcd.txt scroll to the bottom and add “lcd_rotate=2”.

                                This is the clearest part of the thread. Thank you. I was getting very confused at the start.

                                1 Reply Last reply Reply Quote 0
                                • First post
                                  Last post

                                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.

                                  This community forum collects and processes your personal information.
                                  consent.not_received