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

    Selecting RETROPI SETTINGS causes Black screen

    Scheduled Pinned Locked Moved Help and Support
    blackscreen
    39 Posts 6 Posters 14.4k 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.
    • markyh444M
      markyh444 @arealdushbag
      last edited by

      @arealdushbag Have you even read the link I replied with mate? Seriously!!!!

      Retropie in a NES - Pi 3 with Mausberry circuit shutdown switch wired to buttons and 8bitdo NesPro30 controller
      Retropie in a Saturn Controller - Pi Zero, GPIO controls using DB9 driver
      Retropie in a PSX - Pi3
      https://markyh444.wordpress.com

      1 Reply Last reply Reply Quote 0
      • markyh444M
        markyh444
        last edited by markyh444

        Here it is again, copied and pasted, right here...

        herb_fargus ADMINISTRATORS March 23, 2016
        Before posting on the forum you need to do three things:

        Read the forum rules: http://retropie.org.uk/forum/topic/2/forum-rules

        Search the official RetroPie Wiki for an answer to your problem: https://github.com/retropie/retropie-setup/wiki

        Search this forum to see if your question has already been answered.

        If you have done the above steps please add the following relevant information so that we can help narrow down the cause of your issue:

        Pi Model: (B, B+, 2 B etc..)
        RetroPie Version Used: (3.6, 3.8.1, 4.01 etc..)
        Built From: (Pre made SD Image on RetroPie website, Berryboot, or on top of existing OS etc..)
        USB Devices connected:
        Controller used:
        Error messages received:
        Log found in /dev/shm/runcommand.log (if relevant):
        Guide used: (Mention if you followed a guide)
        File: (File with issue - with FULL path)
        Emulator: (Name of emulator - if applicable)
        Attachment of config files: (PLEASE USE PASTEBIN.COM FOR LARGE LOGS)
        How to replicate the problem:

        Use markdown to format your posts - see http://commonmark.org/help/ - and put large logs on a pastebin type site like http://paste.ubuntu.com/ http://pastebin.com/ or similar.

        Please wait patiently for a response - you are asking people to help you in their free time, and due to timezones, someone with an answer may not currently be around. Do not bump posts.

        Also when posting PLEASE use tags so that it is easier for other users to search this forum for answers to their problems.

        Retropie in a NES - Pi 3 with Mausberry circuit shutdown switch wired to buttons and 8bitdo NesPro30 controller
        Retropie in a Saturn Controller - Pi Zero, GPIO controls using DB9 driver
        Retropie in a PSX - Pi3
        https://markyh444.wordpress.com

        BuZzB A 2 Replies Last reply Reply Quote 0
        • BuZzB
          BuZz administrators @markyh444
          last edited by

          @markyh444 Welcome to my world :) Frustrating eh.

          To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

          markyh444M 1 Reply Last reply Reply Quote 3
          • markyh444M
            markyh444 @BuZz
            last edited by

            @BuZz incomprehensively so...

            Retropie in a NES - Pi 3 with Mausberry circuit shutdown switch wired to buttons and 8bitdo NesPro30 controller
            Retropie in a Saturn Controller - Pi Zero, GPIO controls using DB9 driver
            Retropie in a PSX - Pi3
            https://markyh444.wordpress.com

            1 Reply Last reply Reply Quote 0
            • A
              arealdushbag @markyh444
              last edited by

              @markyh444 @BuZz

              Thank you for you help you have been more than helpful I'm just too new to Linux to properly explain this issue..I checked online before submitting to this forum. No more help is needed.

              markyh444M herb_fargusH 2 Replies Last reply Reply Quote 0
              • markyh444M
                markyh444 @arealdushbag
                last edited by

                @arealdushbag Dude, we just want you to answer the questions in the post. There's bullet points. You dont need to know squat about Linux to answer some questions. If you don't know how to find something out, just put that you don't know how to find it out and we'll help.

                Retropie in a NES - Pi 3 with Mausberry circuit shutdown switch wired to buttons and 8bitdo NesPro30 controller
                Retropie in a Saturn Controller - Pi Zero, GPIO controls using DB9 driver
                Retropie in a PSX - Pi3
                https://markyh444.wordpress.com

                1 Reply Last reply Reply Quote 0
                • herb_fargusH
                  herb_fargus administrators @arealdushbag
                  last edited by

                  @arealdushbag if you aren't familiar with Linux terminology or what each retropie setting is (retropie has a lot of settings) you can always just post a video or screenshots of the steps you are taking as well.

                  If you read the documentation it will answer 99% of your questions: https://retropie.org.uk/docs/

                  Also if you want a solution to your problems read this first: https://retropie.org.uk/forum/topic/3/read-this-first

                  1 Reply Last reply Reply Quote 1
                  • BuZzB
                    BuZz administrators
                    last edited by

                    I think this is related to a kernel update. I have the problem on one of my machines (noticed half hour ago) so I will be looking into it.

                    To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

                    A 1 Reply Last reply Reply Quote 0
                    • A
                      arealdushbag @BuZz
                      last edited by

                      @herb_fargus @markyh444 @BuZz
                      So the problem was that when I exited Kodi back into emulation station and try to enter into the RetroPI setup script I would not see the menu. I originally configured my retropie to boot to Kodi automatically(first mistake). So I eventually found one of
                      @markyh444 old forums post about a similar problem. The fix I found from that post was not to auto boot to KODI and boot to emulation station instead. That fixed the problem. I did not mention that I was exiting KODI then trying to launch RetroPI setup SCRIPT. I thought Kodi wouldnt affect me trying to launch that window.

                      1 Reply Last reply Reply Quote 1
                      • markyh444M
                        markyh444
                        last edited by

                        I've never had Kodi on any of my RetroPie builds, so I dunno how you've found an old post by me about this.

                        Retropie in a NES - Pi 3 with Mausberry circuit shutdown switch wired to buttons and 8bitdo NesPro30 controller
                        Retropie in a Saturn Controller - Pi Zero, GPIO controls using DB9 driver
                        Retropie in a PSX - Pi3
                        https://markyh444.wordpress.com

                        1 Reply Last reply Reply Quote 0
                        • BuZzB
                          BuZz administrators
                          last edited by BuZz

                          I also go to es from kodi. I suspect now a kodi script change or something in tvservice. I'll debug this though.

                          Also why giving as much information as possible helps, as it gives me a pointer as to how to reproduce and fix it.

                          To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

                          1 Reply Last reply Reply Quote 0
                          • RascasR
                            Rascas
                            last edited by Rascas

                            There wasn't any change in Kodi from some time now, the last one was from some days after the 16.1 release. Although I didn't test the RetroPie 4.X versions yet, I suspect this is because of the old "black screen on exit bug" in Kodi which was never fixed but it has a workaround, which is changing virtual terminals on exit. Can you try to edit /usr/bin/kodi and in the end, change the line
                            sudo chvt 2
                            to
                            sudo chvt 3

                            BuZzB 2 Replies Last reply Reply Quote 0
                            • BuZzB
                              BuZz administrators @Rascas
                              last edited by

                              @Rascas Thanks. I guess some firmware / kernel change has brought it back again - I will test above, and also rolling back kernel/firmware.

                              I will also test doing fbset -depth 8; fbset -depth 16 which is what we use in retropie to reset the framebuffer.

                              To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

                              1 Reply Last reply Reply Quote 0
                              • BuZzB
                                BuZz administrators @Rascas
                                last edited by BuZz

                                @Rascas

                                I thought the black screen on exit was a Kodi 15 bug which was fixed in 16 ?

                                Another thing - your line tvservice -p can be problematic on composite set-ups (a user reported it here) - Better would be to save the mode before launching kodi via tvservice -s and restore the mode afterwards.

                                The fbset -depth 8/fbset -depth 16 might work better than switching vts btw as it will work even if already on VT 2. Also no sudo needed.

                                I would also add a 1 second delay after switching mode with tvservice.

                                To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

                                1 Reply Last reply Reply Quote 0
                                • RascasR
                                  Rascas
                                  last edited by Rascas

                                  It wasn't really fixed in the program or firmware, but workarounded in /usr/bin/kodi.

                                  Can you give me an example on how to save and restore with tvservice, in a way that works for any kind of TV / setup ?

                                  I don't remember exactly in what but I think the change of VT is needed because of black screen after exiting Kodi. I think fbset -depth 8/fbset -depth 16 isn't enough. I will try to test it but only on Monday now, can you please test it also ?

                                  BuZzB 1 Reply Last reply Reply Quote 0
                                  • BuZzB
                                    BuZz administrators @Rascas
                                    last edited by

                                    @Rascas Have done some testing.

                                    Actually it was enough to add a sleep 1 right after tvservice to fix the problem. I also tested with fbset which works - so I think this would be safer (and reduces the need for a check)

                                    sudo tvservice -p >/dev/null 2>&1
                                    sleep 1
                                    fbset -depth 8
                                    fbset -depth 16
                                    

                                    but I would also remove the tvservice line altogether - unless you are actually saving the previous mode and restoring it - are we certain Kodi doesn't restore the video mode on exit anyway. Works here to just include the fbset lines.

                                    To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

                                    1 Reply Last reply Reply Quote 0
                                    • RascasR
                                      Rascas
                                      last edited by Rascas

                                      sudo tvservice -p >/dev/null 2>&1 This is only needed to fix a bug in which, if one uses a different resolution in Kodi than the default TV resolution (or the defined in config.txt), when you exit Kodi, ES stays in the same resolution of the one set in Kodi.

                                      1 Reply Last reply Reply Quote 0
                                      • BuZzB
                                        BuZz administrators
                                        last edited by BuZz

                                        I put this together based on runcommand code (converted from bash to generic shell) - only had limited testing but should work on composite (as tvservice -p does not work right when using composite out)

                                        #!/bin/sh
                                        
                                        save_mode() {
                                            local status="$(tvservice -s)"
                                            if echo "$status" | grep -qE "(PAL|NTSC)"; then
                                                MODE_TYPE=$(echo "$status" | grep -oE "(PAL|NTSC)")
                                                MODE_INFO=$(echo "$status" | grep -oE "([0-9]+\:[0-9]+)")
                                            else
                                                MODE_TYPE=$(echo "$status" | grep -oE "(CEA|DMT)")
                                                MODE_INFO=$(echo "$status" | grep -oE "\([0-9]+\)" | tr -d '()')
                                            fi
                                        }
                                        
                                        restore_mode() {
                                            if [ "$MODE_TYPE" = "PAL" ] || [ "$MODE_TYPE" = "NTSC" ]; then
                                                tvservice -c "$MODE_TYPE $MODE_INFO" >/dev/null
                                            else
                                                tvservice -e "$MODE_TYPE $MODE_INFO" >/dev/null
                                            fi
                                            sleep 1
                                            fbset -depth 8
                                            fbset -depth 16
                                        }
                                        
                                        save_mode
                                        
                                        # launch kodi
                                        
                                        restore_mode
                                        

                                        To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

                                        RascasR 1 Reply Last reply Reply Quote 0
                                        • BuZzB
                                          BuZz administrators
                                          last edited by

                                          Made a few minor updates to the script above.

                                          To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

                                          1 Reply Last reply Reply Quote 0
                                          • RascasR
                                            Rascas @BuZz
                                            last edited by Rascas

                                            Nice. If the chvt isn't really needed anymore and can be replaced with fbset, I think something like this maybe better:

                                            #!/bin/sh
                                            
                                            save_mode() {
                                                local status="$(tvservice -s)"
                                                if echo "$status" | grep -qE "(PAL|NTSC)"; then
                                                    MODE_TYPE=$(echo "$status" | grep -oE "(PAL|NTSC)")
                                                    MODE_INFO=$(echo "$status" | grep -oE "([0-9]+\:[0-9]+)")
                                                else
                                                    MODE_TYPE=$(echo "$status" | grep -oE "(CEA|DMT)")
                                                    MODE_INFO=$(echo "$status" | grep -oE "\([0-9]+\)" | tr -d '()')
                                                fi
                                                ORIGINAL_DEPTH=`fbset | head -3 | tail -1 | cut -d " " -f 10`
                                            }
                                            
                                            restore_mode() {
                                                if [ "$MODE_TYPE" = "PAL" ] || [ "$MODE_TYPE" = "NTSC" ]; then
                                                    tvservice -c "$MODE_TYPE $MODE_INFO" >/dev/null
                                                else
                                                    tvservice -e "$MODE_TYPE $MODE_INFO" >/dev/null
                                                fi
                                                sleep 1
                                                fbset -depth 8 > /dev/null 2>&1
                                                fbset -depth $ORIGINAL_DEPTH > /dev/null 2>&1
                                            }
                                            
                                            save_mode
                                            
                                            # launch kodi
                                            
                                            restore_mode
                                            

                                            This is because, for example in PiPplware distribution, we use framebuffer_depth=32 which gives better quality image in some cases, like pictures / fotos in Kodi and LXDE/XFCE. Not sure if this gives better image quality in emulators though, probably not.

                                            BuZzB 2 Replies 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.