Graphics acceleration like WebGL is broken on nvidia-390

Bug #1957172 reported by Vladimir Kamarzin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
chromium-browser (Ubuntu)
Undecided
Unassigned

Bug Description

```
% lsb_release -rd
Description: Ubuntu 20.04.3 LTS
Release: 20.04
```

Snap:

```
chromium 97.0.4692.71 1864 latest/stable canonical✓ -
```

I'm using proprietary nvidia drivers `nvidia-driver-390` package.

I've migrated my home system to ubuntu 20.04 some time ago and noticed that all acceleration is broken in snap-based chromium.

If I go into chrome://gpu/

```
Graphics Feature Status
Canvas: Software only. Hardware acceleration disabled
Canvas out-of-process rasterization: Disabled
Compositing: Software only. Hardware acceleration disabled
Multiple Raster Threads: Disabled
Out-of-process Rasterization: Disabled
OpenGL: Disabled
Rasterization: Software only. Hardware acceleration disabled
Raw Draw: Disabled
Skia Renderer: Enabled
Video Decode: Software only. Hardware acceleration disabled
Video Encode: Software only. Hardware acceleration disabled
Vulkan: Disabled
WebGL: Disabled
WebGL2: Disabled
Problems Detected
Accelerated video encode has been disabled, either via blocklist, about:flags or the command line.
Disabled Features: video_encode
Accelerated video decode has been disabled, either via blocklist, about:flags or the command line.
Disabled Features: video_decode
Gpu compositing has been disabled, either via blocklist, about:flags or the command line. The browser will fall back to software compositing and hardware acceleration will be unavailable.
Disabled Features: gpu_compositing
GPU process was unable to boot: GPU process crashed too many times with SwiftShader.
Disabled Features: all

...
Log Messages
GpuProcessHost: The GPU process exited normally. Everything is okay.
GpuProcessHost: The GPU process exited normally. Everything is okay.
GpuProcessHost: The GPU process exited normally. Everything is okay.
GpuProcessHost: The GPU process exited normally. Everything is okay.
GpuProcessHost: The GPU process exited normally. Everything is okay.
GpuProcessHost: The GPU process exited normally. Everything is okay.
GpuProcessHost: The GPU process exited normally. Everything is okay.
GpuProcessHost: The GPU process exited normally. Everything is okay.
GpuProcessHost: The GPU process exited normally. Everything is okay.
GpuProcessHost: The GPU process exited normally. Everything is okay.
GpuProcessHost: The GPU process exited normally. Everything is okay.
GpuProcessHost: The GPU process exited normally. Everything is okay.
GpuProcessHost: The GPU process exited normally. Everything is okay.
GpuProcessHost: The GPU process exited normally. Everything is okay.
GpuProcessHost: The GPU process exited normally. Everything is okay.
GpuProcessHost: The GPU process exited normally. Everything is okay.
GpuProcessHost: The GPU process exited normally. Everything is okay.
GpuProcessHost: The GPU process exited normally. Everything is okay.
GpuProcessHost: The GPU process exited normally. Everything is okay.
GpuProcessHost: The GPU process exited normally. Everything is okay.
GpuProcessHost: The GPU process exited normally. Everything is okay.
[137727:137727:0112/173138.821608:ERROR:angle_platform_impl.cc(44)] : Display.cpp:894 (initialize): ANGLE Display::initialize error 0: Internal Vulkan error (-3): Initialization of an object could not be completed for implementation-specific reasons, in ../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp, initialize:1068.
[137727:137727:0112/173138.822966:ERROR:gl_surface_egl.cc(783)] : EGL Driver message (Critical) eglInitialize: Internal Vulkan error (-3): Initialization of an object could not be completed for implementation-specific reasons, in ../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp, initialize:1068.
[137727:137727:0112/173138.823496:ERROR:gl_surface_egl.cc(1391)] : eglInitialize SwANGLE failed with error EGL_NOT_INITIALIZED
[137727:137727:0112/173138.824148:ERROR:gl_ozone_egl.cc(20)] : GLSurfaceEGL::InitializeOneOff failed.
[137727:137727:0112/173138.858669:ERROR:viz_main_impl.cc(161)] : Exiting GPU process due to errors during initialization
GpuProcessHost: The GPU process exited normally. Everything is okay.
[137735:137735:0112/173138.988272:WARNING:vaapi_wrapper.cc(606)] : VAAPI video acceleration not available for disabled
[137735:137735:0112/173138.989446:ERROR:gpu_init.cc(457)] : Passthrough is not supported, GL is disabled, ANGLE is
```

I suspect that chromium snap cannot access `/dev/nvidia*` files.

If I run chromium binary directly like `/snap/chromium/current/usr/lib/chromium-browser/chrome`
or run flatpak version of chromium, acceleration works fine and there are no such error messages.

In the journalctl logs I also see a DENIED message at the startup, not sure if this is related

```
Jan 12 17:31:32 home kernel: audit: type=1107 audit(1641990692.085:180): pid=1524 uid=103 auid=4294967295 ses=4294967295 subj=unconfined msg='apparmor="DENIED" operation="dbus_method_call" bus="system" path="/" interface="org.freedesktop.DBus.ObjectManager" member="GetManagedObjects" mask="send" name="org.bluez" pid=137005 label="snap.chromium.chromium"
                              exe="/usr/bin/dbus-daemon" sauid=103 hostname=? addr=? terminal=?'
```

Vladimir Kamarzin (vvk)
description: updated
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers