NVIDIA / egl-wayland

The EGLStream-based Wayland external platform
MIT License
293 stars 47 forks source link

deadlock displaying frames #20

Open mleeman opened 5 years ago

mleeman commented 5 years ago

I have a simple setup that is

1/ Debian 10 (buster) 2/ GStreamer git, built with gst-build (20190910) 3/ libnvidia-egl-wayland1 (built from git, same date) 4/ mutter 3.32.2+git20190711-2 (debian experimental snapshot). Any snapshot after that will do since it tackles the inverted display. 5/ gfx card is p2000/p4000/m4000 (does not really matter) 6/ nvidia drivers are 430.34-1

A simple pipeline is launched:

$ gst-launch-1.0 videotestsrc ! glimagesink &

This results in a single frame being shown.

When that same pipeline is launched again, both videos are shown smoothly.

mvicomoya commented 5 years ago

Thanks for reporting this issue, @mleeman.

I've been lately falling behind in updating our copy in github with all changes we've done internally, sorry about that.

I just pushed a few changes and bumped the library version to 1.1.4

Note that there has been a considerable overhaul in our event queue management, that may have resolved the issue you were seeing.

Could you please retest and get back with the results?

mleeman commented 5 years ago

I'll have a look, tnx.

mleeman commented 5 years ago

OK, I have packaged it for debian buster and installed it. The behaviour is still the same.

Since the time I have entered this issue in this project, some experiences have surfaced that it could also be related to mutter.

https://gitlab.gnome.org/GNOME/mutter/issues/827

mvicomoya commented 5 years ago

I wonder if this might be related to how eglSwapInterval() is configured by the client, and how wl_surface::frame events are emitted by mutter.

What swapInterval does gst use? If it's 1 (the default), could you try 0?

This can also relate to eglstreams being setup in FIFO mode, and the FIFO being filled up because mutter is not consuming all produced frames, so the client blocks waiting for room in it.

We made MAILBOX the default mode for the eglstreams used by mutter, but maybe something has regressed that recently.