New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wayland: waiting for events and blocking #614
Comments
The problem described here with Wayland was traced to an incompatibility of NVidia drivers, FLTK and Wayland. |
I am adding the ToyGL3player.cxx file that @ManoloFLTK created which works fine on Ubuntu with Mesa/nouveau drivers but does not work fine with NVidia drivers. |
@ManoloFLTK Sorry for the bother. I was wondering if you had an NVidia card on a Linux box to replicate the Wayland issues. |
No, I don't have that. |
El 26/01/2023 a las 12:12 p. m., ManoloFLTK escribió:
@ggarra13 <https://github.com/ggarra13> Could you, please, report
whether ToyGL3player works with NVidia and after commit 1581662
<1581662>
(26 jan 2023) ?
No, it doesn't. And my player, when set to FLTK_BACKEND=x11 which used
to work now stutters a bit too.
…--
Gonzalo Garramuño
***@***.***
|
@ggarra13 Is this issue still valid? If not, please, close it. |
Describe the bug
When my video player application runs, it stutters and eventually hangs.
To Reproduce
I am unable to reproduce it with the simple examples. However, I traced the problem to two functions. First, the stuttering happens in:
Fl_Gl_Wayland_Gl_Window_Driver::swap_buffers() when it calls:
wl_display_read_events(fl_wl_display()); // this stops the event loop for some seconds and then continues.
The hanging, happens eventually when calling fd_callback() in:
wl_display_dispatch()
It is unclear to me if one is the reason for the other.
I commented all the Wayland code in swap_buffers() right before eglSwapBuffers and then I was able to play my movie without stuttering or blocking. This, of course, is not the solution as the demo programs became unresponsive to the mouse and my application would crash sometimes when leaving the main window and entering it again.
Expected behavior
I expect Wayland to work as X11 does, playing my movie without stuttering or blocking.
Screenshots
I don't have screenshots, but I have my application free to download and compile with just a simple runme.sh script. It takes about 20 mins to compile, thou.
https://github.com/ggarra13/mrv2
I also added @ManoloFLTK 's ToyGL3Player which does not animate properly with NVidia drivers and current Wayland code.
FLTK Version
b26db74
FLTK Configure / Build Options
include( ExternalProject )
set( FLTK_TAG master )
set( patch_cmd )
if (APPLE OR WIN32)
set( wayland OFF )
set( pango OFF )
else()
set( wayland ON ) # we'll leave it on, albet it is way too buggy.
set( pango ON )
endif()
ExternalProject_Add(
FLTK
GIT_REPOSITORY "https://github.com/fltk/fltk.git"
GIT_TAG ${FLTK_TAG}
GIT_PROGRESS 1
PATCH_COMMAND ${patch_cmd}
CMAKE_ARGS
-DCMAKE_MODULE_PATH=${CMAKE_MODULE_PATH}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}
-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
-DFLTK_BUILD_EXAMPLES=OFF
-DFLTK_BUILD_TEST=OFF
-DOPTION_BUILD_SHARED_LIBS=0
-DOPTION_USE_SYSTEM_ZLIB=0
-DOPTION_USE_SYSTEM_LIBJPEG=0
-DOPTION_USE_SYSTEM_LIBPNG=0
-DOPTION_USE_PANGO=${pango}
-DOPTION_USE_WAYLAND=${wayland}
)
Operating System / Platform:
Linux.
Ubuntu 22.04 on Wayland
Linux/Unix Runtime, if applicable:
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: