WebGL doesn't work on NVIDIA, but works on Intel

Description of the issue: When I launch Brave from Intel WebGL works fine, but I when I run prime brave (prime is a thing that sets PRIME offload variables) I see that WebGL doesn’t work (Figma doesn’t launch, get.webgl.org says that I have it disabled

How can this issue be reproduced?

You need to install Arch / Manjaro Linux

  1. Install yay: sudo pacman -S yay
  2. Install latest nvidia drivers (yay -S nvidia)
  3. Install prime (yay -S prime)
  4. Run Brave using NVIDIA GPU (prime brave)
  5. Open https://alteredqualia.com/tmp/webgl-maxparams-test/
  6. See an empty page because it dosn’t work

Expected result:

WebGL should be working because it works fine in Qutebrowser

Brave Version( check About Brave): 1.0.1 Chromium: 78.0.3904.108 (Official Build) unknown (64-bit)

Additional Information:

OS: Linux 5.4.2-1
Distro: Manjaro Linux x64
dGPU: NVIDIA GeForce GT 740M
dGPU driver: GPU Driver: NVIDIA 440.36

Additional info: here

Brave’s hardware acceleration support is a bit buggy at the moment – we have a bunch of scheduled fixes for such but this is probably why you’re seeing this.

Tagging @clifton or @rebron2000 if they have anything else to add :slight_smile:

@v1rtl,
Does disabling hardware acceleration resolve the issue?

You’ll find this in Settings --> Additional Settings --> System --> Hardware Acceleration

Reset all flags to default. Launched with NVIDIA, got this

Graphics Feature Status

  • Canvas: Software only. Hardware acceleration disabled
  • Flash: Software only. Hardware acceleration disabled
  • Flash Stage3D: Software only. Hardware acceleration disabled
  • Flash Stage3D Baseline profile: Software only. Hardware acceleration disabled
  • Compositing: Software only. Hardware acceleration disabled
  • Multiple Raster Threads: Disabled
  • Out-of-process Rasterization: Disabled
  • Hardware Protected Video Decode: Disabled
  • Rasterization: Software only. Hardware acceleration disabled
  • Skia Renderer: Disabled
  • Video Decode: Software only. Hardware acceleration disabled
  • Viz Display Compositor: Enabled
  • Viz Hit-test Surface Layer: Disabled
  • WebGL: Disabled
  • WebGL2: Disabled

Problems Detected

  • GPU process was unable to boot: GPU process crashed too many times with SwiftShader.
    Disabled Features: all

Graphics Feature Status for Hardware GPU

  • Canvas: Software only. Hardware acceleration disabled
  • Flash: Software only. Hardware acceleration disabled
  • Flash Stage3D: Software only. Hardware acceleration disabled
  • Flash Stage3D Baseline profile: Software only. Hardware acceleration disabled
  • Compositing: Software only. Hardware acceleration disabled
  • Multiple Raster Threads: Disabled
  • Out-of-process Rasterization: Disabled
  • Hardware Protected Video Decode: Disabled
  • Rasterization: Software only. Hardware acceleration disabled
  • Skia Renderer: Disabled
  • Video Decode: Software only. Hardware acceleration disabled
  • Viz Display Compositor: Enabled
  • Viz Hit-test Surface Layer: Disabled
  • WebGL: Disabled
  • WebGL2: Disabled

Problems Detected for Hardware GPU

  • GPU process was unable to boot: GPU process crashed too many times with SwiftShader.
    Disabled Features: all

Log Messages

  • [21198:21198:1220/135000.044409:ERROR:gl_implementation.cc(282)] : Failed to load /usr/lib/brave/swiftshader/libGLESv2.so: /usr/lib/brave/swiftshader/libGLESv2.so: cannot open shared object file: No such file or directory
  • GpuProcessHost: The GPU process exited with code 1024.
  • [21390:21390:1220/135001.029544:ERROR:gpu_channel_manager.cc(397)] : ContextResult::kFatalFailure: Failed to create shared context for virtualization.

By spending some time on google I found a way to fix libGLESv2 error by symlinking libs to /usr/lib/.

Although issue is still present.

Here are logs from prime brave:

[10204:10204:1220/143101.809099:ERROR:gl_surface_glx.cc(78)] XGetWindowAttributes failed for
[10204:10204:1220/143101.809182:ERROR:gl_surface_glx.cc(839)] Failed to get GLXConfig
[10204:10204:1220/143101.809197:ERROR:gpu_info_collector.cc(60)] gl::GLContext::CreateOffscr
[10204:10204:1220/143101.809207:ERROR:gpu_info_collector.cc(199)] Could not create surface f
[10204:10204:1220/143101.809220:ERROR:gpu_init.cc(66)] gpu::CollectGraphicsInfo failed.
[10204:10204:1220/143101.811981:ERROR:viz_main_impl.cc(176)] Exiting GPU process due to erro
[10210:10236:1220/143101.976946:ERROR:ssl_client_socket_impl.cc(969)] handshake failed; retu
[10210:10236:1220/143102.978379:ERROR:ssl_client_socket_impl.cc(969)] handshake failed; returned -1, SSL error code 1, net_error -100
[10210:10236:1220/143105.913039:ERROR:ssl_client_socket_impl.cc(969)] handshake failed; returned -1, SSL error code 1, net_error -100
[10177:10177:1220/143107.696713:ERROR:CONSOLE(0)] "Unrecognized Content-Security-Policy directive 'image-src'.
", source: https://get.webgl.org/ (0)
[10210:10236:1220/143113.391134:ERROR:ssl_client_socket_impl.cc(969)] handshake failed; returned -1, SSL error code 1, net_error -100
[10560:1:1220/143116.883584:ERROR:child_process_sandbox_support_impl_linux.cc(81)] FontService unique font name matching request did not receive a response.
[10560:1:1220/143116.884735:ERROR:child_process_sandbox_support_impl_linux.cc(81)] FontService unique font name matching request did not receive a response.

There are definitely a lot of folks having problems with Brave on Arch Linux; it’s not officially supported (see https://github.com/brave/brave-browser/issues/1950) but there is a maintainer who packages it

You may need to launch with the command line arg --ignore-gpu-blacklist. For more info, you can also see:


and

I already have GPU blacklist disabled in brave://flags:

"browser": {
      "enabled_labs_experiments": [ "enable-experimental-webassembly-features", "enable-gpu-rasterization@3", "enable-javascript-harmony", "enable-oop-rasterization@1", "enable-reader-mode", "enable-webassembly-code-gc@1", "enable-webassembly-threads@1", "enable-webgl-draft-extensions", "ignore-gpu-blacklist" ]
   }

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.