You are not logged in.

#1 2023-01-01 21:56:32

IrreleventIdiot
Member
From: SC
Registered: 2017-01-28
Posts: 35

[(Semi) SOLVED] Wayland Nvidia: Chromium/Electron MESA-LOADER errors

I'm running with the standard linux and nvidia packages, and I'm using GNOME 43 with Wayland. Everything else runs great and smoothly. It should also be noted that I run with multiple monitors running at different resolutions, with the primary one being a high-refresh rate (165hz) monitor, the others running at a standard 60hz.

I'm noticing graphical glitches on Chromium and Electron apps when running in native Wayland mode (Xwayland also, actually). These glitches either include the applications visibly drawing over themselves, or the text cursor jumping around incorrectly or text not updating immediately, making it difficult to type.

These are the MESA-LOADER errors I'm getting when running Chromium-based apps in Wayland mode (--enable-features=UseOzonePlatform --ozone-platform=wayland):

Note well that it cannot open shared object files due to permissions being denied.

[62:0101/164343.772185:ERROR:gpu_init.cc(521)] Passthrough is not supported, GL is egl, ANGLE is 
MESA-LOADER: failed to retrieve device information
MESA-LOADER: failed to open nvidia-drm: /usr/lib/dri/nvidia-drm_dri.so: cannot open shared object file: Permission denied (search paths /usr/lib/dri, suffix _dri)
failed to load driver: nvidia-drm
MESA-LOADER: failed to open zink: /usr/lib/dri/zink_dri.so: cannot open shared object file: Permission denied (search paths /usr/lib/dri, suffix _dri)
failed to load driver: zink
MESA-LOADER: failed to open kms_swrast: /usr/lib/dri/kms_swrast_dri.so: cannot open shared object file: Permission denied (search paths /usr/lib/dri, suffix _dri)
failed to load driver: kms_swrast
MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: cannot open shared object file: Permission denied (search paths /usr/lib/dri, suffix _dri)
failed to load swrast driver
[71:0101/164343.839879:ERROR:command_buffer_proxy_impl.cc(128)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.

(I've been told the "Passthrough is not supported" error may be ignored, let me know if this isn't the case...)

I've been (maybe) able to make some progress on these errors. At first the "search paths" listed were incorrect. These were corrected by using environment variables. Oddly though even when they were wrong (the search paths used didn't exist), I still got permission denied errors...

For the life of me I cannot figure out why I'm getting "PERMISSION DENIED" errors. I've checked the entire directory tree for /usr/lib/dri, and all of them, files included, have 755 (rwxr-xr-x) permissions. These are as far as I know completely correct for those directories, and I haven't noticed any other apps having issues. So why only the Chromium ones?

I checked everything I could think of, and I've now got new environment variables running in my ~/.config/environment.d/envvars.conf file:

LIBVA_DRIVER_NAME=nvidia
VDPAU_DRIVER=nvidia
LIBVA_DRIVERS_PATH=/usr/lib/dri
LIBGL_DRIVERS_PATH=/usr/lib/dri
GBM_BACKENDS_PATH=/usr/lib/gbm

---

It's entirely possible that it's some sort of NVIDIA driver bug--believe me my next card will be AMD--but I don't know how to pin it down. I attempted to use the downgrade AUR tool to revert to an older driver (e.g. 515.65.x), but then everything breaks. I don't really know how to properly downgrade, as mkinitcpio starts throwing MODULE NOT FOUND errors.

I'm practically at my wits end.

Last edited by IrreleventIdiot (2023-01-05 16:37:12)


Yes, I know I spelt "Irrelevant" wrong.

Offline

#2 2023-01-02 07:47:50

seth
Member
Registered: 2012-09-03
Posts: 49,985

Re: [(Semi) SOLVED] Wayland Nvidia: Chromium/Electron MESA-LOADER errors

The mesa warnings are normal, particularily on nvidia.
Undo everything you did because of them.

You cannot downgrade to a pre-built version of the nvidia package w/o also downgrading the kernel to the version that package was linked to.
You need to use nvidia-dkms instead, which will build kernel modules for all installed kernels, nb. you'll need the linux*-headers package(s) for this as well.

Do you get the original problems also when only running on one output (monitor)?
Does its HiDPI feature matter?

Offline

#3 2023-01-02 17:54:56

IrreleventIdiot
Member
From: SC
Registered: 2017-01-28
Posts: 35

Re: [(Semi) SOLVED] Wayland Nvidia: Chromium/Electron MESA-LOADER errors

Thanks for responding!

If the warnings are normal, then what might be causing these graphical glitches? Is it just Nvidia Driver Issues then?

Undo everything...got it. I was following the Wiki's Hardware Acceleration instructions for a related issue with the LIBVA and VDPAU variables... But for now I can comment everything out.

https://wiki.archlinux.org/title/Hardwa … celeration

I was using the dkms nvidia drivers before, but switched to the plain nvidia driver as part of my troubleshooting; actually I was also using linux-zen as well too, but switched to standard linux and drivers to check if using the custom ones might have been causing issues.

I have linux-headers. I was trying to use older nvidia-dkms versions with the kernel but like I said was getting MODULE NOT FOUND errors when running mkinitcpio -p linux.

I'll test only using a single monitor when I get back to my system. And yes, both the HiDPI and High Refresh Rates matter to me. I'm coming from Windows where I had the lower refresh rate and/or higher/lower resolution monitors for extra apps (e.g. Discord, Vivaldi), whereas the main monitor was for gaming.

---

On a side note, I am also looking into getting an AMD card to replace Nvidia. I was chatting with some people about the issue and one of them told me that he knew a friend who had the same exact issue--which immediately disappeared upon getting AMD.

I've love to fix this current issue, but I'm not worried if I can't since I have the blessing of being able to afford replacing my Nvidia card with AMD.

Thanks!


Yes, I know I spelt "Irrelevant" wrong.

Offline

#4 2023-01-02 21:06:07

seth
Member
Registered: 2012-09-03
Posts: 49,985

Re: [(Semi) SOLVED] Wayland Nvidia: Chromium/Electron MESA-LOADER errors

I was trying to use older nvidia-dkms versions with the kernel but like I said was getting MODULE NOT FOUND errors when running mkinitcpio -p linux.

dkms status

https://wiki.archlinux.org/title/Dynami … ld_modules

both the HiDPI and High Refresh Rates matter to me

No, what I meant is whether the HiDPI condition (and gnome scaling around) are relevant to the glitches.

Do you btw. only get those artifacts when playing videos or also on regular web-browsing (sites w/o videos)?

Offline

#5 2023-01-02 21:32:47

IrreleventIdiot
Member
From: SC
Registered: 2017-01-28
Posts: 35

Re: [(Semi) SOLVED] Wayland Nvidia: Chromium/Electron MESA-LOADER errors

Okay, just got back to test it.

I went ahead and disabled the envvars.conf file, and disabled both other monitors, rebooted and began testing. The issues persist regardless of whether the web browser is open, or if videos are playing or not. As I'm typing this post the text updates in a janky way and the text cursor is erratic. I changed resolutions and refresh rates down to 1080p and 60hz and the issues remain. On a different app, Obsidian, the text appears to be fine, but there are different artifacts, such as when I open the left sidebar, or if I scroll to the bottom of a note, the app draws over itself some.

I see now about the DKMS stuff, so hopefully if I work with the wiki in mind (I forgot to check...), I can try downgrading the dkms drivers to an older version (e.g. 515.x) to see if I can get rid of these annoying issues.


Yes, I know I spelt "Irrelevant" wrong.

Offline

#6 2023-01-02 22:00:01

IrreleventIdiot
Member
From: SC
Registered: 2017-01-28
Posts: 35

Re: [(Semi) SOLVED] Wayland Nvidia: Chromium/Electron MESA-LOADER errors

yeah downgraded to nvidia-dkms 515.76 and nothing improved. I could try an older driver but I doubt that would really help either.


Yes, I know I spelt "Irrelevant" wrong.

Offline

#7 2023-01-02 22:23:33

seth
Member
Registered: 2012-09-03
Posts: 49,985

Re: [(Semi) SOLVED] Wayland Nvidia: Chromium/Electron MESA-LOADER errors

Did you test whether you get similar problems w/
1. gnome/X11
2. weston (or sway etc)?

Offline

#8 2023-01-02 23:20:01

IrreleventIdiot
Member
From: SC
Registered: 2017-01-28
Posts: 35

Re: [(Semi) SOLVED] Wayland Nvidia: Chromium/Electron MESA-LOADER errors

I tested X already, and it has its own issues: even though it fixes my stated issues, it introduces terrible graphics performance, especially for gaming: Even though it says I'm getting good frames (reported by mangohud), I can tell it's not even giving me 30 FPS. The DE or any application I use feels like it isn't getting the refresh rate of the monitor, even though the mouse moves smoothly. I'd rather stick with Wayland if I can help it...

Never used weston/sway before until today, but I gave both a try. I don't know how to configure them to use my monitors' refresh rate so it appears my monitor was running at 60hz rather than its rated 165hz. On weston my web browser stopped having glitchy text, but Obsidian still had the occasional graphical over-write glitch, although less so...On sway it appeared that there were no issues at all...


Yes, I know I spelt "Irrelevant" wrong.

Offline

#9 2023-01-03 09:11:54

seth
Member
Registered: 2012-09-03
Posts: 49,985

Re: [(Semi) SOLVED] Wayland Nvidia: Chromium/Electron MESA-LOADER errors

Feelings are not a very good metric.
What does glxgears report (it'll likely tell you that the output is synced and to what framerate)

Since this sounds increasinly like a mutter (gnome compositor) issue: how does eg. openbox/X11 perform?

Offline

#10 2023-01-03 16:30:51

IrreleventIdiot
Member
From: SC
Registered: 2017-01-28
Posts: 35

Re: [(Semi) SOLVED] Wayland Nvidia: Chromium/Electron MESA-LOADER errors

GLXGears on both X11 and Wayland Gnome report 164.83hz frames. On Openbox it reports only 60hz, but I only just installed Openbox and it might take me a while to figure out how to configure my displays to function in the same manner as GNOME...right now I don't know how to configure.

But applications seem to perform better on Openbox, albeit only at 60hz, and I tried running "Slay the Spire", it runs smoothly for 60hz. However, Openbox does have this minor issue where the background gets drawn over a la Windows XP Solitaire victory. Thankfully windows do not draw over one another.

I never considered it could be a mutter issue...


Yes, I know I spelt "Irrelevant" wrong.

Offline

#11 2023-01-03 16:58:01

seth
Member
Registered: 2012-09-03
Posts: 49,985

Re: [(Semi) SOLVED] Wayland Nvidia: Chromium/Electron MESA-LOADER errors

right now I don't know how to configure.

xrandr -q
__GL_SYNC_TO_VBLANK=0 glxgears
__GL_SYNC_TO_VBLANK=1 __GL_SYNC_DISPLAY_DEVICE=DP-0 glxgears # replace DP-0 w/ the output names from xrandr

Openbox does have this minor issue where the background gets drawn over a la Windows XP Solitaire victory.

What background gets drawn over where?
Openbox isn't a compositing WM and doesn't interfere between the clients output and the X11 server.
(unless you're running eg. picom on top of it…)

Offline

#12 2023-01-03 19:15:22

IrreleventIdiot
Member
From: SC
Registered: 2017-01-28
Posts: 35

Re: [(Semi) SOLVED] Wayland Nvidia: Chromium/Electron MESA-LOADER errors

Thanks for the tip, I was able to set my primary monitor to its proper 164.83hz framerate.

- When running glxgears with VBLANK=0 I get 34000+ frames.
- When running glxgears with VBLANK=1 and setting the display to sync to, it runs at 164.83x frames.

I'm not running anything else other than just openbox. I just installed it and ran it via logging in through GDM. There is no background to speak of,  it's just black. The black is what's getting overdrawn. I don't really know what's going on here, but neither do I really care personally since it's not really affecting anything, and I don't plan on using openbox beyond troubleshooting. If this is a problem let me know.


Yes, I know I spelt "Irrelevant" wrong.

Offline

#13 2023-01-03 21:12:08

seth
Member
Registered: 2012-09-03
Posts: 49,985

Re: [(Semi) SOLVED] Wayland Nvidia: Chromium/Electron MESA-LOADER errors

That's the overlay key (used to be pink or green but since quite a while is black, or probably just 0) - that's normal in an uncomposited environment and not related to openbox.

Back on topic: what if you "export __GL_SYNC_TO_VBLANK=0" to your gnome session (wayland or X11)?

Offline

#14 2023-01-03 21:51:22

IrreleventIdiot
Member
From: SC
Registered: 2017-01-28
Posts: 35

Re: [(Semi) SOLVED] Wayland Nvidia: Chromium/Electron MESA-LOADER errors

__GL_SYNC_TO_VBLANK=0 on wayland helps a little bit with text jank but it's still there. The other graphical issues persist. I also tried with =1 and it was worse--like before.

On X with either =0 or =1 it made no difference. The monitor running at 164.83hz didn't affect the applications visibly, I can tell if I move the window, or cause UI animations to occur, they're not animating at 165hz I can tell you that. At least there isn't text jank or over-draw issues on X.

---

I ordered an AMD GPU btw.


Yes, I know I spelt "Irrelevant" wrong.

Offline

#15 2023-01-03 23:01:20

seth
Member
Registered: 2012-09-03
Posts: 49,985

Re: [(Semi) SOLVED] Wayland Nvidia: Chromium/Electron MESA-LOADER errors

I can tell if I move the window, or cause UI animations to occur, they're not animating at 165hz I can tell you that.

"How"?

I ordered an AMD GPU btw.

I'd not hold my breath.

These glitches either include the applications visibly drawing over themselves, or the text cursor jumping around incorrectly or text not updating immediately, making it difficult to type.

might mean that an old buffer makes it to the scanout. That /can/ be a driver bug, but right now my money is on mutter. Or…

On a different app, Obsidian

Is that an appimage? Are the affected apps all appimages, snaps or flatpaks?

Offline

#16 2023-01-03 23:04:44

IrreleventIdiot
Member
From: SC
Registered: 2017-01-28
Posts: 35

Re: [(Semi) SOLVED] Wayland Nvidia: Chromium/Electron MESA-LOADER errors

How? I...just can? I guess not everyone can visibly see the difference in framerate but I can.

You doubt AMD drivers would fix my issue? I have another system with Intel Integrated graphics and I have zero issues with GNOME 43 on Wayland. All the same applications.

Flatpak *and* Arch Packages. I've tried both and they both have the exact same issues. I haven't tried snaps or appimages, but I seriously doubt they'd be any different.


Yes, I know I spelt "Irrelevant" wrong.

Offline

#17 2023-01-03 23:15:52

seth
Member
Registered: 2012-09-03
Posts: 49,985

Re: [(Semi) SOLVED] Wayland Nvidia: Chromium/Electron MESA-LOADER errors

snaps, appimages and flatpaks all fall into the same category here (basically they may give a fuck about your system libraries and configurations)
Does the other system have multiple outputs at different refresh rates?

I guess not everyone can visibly see the difference in framerate but I can.

Sure. You're very special.
I just wanted to know whether that's based on some objective metric or your feelings.

Everyone can tell the difference between 10fps and 60fps
Is what you feel to see more like 10fps, 30fps, 60fps or 120fps?

Edit: for tests on X11, try

Section "Device"
    Identifier "Default nvidia Device"
    Driver	"nvidia"
    Option	"TripleBuffer"    "True"
EndSection

Triple buffering will prevent blocking gl swaps that in the worst case scenario could cut the framerate from 165 to 82Hz, though if you effectively exported __GL_SYNC_TO_VBLANK=0 to that session (ie. the environment actually applied to mutter and all other processes) swapping should™ never not block itfp…

Last edited by seth (2023-01-03 23:28:47)

Offline

#18 2023-01-03 23:30:25

IrreleventIdiot
Member
From: SC
Registered: 2017-01-28
Posts: 35

Re: [(Semi) SOLVED] Wayland Nvidia: Chromium/Electron MESA-LOADER errors

No. The other system is a laptop with a 4K 60fps display.

RIP, I should probably give myself an ego check.

It feels like 60fps. I have a 60hz monitor right next to my 165hz monitor so I can drag the window to the other one and compare. There is a notable difference to me.


Yes, I know I spelt "Irrelevant" wrong.

Offline

#19 2023-01-04 08:45:57

seth
Member
Registered: 2012-09-03
Posts: 49,985

Re: [(Semi) SOLVED] Wayland Nvidia: Chromium/Electron MESA-LOADER errors

60Hz would mean that it's synced and synced to the wrong™ output.
Or that gnome on X11 caps the output.

First, let's get some hard data on the situation.
Export "CLUTTER_SHOW_FPS=1"
Also test the behavior w/ only the 165Hz output available and also make sure to enable triple buffering.

----
Obviously the laptop w/ a single intel chip and one single output at 60Hz are not a good predictor for anything concerning this system.
Using MESA you might still have luck w/ the original buffer swapping (?) "applications visibly drawing over themselves, or the text cursor jumping around incorrectly or text not updating immediately" issue.
Or not - https://wiki.archlinux.org/title/AMDGPU … cy_problem

Offline

#20 2023-01-04 14:14:44

IrreleventIdiot
Member
From: SC
Registered: 2017-01-28
Posts: 35

Re: [(Semi) SOLVED] Wayland Nvidia: Chromium/Electron MESA-LOADER errors

Alright, set "TripleBuffer" in /etc/X11/xorg.conf, and made sure CLUTTER_SHOW_FPS=1 is exported in .config/environment.d/envvars.conf (and checked in the terminal after launching Gnome with Xorg). Although...I don't see an FPS display anywhere?

It still felt like 60hz on all monitors with X, until I disabled everything but the 165hz monitor, then it gained the high-refresh.

I definitely understand about my other system not being really comparable...but Wayland is still giving me trouble even when I disabled all other monitors on this system, which indicates that it's at least a problem with how Mutter works with the Nvidia driver, correct?

ADDENDUM:

I should also note that on X, when running properly at a high-refresh rate (with other monitors disabled), my Chromium/Electron apps work flawlessly. No text jank, no over-draw, or any other issue that I can see.

ADDENDUM 2:

I forgot to mention this about X, but certain other apps (I've only noticed with Steam or GNOME-Terminal) launch with blurry text on some parts of the UI, but this quickly goes away if you move the mouse over the application, not sure what's going on there, I looked it up but didn't see anything immediate.

---

Thanks for being patient with me and these bugs.

Last edited by IrreleventIdiot (2023-01-04 14:31:33)


Yes, I know I spelt "Irrelevant" wrong.

Offline

#21 2023-01-04 14:43:34

seth
Member
Registered: 2012-09-03
Posts: 49,985

Re: [(Semi) SOLVED] Wayland Nvidia: Chromium/Electron MESA-LOADER errors

I don't see an FPS display anywhere?

Gnome apparently thinks it's a good idea to spam the journal w/ that… try

journalctl -f | grep FPS

indicates that it's at least a problem with how Mutter works with the Nvidia driver, correct?

inference != equivalence

You know that mutter on wayland doesn't work well w/ nvidia, but that's not equivalent to mutter working great w/o nvidia.
Not having issues w/ mutter/X11/nvidia so far is rather an indicator to the contrary.
It's simply not yet possible to say where the issue is.

Try to force nvidia to sync to the high-res output

__GL_SYNC_DISPLAY_DEVICE=DP-0 glxgears # replace DP-0 w/ the output name from xrandr for the 165Hz output

Unless mutter is fishing frequencies out of the randr data and artifically limiting the refresh rate (w/o actually syncing to the vblank signal) that should™ get you 165Hz, but the 60Hz output will probably tear.

Offline

#22 2023-01-04 16:52:34

IrreleventIdiot
Member
From: SC
Registered: 2017-01-28
Posts: 35

Re: [(Semi) SOLVED] Wayland Nvidia: Chromium/Electron MESA-LOADER errors

Well I got it working on X properly: https://www.reddit.com/r/linuxhardware/ … different/

I have to make sure nvidia-settings opens on login to fully get it working, but it does the trick. I just had never configured X on my computer, nor put any effort into researching it, because my intent was to get Wayland working 100% to-where I'd never need to touch X beyond having Xwayland for apps that didn't have native support yet. It's no wonder I've been having issues with X...this it doesn't really solve the issue of Wayland being buggy with Nvidia; I guess that's why I've got an AMD card coming in.

I still have the minor issue of some applications (GNOME-Terminal, Steam) having blurry unreadable text on launch, but it goes away if you roll your mouse over it, so not a huge issue.

If you want I can mark this issue as solved since getting X working resolves the issues of my Chromium/Electron Apps being graphically janky. I can always open a different issue topic if I need to for the minor text blur issue in case I can't figure it out myself like this one.

---

Thank you so much for your support and patience with me. You also helped me learn a LOT, which is the main reason I use Arch--it makes me learn to do things myself, instead of having automated or pre-built configurations take care of it for me.

Last edited by IrreleventIdiot (2023-01-04 16:52:55)


Yes, I know I spelt "Irrelevant" wrong.

Offline

#23 2023-01-06 21:18:47

IrreleventIdiot
Member
From: SC
Registered: 2017-01-28
Posts: 35

Re: [(Semi) SOLVED] Wayland Nvidia: Chromium/Electron MESA-LOADER errors

One last update: I got the AMD card, installed it, and without any further configuration all Wayland issues immediately disappeared.

Last edited by IrreleventIdiot (2023-01-06 21:19:03)


Yes, I know I spelt "Irrelevant" wrong.

Offline

Board footer

Powered by FluxBB