Compute Module 4 (CM4 Lite) Error creating SDL Window
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
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.
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.
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.
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!