Offloading && Chrome?

Hi,

I’m currently on Nvidia 525.85.05 and Linux 6.1.10.

In an offload set up, I can get apps (e.g. Google Earth, Zoom) to use my dGPU. However, my browser (Brave) refuses - more below. In searching the forum and web searches, it seems I am not the only one.

Using brave://gpu/ confirms that acceleration is not available when I attempt to use the Nvidia environment variables (see below). At startup, the Brave issues errors (also below) - I did some web searching on the warnings but no luck.

Is the Chrome engine still not able to handle offloading? Is this a a Brave issue? If so, I can report it to them.

Thank you for any help!

Warnings

$ __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME="nvidia" brave-browser-stable

[28225:28225:0213/163205.073605:ERROR:angle_platform_impl.cc(43)] Display.cpp:1014 (initialize): ANGLE Display::initialize error 12289: Invalid visual ID requested.
ERR: Display.cpp:1014 (initialize): ANGLE Display::initialize error 12289: Invalid visual ID requested.
[28225:28225:0213/163205.073688:ERROR:gl_display.cc(504)] EGL Driver message (Critical) eglInitialize: Invalid visual ID requested.
[28225:28225:0213/163205.073717:ERROR:gl_display.cc(917)] eglInitialize OpenGL failed with error EGL_NOT_INITIALIZED, trying next display type
[28225:28225:0213/163205.074008:ERROR:angle_platform_impl.cc(43)] Display.cpp:1014 (initialize): ANGLE Display::initialize error 12289: Invalid visual ID requested.
ERR: Display.cpp:1014 (initialize): ANGLE Display::initialize error 12289: Invalid visual ID requested.
[28225:28225:0213/163205.074037:ERROR:gl_display.cc(504)] EGL Driver message (Critical) eglInitialize: Invalid visual ID requested.
[28225:28225:0213/163205.074060:ERROR:gl_display.cc(917)] eglInitialize OpenGLES failed with error EGL_NOT_INITIALIZED
[28225:28225:0213/163205.074081:ERROR:gl_ozone_egl.cc(23)] GLDisplayEGL::Initialize failed.
[28225:28225:0213/163205.075240:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization
[28188:28188:0213/163205.292989:ERROR:profile_attributes_storage.cc(844)] Failed to PNG encode the image.
[28315:28315:0213/163205.399719:ERROR:angle_platform_impl.cc(43)] Display.cpp:1014 (initialize): ANGLE Display::initialize error 12289: Invalid visual ID requested.
ERR: Display.cpp:1014 (initialize): ANGLE Display::initialize error 12289: Invalid visual ID requested.

ERR: Display.cpp:1014 (initialize): ANGLE Display::initialize error 12289: Invalid visual ID requested.
[28451:28451:0213/163205.567983:ERROR:gl_display.cc(504)] EGL Driver message (Critical) eglInitialize: Invalid visual ID requested.
[28451:28451:0213/163205.568007:ERROR:gl_display.cc(917)] eglInitialize OpenGLES failed with error EGL_NOT_INITIALIZED
[28451:28451:0213/163205.568034:ERROR:gl_ozone_egl.cc(23)] GLDisplayEGL::Initialize failed.
[28451:28451:0213/163205.569186:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization
[28265:7:0213/163205.676615:ERROR:command_buffer_proxy_impl.cc(128)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.
[28188:28188:0213/163205.834788:ERROR:sharing_service.cc(222)] Device registration failed with fatal error

This once worked (apart from video hw accel) but is now broken in chrome (since v94, AFAIK). Funny enough, I just tried and it worked…once. On subsequent runs, it wouldn’t work again. Don’t really know but I’d rather suspect a bug in chrome.

Hi,

Thank you for trying and replying with the results. Very bizarre non-deterministic behavior! :)

I have confirmed that the latest Brave and Google Chrome drops fail:

Google Chrome - Version 110.0.5481.96 (Official Build) (64-bit)
Brave - Version 1.48.158 Chromium: 110.0.5481.77 (Official Build) (64-bit)

Later today I’ll test with a beta version of both. I’ll post the results. If they fail, I’ll report an upstream bug and post the link too.

See 1416297 - chromium - An open-source project to help move the web forward. - Monorail

Hi @generix,

I got it to work. I believe there still is a defect: It only works from a boot and only if I do not re-login.

When you get a chance, please try the following with an Optimus environment set up:

  • Reboot

  • Confirm only one GPU provider listed:

    xrandr --listproviders | grep '^Provider [0-9]' | cut -d: -f1

  • Monitor dGPU:

    watch -n1 nvidia-smi

  • Start brave (or a chromium based browser):

    __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME="nvidia" brave-browser-stable

  • Confirm via the nvidia-smi that dGPU is being used.

  • Confirm hardware acceleration via brave://gpu- or equivalent.

Thx a lot!

I don’t understand this, this would mean render offload is broken.

In this case I believe broken is on a spectrum. I see occasional, odd browser repaint flashes.

Using nvidia-smi as the source of truth along with brave://gpu, acceleration is enabled.

Here’s an example showing nvidia-smi with my current browser offloaded: https://i.imgur.com/S8RpeLK.png

Update

If possible, please try the test as I think it might be fruitful in determining where lies the issue.

On my end, after several hours of constant browser use, there are definitely, somewhat random, redraw issues.