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

    Compute Module 4 (CM4 Lite) Error creating SDL Window

    Scheduled Pinned Locked Moved Help and Support
    cm4 dpi error
    6 Posts 3 Posters 464 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
      Cythan77286
      last edited by

      Re: Display Problem with CM4 Board

      Retropie version: 4.7.1 (RPI 4/400).
      LCD Connection: DPI Mode 2.
      Board: Compute Module 4 – 2GB RAM (Wireless).

      I am attempting to connect a 4 inch RGB DPI display to a compute module 4 (lite) and run Retropie on it with the end goal of making a handheld console.
      The screen turns on and boots showing the coloured box and the initial scripts however, the issue I’m having is the emulation station fails to start and I get an error message displayed reads
      “Error creating SDL window!”
      “Could not initialize EGL”
      “Renderer failed to initialize!”
      “Window failed to initialize!”

      If I connect the screen using HDMI everything works and boots up normally. Is their a work around or a solution to this problem?

      my 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=i2c_arm=on
      #dtparam=i2s=on
      #dtparam=spi=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
      
      # Enable USB
      dtoverlay=dwc2,dr_mode=host
      
      # Internal antenna
      dtparam=ant1
      
      [pi4]
      # Enable DRM VC4 V3D driver on top of the dispmanx display stack
      #dtoverlay=vc4-kms-v3d
      max_framebuffers=2
      
      
      
      [all]
      dtoverlay=vc4-fkms-v3d
      #gpu_mem_256=128
      #gpu_mem_512=256
      #gpu_mem_1024=256
      #overscan_scale=1
      
      # Added to support tft screen 
      
      # Disable spi and i2c, we need these pins.
      dtparam=spi=off
      dtparam=i2c_arm=off
      
      # Set screen size and any overscan required
      dtoverlay=dpi24
      overscan_left=0
      overscan_right=0
      overscan_top=0
      overscan_bottom=0
      
      framebuffer_width=480
      framebuffer_height=272
      
      # enable the DPI display
      enable_dpi_lcd=1
      display_default_lcd=1
      
      # set up the size to 480x272
      dpi_group=2
      dpi_mode=87
      
      # set up the hsync/vsync/clock polarity and format
      #dpi_output_format=0x7F012
      dpi_output_format=0x7f012
      
      # set up the size to 480x272
      hdmi_timings=480 0 40 48 88 272 0 13 3 32 0 0 0 60 0 32000000 6
      
      boot_delay=1
      
      
      1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator
        last edited by mitu

        This looks like DRM/KMS is not working or is not initialized on the display. Can you move the DPI settings above the [pi4] section and see if you get a different result ?
        Make sure you're using the latest Kernel/firmware - do an update for the RetroPie packages and the OS/kernel from the RetroPie-Setup.

        C 1 Reply Last reply Reply Quote 0
        • C
          Cythan77286 @mitu
          last edited by

          @mitu
          I moved the DPI settings above the [Pi4] in the config file and got the same result as before. I then proceeded to perform an update on all installed packages and still got the same result after the update.

          I next tried the configuration and physical connection that Waveshare use in one of their examples for a similar screen (link below) . However this also yielded the same result, initially boot and show colours then display the Retropie splash screen then crash back to the console.
          https://www.waveshare.com/wiki/4inch_DPI_LCD_(B)

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

            @cythan77286 said in Compute Module 4 (CM4 Lite) Error creating SDL Window:

            https://www.waveshare.com/wiki/4inch_DPI_LCD_(B)

            Looking at the page, it specifies that the FKMS overlay should be disabled:

            Note: For Raspberry Pi 4, you need to comment out dtoverlay=vc4-fkms-V3D.

            This effectively means that GPU acceleration and the KMS/DRM drivers for the Pi4 are disabled, which is not a supported configuration for RetroPie. In fact, any application (not only SDL2 applications) that need an accelerated GLES[2|3] context will fail.

            C 1 Reply Last reply Reply Quote 0
            • C
              Cythan77286 @mitu
              last edited by

              @mitu
              That makes sense that the FKMS overlay should be enabled.

              What I have observed is if I comment out "dtoverlay=vc4-fkms-v3d" the screen will run through the initial boot showing the colours and then the retropie splash screen and then crash to the console showing the error message.
              However If I leave "dtoverlay=vc4-fkms-v3d" in the config file it runs through the initial boot showing the colours then the retropie splash screen then it crashes to a black screen. interestingly enough I can still connect to it over SSH but if I try to run emulationstation I get the below errors;

              Oct 15 11:12:13 lvl0: Error initializing SDL!
              No currently active connector found.
              Oct 15 11:12:13 lvl0: Renderer failed to initialize!
              Oct 15 11:12:13 lvl0: Window failed to initialize!

              S 1 Reply Last reply Reply Quote 0
              • S
                SergioPoverony @Cythan77286
                last edited by SergioPoverony

                @cythan77286 I have too trouble,
                Copy my post from raspberrypi forum

                1-st
                #vc4_kms_v3d
                #vc4_fkms_v3d

                DPI 18Bit work fine, rotate 0-90-180-270.
                Screen show console but cant make (emulationstation window) GL error SDL

                2-nd
                vc4_kms_v3d
                #vc4_fkms_v3d

                DPI 18Bit work fine, rotate 0-90-180-270.
                Screen show console but cant make (emulationstation window) GL error SDL

                3-rt
                #vc4_kms_v3d
                vc4_fkms_v3d

                DPI 18Bit work fine, CAN'T rotate 0-90-180-270.
                Screen show console and fine work emulationstation window and etc. But cant rotate

                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.