Bugzilla – Bug 1219718
NVIDIA + wayland-only google-chrome-stable blinks/flashes on scrolling/type
Last modified: 2024-07-18 14:25:38 UTC
Created attachment 872575 [details] gpu internals from chrome Hello team (Separated from Bug #1219505) I just updated my Leap 15.6 to the latest build with GNOME45 and I noticed that gnome seem to have blinking (or flashing) issues as a type or scroll. This happens only on Wayland (tested with GNOME). My particular setup has nvidia card (rtx 3070) in case it matters. Alynx Zhou mentioned in https://bugzilla.suse.com/show_bug.cgi?id=1219505#c13 I think a workaround is not put Chrome full screen, it will still blink, but less frequently.
Workaround in general is to use XWayland (GNOME X11 in GDM). Or as Alynx mentioned keep chrome in non-fullscreen.
There is a good news for this that there is a explicit sync protocol to solve the NVIDIA sync issue (<https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/90>) gets ACKs from GNOME, KDE and Weston recent 2 days (also implementations), this means it is nearly getting accepted.
Just to confirm that this happens only on Wayland and only with NVIDIA drivers (I'm using nvidia-drivers-G06 which are part of Leap 15.6) Imagine that you type in google-chrome (from google-chrome-stable) webbrowser and all chromium/flatpak/electron apps on background (doens't happen if they're minimalized) flicker over your window as you type. This happens in all flatpak apps too, such as telegram, orlack when I type Yifan that the slack flashes/flickers as I type him a message :-) Alynx, will this happen prior to Gold Master?
I don't think we could fix this soon, because it needs explicit sync landed in both NVIDIA side and compositor side, it is a large change, and even we can backport explicit sync support in mutter side, we still need new nvidia driver to make that work. A relatively easier fix would be let user run Wayland chromium/electron, the only problem I think it input method, and I could add text-input-v1 patch to 15.6 to fix that.
Any chance you could help Stefan?
Mutter has merged linux-drm-syncobj-v1 implementation (<https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3300>), so what we need is 1. NVIDIA driver support this 2. linux-drm-syncobj-v1 released in wayland-protocols. And I've added text-input-v1 to GNOME:STABLE:45, so users should be able to use input method with pure wayland chromium/electron, so they can ignore this bug because wayland chromium won't blink.
It seems nvidia already released version 555 (I find everything works fine on my own system), to get this fixed on SLE-15-SP6, we need to: 1. Backport <https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/90/diffs> to wayland-protocols so we have linux-drm-syncobj-v1 protocol. 2. Backport <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/967> to xwayland. 3. Backport <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3300> to GNOME 45.
(In reply to Alynx Zhou from comment #11) > It seems nvidia already released version 555 (I find everything works fine > on my own system), to get this fixed on SLE-15-SP6, we need to: See my comments #8 and #10 > 1. Backport > <https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/ > 90/diffs> to wayland-protocols so we have linux-drm-syncobj-v1 protocol. -> gnome-maintainers > 2. Backport > <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/967> to > xwayland. I couldn't find this git commit anywhere in xserver/xwayland git tree, but I could find the changes for dri3/dri3.c dri3/dri3.h dri3/dri3_priv.h dri3/dri3_request.c dri3/dri3_screen.c include/protocol-versions.h meson.build in commit 613dcb6a77d831cd0a6d1e19671b548491ada934 Author: Erik Kurzinger <ekurzinger@nvidia.com> Date: Tue Aug 16 11:57:40 2022 -0700 DRI3: add DRI3ImportSyncobj and DRI3FreeSyncobj of remotes/origin/xwayland-24.1 branch. Parts of the remaining changes of the files hw/xwayland/meson.build hw/xwayland/xwayland-glamor-gbm.c hw/xwayland/xwayland-glamor.c hw/xwayland/xwayland-glamor.h hw/xwayland/xwayland-present.c hw/xwayland/xwayland-screen.h hw/xwayland/xwayland-window-buffers.c hw/xwayland/xwayland-window.c hw/xwayland/xwayland-window.h meson.build present/present_execute.c are in git commit commit 87bf2cafcc27e609e4a75d0596682c2619f3f1dc Author: Erik Kurzinger <ekurzinger@nvidia.com> Date: Tue Aug 15 15:32:47 2023 -0700 xwayland: add support for wp_linux_drm_syncobj_v1 of remotes/origin/xwayland-24.1 branch. Parts of the remaining changes of the files hw/xfree86/common/xf86Module.h hw/xwayland/xwayland-present.c include/protocol-versions.h meson.build present/present.c present/present_execute.c present/present_priv.h present/present_request.c present/present_scmd.c present/present_screen.c present/present_vblank.c are in commit ac0bc0b3b6e678f6f0157e7ae3a77122783d2eed Author: Erik Kurzinger <ekurzinger@nvidia.com> Date: Mon Mar 18 11:33:15 2024 -0700 Present: add PresentCapabilitySyncobj and PresentPixmapSynced of remotes/origin/xwayland-24.1 branch. I'm pretty sure that on the way you need to pick up addtional commits. So Backporting this won't be trivial. I think it would be safer to update to xwayland 24.1.0 > 3. Backport <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3300> to > GNOME 45. -> gnome-maintainers
I've backported linux-drm-syncobj-v1 implementation for mutter here: https://build.opensuse.org/package/show/home:AZhou:branches:GNOME:STABLE:45/mutter I agree upgrade Xwayland is a good idea.
perhaps we need an eco if we do massive changes
(In reply to Marcus Meissner from comment #14) > perhaps we need an eco if we do massive changes Yeah. I don't know who will be brave enough to check these changes in. I've now submitted the necessary changes for - dri3proto - presentproto - wayland-protocols - xwayland
i would not start submission before feature approval Lubos, do you think it would be worthwhile to do
This is literally pain in the a**. I'd go even with an early fix.
https://jira.suse.com/browse/PED-8800 filed
Hi Lubos, could you test those new packages to see whether they works fine? You can get mutter 45 with backported linux-drm-syncobj-v1 support in my branch: https://build.opensuse.org/package/show/home:AZhou:branches:GNOME:STABLE:45/mutter
Do we have the xwayland update built somewhere for 15.6/SP6? I think that's the only one I'm missing to test Alynx's updated mutter.
(In reply to Lubos Kocman from comment #21) > Do we have the xwayland update built somewhere for 15.6/SP6? I think that's > the only one I'm missing to test Alynx's updated mutter. https://build.suse.de/project/show/home:sndirsch:branches:SUSE:SLE-15-SP6:Update
I am using these from Stefan's repo above lkocman@localhost:~> rpm -qa | egrep "dri3proto|presentproto|wayland-protocols|xwayland" wayland-protocols-devel-1.36-150600.1.1.noarch dri3proto-devel-1.2-150600.5.4.1.x86_64 xwayland-24.1.1-150600.4.9.1.x86_64 presentproto-devel-1.3-150600.2.3.1.x86_64 I did reinstall nvidia 550 (to rebuild kmods etc) after installing above pkgs^ lkocman@localhost:~> rpm -qa | grep nvidia nvidia-gl-G06-550.100-lp156.25.1.x86_64 nvidia-compute-G06-32bit-550.100-lp156.25.1.x86_64 nvidia-utils-G06-550.100-lp156.25.1.x86_64 nvidia-gl-G06-32bit-550.100-lp156.25.1.x86_64 nvidia-video-G06-550.100-lp156.25.1.x86_64 kernel-firmware-nvidia-20240201-150600.1.2.noarch nvidia-compute-utils-G06-550.100-lp156.25.1.x86_64 nvidia-video-G06-32bit-550.100-lp156.25.1.x86_64 nvidia-drivers-G06-550.100-lp156.25.1.x86_64 nvidia-driver-G06-kmp-default-550.100_k6.4.0_150600.21-lp156.25.1.x86_64 nvidia-compute-G06-550.100-lp156.25.1.x86_64 rebooted and the screen still flashes like crazy if I type in google-chrome-stable placed over any electron application. Perhaps I missed something lkocman@localhost:~> rpm -q xwayland --changelog | head -15 * Thu Jul 11 2024 sndirsch@suse.com - added version specific reqirements for dri3proto, presentproto and wayland-protocols * Thu Jul 11 2024 sndirsch@suse.com - This supersedes the following patches * U_CVE-2024-31080-Xi-ProcXIGetSelectedEvents-needs-to-use-unswapped-le.patch * U_CVE-2024-31081-Xi-ProcXIPassiveGrabDevice-needs-to-use-unswapped-le.patch * U_CVE-2024-31083-render-fix-refcounting-of-glyphs-during-ProcRenderAd.patch * U_render-Avoid-possible-double-free-in-ProcRenderAddGl.patch which fixed security issues * CVE-2024-31080 (bsc#1222309) * CVE-2024-31081 (bsc#1222310) * CVE-2024-31083 (bsc#1222312) and a regression due to a security fix for CVE-2024-31083 (bsc#1222312, lkocman@localhost:~> rpm -q dri3proto-devel --changelog | head -15 * Wed Jun 05 2024 sndirsch@suse.com - n_dri3proto-1.4-2024.1.patch * update to version 1.4 (patch generated from xorgproto-2024.1 sources) * Tue May 22 2018 sndirsch@suse.com - n_dri3proto-1.2-2018.4.patch * update to version 1.2 (patch generated from xorgproto-2018.4 sources) * Thu Sep 18 2014 jengelh@inai.de - Update description and other metadata - Use full %configure for build, and remove CFLAGS (nothing is compiled) - Make file list more compact lkocman@localhost:~> rpm -q wayland-protocols-devel --changelog | head -15 * Sat May 04 2024 sp1rit@disroot.org - Update to version 1.36: * xdg-dialog: fix missing namespace in protocol name - Changes from version 1.35: * cursor-shape-v1: Does not advertises the list of supported cursors * xdg-shell: add missing enum attribute to set_constraint_adjustment * xdg-shell: recommend against drawing decorations when tiled * tablet-v2: mark as stable * staging: add alpha-modifier protocol * Tue Apr 30 2024 christophe@krop.fr - Update to 1.36 * Fix to the xdg dialog protocol * tablet-v2 protocol is now stable * alpha-modifier: new protocol lkocman@localhost:~> rpm -q presentproto-devel --changelog * Wed Jun 05 2024 sndirsch@suse.com - n_presentproto-1.3-2024.1.patch * update to version 1.4 (patch generated from xorgproto-2024.1 sources) * Wed Nov 29 2023 sndirsch@suse.com - change license tag in specfile to HPDN - -> https://spdx.org/licenses/HPND.html * Wed Sep 20 2023 sndirsch@suse.com - n_presentproto-1.3-2023.2.patch * update to version 1.3 (patch generated from xorgproto-2023.2 sources) * Tue May 22 2018 sndirsch@suse.com - n_presentproto-1.2-2018.4.patch * update to version 1.2 (patch generated from xorgproto-2018.4 sources) * Thu Jan 26 2017 tobias.johannes.klausmann@mni.thm.de - Update to version 1.1: This release fixes a bug causing libXpresent to have a wrong idea of the present wire protocol structures. Plus a number of documentation improvements. * Thu Sep 18 2014 jengelh@inai.de - Update description and other metadata - Use full %configure for build, and remove CFLAGS (nothing is compiled) - Make file list more compact * Thu Apr 24 2014 tobias.johannes.klausmann@mni.thm.de - Created package presentproto with initial version 1.0
I've installed mutter from Alynx and rebooted. Flashing still happens if I place two electron apps over each other and type. In my case google-chrome-stable and e.g. slack from flatpak. lkocman@localhost:~> rpm -q mutter --changelog | head -10 * Thu Jul 11 2024 alynx.zhou@suse.com - Add mutter-return-status-from-meta_egl_query_device_string.patch and mutter-implement-linux-drm-syncobj-v1.patch: Implement linux-drm-syncobj-v1 to fix blink in Chromium and other Xwayland apps (glgo#GNOME/mutter!3614, glgo#GNOME/mutter!3300, bsc#1219718). * Tue Jun 04 2024 alynx.zhou@suse.com - Add mutter-fix-initial-suspended-state.patch: With Qt 6.7 some apps cannot shown on launch, this patch fixes the initial Flatpaks are using lkocman@localhost:~> flatpak list | grep nvidia nvidia-550-100 org.freedesktop.Platform.GL.nvidia-550-100 1.4 user lkocman@localhost:~ Let me test non-flatpak apps over each other (e.g. chromium and chrome)
After installing NVIDIA-Linux-x86_64-555.58.run following https://en.opensuse.org/SDB:NVIDIA_drivers Tweaking gdm-rules, GDM config, adding modeset to grub2.cfg etc ... lkocman@localhost:~> echo $XDG_SESSION_TYPE wayland lkocman@localhost:~> lsmod | grep -i nvidia nvidia_drm 122880 50 nvidia_modeset 1368064 7 nvidia_drm nvidia 54603776 265 nvidia_modeset video 77824 2 asus_wmi,nvidia_modeset I can confirm I no longer have any flickering under wayland! Great job team! Looks fixed to me.
https://build.suse.de/request/show/339182
Thanks for testing Lubos! Once the updates for boo#1227575 have been released, the installation of nvidia 555 driver will be easier. Then you just need to add CUDA repo zypper ar https://developer.download.nvidia.com/compute/cuda/repos/sles15/x86_64/ CUDA and install meta package nv-prefer-signed-open-driver (from update repo) which will install nvidia-open-driver-G06-signed-cuda-kmp (from update repo) nvidia-compute-G06 (from CUDA repo) Then also select from CUDA repo the meta package nvidia-drivers-G06 which will install all the other required packages for the desktop nvidia-gl-G06 nvidia-utils-G06 nvidia-compute-utils-G06 nvidia-video-G06
(In reply to Stefan Dirsch from comment #28) > Thanks for testing Lubos! Once the updates for boo#1227575 have been > released, the installation of nvidia 555 driver will be easier. Then you > just need to add CUDA repo > > zypper ar > https://developer.download.nvidia.com/compute/cuda/repos/sles15/x86_64/ CUDA > > and install meta package > > nv-prefer-signed-open-driver (from update repo) > > which will install > > nvidia-open-driver-G06-signed-cuda-kmp (from update repo) > nvidia-compute-G06 (from CUDA repo) > > Then also select from CUDA repo the meta package > > nvidia-drivers-G06 > > which will install all the other required packages for the desktop > > nvidia-gl-G06 > nvidia-utils-G06 > nvidia-compute-utils-G06 > nvidia-video-G06 Egbert planned to blog about this after his vacation end of July with the main focus on CUDA though.
We could cover that in openSUSE-repos-*-NVIDIA.
(In reply to Lubos Kocman from comment #30) > We could cover that in openSUSE-repos-*-NVIDIA. Yes, definitely!