Log In  

While snooping around the Pico8 execution options, I ran into an SDL error while trying to scale Pico 8 to fit my Pi's screen using "-pixel_perfect 0"

The SDL error is as follows:

SDL Error: The video driver did not add any displays

** FATAL ERROR: Unable to initialize SDL

For some context, I am running my Pi's video output via composite. I assumed this error was related to that, so I tested it once again using the default HDMI output. The SDL error returned exactly the same.

To test further, I attempted executing Pico8 from a CLI environment instead of desktop. This returned the exact same SDL error every time, even without any options. I tried this for HDMI and composite.

To make sure this wasn't something wrong with my own Pi, I performed a reinstall of Pi OS and tried each iteration of the problem once again to the same results.

I still suspect I may be missing something on my end, but I think this is enough evidence to report officially as a bug. I'm no longer concerned about "-pixel_perfect 0" not working as I believe I've found an alternative, but I am concerned that starting Pico8 from a CLI environment doesn't seem to work on Pi.

P#119317 2022-10-19 17:44 ( Edited 2022-10-19 17:46)

working perfectly fine here:

[email protected]:~/pico-8 $ ./pico8 -pixel_perfect 0                                                                                                                   |
[email protected]:~/pico-8 $ uname -a                                                                                                                                   |
Linux raspberrypi 4.4.21-v7+ #911 SMP Thu Sep 15 14:22:38 BST 2016 armv7l GNU/Linux                                                                                  |

[email protected]:~/pico-8 $ cat /etc/os-release                                                                                                                        |
PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"                                                                                                                          |
NAME="Raspbian GNU/Linux"                                                                                                                                            |
VERSION_ID="8"                                                                                                                                                       |
VERSION="8 (jessie)"                                                                                                                                                 |

using pico8 version 0.2.5c, and output to hdmi -> vga -> lcd 21"

perhaps

[email protected]:~/pico-8 $ ldd pico8_dyn                                                                                                                              |
        linux-vdso.so.1 (0x7ee2d000)                                                                                                                                 |
        /usr/lib/arm-linux-gnueabihf/libarmmem.so (0x76f57000)                                                                                                       |
        libSDL2-2.0.so.0 => not found                                                                                                                                |
        libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0x76ec9000)                                                                                                 |
        libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x76d88000)                                                                                                 |
        /lib/ld-linux-armhf.so.3 (0x54ad2000)                                                                                                                        |

my SDL2 lib is not in the path, so pico8 will do the resolving by itself, which is great. But what happen if it's in your path already, wrong one?
Please share your ldd.

edit: on a pi 3B

P#119467 2022-10-23 05:19 ( Edited 2022-10-23 05:24)

I've just run into this problem too. Have you tried enabling the legacy desktop drivers via raspi-config? (neither work for me lol but they give different errors)

I'm running a Pi Zero 2 W Rev 1.0, connected to the HDMI output and using the legacy desktop drivers (dtoverlay=vc4-kms-v3d is commented in config.txt):

[email protected]:~/pico-8 $ ./pico8
[email protected]:~/pico-8 $ ./pico8 -pixel_perfect 0
libEGL warning: DRI2: failed to authenticate
SDL Error: Could not create GLES window surface

** FATAL ERROR: Unable to create window

Segmentation fault
[email protected]:~/pico-8 $ uname -a
Linux picodate 5.15.76-v7+ #1597 SMP Fri Nov 4 12:13:17 GMT 2022 armv7l GNU/Linux
[email protected]:~/pico-8 $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"


Here's the ldd. In case it helps I've also uploaded a strace.

[email protected]:~/pico-8 $ ldd pico8_dyn
    linux-vdso.so.1 (0x7eff9000)
    /usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so => /usr/lib/arm-linux-gnueabihf/libarmmem-v7l.so (0x76f7c000)
    libSDL2-2.0.so.0 => /lib/arm-linux-gnueabihf/libSDL2-2.0.so.0 (0x76e17000)
    libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0x76da8000)
    libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x76c54000)
    libasound.so.2 => /lib/arm-linux-gnueabihf/libasound.so.2 (0x76b71000)
    libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0x76b5d000)
    libpulse.so.0 => /lib/arm-linux-gnueabihf/libpulse.so.0 (0x76b02000)
    libX11.so.6 => /lib/arm-linux-gnueabihf/libX11.so.6 (0x769dc000)
    libXext.so.6 => /lib/arm-linux-gnueabihf/libXext.so.6 (0x769bd000)
    libXcursor.so.1 => /lib/arm-linux-gnueabihf/libXcursor.so.1 (0x769a4000)
    libXinerama.so.1 => /lib/arm-linux-gnueabihf/libXinerama.so.1 (0x76991000)
    libXi.so.6 => /lib/arm-linux-gnueabihf/libXi.so.6 (0x76973000)
    libXrandr.so.2 => /lib/arm-linux-gnueabihf/libXrandr.so.2 (0x7695a000)
    libXss.so.1 => /lib/arm-linux-gnueabihf/libXss.so.1 (0x76947000)
    libXxf86vm.so.1 => /lib/arm-linux-gnueabihf/libXxf86vm.so.1 (0x76932000)
    libdrm.so.2 => /lib/arm-linux-gnueabihf/libdrm.so.2 (0x76912000)
    libgbm.so.1 => /lib/arm-linux-gnueabihf/libgbm.so.1 (0x768f6000)
    libwayland-egl.so.1 => /lib/arm-linux-gnueabihf/libwayland-egl.so.1 (0x768e4000)
    libwayland-client.so.0 => /lib/arm-linux-gnueabihf/libwayland-client.so.0 (0x768c9000)
    libwayland-cursor.so.0 => /lib/arm-linux-gnueabihf/libwayland-cursor.so.0 (0x768b2000)
    libxkbcommon.so.0 => /lib/arm-linux-gnueabihf/libxkbcommon.so.0 (0x76867000)
    libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0x7683b000)
    /lib/ld-linux-armhf.so.3 (0x76f91000)
    libpulsecommon-14.2.so => /usr/lib/arm-linux-gnueabihf/pulseaudio/libpulsecommon-14.2.so (0x767b8000)
    libdbus-1.so.3 => /lib/arm-linux-gnueabihf/libdbus-1.so.3 (0x76764000)
    libxcb.so.1 => /lib/arm-linux-gnueabihf/libxcb.so.1 (0x76733000)
    libXrender.so.1 => /lib/arm-linux-gnueabihf/libXrender.so.1 (0x7671a000)
    libXfixes.so.3 => /lib/arm-linux-gnueabihf/libXfixes.so.3 (0x76705000)
    libwayland-server.so.0 => /lib/arm-linux-gnueabihf/libwayland-server.so.0 (0x766e7000)
    libexpat.so.1 => /lib/arm-linux-gnueabihf/libexpat.so.1 (0x766b3000)
    libffi.so.7 => /lib/arm-linux-gnueabihf/libffi.so.7 (0x7669b000)
    libsystemd.so.0 => /lib/arm-linux-gnueabihf/libsystemd.so.0 (0x765e4000)
    libwrap.so.0 => /lib/arm-linux-gnueabihf/libwrap.so.0 (0x765cc000)
    libsndfile.so.1 => /lib/arm-linux-gnueabihf/libsndfile.so.1 (0x76547000)
    libasyncns.so.0 => /lib/arm-linux-gnueabihf/libasyncns.so.0 (0x76532000)
    librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0x7651a000)
    libXau.so.6 => /lib/arm-linux-gnueabihf/libXau.so.6 (0x76507000)
    libXdmcp.so.6 => /lib/arm-linux-gnueabihf/libXdmcp.so.6 (0x764f2000)
    libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0x764c5000)
    liblzma.so.5 => /lib/arm-linux-gnueabihf/liblzma.so.5 (0x76494000)
    libzstd.so.1 => /lib/arm-linux-gnueabihf/libzstd.so.1 (0x763c7000)
    liblz4.so.1 => /lib/arm-linux-gnueabihf/liblz4.so.1 (0x7639a000)
    libgcrypt.so.20 => /lib/arm-linux-gnueabihf/libgcrypt.so.20 (0x762bd000)
    libnsl.so.2 => /lib/arm-linux-gnueabihf/libnsl.so.2 (0x76299000)
    libFLAC.so.8 => /lib/arm-linux-gnueabihf/libFLAC.so.8 (0x7625c000)
    libvorbis.so.0 => /lib/arm-linux-gnueabihf/libvorbis.so.0 (0x76225000)
    libvorbisenc.so.2 => /lib/arm-linux-gnueabihf/libvorbisenc.so.2 (0x76193000)
    libopus.so.0 => /lib/arm-linux-gnueabihf/libopus.so.0 (0x76135000)
    libogg.so.0 => /lib/arm-linux-gnueabihf/libogg.so.0 (0x7611d000)
    libnsl.so.1 => /lib/arm-linux-gnueabihf/libnsl.so.1 (0x760f8000)
    libresolv.so.2 => /lib/arm-linux-gnueabihf/libresolv.so.2 (0x760d3000)
    libbsd.so.0 => /lib/arm-linux-gnueabihf/libbsd.so.0 (0x760b1000)
    libgpg-error.so.0 => /lib/arm-linux-gnueabihf/libgpg-error.so.0 (0x76084000)
    libtirpc.so.3 => /lib/arm-linux-gnueabihf/libtirpc.so.3 (0x7604d000)
    libmd.so.0 => /lib/arm-linux-gnueabihf/libmd.so.0 (0x76032000)
    libgssapi_krb5.so.2 => /lib/arm-linux-gnueabihf/libgssapi_krb5.so.2 (0x75fe2000)
    libkrb5.so.3 => /lib/arm-linux-gnueabihf/libkrb5.so.3 (0x75f27000)
    libk5crypto.so.3 => /lib/arm-linux-gnueabihf/libk5crypto.so.3 (0x75eeb000)
    libcom_err.so.2 => /lib/arm-linux-gnueabihf/libcom_err.so.2 (0x75ed8000)
    libkrb5support.so.0 => /lib/arm-linux-gnueabihf/libkrb5support.so.0 (0x75ebd000)
    libkeyutils.so.1 => /lib/arm-linux-gnueabihf/libkeyutils.so.1 (0x75ea9000)


Like @cobalt00 I'm going to go with an alternative fix for the time being, but it'd be great to know if it's a bug or something we're doing wrong.

P#121382 2022-11-25 12:19

m_b, your ldd output really looks like the output for pico8 (statically linked, contrary to pico8_dyn), which embeds its own libsdl built with options defined by zep. libsdl from the repo will have different options, as would one built by yourself.

P#121385 2022-11-25 15:19

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2023-01-30 10:26:25 | 0.237s | Q:22