Raspberry Pi 4 - Forced VSYNC?!
-
Hi @mitu, thanks for reply.
I don't understand the point because if there is a bug on SDL 2.0.10 the same behaviour should happens with Raspberry Pi v3. So there is a difference between Raspberry Pi v3 and Raspberry Pi v4 that creates the problem. Video driver? Hardware?
Anyway I tried with RetroPie 4.7.1 stock (5.4 kernel) and after a full upgrade (so new kernel). After that I changed this option in config.txt
dtoverlay=vc4-fkms-v3d
so, as I understand, Fake KMS in this
dtoverlay=vc4-kms-v3d
so Full KMS. The problem persists. I will try to use newer SDL version in order to continue my investigation.
Maybe there is a wrong interaction between KMS and SDL2 that only appears on Raspberry Pi v4
-
@francemsr said in Raspberry Pi 4 - Forced VSYNC?!:
I don't understand the point because if there is a bug on SDL 2.0.10 the same behaviour should happens with Raspberry Pi v3. So there is a difference between Raspberry Pi v3 and Raspberry Pi v4 that creates the problem. Video driver? Hardware?
The Pi3 (and previous models) has a different video driver in SDL2 - as I said the issue is with the KMS video driver (which is used on the Pi4).
-
@mitu sorry but you wrote "I remember being a SDL2 issue with its KMS video driver." as kind of sort of SDL-ONLY-RELATED internal driver, not Raspberry Pi one :-)
As I said before, I'll try SDL 2.0.14 and I'll report the result
-
@francemsr Yes, it's the SDL2 driver, not the Linux kernel or Mesa drivers.
-
@mitu good, thanks.
Just for testing purpose: is there a way to use glxgears closing EmulationStation?
-
@francemsr You can install the desktop part as a Port and start it from EmulationStation - https://retropie.org.uk/docs/FAQ/#where-did-the-desktop-go
-
@mitu ok, I thought there was a different way instead of pass from Desktop Environment.
Thanks for now
-
@francemsr You can instruct the RetroPie launcher (
runcommand
) to start an emulator/program viaxorg
by addingXINIT
to its command inemulators.cfg
- for instance this is howsteamlink
is started (see here). -
@mitu oh good thing!
-
Built SDL2 with --enable-video-kmsdrm parameter, this is the result of pre-build configuration
SDL2 Configure Summary: Building Shared Libraries Building Static Libraries Enabled modules : atomic audio video render events joystick haptic sensor power filesystem threads timers file loadso cpuinfo assembly Assembly Math : Audio drivers : disk dummy oss alsa(dynamic) sndio(dynamic) Video drivers : dummy rpi x11(dynamic) kmsdrm(dynamic) opengl opengl_es1 opengl_es2 vulkan X11 libraries : xcursor xdbe xinerama xinput2 xinput2_multitouch xrandr xscrnsaver xshape xvidmode Input drivers : linuxev linuxkd Enable virtual joystick APIs : YES Using libsamplerate : YES Using libudev : YES Using dbus : YES Using ime : YES Using ibus : YES Using fcitx : YES
When Raspberry Pi starts EmulationStation crashes on Creating window... log. Maybe I break something, any idea? This happens both with dtoverlay=vc4-fkms-v3d and dtoverlay=vc4-kms-v3d
P.S.: Building without --enable-video-kmsdrm option bring me to console with error related on creation of OpenGL window
-
Try to disable the
rpi
video driver when configuring SDL2. -
@mitu Built SDL 2.0.14 with
--disable-video-rpi --enable-video-kmsdrm
The FPS problem still exists with 5.4 kernel, or newer one after full SO upgrade (in this case with fkms or kms), and in this way when emulator is closed EmulationStation is frozen.
Anyway I found a solution, if VERTICAL SYNC is enabled also on emulator (I added a command line parameter for this) also Raspberry Pi v4 version is ok.
If you don't have any other idea I'll stop the investigation, I don't love VSYNC because if a user has a 50 Hz monitor all games with nominal 60 FPS framerate runs at 50 FPS.
Really appreciate your help
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.