Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

backend/wayland: spurious eglSwapBuffers failures #1768

Closed
emersion opened this issue Jul 23, 2019 · 6 comments · Fixed by #2245
Closed

backend/wayland: spurious eglSwapBuffers failures #1768

emersion opened this issue Jul 23, 2019 · 6 comments · Fixed by #2245

Comments

@emersion
Copy link
Member

emersion commented Jul 23, 2019

Sometimes eglSwapBuffers fails on the Wayland backend. Maybe we're running out of buffers.

2019-07-23 19:12:39 - [EGL] eglSwapInterval: eglSwapInterval
2019-07-23 19:12:39 - [EGL] eglSwapBuffers: eglSwapBuffers
2019-07-23 19:12:39 - [render/egl.c:400] eglSwapBuffers failed
@RedSoxFan
Copy link
Member

It looks like this effects the DRM backend as well: swaywm/sway#4419 and #1780

@Emantor
Copy link
Contributor

Emantor commented Aug 7, 2019

Probably "fixed" by #1781

@emersion
Copy link
Member Author

Can still reproduce.

@aemino
Copy link

aemino commented Sep 20, 2019

I also encounter this with my toy compositor using the Wayland backend. It tends to happen occasionally when I move my mouse in and out of the compositor window.

@ascent12
Copy link
Member

I recently updated the EGL log message to give the error code, now making it:

2019-09-20 15:30:31 - [EGL] command: eglSwapInterval, error: 0x300d, message: "eglSwapInterval"
2019-09-20 15:30:31 - [EGL] command: eglSwapBuffers, error: 0x300d, message: "eglSwapBuffers"
2019-09-20 15:30:31 - [render/egl.c:402] eglSwapBuffers failed

The reliable way to trigger it on sway is to simply have a client open, unfocus then focus the window (happens on both), which I assume is triggering an xdg_surface.configure and wl_surface.frame. The X11 backend is not affected.

0x300d is EGL_BAD_SURFACE.

@emersion
Copy link
Member Author

emersion commented Jun 2, 2020

Seems like the error code for eglSwapInterval has changed. It's now:

00:01:01.199 [EGL] command: eglSwapInterval, error: 0x3006, message: "eglSwapInterval"
00:01:01.199 [EGL] command: eglSwapBuffers, error: 0x300d, message: "eglSwapBuffers"
00:01:01.199 [render/egl.c:449] eglSwapBuffers failed

emersion added a commit to emersion/wlroots that referenced this issue Jun 2, 2020
This was introduced in [1]. However after reverting that PR I still
can't reproduce the bug the PR aimed to fix [2].

Since there's no good explanation why we would need to swap buffers
before resizing, let's just revert the PR.

[1]: swaywm#1486
[2]: swaywm#1371

Closes: swaywm#1768
ddevault pushed a commit that referenced this issue Jun 2, 2020
This was introduced in [1]. However after reverting that PR I still
can't reproduce the bug the PR aimed to fix [2].

Since there's no good explanation why we would need to swap buffers
before resizing, let's just revert the PR.

[1]: #1486
[2]: #1371

Closes: #1768
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging a pull request may close this issue.

5 participants