Chromium/Brave snap doesn't launch correctly Ubuntu 22.04 on Wayland, Nvidia

Bug #1968610 reported by librenyaa
54
This bug affects 11 people
Affects Status Importance Assigned to Milestone
chromium-browser (Ubuntu)
Confirmed
High
Unassigned

Bug Description

When launching Chromium as a snap on Ubuntu 22.04, it will not open properly and will open the browser with only the titlebar and a transparent window. I am using an Nvidia Graphics card with the 510.60.02 Nvidia proprietary drivers.

Description: Ubuntu Jammy Jellyfish (development branch)
Release: 22.04
Chromium Version: 100.0.4896.75 2022-04-07

When running "snap run chromium" in the terminal, the following output happens. Attached screenshot of result.

nyaa@nyaa-desktop:~$ snap run chromium
Gtk-Message: 13:42:20.777: Failed to load module "canberra-gtk-module"
Gtk-Message: 13:42:20.778: Failed to load module "canberra-gtk-module"
MESA-LOADER: failed to retrieve device information
MESA-LOADER: failed to open nvidia-drm: /snap/chromium/1957/gnome-platform/usr/lib/x86_64-linux-gnu/dri/nvidia-drm_dri.so: cannot open shared object file: Permission denied (search paths /snap/chromium/1957/gnome-platform/usr/lib/x86_64-linux-gnu/dri)
failed to load driver: nvidia-drm
MESA-LOADER: failed to open kms_swrast: /snap/chromium/1957/gnome-platform/usr/lib/x86_64-linux-gnu/dri/kms_swrast_dri.so: cannot open shared object file: Permission denied (search paths /snap/chromium/1957/gnome-platform/usr/lib/x86_64-linux-gnu/dri)
failed to load driver: kms_swrast
MESA-LOADER: failed to open swrast: /snap/chromium/1957/gnome-platform/usr/lib/x86_64-linux-gnu/dri/swrast_dri.so: cannot open shared object file: Permission denied (search paths /snap/chromium/1957/gnome-platform/usr/lib/x86_64-linux-gnu/dri)
failed to load swrast driver
[9358:9478:0411/134223.111306:ERROR:udev_watcher.cc(98)] Failed to begin udev enumeration.

Edit: I have recently tested this more, and I've isolated it to Wayland and the snap version of Chromium. On X, the chromium snap runs correctly.

When I run Chromium as a binary from the Chromium website, the issue doesn't occur on Wayland.

Revision history for this message
librenyaa (librenyaa-deactivatedaccount) wrote :
description: updated
description: updated
description: updated
summary: - Chromium snap doesn't launch correctly Ubuntu 22.04
+ Chromium snap doesn't launch correctly Ubuntu 22.04 on Wayland, Nvidia
Revision history for this message
Launchpad Janitor (janitor) wrote : Re: Chromium snap doesn't launch correctly Ubuntu 22.04 on Wayland, Nvidia

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in chromium-browser (Ubuntu):
status: New → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I would mark this as a duplicate of bug 1967488 had you said "black" instead of "transparent". But I guess they could still both be the same issue.

tags: added: jammy nvidia nvidia-wayland wayland wayland-session
Revision history for this message
Bram Stolk (b-stolk) wrote (last edit ):

I am hitting this too.

Unlike OP, I am on 22.10
Like OP, I am on nvidia 510 proprietary drivers.

Adding --ozone-platform=wayland fixes the issue for me.

$ chromium
Gtk-Message: 10:43:34.433: Not loading module "atk-bridge": The functionality is provided by GTK natively. Please try to not load it.
MESA-LOADER: failed to retrieve device information
MESA-LOADER: failed to open nvidia-drm: /snap/chromium/2271/gnome-platform/usr/lib/x86_64-linux-gnu/dri/nvidia-drm_dri.so: cannot open shared object file: Permission denied (search paths /snap/chromium/2271/gnome-platform/usr/lib/x86_64-linux-gnu/dri, suffix _dri)
failed to load driver: nvidia-drm

chromium snap version: 109.0.5414.74 (latest/stable channel)

UPDATE: I upgraded to nvidia 525 proprietary drivers, which still have this issue.

description: updated
Revision history for this message
Nathan Teodosio (nteodosio) wrote : Re: [Bug 1968610] Re: Chromium snap doesn't launch correctly Ubuntu 22.04 on Wayland, Nvidia

If Bram's suggestion fails, try to disable hardware acceleration:

   chromium --disable-gpu

Changed in chromium-browser (Ubuntu):
importance: Undecided → High
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: Chromium snap doesn't launch correctly Ubuntu 22.04 on Wayland, Nvidia

As a workaround/fix try logging into Xorg and then opening this in Chromium:

  chrome://flags/#ozone-platform-hint

Change it to 'Wayland'.

Now log out and log into Wayland again. Does Chromium work now?

summary: - Chromium snap doesn't launch correctly Ubuntu 22.04 on Wayland, Nvidia
+ Chromium/Brave snap doesn't launch correctly Ubuntu 22.04 on Wayland,
+ Nvidia
tags: added: driver-snap
Revision history for this message
Daniel van Vugt (vanvugt) wrote (last edit ):

Let's merge this into bug 1967488.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.