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

    Error Creating SDL window... But my config file looks different?

    Scheduled Pinned Locked Moved Help and Support
    sdl windowlcd screendriver installerror
    13 Posts 2 Posters 779 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.
    • mituM
      mitu Global Moderator @Jvdos
      last edited by

      @Jvdos said in Error Creating SDL window... But my config file looks different?:

      However, this line is not present in what I think is my config file. The file is in my SD card under:
      "D:\config"

      This may not be the right file, check if don't have a config.txt file located directly on the boot/bootfs partition of the card. Otherwise, start with a standard Pi4 image and save the config.txt from it (after you write it on the sdcard) and then add the necessary lines to enable the screen, without running the Waveshare script.

      J 1 Reply Last reply Reply Quote 1
      • J
        Jvdos @mitu
        last edited by

        @mitu Going to try this now, but will the lines enabling the screen still work without the files downloaded through the wave share script?

        J 1 Reply Last reply Reply Quote 0
        • J
          Jvdos @Jvdos
          last edited by

          @Jvdos said in Error Creating SDL window... But my config file looks different?:

          @mitu Going to try this now, but will the lines enabling the screen still work without the files downloaded through the wave share script?

          Okay my config file now looks like this after adding the necessary lines to enable the screen:

          # For more options and information see
          # http://rpf.io/configtxt
          # Some settings may impact device functionality. See link above for details
          
          # uncomment if you get no picture on HDMI for a default "safe" mode
          #hdmi_safe=1
          
          # uncomment this if your display has a black border of unused pixels visible
          # and your display can output without overscan
          #disable_overscan=1
          
          # uncomment the following to adjust overscan. Use positive numbers if console
          # goes off screen, and negative if there is too much border
          #overscan_left=16
          #overscan_right=16
          #overscan_top=16
          #overscan_bottom=16
          
          # uncomment to force a console size. By default it will be display's size minus
          # overscan.
          #framebuffer_width=1280
          #framebuffer_height=720
          
          # uncomment if hdmi display is not detected and composite is being output
          hdmi_force_hotplug=1
          
          # uncomment to force a specific HDMI mode (this will force VGA)
          #hdmi_group=1
          #hdmi_mode=1
          
          # uncomment to force a HDMI mode rather than DVI. This can make audio work in
          # DMT (computer monitor) modes
          #hdmi_drive=2
          
          # uncomment to increase signal to HDMI, if you have interference, blanking, or
          # no display
          #config_hdmi_boost=4
          
          # uncomment for composite PAL
          #sdtv_mode=2
          
          #uncomment to overclock the arm. 700 MHz is the default.
          #arm_freq=800
          
          # Uncomment some or all of these to enable the optional hardware interfaces
          dtparam=i2c_arm=on
          #dtparam=i2s=on
          dtparam=spi=on
          enable_uart=1
          
          # Uncomment this to enable infrared communication.
          #dtoverlay=gpio-ir,gpio_pin=17
          #dtoverlay=gpio-ir-tx,gpio_pin=18
          
          # Additional overlays and parameters are documented /boot/overlays/README
          
          # Enable audio (loads snd_bcm2835)
          dtparam=audio=on
          dtoverlay=waveshare35a
          #dtoverlay=ads7846,cs=1,penirq=17,penirq_pull=2,speed=1000000,keep_vref_on=1,swapxy=1,pmax=255,xohms=60,xmin=200,xmax=3900,ymin=200,ymax=3900
          hdmi_force_hotplug=1
          #max_usb_current=1
          hdmi_group=2
          hdmi_mode=1
          hdmi_mode=87
          hdmi_cvt 640 480 60 6 0 0 0
          hdmi_drive=2
          
          [pi4]
          # Enable DRM VC4 V3D driver on top of the dispmanx display stack
          dtoverlay=vc4-fkms-v3d
          max_framebuffers=2
          
          [all]
          #dtoverlay=vc4-fkms-v3d
          overscan_scale=1
          
          

          ...The Pi now displays on my HDMI monitor (with a very low resolution as if it were on the LCD screen)

          I am no longer getting the error about SDL window.
          How do i get it to show on the LCD screen? do I need to add the drivers through the terminal now?

          mituM 1 Reply Last reply Reply Quote 0
          • mituM
            mitu Global Moderator @Jvdos
            last edited by

            @Jvdos Make sure you add all the overlays and parameters at the end of the file, not at the beginning. You also have twice specified hdmi_mode, only the last value should be set; hdmi_drive has no effect.
            Did you try to add the [pi4] section from the default image to your previous configuration file (which I presume was working with the screen) ?

            J 1 Reply Last reply Reply Quote 0
            • J
              Jvdos @mitu
              last edited by Jvdos

              @mitu

              @mitu said in Error Creating SDL window... But my config file looks different?:

              Did you try to add the [pi4] section from the default image to your previous configuration file (which I presume was working with the screen) ?

              I tried something like that before yes.
              However, I copied an entire config.txt file from someone with the same problem (also with the same driver) And it didn't do anything noticeable except make it so neither display worked.

              @Jvdos Make sure you add all the overlays and parameters at the end of the file, not at the beginning. You also have twice specified hdmi_mode, only the last value should be set; hdmi_drive has no effect.

              Changed those things.

              # For more options and information see
              # http://rpf.io/configtxt
              # Some settings may impact device functionality. See link above for details
              
              # uncomment if you get no picture on HDMI for a default "safe" mode
              #hdmi_safe=1
              
              # uncomment this if your display has a black border of unused pixels visible
              # and your display can output without overscan
              #disable_overscan=1
              
              # uncomment the following to adjust overscan. Use positive numbers if console
              # goes off screen, and negative if there is too much border
              #overscan_left=16
              #overscan_right=16
              #overscan_top=16
              #overscan_bottom=16
              
              # uncomment to force a console size. By default it will be display's size minus
              # overscan.
              #framebuffer_width=1280
              #framebuffer_height=720
              
              # uncomment if hdmi display is not detected and composite is being output
              hdmi_force_hotplug=1
              
              # uncomment to force a specific HDMI mode (this will force VGA)
              #hdmi_group=1
              #hdmi_mode=1
              
              # uncomment to force a HDMI mode rather than DVI. This can make audio work in
              # DMT (computer monitor) modes
              #hdmi_drive=2
              
              # uncomment to increase signal to HDMI, if you have interference, blanking, or
              # no display
              #config_hdmi_boost=4
              
              # uncomment for composite PAL
              #sdtv_mode=2
              
              #uncomment to overclock the arm. 700 MHz is the default.
              #arm_freq=800
              
              # Uncomment some or all of these to enable the optional hardware interfaces
              dtparam=i2c_arm=on
              #dtparam=i2s=on
              dtparam=spi=on
              enable_uart=1
              
              # Uncomment this to enable infrared communication.
              #dtoverlay=gpio-ir,gpio_pin=17
              #dtoverlay=gpio-ir-tx,gpio_pin=18
              
              # Additional overlays and parameters are documented /boot/overlays/README
              
              # Enable audio (loads snd_bcm2835)
              dtparam=audio=on
              
              [pi4]
              # Enable DRM VC4 V3D driver on top of the dispmanx display stack
              dtoverlay=vc4-fkms-v3d
              max_framebuffers=2
              
              [all]
              #dtoverlay=vc4-fkms-v3d
              overscan_scale=1
              dtoverlay=waveshare35a
              #dtoverlay=ads7846,cs=1,penirq=17,penirq_pull=2,speed=1000000,keep_vref_on=1,swapxy=1,pmax=255,xohms=60,xmin=200,xmax=3900,ymin=200,ymax=3900
              hdmi_force_hotplug=1
              #max_usb_current=1
              hdmi_group=2
              hdmi_mode=87
              hdmi_cvt 640 480 60 6 0 0 0
              
              
              
              J 1 Reply Last reply Reply Quote 0
              • J
                Jvdos @Jvdos
                last edited by

                I ended up trying this config file, and it boots up, showing only the start up text that rolls past and then a black screen. Nothing on the LCD either.

                # For more options and information see
                # http://rpf.io/configtxt
                # Some settings may impact device functionality. See link above for details
                
                # uncomment if you get no picture on HDMI for a default "safe" mode
                #hdmi_safe=1
                
                # uncomment this if your display has a black border of unused pixels visible
                # and your display can output without overscan
                #disable_overscan=1
                
                # uncomment the following to adjust overscan. Use positive numbers if console
                # goes off screen, and negative if there is too much border
                #overscan_left=16
                #overscan_right=16
                #overscan_top=16
                #overscan_bottom=16
                
                # uncomment to force a console size. By default it will be display's size minus
                # overscan.
                #framebuffer_width=1280
                #framebuffer_height=720
                
                # uncomment if hdmi display is not detected and composite is being output
                hdmi_force_hotplug=1
                
                # uncomment to force a specific HDMI mode (this will force VGA)
                #hdmi_group=1
                #hdmi_mode=1
                
                # uncomment to force a HDMI mode rather than DVI. This can make audio work in
                # DMT (computer monitor) modes
                #hdmi_drive=2
                
                # uncomment to increase signal to HDMI, if you have interference, blanking, or
                # no display
                #config_hdmi_boost=4
                
                # uncomment for composite PAL
                #sdtv_mode=2
                
                #uncomment to overclock the arm. 700 MHz is the default.
                #arm_freq=800
                
                # Uncomment some or all of these to enable the optional hardware interfaces
                dtparam=i2c_arm=on
                #dtparam=i2s=on
                dtparam=spi=on
                enable_uart=1
                
                # Uncomment this to enable infrared communication.
                #dtoverlay=gpio-ir,gpio_pin=17
                #dtoverlay=gpio-ir-tx,gpio_pin=18
                
                # Additional overlays and parameters are documented /boot/overlays/README
                
                # Enable audio (loads snd_bcm2835)
                dtparam=audio=on
                
                [pi4]
                # Enable DRM VC4 V3D driver on top of the dispmanx display stack
                dtoverlay=vc4-fkms-v3d
                max_framebuffers=2
                
                [all]
                #dtoverlay=vc4-fkms-v3d
                overscan_scale=1
                dtoverlay=waveshare35a
                #dtoverlay=ads7846,cs=1,penirq=17,penirq_pull=2,speed=1000000,keep_vref_on=1,swapxy=1,pmax=255,xohms=60,xmin=200,xmax=3900,ymin=200,ymax=3900
                hdmi_force_hotplug=1
                #max_usb_current=1
                hdmi_group=2
                hdmi_mode=87
                hdmi_cvt 640 480 60 6 0 0 0
                
                

                So what is wrong with this config file?

                mituM 1 Reply Last reply Reply Quote 0
                • mituM
                  mitu Global Moderator @Jvdos
                  last edited by

                  @Jvdos said in Error Creating SDL window... But my config file looks different?:

                  So what is wrong with this config file?

                  You've commented out the ads7846 overlay - wasn't it enabled in the working config ?

                  J 1 Reply Last reply Reply Quote 0
                  • J
                    Jvdos @mitu
                    last edited by Jvdos

                    @mitu So i tried that, and it didn't work. Nothing seemed to change. This is my config file now. (I realized i still had some param set at the top)

                    # For more options and information see
                    # http://rpf.io/configtxt
                    # Some settings may impact device functionality. See link above for details
                    
                    # uncomment if you get no picture on HDMI for a default "safe" mode
                    #hdmi_safe=1
                    
                    # uncomment this if your display has a black border of unused pixels visible
                    # and your display can output without overscan
                    #disable_overscan=1
                    
                    # uncomment the following to adjust overscan. Use positive numbers if console
                    # goes off screen, and negative if there is too much border
                    #overscan_left=16
                    #overscan_right=16
                    #overscan_top=16
                    #overscan_bottom=16
                    
                    # uncomment to force a console size. By default it will be display's size minus
                    # overscan.
                    #framebuffer_width=1280
                    #framebuffer_height=720
                    
                    # uncomment if hdmi display is not detected and composite is being output
                    hdmi_force_hotplug=1
                    
                    # uncomment to force a specific HDMI mode (this will force VGA)
                    #hdmi_group=1
                    #hdmi_mode=1
                    
                    # uncomment to force a HDMI mode rather than DVI. This can make audio work in
                    # DMT (computer monitor) modes
                    #hdmi_drive=2
                    
                    # uncomment to increase signal to HDMI, if you have interference, blanking, or
                    # no display
                    #config_hdmi_boost=4
                    
                    # uncomment for composite PAL
                    #sdtv_mode=2
                    
                    #uncomment to overclock the arm. 700 MHz is the default.
                    #arm_freq=800
                    
                    # Uncomment some or all of these to enable the optional hardware interfaces
                    #dtparam=i2s=on
                    
                    
                    # Uncomment this to enable infrared communication.
                    #dtoverlay=gpio-ir,gpio_pin=17
                    #dtoverlay=gpio-ir-tx,gpio_pin=18
                    
                    # Additional overlays and parameters are documented /boot/overlays/README
                    
                    # Enable audio (loads snd_bcm2835)
                    dtparam=audio=on
                    
                    [pi4]
                    # Enable DRM VC4 V3D driver on top of the dispmanx display stack
                    dtoverlay=vc4-fkms-v3d
                    max_framebuffers=2
                    
                    [all]
                    #dtoverlay=vc4-fkms-v3d
                    overscan_scale=1
                    dtparam=i2c_arm=on
                    dtparam=spi=on
                    enable_uart=1
                    dtoverlay=waveshare35a
                    dtoverlay=ads7846,cs=1,penirq=17,penirq_pull=2,speed=1000000,keep_vref_on=1,swapxy=1,pmax=255,xohms=60,xmin=200,xmax=3900,ymin=200,ymax=3900
                    hdmi_force_hotplug=1
                    #max_usb_current=1
                    hdmi_group=2
                    hdmi_mode=87
                    hdmi_cvt 640 480 60 6 0 0 0
                    
                    

                    @mitu said in Error Creating SDL window... But my config file looks different?:

                    • wasn't it enabled in the working config ?

                    In the first one i posted, it wasn't. That's the only file I've gotten it to display on the LCD. (Only showing me the SDL window error.) The LCD is only connected via GPIO btw.

                    I don't get it. The driver just works for other people on Retropie. What's so different about my pi that i didn't get immediate results?

                    J 1 Reply Last reply Reply Quote 0
                    • J
                      Jvdos @Jvdos
                      last edited by Jvdos

                      @Jvdos OK well, I tried to use the following config.txt file again since that one shows on the HDMI. Nothing changed even after rebooting multiple times.

                      # For more options and information see
                      # http://rpf.io/configtxt
                      # Some settings may impact device functionality. See link above for details
                      
                      # uncomment if you get no picture on HDMI for a default "safe" mode
                      #hdmi_safe=1
                      
                      # uncomment this if your display has a black border of unused pixels visible
                      # and your display can output without overscan
                      #disable_overscan=1
                      
                      # uncomment the following to adjust overscan. Use positive numbers if console
                      # goes off screen, and negative if there is too much border
                      #overscan_left=16
                      #overscan_right=16
                      #overscan_top=16
                      #overscan_bottom=16
                      
                      # uncomment to force a console size. By default it will be display's size minus
                      # overscan.
                      #framebuffer_width=1280
                      #framebuffer_height=720
                      
                      # uncomment if hdmi display is not detected and composite is being output
                      hdmi_force_hotplug=1
                      
                      # uncomment to force a specific HDMI mode (this will force VGA)
                      #hdmi_group=1
                      #hdmi_mode=1
                      
                      # uncomment to force a HDMI mode rather than DVI. This can make audio work in
                      # DMT (computer monitor) modes
                      #hdmi_drive=2
                      
                      # uncomment to increase signal to HDMI, if you have interference, blanking, or
                      # no display
                      #config_hdmi_boost=4
                      
                      # uncomment for composite PAL
                      #sdtv_mode=2
                      
                      #uncomment to overclock the arm. 700 MHz is the default.
                      #arm_freq=800
                      
                      # Uncomment some or all of these to enable the optional hardware interfaces
                      dtparam=i2c_arm=on
                      #dtparam=i2s=on
                      dtparam=spi=on
                      enable_uart=1
                      
                      # Uncomment this to enable infrared communication.
                      #dtoverlay=gpio-ir,gpio_pin=17
                      #dtoverlay=gpio-ir-tx,gpio_pin=18
                      
                      # Additional overlays and parameters are documented /boot/overlays/README
                      
                      # Enable audio (loads snd_bcm2835)
                      dtparam=audio=on
                      dtoverlay=waveshare35a
                      #dtoverlay=ads7846,cs=1,penirq=17,penirq_pull=2,speed=1000000,keep_vref_on=1,swapxy=1,pmax=255,xohms=60,xmin=200,xmax=3900,ymin=200,ymax=3900
                      hdmi_force_hotplug=1
                      #max_usb_current=1
                      hdmi_group=2
                      hdmi_mode=1
                      hdmi_mode=87
                      hdmi_cvt 640 480 60 6 0 0 0
                      hdmi_drive=2
                      
                      [pi4]
                      # Enable DRM VC4 V3D driver on top of the dispmanx display stack
                      dtoverlay=vc4-fkms-v3d
                      max_framebuffers=2
                      
                      [all]
                      #dtoverlay=vc4-fkms-v3d
                      overscan_scale=1
                      
                      
                      

                      So, any changes I make to config file have no effect now. Even after loading the original config.txt before adding any drivers etc. I am probably going to restart with a fresh install, and then alter the config file.

                      J 1 Reply Last reply Reply Quote 0
                      • J
                        Jvdos @Jvdos
                        last edited by Jvdos

                        @mitu Okay, made a fresh install and that did nothing... Im really not sure what to here.

                        Does there need to be a file for the config.txt to reference? Like a driver in the overlays folder? I notice one there after running the waveshare script... Do I just need to clone the repo and then use this config file?

                        # For more options and information see
                        # http://rpf.io/configtxt
                        # Some settings may impact device functionality. See link above for details
                        
                        # uncomment if you get no picture on HDMI for a default "safe" mode
                        #hdmi_safe=1
                        
                        # uncomment this if your display has a black border of unused pixels visible
                        # and your display can output without overscan
                        #disable_overscan=1
                        
                        # uncomment the following to adjust overscan. Use positive numbers if console
                        # goes off screen, and negative if there is too much border
                        #overscan_left=16
                        #overscan_right=16
                        #overscan_top=16
                        #overscan_bottom=16
                        
                        # uncomment to force a console size. By default it will be display's size minus
                        # overscan.
                        #framebuffer_width=1280
                        #framebuffer_height=720
                        
                        # uncomment if hdmi display is not detected and composite is being output
                        hdmi_force_hotplug=1
                        
                        # uncomment to force a specific HDMI mode (this will force VGA)
                        #hdmi_group=1
                        #hdmi_mode=1
                        
                        # uncomment to force a HDMI mode rather than DVI. This can make audio work in
                        # DMT (computer monitor) modes
                        #hdmi_drive=2
                        
                        # uncomment to increase signal to HDMI, if you have interference, blanking, or
                        # no display
                        #config_hdmi_boost=4
                        
                        # uncomment for composite PAL
                        #sdtv_mode=2
                        
                        #uncomment to overclock the arm. 700 MHz is the default.
                        #arm_freq=800
                        
                        # Uncomment some or all of these to enable the optional hardware interfaces
                        #dtparam=i2s=on
                        
                        
                        # Uncomment this to enable infrared communication.
                        #dtoverlay=gpio-ir,gpio_pin=17
                        #dtoverlay=gpio-ir-tx,gpio_pin=18
                        
                        # Additional overlays and parameters are documented /boot/overlays/README
                        
                        # Enable audio (loads snd_bcm2835)
                        dtparam=audio=on
                        
                        [pi4]
                        # Enable DRM VC4 V3D driver on top of the dispmanx display stack
                        dtoverlay=vc4-fkms-v3d
                        max_framebuffers=2
                        
                        [all]
                        #dtoverlay=vc4-fkms-v3d
                        overscan_scale=1
                        dtparam=i2c_arm=on
                        dtparam=spi=on
                        enable_uart=1
                        dtoverlay=waveshare35a
                        dtoverlay=ads7846,cs=1,penirq=17,penirq_pull=2,speed=1000000,keep_vref_on=1,swapxy=1,pmax=255,xohms=60,xmin=200,xmax=3900,ymin=200,ymax=3900
                        hdmi_force_hotplug=1
                        #max_usb_current=1
                        hdmi_group=2
                        hdmi_mode=87
                        hdmi_cvt 640 480 60 6 0 0 0
                        
                        
                        
                        mituM J 2 Replies Last reply Reply Quote 0
                        • mituM
                          mitu Global Moderator @Jvdos
                          last edited by

                          @Jvdos said in Error Creating SDL window... But my config file looks different?:

                          @mitu Okay, made a fresh install and that did nothing... Im really not sure what to here.

                          Sorry, I only know what RetroPie needs to have in config.txt in order for it to work properly. The Waveshare displays seem cheap, but lacking good support.

                          1 Reply Last reply Reply Quote 0
                          • J
                            Jvdos @Jvdos
                            last edited by

                            @mitu thats okay. Im sure i can find another driver and solve the problem with that one.

                            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.