You are not logged in.

#1 2024-04-02 13:24:45

babaliaris
Member
From: Greece
Registered: 2017-09-29
Posts: 86
Website

[Solved] Plasma 6 (Wayland + New Mesa) causes flickering in many apps.

After updating to Plasma 6 (switching to Wayland) I get a lot of visual bugs (mostly flickering) in many apps that use hardware acceleration.
Thankfully, disabling hardware acceleration makes the applications workable, else it's almost impossible to use them since these visual bugs make the applications unusable.

I found many similar threads "out there" in the internet, so this must be a known problem. I didn't find any posts here related to this problem, if there is a thread you can post it here and I will mark this post as closed.

I will post the output of the drawio desktop program (installed using snap) with and without hardware acceleration as an example.

Do we know what is causing this problem? Does the community have any strategies for the future of Nvidia on Linux?
I'm seriously considering switching to AMD cards when the next generation arrives (if Nvdia is the reason due to it's closed hardware documentation).

With Hardware Acceleration

(drawio:6555): Gtk-WARNING **: 16:05:27.291: Theme parsing error: gtk.css:3536:25: 'font-feature-settings' is not a valid property name
Gtk-Message: 16:05:27.300: Failed to load module "colorreload-gtk-module"
Gtk-Message: 16:05:27.300: Failed to load module "window-decorations-gtk-module"
16:05:27.337 › SNAP env is defined, updater is disabled

(drawio:6555): Gtk-WARNING **: 16:05:27.352: Theme parsing error: gtk.css:3536:25: 'font-feature-settings' is not a valid property name
libGL error: MESA-LOADER: failed to open nouveau (search paths /snap/drawio/204/gnome-platform/usr/lib/x86_64-linux-gnu/dri)
libGL error: failed to load driver: nouveau
libGL error: MESA-LOADER: failed to open swrast (search paths /snap/drawio/204/gnome-platform/usr/lib/x86_64-linux-gnu/dri)
libGL error: failed to load driver: swrast
[6626:0402/160527.362745:ERROR:angle_platform_impl.cc(44)] Display.cpp:1052 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
ERR: Display.cpp:1052 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
[6626:0402/160527.362825:ERROR:gl_display.cc(515)] EGL Driver message (Critical) eglInitialize: Could not create a backing OpenGL context.
[6626:0402/160527.362852:ERROR:gl_display.cc(786)] eglInitialize OpenGL failed with error EGL_NOT_INITIALIZED, trying next display type
[6626:0402/160527.363434:ERROR:angle_platform_impl.cc(44)] Display.cpp:1052 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
ERR: Display.cpp:1052 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
[6626:0402/160527.363466:ERROR:gl_display.cc(515)] EGL Driver message (Critical) eglInitialize: Could not create a backing OpenGL context.
[6626:0402/160527.363489:ERROR:gl_display.cc(786)] eglInitialize OpenGLES failed with error EGL_NOT_INITIALIZED
[6626:0402/160527.363512:ERROR:gl_display.cc(820)] Initialization of all EGL display types failed.
[6626:0402/160527.363538:ERROR:gl_ozone_egl.cc(26)] GLDisplayEGL::Initialize failed.
[6626:0402/160527.365538:ERROR:angle_platform_impl.cc(44)] Display.cpp:1052 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
ERR: Display.cpp:1052 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
[6626:0402/160527.365575:ERROR:gl_display.cc(515)] EGL Driver message (Critical) eglInitialize: Could not create a backing OpenGL context.
[6626:0402/160527.365599:ERROR:gl_display.cc(786)] eglInitialize OpenGL failed with error EGL_NOT_INITIALIZED, trying next display type
[6626:0402/160527.366144:ERROR:angle_platform_impl.cc(44)] Display.cpp:1052 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
ERR: Display.cpp:1052 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
[6626:0402/160527.366174:ERROR:gl_display.cc(515)] EGL Driver message (Critical) eglInitialize: Could not create a backing OpenGL context.
[6626:0402/160527.366197:ERROR:gl_display.cc(786)] eglInitialize OpenGLES failed with error EGL_NOT_INITIALIZED
[6626:0402/160527.366219:ERROR:gl_display.cc(820)] Initialization of all EGL display types failed.
[6626:0402/160527.366241:ERROR:gl_ozone_egl.cc(26)] GLDisplayEGL::Initialize failed.
[6626:0402/160527.367089:ERROR:viz_main_impl.cc(196)] Exiting GPU process due to errors during initialization
libGL error: MESA-LOADER: failed to open nouveau (search paths /snap/drawio/204/gnome-platform/usr/lib/x86_64-linux-gnu/dri)
libGL error: failed to load driver: nouveau
libGL error: MESA-LOADER: failed to open swrast (search paths /snap/drawio/204/gnome-platform/usr/lib/x86_64-linux-gnu/dri)
libGL error: failed to load driver: swrast
[6665:0402/160527.426280:ERROR:angle_platform_impl.cc(44)] Display.cpp:1052 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
ERR: Display.cpp:1052 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
[6665:0402/160527.426385:ERROR:gl_display.cc(515)] EGL Driver message (Critical) eglInitialize: Could not create a backing OpenGL context.
[6665:0402/160527.426414:ERROR:gl_display.cc(786)] eglInitialize OpenGL failed with error EGL_NOT_INITIALIZED, trying next display type
[6665:0402/160527.426990:ERROR:angle_platform_impl.cc(44)] Display.cpp:1052 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
ERR: Display.cpp:1052 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
[6665:0402/160527.427022:ERROR:gl_display.cc(515)] EGL Driver message (Critical) eglInitialize: Could not create a backing OpenGL context.
[6665:0402/160527.427046:ERROR:gl_display.cc(786)] eglInitialize OpenGLES failed with error EGL_NOT_INITIALIZED
[6665:0402/160527.427070:ERROR:gl_display.cc(820)] Initialization of all EGL display types failed.
[6665:0402/160527.427095:ERROR:gl_ozone_egl.cc(26)] GLDisplayEGL::Initialize failed.
[6665:0402/160527.429026:ERROR:angle_platform_impl.cc(44)] Display.cpp:1052 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
ERR: Display.cpp:1052 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
[6665:0402/160527.429064:ERROR:gl_display.cc(515)] EGL Driver message (Critical) eglInitialize: Could not create a backing OpenGL context.
[6665:0402/160527.429089:ERROR:gl_display.cc(786)] eglInitialize OpenGL failed with error EGL_NOT_INITIALIZED, trying next display type
[6665:0402/160527.429609:ERROR:angle_platform_impl.cc(44)] Display.cpp:1052 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
ERR: Display.cpp:1052 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
[6665:0402/160527.429638:ERROR:gl_display.cc(515)] EGL Driver message (Critical) eglInitialize: Could not create a backing OpenGL context.
[6665:0402/160527.429661:ERROR:gl_display.cc(786)] eglInitialize OpenGLES failed with error EGL_NOT_INITIALIZED
[6665:0402/160527.429683:ERROR:gl_display.cc(820)] Initialization of all EGL display types failed.
[6665:0402/160527.429705:ERROR:gl_ozone_egl.cc(26)] GLDisplayEGL::Initialize failed.
[6665:0402/160527.430549:ERROR:viz_main_impl.cc(196)] Exiting GPU process due to errors during initialization
MESA-LOADER: failed to open nouveau (search paths /snap/drawio/204/gnome-platform/usr/lib/x86_64-linux-gnu/dri)
failed to load driver: nouveau
MESA-LOADER: failed to open kms_swrast (search paths /snap/drawio/204/gnome-platform/usr/lib/x86_64-linux-gnu/dri)
failed to load driver: kms_swrast
MESA-LOADER: failed to open swrast (search paths /snap/drawio/204/gnome-platform/usr/lib/x86_64-linux-gnu/dri)
failed to load swrast driver

Without Hardware Acceleration

$drawio --disable-gpu

(drawio:6760): Gtk-WARNING **: 16:06:19.425: Theme parsing error: gtk.css:3536:25: 'font-feature-settings' is not a valid property name
Gtk-Message: 16:06:19.435: Failed to load module "colorreload-gtk-module"
Gtk-Message: 16:06:19.435: Failed to load module "window-decorations-gtk-module"
16:06:19.473 › SNAP env is defined, updater is disabled

(drawio:6760): Gtk-WARNING **: 16:06:19.484: Theme parsing error: gtk.css:3536:25: 'font-feature-settings' is not a valid property name
MESA-LOADER: failed to open nouveau (search paths /snap/drawio/204/gnome-platform/usr/lib/x86_64-linux-gnu/dri)
failed to load driver: nouveau
MESA-LOADER: failed to open kms_swrast (search paths /snap/drawio/204/gnome-platform/usr/lib/x86_64-linux-gnu/dri)
failed to load driver: kms_swrast
MESA-LOADER: failed to open swrast (search paths /snap/drawio/204/gnome-platform/usr/lib/x86_64-linux-gnu/dri)
failed to load swrast driver

Kernel Version

Linux version 6.8.2-arch2-1 (linux@archlinux) (gcc (GCC) 13.2.1 20230801, GNU ld (GNU Binutils) 2.42.0) #1 SMP PREEMPT_DYNAMIC Thu, 28 Mar 2024 17:06:35 +0000

GPU + Kernel Driver

sudo lspci -k | grep -A 2 -E "(VGA|3D)"
2b:00.0 VGA compatible controller: NVIDIA Corporation GA104 [GeForce RTX 3070 Ti] (rev a1)
        Subsystem: ASUSTeK Computer Inc. GA104 [GeForce RTX 3070 Ti]
        Kernel driver in use: nvidia

Pacman Mesa Version

sudo pacman -Q | grep mesa
mesa 1:24.0.3-2
mesa-utils 9.0.0-3

Last edited by babaliaris (2024-04-02 14:24:50)


Github Account: github.com/babaliaris     big_smileArch General Guidelinesbig_smile
Favourite Distro: archlinux.org                           big_smileArch Wikibig_smile

Offline

#2 2024-04-02 13:42:03

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,804

Re: [Solved] Plasma 6 (Wayland + New Mesa) causes flickering in many apps.

There are many threads on this here. Short answer, xwayland windows that do not run native wayland have known flickering issues on nvidia, for firefox/chrome/electron clients this can be mitigated by switching them to wayland. For xwayland in general there's the https://aur.archlinux.org/packages/xorg … t-sync-git patchset which is already giving some improvements on it's own. Proper working of this pends on adjustments across the stack (that are however in the works) and on nvidia's side minimally nvidia 555 slated for may.

FWIW seeing all those mesa and acceleration failures suggest to me you're not actually running the nvidia driver on Wayland, if you want to test that you need to enable KMS: https://wiki.archlinux.org/title/NVIDIA … de_setting (note you need to do that via kernel parameters to disable the simpledrm device that's currently giving you a subpar experience in general)

Some other threads:- https://bbs.archlinux.org/viewtopic.php … 3#p2157653

Switching to a Xorg session is still a general possibility.

Offline

#3 2024-04-02 14:05:53

babaliaris
Member
From: Greece
Registered: 2017-09-29
Posts: 86
Website

Re: [Solved] Plasma 6 (Wayland + New Mesa) causes flickering in many apps.

V1del wrote:

There are many threads on this here. Short answer, xwayland windows that do not run native wayland have known flickering issues on nvidia, for firefox/chrome/electron clients this can be mitigated by switching them to wayland. For xwayland in general there's the https://aur.archlinux.org/packages/xorg … t-sync-git patchset which is already giving some improvements on it's own. Proper working of this pends on adjustments across the stack (that are however in the works) and on nvidia's side minimally nvidia 555 slated for may.

Thank you! I've learned some valuable information from your answer. I did not have any Idea of the existence of Xwayland. I will try this aur package and see if it solves most of the problems.


V1del wrote:

FWIW seeing all those mesa and acceleration failures suggest to me you're not actually running the nvidia driver on Wayland, if you want to test that you need to enable KMS: https://wiki.archlinux.org/title/NVIDIA … de_setting (note you need to do that via kernel parameters to disable the simpledrm device that's currently giving you a subpar experience in general)

I have done that already with your help: https://bbs.archlinux.org/viewtopic.php?id=293851



V1del wrote:

Switching to a Xorg session is still a general possibility.

I know it, but I will try to stick with Wayland and contribute as much as I can with feedback.


Github Account: github.com/babaliaris     big_smileArch General Guidelinesbig_smile
Favourite Distro: archlinux.org                           big_smileArch Wikibig_smile

Offline

#4 2024-04-02 14:23:45

babaliaris
Member
From: Greece
Registered: 2017-09-29
Posts: 86
Website

Re: [Solved] Plasma 6 (Wayland + New Mesa) causes flickering in many apps.

Replacing the official xorg-wayland package with the aur package xorg-xwayland-explicit-sync seems to have fixed everything!

I imagine, once the official implementation is done, I should switch back to xorg-wayland, after removing the xorg-xwayland-explicit-sync.

Thank for the help!


Github Account: github.com/babaliaris     big_smileArch General Guidelinesbig_smile
Favourite Distro: archlinux.org                           big_smileArch Wikibig_smile

Offline

Board footer

Powered by FluxBB