[Wayland-bugs] [Bug 769835] On Wayland, application containing GtkGLArea stops responding if it's not on current workspace
https://bugzilla.gnome.org/show_bug.cgi?id=769835 Carlos Garnachochanged: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #25 from Carlos Garnacho --- \o/ Attachment 342427 pushed as ab66c3d - wayland: Disable EGL swap interval -- You are receiving this mail because: You are on the CC list for the bug.___ wayland-bugs mailing list wayland-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-bugs
[Wayland-bugs] [Bug 769835] On Wayland, application containing GtkGLArea stops responding if it's not on current workspace
https://bugzilla.gnome.org/show_bug.cgi?id=769835 Carlos Garnachochanged: What|Removed |Added Attachment #342427|accepted-commit_now |committed status|| -- You are receiving this mail because: You are on the CC list for the bug.___ wayland-bugs mailing list wayland-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-bugs
[Wayland-bugs] [Bug 769835] On Wayland, application containing GtkGLArea stops responding if it's not on current workspace
https://bugzilla.gnome.org/show_bug.cgi?id=769835 Emmanuele Bassi (:ebassi)changed: What|Removed |Added Attachment #342427|none|accepted-commit_now status|| --- Comment #24 from Emmanuele Bassi (:ebassi) --- Review of attachment 342427: Looks good to me. -- You are receiving this mail because: You are on the CC list for the bug.___ wayland-bugs mailing list wayland-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-bugs
[Wayland-bugs] [Bug 769835] On Wayland, application containing GtkGLArea stops responding if it's not on current workspace
https://bugzilla.gnome.org/show_bug.cgi?id=769835 --- Comment #23 from Michael Catanzaro--- Going to keep poking about this, since all apps using WebKit are in a really bad state on Wayland right now: (In reply to Michael Catanzaro from comment #22) > (Just want to add: I hope we can do a 3.22 release with this fix soon, since > it's an extremely high-impact issue for WebKit. Thanks Carlos. :) -- You are receiving this mail because: You are on the CC list for the bug.___ wayland-bugs mailing list wayland-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-bugs
[Wayland-bugs] [Bug 769835] On Wayland, application containing GtkGLArea stops responding if it's not on current workspace
https://bugzilla.gnome.org/show_bug.cgi?id=769835 --- Comment #22 from Michael Catanzaro--- (Just want to add: I hope we can do a 3.22 release with this fix soon, since it's an extremely high-impact issue for WebKit. Thanks Carlos. :) -- You are receiving this mail because: You are on the CC list for the bug.___ wayland-bugs mailing list wayland-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-bugs
[Wayland-bugs] [Bug 769835] On Wayland, application containing GtkGLArea stops responding if it's not on current workspace
https://bugzilla.gnome.org/show_bug.cgi?id=769835 Carlos Garnachochanged: What|Removed |Added Attachment #342424|needs-work |none status|| Attachment #342424|0 |1 is obsolete|| --- Comment #21 from Carlos Garnacho --- Created attachment 342427 --> https://bugzilla.gnome.org/attachment.cgi?id=342427=edit wayland: Disable EGL swap interval We have a frame clock that ensures rendering is done as per the output vsync. There is no need to have Mesa do the same for us. This, most notably, ensures Mesa doesn't schedule frame callbacks that will be left unattended if the compositor stops throttling frames for its surface, this is eg. the case if the toplevel is moved to another workspace. Also, given a SwapInterval!=0 will always bring these unexpected side effects, check that it's possible to disable it, and spew a debug message if that isn't the case. -- You are receiving this mail because: You are on the CC list for the bug.___ wayland-bugs mailing list wayland-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-bugs
[Wayland-bugs] [Bug 769835] On Wayland, application containing GtkGLArea stops responding if it's not on current workspace
https://bugzilla.gnome.org/show_bug.cgi?id=769835 Emmanuele Bassi (:ebassi)changed: What|Removed |Added Attachment #342424|none|needs-work status|| --- Comment #20 from Emmanuele Bassi (:ebassi) --- Review of attachment 342424: Looks definitely better. ::: gdk/wayland/gdkglcontext-wayland.c @@ +472,3 @@ + EGL_MIN_SWAP_INTERVAL, + _wayland->egl_min_swap_interval)) +return NULL; You should set the GError if you return NULL here. Something like: if (!eglGetConfigAttrib (...)) { g_set_error_literal (error, GDK_GL_ERROR, GDK_GL_ERROR_NOT_AVAILABLE, "Could not retrieve the minimum swap interval"); return NULL; } But maybe we should move this check inside find_eglconfig_for_window(). @@ +552,3 @@ +eglSwapInterval (display_wayland->egl_display, 0); + else +g_warning ("Can't disable GL swap interval"); I'd probably use g_debug(), not a warning. -- You are receiving this mail because: You are on the CC list for the bug.___ wayland-bugs mailing list wayland-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-bugs
[Wayland-bugs] [Bug 769835] On Wayland, application containing GtkGLArea stops responding if it's not on current workspace
https://bugzilla.gnome.org/show_bug.cgi?id=769835 Carlos Garnachochanged: What|Removed |Added Attachment #342410|needs-work |none status|| Attachment #342410|0 |1 is obsolete|| --- Comment #19 from Carlos Garnacho --- Created attachment 342424 --> https://bugzilla.gnome.org/attachment.cgi?id=342424=edit wayland: Disable EGL swap interval We have a frame clock that ensures rendering is done as per the output vsync. There is no need to have Mesa do the same for us. This, most notably, ensures Mesa doesn't schedule frame callbacks that will be left unattended if the compositor stops throttling frames for its surface, this is eg. the case if the toplevel is moved to another workspace. Also, given a SwapInterval!=0 will always bring these unexpected side effects, check that it's possible to disable it, and warn if that isn't the case. -- You are receiving this mail because: You are on the CC list for the bug.___ wayland-bugs mailing list wayland-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-bugs
[Wayland-bugs] [Bug 769835] On Wayland, application containing GtkGLArea stops responding if it's not on current workspace
https://bugzilla.gnome.org/show_bug.cgi?id=769835 --- Comment #18 from Carlos Garnacho--- (In reply to Emmanuele Bassi (:ebassi) from comment #17) > Review of attachment 342410 [details] [review]: > > ::: gdk/wayland/gdkglcontext-wayland.c > @@ +441,3 @@ > +static gboolean > +egl_config_can_disable_swap_interval (GdkDisplay *display, > + const EGLConfig *config) > > EGLConfig is already a pointer; I don't think you need to pass it as a > pointer… Hmm, I see. I was confused by the weird memory management at: https://git.gnome.org//browse/gtk+/tree/gdk/wayland/gdkglcontext-wayland.c#n410 where it seems to return stuff from a freed block, knowing that EGLConfig is a pointer itself makes sense then. > > @@ +446,3 @@ > + EGLint interval; > + > + if (!eglGetConfigAttrib (display_wayland->egl_display, *config, > > … especially since you're just dereferencing it here. > > @@ +483,3 @@ > return NULL; > > + if (!egl_config_can_disable_swap_interval (display, )) > > I'm not convinced this is an appropriate action to take. > > If swap interval cannot be disabled then we should fall back to the existing > behaviour; it's not optimal, but saying "you can't have GL because your > driver does not allow disabling swap interval" seems to me far more drastic > than necessary. > > Just save the return value inside the GdkGLContext and emit a warning or a > debug message. Sure, question is when it's more appropriate to warn then. Before it locks presumably... > > @@ +543,3 @@ >eglMakeCurrent(display_wayland->egl_display, EGL_NO_SURFACE, > EGL_NO_SURFACE, > EGL_NO_CONTEXT); > + eglSwapInterval (dpy, 0); > > Not sure it's needed, here; we're unbinding everything, which means there's > no context and no surface to swap. Right, I was unsure about this one. Thanks for the review! -- You are receiving this mail because: You are on the CC list for the bug.___ wayland-bugs mailing list wayland-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-bugs
[Wayland-bugs] [Bug 769835] On Wayland, application containing GtkGLArea stops responding if it's not on current workspace
https://bugzilla.gnome.org/show_bug.cgi?id=769835 Emmanuele Bassi (:ebassi)changed: What|Removed |Added Attachment #342410|none|needs-work status|| --- Comment #17 from Emmanuele Bassi (:ebassi) --- Review of attachment 342410: ::: gdk/wayland/gdkglcontext-wayland.c @@ +441,3 @@ +static gboolean +egl_config_can_disable_swap_interval (GdkDisplay *display, + const EGLConfig *config) EGLConfig is already a pointer; I don't think you need to pass it as a pointer… @@ +446,3 @@ + EGLint interval; + + if (!eglGetConfigAttrib (display_wayland->egl_display, *config, … especially since you're just dereferencing it here. @@ +483,3 @@ return NULL; + if (!egl_config_can_disable_swap_interval (display, )) I'm not convinced this is an appropriate action to take. If swap interval cannot be disabled then we should fall back to the existing behaviour; it's not optimal, but saying "you can't have GL because your driver does not allow disabling swap interval" seems to me far more drastic than necessary. Just save the return value inside the GdkGLContext and emit a warning or a debug message. @@ +543,3 @@ eglMakeCurrent(display_wayland->egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + eglSwapInterval (dpy, 0); Not sure it's needed, here; we're unbinding everything, which means there's no context and no surface to swap. -- You are receiving this mail because: You are on the CC list for the bug.___ wayland-bugs mailing list wayland-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-bugs
[Wayland-bugs] [Bug 769835] On Wayland, application containing GtkGLArea stops responding if it's not on current workspace
https://bugzilla.gnome.org/show_bug.cgi?id=769835 Emmanuele Bassi (:ebassi)changed: What|Removed |Added CC||eba...@gmail.com --- Comment #16 from Emmanuele Bassi (:ebassi) --- On X11 we already disable swap interval when running composited — and since Wayland is using a compositor by default, I think it makes complete sense to rely on the compositor signaling us when to render. The only issue I can think of is that the Wayland compositor may not be synchronised to the vertical refresh rate; or could be a very simple process that just sets up the output and then relies on the toolkit to deal with the timing of submitting frames. Having said that, I seriously doubt this is even a case GTK should contemplate. -- You are receiving this mail because: You are on the CC list for the bug.___ wayland-bugs mailing list wayland-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-bugs
[Wayland-bugs] [Bug 769835] On Wayland, application containing GtkGLArea stops responding if it's not on current workspace
https://bugzilla.gnome.org/show_bug.cgi?id=769835 Carlos Garnachochanged: What|Removed |Added Attachment #342399|reviewed|none status|| Attachment #342399|0 |1 is obsolete|| --- Comment #15 from Carlos Garnacho --- Created attachment 342410 --> https://bugzilla.gnome.org/attachment.cgi?id=342410=edit wayland: Disable EGL swap interval We have a frame clock that ensures rendering is done as per the output vsync. There is no need to have Mesa do the same for us. This, most notably, ensures Mesa doesn't schedule frame callbacks that will be left unattended if the compositor stops throttling frames for its surface, this is eg. the case if the toplevel is moved to another workspace. Also, given a SwapInterval!=0 will always bring these unexpected side effects, check that it's possible to disable it, and error out if that isn't the case. -- You are receiving this mail because: You are on the CC list for the bug.___ wayland-bugs mailing list wayland-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-bugs
[Wayland-bugs] [Bug 769835] On Wayland, application containing GtkGLArea stops responding if it's not on current workspace
https://bugzilla.gnome.org/show_bug.cgi?id=769835 --- Comment #14 from Carlos Garnacho--- (In reply to Jonas Ådahl from comment #13) > Review of attachment 342399 [details] [review]: > > Should we maybe check the EGL_MIN_SWAP_INTERVAL and fail up front if we > cannot configure the EGL context to let us handle the frame scheduling > ourself? Yeah, probably makes sense, it seems Mesa eglSwapInterval implementations will just clamp and return true, so we might still hit this if the context can't disable frame throttling. -- You are receiving this mail because: You are on the CC list for the bug.___ wayland-bugs mailing list wayland-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-bugs
[Wayland-bugs] [Bug 769835] On Wayland, application containing GtkGLArea stops responding if it's not on current workspace
https://bugzilla.gnome.org/show_bug.cgi?id=769835 --- Comment #12 from Carlos Garnacho--- Created attachment 342399 --> https://bugzilla.gnome.org/attachment.cgi?id=342399=edit wayland: Disable EGL swap interval We have a frame clock that ensures rendering is done as per the output vsync. There is no need to have Mesa do the same for us. This, most notably, ensures Mesa doesn't schedule frame callbacks that will be left unattended if the compositor stops throttling frames for its surface, this is eg. the case if the toplevel is moved to another workspace. -- You are receiving this mail because: You are on the CC list for the bug.___ wayland-bugs mailing list wayland-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-bugs
[Wayland-bugs] [Bug 769835] On Wayland, application containing GtkGLArea stops responding if it's not on current workspace
https://bugzilla.gnome.org/show_bug.cgi?id=769835 --- Comment #11 from Michael Catanzaro--- (In reply to qbox from comment #10) > I don't know if amarok uses GTKGLArea. It doesn't. Amarok uses Qt, not GTK+. This is a GTK+ bug, so I suggest you file a new bug report. -- You are receiving this mail because: You are on the CC list for the bug.___ wayland-bugs mailing list wayland-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-bugs
[Wayland-bugs] [Bug 769835] On Wayland, application containing GtkGLArea stops responding if it's not on current workspace
https://bugzilla.gnome.org/show_bug.cgi?id=769835 qboxchanged: What|Removed |Added CC||li...@qbox.es --- Comment #10 from qbox --- I don't know if amarok uses GTKGLArea. But, in Fedora 25, with Gnome-Wayland mouse stop working over any active windows/desktops. Gnome bars keeps working. After minimize and restore Amarok using letf-bottom bar, mouse come to life again in all desktops/windows. -- You are receiving this mail because: You are on the CC list for the bug.___ wayland-bugs mailing list wayland-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-bugs
[Wayland-bugs] [Bug 769835] On Wayland, application containing GtkGLArea stops responding if it's not on current workspace
https://bugzilla.gnome.org/show_bug.cgi?id=769835 Michael Catanzarochanged: What|Removed |Added See Also||https://bugs.webkit.org/sho ||w_bug.cgi?id=163427 -- You are receiving this mail because: You are on the CC list for the bug.___ wayland-bugs mailing list wayland-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-bugs
[Wayland-bugs] [Bug 769835] On Wayland, application containing GtkGLArea stops responding if it's not on current workspace
https://bugzilla.gnome.org/show_bug.cgi?id=769835 Jean-François Fortin Tamchanged: What|Removed |Added CC||nekoh...@gmail.com Blocks||695806 -- You are receiving this mail because: You are on the CC list for the bug.___ wayland-bugs mailing list wayland-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-bugs
[Wayland-bugs] [Bug 769835] On Wayland, application containing GtkGLArea stops responding if it's not on current workspace
https://bugzilla.gnome.org/show_bug.cgi?id=769835 Jonas Ådahlchanged: What|Removed |Added CC||r...@robster.org.uk, ||wayland-bugs@lists.freedesk ||top.org Component|wayland |Backend: Wayland Assignee|mutter-ma...@gnome.bugs |gtk-b...@gtk.org Product|mutter |gtk+ QA Contact|mutter-ma...@gnome.bugs |gtk-b...@gtk.org --- Comment #9 from Jonas Ådahl --- (moving back to gtk+ since this is about frame throttling getting away of unrelated IO) I think that, for whatever reason a frame is scheduled (be it because some focus-out animation or an application deliberately asking for it for whatever reason), we should still handle the situation where we actually don't want to paint because of the vsync throttling. As far as I can see, we use _gdk_frame_clock_freeze() and _gdk_frame_clock_thaw() to do the throttling, but maybe what we really should do is gdk_window_freeze_updates()/gdk_window_thaw_updates()? We handle those here and there in gdkwindow-wayland.c (the checking of window->update_freeze_count). -- You are receiving this mail because: You are on the CC list for the bug.___ wayland-bugs mailing list wayland-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-bugs