Chromium snap on Jammy system with nvidia-510 does not start

Bug #1966108 reported by Adam Collard
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
snapd
In Progress
Critical
Unassigned

Bug Description

Launching chromium takes several seconds before it gives me a window that i can interact with.

Debugging information linked below

$ snap version
snap 2.55.2+22.04
snapd 2.55.2+22.04
series 16
ubuntu 22.04
kernel 5.15.0-23-generic

$ snap list chromium
Name Version Rev Tracking Publisher Notes
chromium 101.0.4929.5 1938 latest/edge canonical✓ -

$ snap connections chromium | pastebinit

https://paste.ubuntu.com/p/DxzVCXD8Yp/

$ SNAPD_DEBUG=1 snap run chromium | pastebinit

https://paste.ubuntu.com/p/JZND95n96f/

description: updated
description: updated
Revision history for this message
Adam Collard (adam-collard) wrote (last edit ):
Download full text (4.1 KiB)

This got much worse after enabling proprietary drivers and leaves me with a completely unusable Chromium (no browser chrome painted, let alone content)

$ ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd000013C2sv00001462sd00003160bc03sc00i00
vendor : NVIDIA Corporation
model : GM204 [GeForce GTX 970]
driver : nvidia-driver-510-server - distro non-free
driver : nvidia-driver-390 - distro non-free
driver : nvidia-driver-418-server - distro non-free
driver : nvidia-driver-510 - distro non-free recommended
driver : nvidia-driver-450-server - distro non-free
driver : nvidia-driver-470 - distro non-free
driver : nvidia-driver-470-server - distro non-free
driver : xserver-xorg-video-nouveau - distro free builtin

$ ubuntu-drivers debug | grep 'installed: [^<]'
nvidia-driver-510: installed: 510.60.02-0ubuntu1 available: 510.60.02-0ubuntu1 (auto-install) [distro] non-free modalias: pci:v000010DEd000013C2sv00001462sd00003160bc03sc00i00 path: /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 vendor: NVIDIA Corporation model: GM204 [GeForce GTX 970] support level: PB

$ snap version
snap 2.55.2+22.04.1
snapd 2.55.2+22.04.1
series 16
ubuntu 22.04
kernel 5.15.0-23-generic
$ snap list chromium
Name Version Rev Tracking Publisher Notes
chromium 100.0.4896.60 1951 latest/stable canonical✓ -

snippet from SNAPD_DEBUG=1 snap run chromium
DEBUG: requesting changing of apparmor profile on next exec to snap-update-ns.chromium
change.go:566: DEBUG: desiredIDs: map[/run/user/1000/doc:true]
change.go:567: DEBUG: reuse: map[]
change.go:320: DEBUG: mount name:"/run/user/1000/doc/by-app/snap.chromium" dir:"/run/user/1000/doc" type:"none" opts:MS_BIND unparsed:"" (error: <nil>)
DEBUG: snap-update-ns finished successfully
DEBUG: set_effective_identity uid:0 (change: no), gid:1000 (change: yes)
DEBUG: NOT preserving per-user mount namespace
DEBUG: releasing lock 7
DEBUG: sending command 0 to helper process (pid: 1601462)
DEBUG: waiting for response from helper
DEBUG: sanity timeout reset and disabled
DEBUG: helper process received command 0
DEBUG: helper process exiting
DEBUG: waiting for the helper process to exit
DEBUG: helper process exited normally
DEBUG: resetting PATH to values in sync with core snap
DEBUG: set_effective_identity uid:1000 (change: yes), gid:1000 (change: yes)
DEBUG: creating user data directory: /home/acollard/snap/chromium/1951
DEBUG: requesting changing of apparmor profile on next exec to snap.chromium.chromium
DEBUG: ruid: 1000, euid: 1000, suid: 0
DEBUG: setting capabilities bounding set
DEBUG: regaining SYS_ADMIN
DEBUG: loading bpf program for security tag snap.chromium.chromium
DEBUG: read 6520 bytes from /var/lib/snapd/seccomp/bpf//snap.chromium.chromium.bin
DEBUG: read 152 bytes from /var/lib/snapd/seccomp/bpf/global.bin
DEBUG: clearing SYS_ADMIN
DEBUG: execv(/usr/lib/snapd/snap-exec, /usr/lib/snapd/snap-exec...)
DEBUG: argv[1] = chromium
DEBUG: umask restored to 02
DEBUG: working directory restored to /home/acollard
Gtk-Message: 16:52:11.032: Failed to load module "canberra-gtk-module"
Gtk-Message: 16:52:11.033: Faile...

Read more...

Revision history for this message
Adam Collard (adam-collard) wrote :

$ sudo dmesg | tail
[160954.022934] audit: type=1400 audit(1649322775.929:3679): apparmor="DENIED" operation="open" profile="snap.chromium.chromium" name="/run/udev/data/+dmi:id" pid=2584425 comm="ThreadPoolForeg" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[161015.528950] audit: type=1400 audit(1649322837.434:3680): apparmor="DENIED" operation="capable" profile="/snap/snapd/15177/usr/lib/snapd/snap-confine" pid=2585908 comm="snap-confine" capability=12 capname="net_admin"
[161015.589108] audit: type=1400 audit(1649322837.494:3681): apparmor="DENIED" operation="capable" profile="/snap/snapd/15177/usr/lib/snapd/snap-confine" pid=2585908 comm="snap-confine" capability=4 capname="fsetid"
[161016.174001] audit: type=1326 audit(1649322838.082:3682): auid=1000 uid=1000 gid=1000 ses=3 subj=? pid=2585908 comm="chrome" exe="/snap/chromium/1951/usr/lib/chromium-browser/chrome" sig=0 arch=c000003e syscall=314 compat=0 ip=0x7f4e4050676d code=0x50000
[161016.205311] audit: type=1400 audit(1649322838.114:3683): apparmor="DENIED" operation="connect" profile="snap.chromium.chromium" name="/run/user/1000/at-spi/bus" pid=2585908 comm="chrome" requested_mask="wr" denied_mask="wr" fsuid=1000 ouid=1000
[161016.355907] audit: type=1326 audit(1649322838.262:3684): auid=1000 uid=1000 gid=1000 ses=3 subj=? pid=2586094 comm="chrome" exe="/snap/chromium/1951/usr/lib/chromium-browser/chrome" sig=0 arch=c000003e syscall=330 compat=0 ip=0x7f3b0d49903b code=0x50000
[161016.357892] audit: type=1326 audit(1649322838.266:3685): auid=1000 uid=1000 gid=1000 ses=3 subj=? pid=2586095 comm="chrome" exe="/snap/chromium/1951/usr/lib/chromium-browser/chrome" sig=0 arch=c000003e syscall=330 compat=0 ip=0x7f3b0d49903b code=0x50000
[161016.634361] audit: type=1326 audit(1649322838.542:3686): auid=1000 uid=1000 gid=1000 ses=3 subj=? pid=2586167 comm="chrome" exe="/snap/chromium/1951/usr/lib/chromium-browser/chrome" sig=0 arch=c000003e syscall=330 compat=0 ip=0x7f3b0d49903b code=0x50000
[161018.481594] audit: type=1400 audit(1649322840.390:3687): apparmor="DENIED" operation="open" profile="snap.chromium.chromium" name="/run/udev/data/c511:0" pid=2585908 comm="ThreadPoolForeg" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[161018.535646] audit: type=1400 audit(1649322840.442:3688): apparmor="DENIED" operation="open" profile="snap.chromium.chromium" name="/run/udev/data/+dmi:id" pid=2585908 comm="ThreadPoolForeg" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0

Revision history for this message
Adam Collard (adam-collard) wrote :

Tried installing chromium in `--devmode` to eliminate some complexity

https://paste.ubuntu.com/p/Hthb7Twyb4/ is from `SNAPD_DEBUG=1 timeout 5 snap run chromium`

Revision history for this message
Adam Collard (adam-collard) wrote :

@mvo asked me to try this with a build from https://github.com/mvo5/snappy/tree/nvidia-510

Unfortunately i see no change, and still have no usable browser

Here is SNAPD_DEBUG=1 timeout 5 snap run chromium

https://paste.ubuntu.com/p/5SjkRwVgGP/

$ snap version
snap 2.55.3+git294.ge027673
snapd 2.55.3+git294.ge027673
series 16
ubuntu 22.04
kernel 5.15.0-25-generic

Revision history for this message
Michael Vogt (mvo) wrote :

There is a new debug log now:
https://paste.ubuntu.com/p/xs52Gnbnmy/

Revision history for this message
Michael Vogt (mvo) wrote :

So just to summarize the results so far:
1. https://github.com/mvo5/snappy/tree/nvidia-510 appears to be not helping
   (the log indicates the libs get put into the right place)
2. "snap run --strace chromium" shows a bunch of
   "openat(AT_FDCWD, "/run/udev/data/+dmi:id", O_RDONLY|O_CLOEXEC) = -1 EACCES (Permission denied)"
   But those seem to be red-herrings because in devmode things still do not work
3. installing the chromium snap in devmode with the "nvidia-510" branch does not help either

Some dmesg message got observed that may give us hints:
- traps: chrome[53956] trap int3 ip:558eaf942804 sp:7ffd447b2b10 error:0 in chrome[558eaf838000+842a000]
- audit: type=1400 audit(1649953451.658:1596): apparmor="DENIED" operation="open" profile="snap-update-ns.chromium" name="/var/lib/" pid=53960 comm="5" requested_mask="r" denied_mask="r" fsuid=0 ouid=0

summary: - Painfully slow startup for Chromium snap on Jammy system with NVidia GPU
+ Chromium snap on Jammy system with nvidia-510 does not start
Changed in snapd:
status: New → In Progress
importance: Undecided → Critical
Revision history for this message
Michael Vogt (mvo) wrote :

Extra data points:
- firefox snap work for Adam
- glarea-example works fine for Adam

Revision history for this message
Adam Collard (adam-collard) wrote :

Note, glarea-example shows

`libEGL warning: DRI2: failed to create dri screen`

Revision history for this message
Michael Vogt (mvo) wrote :

One (hopefully smaller/easier) reproducer is:
```
acollard@firestorm:~/Projects/snapd$ glarea-example
libEGL warning: DRI2: failed to create dri screen
```

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

I've reproduced this on Ubuntu 22.04 (updated from 20.04) with an RTX 2080 running with 510 nvidia drivers and 5.15 kernel.

There's a few apparmor denials but the key bug, seems to be, that chromium tries to load nvidia_dri.so from a directory where that file is not present.

In my case, at runtime, from snap's POV, in devmode, it failed to load:

/snap/chromium/1961/gnome-platform/usr/lib/x86_64-linux-gnu/dri/nvidia-drm_dri.so

The directory had a bunch of files for nouveau, intel and radeon but nothing for nvidia proprietary driver.

Revision history for this message
Maciej Borzecki (maciek-borzecki) wrote :
Revision history for this message
Maciej Borzecki (maciek-borzecki) wrote :

I've attached a strace dump from Zyga. Looking at the dump there's a bunch of loads of nvidia related files, all of which are successful:

[pid 3977] openat(AT_FDCWD, "/var/lib/snapd/lib/gl/libnvidia-glsi.so.510.60.02", O_RDONLY|O_CLOEXEC <unfinished ...>
[pid 3977] <... openat resumed>) = 20

[pid 3977] openat(AT_FDCWD, "/var/lib/snapd/lib/gl/libnvidia-tls.so.510.60.02", O_RDONLY|O_CLOEXEC) = 20

[pid 3977] openat(AT_FDCWD, "/var/lib/snapd/lib/gl/libnvidia-glcore.so.510.60.02", O_RDONLY|O_CLOEXEC <unfinished ...>
[pid 3977] <... openat resumed>) = 20

[pid 3977] openat(AT_FDCWD, "/var/lib/snapd/hostfs/usr/lib/x86_64-linux-gnu/libGLX_nvidia.so.510.60.02", O_RDONLY) = 20
[pid 3977] openat(AT_FDCWD, "/var/lib/snapd/hostfs/usr/lib/x86_64-linux-gnu/libnvidia-glsi.so.510.60.02", O_RDONLY) = 20
[pid 3977] openat(AT_FDCWD, "/var/lib/snapd/hostfs/usr/lib/x86_64-linux-gnu/libnvidia-tls.so.510.60.02", O_RDONLY) = 20
[pid 3977] openat(AT_FDCWD, "/var/lib/snapd/hostfs/usr/lib/x86_64-linux-gnu/libnvidia-glcore.so.510.60.02", O_RDONLY) = 20

[pid 3977] openat(AT_FDCWD, "/proc/driver/nvidia/params", O_RDONLY) = 21
[pid 3977] openat(AT_FDCWD, "/dev/nvidia0", O_RDWR|O_CLOEXEC) = 21

[pid 3977] openat(AT_FDCWD, "/dev/nvidiactl", O_RDWR <unfinished ...>
[pid 3977] <... openat resumed>) = 25

[pid 3977] openat(AT_FDCWD, "/dev/nvidia-modeset", O_RDWR|O_CLOEXEC) = 26

But lastly, there's this odd piece, where it clearly tries to load Mesa's driver for nvidia and obviously fails (strace seems to be confused about what happens here):

[pid 3977] openat(AT_FDCWD, "/snap/chromium/1961/gnome-platform/usr/lib/x86_64-linux-gnu/dri/tls/nvidia-drm_dri.so", O_RDONLY|O_CLOEXEC) = 257
[pid 3977] --- SIGSYS {si_signo=SIGSYS, si_code=SYS_SECCOMP, si_errno=ENOENT, si_call_addr=0x7fa3f1042f58, si_syscall=__NR_openat, si_arch=AUDIT_ARCH_X86_64} ---
[pid 3890] openat(AT_FDCWD, "/snap/chromium/1961/gnome-platform/usr/share/icons/hicolor/symbolic/apps", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 44
[pid 3977] openat(AT_FDCWD, "/snap/chromium/1961/gnome-platform/usr/lib/x86_64-linux-gnu/dri/nvidia-drm_dri.so", O_RDONLY|O_CLOEXEC) = 257
[pid 3977] --- SIGSYS {si_signo=SIGSYS, si_code=SYS_SECCOMP, si_errno=ENOENT, si_call_addr=0x7fa3f1042f58, si_syscall=__NR_openat, si_arch=AUDIT_ARCH_X86_64} ---
MESA-LOADER: failed to open nvidia-drm: /snap/chromium/1961/gnome-platform/usr/lib/x86_64-linux-gnu/dri/nvidia-drm_dri.so: cannot open shared object file: Permission denied (search paths /snap/chromium/1961/gnome-platform/usr/lib/x86_64-linux-gnu/dri)
[pid 3890] openat(AT_FDCWD, "/snap/chromium/1961/data-dir/icons/hicolor/icon-theme.cache", O_RDONLYfailed to load driver: nvidia-drm
) = -1 ENOENT (Nie ma takiego pliku ani katalogu)

So the questions are:
1. why nvidia doesn't work despite all libs being loaded, /dev/nvidia0 and /dev/nvidiactl being opened
2. why it even tries to load mesa drivers

Revision history for this message
Olivier Tilloy (osomon) wrote :

Can someone who observes the issue on their system run the application with LIBGL_DEBUG=verbose and share the output here?

    LIBGL_DEBUG=verbose snap run chromium

Without any further investigation, it looks like this could be a similar problem to bug #1947180, where the snapcraft desktop extension unconditionally overrides LIBGL_DRIVERS_PATH.

Revision history for this message
Adam Collard (adam-collard) wrote :

$ LIBGL_DEBUG=verbose snap run chromium
Gtk-Message: 15:40:53.159: Failed to load module "canberra-gtk-module"
Gtk-Message: 15:40:53.161: Failed to load module "canberra-gtk-module"
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/acollard/snap/chromium/1961/.drirc: Permission denied.
MESA-LOADER: failed to retrieve device information
MESA-LOADER: failed to open nvidia-drm: /snap/chromium/1961/gnome-platform/usr/lib/x86_64-linux-gnu/dri/nvidia-drm_dri.so: cannot open shared object file: Permission denied (search paths /snap/chromium/1961/gnome-platform/usr/lib/x86_64-linux-gnu/dri)
failed to load driver: nvidia-drm
MESA-LOADER: failed to open kms_swrast: /snap/chromium/1961/gnome-platform/usr/lib/x86_64-linux-gnu/dri/kms_swrast_dri.so: cannot open shared object file: Permission denied (search paths /snap/chromium/1961/gnome-platform/usr/lib/x86_64-linux-gnu/dri)
failed to load driver: kms_swrast
MESA-LOADER: failed to open swrast: /snap/chromium/1961/gnome-platform/usr/lib/x86_64-linux-gnu/dri/swrast_dri.so: cannot open shared object file: Permission denied (search paths /snap/chromium/1961/gnome-platform/usr/lib/x86_64-linux-gnu/dri)
failed to load swrast driver

Revision history for this message
Olivier Tilloy (osomon) wrote :

 > search paths /snap/chromium/1961/gnome-platform/usr/lib/x86_64-linux-gnu/dri

seems to confirm my suspicions: the snapcraft desktop extension sets the value of LIBGL_DRIVERS_PATH to a single path within the gnome platform snap, thus preventing mesa from locating nvidia-drm_dri.so elsewhere.

Revision history for this message
Adam Collard (adam-collard) wrote :

I note that vanilla chrome binary downloaded from upstream also hits failures to find nvidia-drm and friends (but does give me a usable browser, with video chat etc.)

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/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
failed to load driver: nvidia-drm
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/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/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/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
failed to load swrast driver

Revision history for this message
James Henstridge (jamesh) wrote :

I think trying to the Mesa errors and "nvidia-drm_dri.so not found" errors are a red herring here. They indicate that Chromium is trying to use the Mesa user space GL driver, when it should be using the Nvidia user space GL driver.

As for why Firefox might work but Chromium fails, one big difference is that Firefox is a Wayland app and Chromium is an X11 app. The GLVND driver multiplexer uses different methods to pick a driver on the different window systems.

My first guess is that it is trying to dlopen() the libGLX_nvidia.so.0. If that fails, it might fall back to libGLX_mesa.so.0 and give us all these other errors. The dlopen() could fail if a library dependency is missing within the sandbox, or a library is too old.

The 510 GL driver package adds a dependency on libdrm2 and libgbm1, so perhaps it relies on something added since 20.04.

I also notice that the new driver drops files in /usr/share/egl/egl_external_platform.d/, which snap-confine and desktop-launch know nothing about. That looks like it'd be a Wayland only issue though. I don't see any reference to it in the attached strace log though.

Revision history for this message
Maciej Borzecki (maciek-borzecki) wrote :

Though in the strace log, there are multiple refernces where libGLX_nvidia is clearly opened:

[pid 3977] openat(AT_FDCWD, "/var/lib/snapd/lib/gl/libGLX_nvidia.so.0", O_RDONLY|O_CLOEXEC) = 20
[pid 3977] openat(AT_FDCWD, "/var/lib/snapd/hostfs/usr/lib/x86_64-linux-gnu/libGLX_nvidia.so.510.60.02", O_RDONLY) = 20

at least we know that the library is there and is accessible. I could not find a matching close on that fd number, so most likely it remained, so I'm guessing that dlopen(), if it was used, did not fail as I would expect some cleanup to happen.

Revision history for this message
James Henstridge (jamesh) wrote :

I was wrong about it trying to use libGLX_mesa.so. I can see the same "MESA-LOADER:" message strings in libgbm, so that's presumably where they're coming from.

I think there are multiple parts to this problem:

1. If we had a newer libgbm inside the sandbox, it would instead be searching for nvidia-drm_gbm.so.

2. The nvidia-drm_gbm.so file is packaged as https://packages.ubuntu.com/jammy/libnvidia-extra-510, and snap-confine doesn't yet know to make this available within the sandbox.

3. A different set of fixes will be necessary for Wayland apps (or Chromium when we stop forcing it to use X11).

For (1), we'd need a newer Mesa in the gnome-3-38-2004 platform snap. At the moment it is just bundling Focal's Mesa, so if there are plans to do an HWE backport at some point, we might be able to benefit from that.

For (2) and (3), it'll likely require some changes to snap-confine to make the new library and data files available (probably in a few new subdirs of /var/lib/snapd/lib), and some corresponding changes to the desktop-launch script to point at these extra files.

With the Nvidia drivers now making use of some Mesa components, this basically means that there will likely be a minimum Mesa version requirement within the sandbox. It also looks like there are some open source components (e.g. https://github.com/NVIDIA/egl-wayland) that may not be appropriate to pull in from the host system as they may be built against newer library versions.

Revision history for this message
Adam Collard (adam-collard) wrote :

I am no longer hitting this problem

$ snap version
snap 2.55.3+git294.ge027673
snapd 2.55.3+git294.ge027673
series 16
ubuntu 22.04
kernel 5.15.0-25-generic

$ snap info chromium
name: chromium
summary: Chromium web browser, open-source version of Chrome
publisher: Canonical✓
store-url: https://snapcraft.io/chromium
contact: https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bugs?field.tag=snap
license: unset
description: |
  An open-source browser project that aims to build a safer, faster, and more
  stable way for all Internet users to experience the web.
commands:
  - chromium.chromedriver
  - chromium
snap-id: XKEcBqPM06H1Z7zGOdG5fbICuf8NWK5R
tracking: latest/stable
refresh-date: 15 days ago, at 17:21 BST
channels:
  latest/stable: 101.0.4951.41 2022-04-26 (1973) 139MB -
  latest/candidate: 101.0.4951.41 2022-04-26 (1973) 139MB -
  latest/beta: 101.0.4951.41 2022-04-21 (1973) 139MB -
  latest/edge: 102.0.5005.22 2022-04-27 (1977) 138MB -
installed: 100.0.4896.88 (1961) 137MB devmode

Revision history for this message
zagglez (zagglez) wrote :

I am getting the error though - window launches, no content painted at all.
LIBGL_DEBUG=verbose snap run chromium
Gtk-Message: 14:44:58.908: Failed to load module "canberra-gtk-module"
Gtk-Message: 14:44:58.908: Failed to load module "canberra-gtk-module"
libGL: Can't open configuration file /home/mike/snap/chromium/2117/.drirc: Permission denied.
MESA-LOADER: failed to retrieve device information
MESA-LOADER: failed to open nvidia-drm: /snap/chromium/2117/gnome-platform/usr/lib/x86_64-linux-gnu/dri/nvidia-drm_dri.so: cannot open shared object file: Permission denied (search paths /snap/chromium/2117/gnome-platform/usr/lib/x86_64-linux-gnu/dri, suffix _dri)
failed to load driver: nvidia-drm
MESA-LOADER: failed to open kms_swrast: /snap/chromium/2117/gnome-platform/usr/lib/x86_64-linux-gnu/dri/kms_swrast_dri.so: cannot open shared object file: Permission denied (search paths /snap/chromium/2117/gnome-platform/usr/lib/x86_64-linux-gnu/dri, suffix _dri)
failed to load driver: kms_swrast
MESA-LOADER: failed to open swrast: /snap/chromium/2117/gnome-platform/usr/lib/x86_64-linux-gnu/dri/swrast_dri.so: cannot open shared object file: Permission denied (search paths /snap/chromium/2117/gnome-platform/usr/lib/x86_64-linux-gnu/dri, suffix _dri)
failed to load swrast driver

LibGL: Can't open configuration file /home/mike/snap/chromium/2117/.drirc: Permission denied.
actually there is no such file present.

snap 2.57.2
snapd 2.57.2
series 16
ubuntu 22.04
kernel 5.15.0-48-generic

name: chromium
summary: Chromium web browser, open-source version of Chrome
publisher: Canonical✓
store-url: https://snapcraft.io/chromium
contact: https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bugs?field.tag=snap
license: unset
description: |
  An open-source browser project that aims to build a safer, faster, and more
  stable way for all Internet users to experience the web.
commands:
  - chromium.chromedriver
  - chromium
snap-id: XKEcBqPM06H1Z7zGOdG5fbICuf8NWK5R
tracking: latest/stable
refresh-date: 3 days ago, at 13:16 BST
channels:
  latest/stable: 106.0.5249.91 2022-10-04 (2117) 150MB -
  latest/candidate: 106.0.5249.103 2022-10-06 (2125) 150MB -
  latest/beta: 107.0.5304.29 2022-10-07 (2128) 152MB -
  latest/edge: 108.0.5327.0 2022-10-03 (2122) 153MB -
installed: 106.0.5249.91 (2117) 150MB -

Revision history for this message
zagglez (zagglez) wrote :

That's under Wayland. Runs fine under X11.

Revision history for this message
zagglez (zagglez) wrote :

Nvidia driver version: 515.65.01

Revision history for this message
zagglez (zagglez) wrote :

solution thanks to https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1897454

First launch chromium with this command (only needed once) from a terminal
$ chromium --enable-features=UseOzonePlatform --ozone-platform=wayland

Then change the ozone-platform-hint setting by typing into the browser location bar:
chrome://flags/#ozone-platform-hint
And change the value from "default" to "auto"

BTW on nvidia I get loads of DRI related errors and messages about stopping use of gpu
which not surprisingly disappear if I disable hardware acceleration in the browser settings panel (system, hardware acceleration) - sad not to be able to use the GPU for chromium - sigh.

Once the ozone platform hint has been set, you can just launch chromium as normal, ie without the UseOzonePlatform feature - eg from the terminal using:
$ chromium

Revision history for this message
zagglez (zagglez) wrote :

Though that doesn't fix these messages if GPU acceleration is enabled:

[88044:88044:1013/115206.838740:ERROR:gl_display.cc(508)] EGL Driver message (Error) eglGetPlatformDisplay: EGL_BAD_PARAMETER error: In internal function: Additional INFO may be available

libEGL warning: DRI2: failed to create dri screen
[88044:88044:1013/115206.901601:ERROR:gpu_init.cc(521)] Passthrough is not supported, GL is egl, ANGLE is
[88044:88044:1013/115206.904020:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization
[88160:88160:1013/115206.929650:ERROR:gl_display.cc(508)] EGL Driver message (Error) eglGetPlatformDisplay: EGL_BAD_PARAMETER error: In internal function: Additional INFO may be available

libEGL warning: DRI2: failed to create dri screen
[88160:88160:1013/115206.987310:ERROR:gpu_init.cc(521)] Passthrough is not supported, GL is egl, ANGLE is
[88160:88160:1013/115206.989783:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization
[88104:7:1013/115207.007957:ERROR:command_buffer_proxy_impl.cc(128)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.
[87913:88066:1013/115209.132246:ERROR:udev_watcher.cc(98)] Failed to begin udev enumeration.
[88256:88256:1013/115215.684979:ERROR:gl_utils.cc(319)] [.WebGL-0x55e612355240]GL Driver Message (OpenGL, Performance, GL_CLOSE_PATH_NV, High): GPU stall due to ReadPixels
mike@thalia:~$ [91549:91549:1013/115409.748959:ERROR:gl_display.cc(508)] EGL Driver message (Error) eglGetPlatformDisplay: EGL_BAD_PARAMETER error: In internal function: Additional INFO may be available

libEGL warning: DRI2: failed to create dri screen
[91549:91549:1013/115409.790180:ERROR:gpu_init.cc(521)] Passthrough is not supported, GL is egl, ANGLE is
[91549:91549:1013/115409.792987:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization
[91663:91663:1013/115409.851887:ERROR:gl_display.cc(508)] EGL Driver message (Error) eglGetPlatformDisplay: EGL_BAD_PARAMETER error: In internal function: Additional INFO may be available

libEGL warning: DRI2: failed to create dri screen
[91663:91663:1013/115409.916643:ERROR:gpu_init.cc(521)] Passthrough is not supported, GL is egl, ANGLE is
[91663:91663:1013/115409.918768:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization
[91497:91572:1013/115411.987147:ERROR:udev_watcher.cc(98)] Failed to begin udev enumeration.
[91758:91758:1013/115413.234454:ERROR:gl_utils.cc(319)] [.WebGL-0x55d1a25f21d0]GL Driver Message (OpenGL, Performance, GL_CLOSE_PATH_NV, High): GPU stall due to ReadPixels

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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