thorium: Hardware acceleration broken on Wayland Ozone

System Details

  • OS: CachyOS (Based on Arch Linux, using kernel 6.3.5-1-cachyos-pds-lto)
  • Thorium Version 113.0.5672.134
  • GPU: AMD Radeon RX 6650 XT (Navi 23), Driver: amdgpu
  • CPU: Intel Core i5 36000k (Raptor Lake)
  • Software Versions: X.org server v21.1.8-1.1, Xwayland v23.1.1-1.1, Mesa v23.1.1-2, Wayland v1.22.0-1.1, Hyprland v0.26.0-1.1

Problem I am running Hyprland (v0.26.0-1.1), a tiling Wayland compositor. By default, Thorium launches using Xwayland. When manually setting the “Preferred Ozone platform” to “Wayland” in the flags, I noticed that it takes about 15 seconds to launch. When launched from a terminal, it outputs:

[5539:1:0603/020635.231510:ERROR:command_buffer_proxy_impl.cc(128)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.
[5434:5434:0603/020635.232068:ERROR:gpu_process_host.cc(953)] GPU process exited unexpectedly: exit_code=7
[5434:5434:0603/020640.385249:ERROR:gpu_process_host.cc(953)] GPU process exited unexpectedly: exit_code=7
[5434:5434:0603/020645.528644:ERROR:gpu_process_host.cc(953)] GPU process exited unexpectedly: exit_code=7
[5539:7:0603/020645.568771:ERROR:command_buffer_proxy_impl.cc(128)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.
[5540:7:0603/020645.568827:ERROR:command_buffer_proxy_impl.cc(128)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.

When disabling hardware acceleration in the settings, or launching with the parameters “–disable-gpu” or “–disable-gpu-compositing”, it launches immediately, of course, with hardware acceleration disabled, but I would like it to be enabled and not running through Xwayland.

Additional Notes If launched with the parameter “–disable-gpu-process-crash-limit”, it will output GPU process exited unexpectedly: exit_code=7 indefinitely. I tried to look in the “Chromium code search” documentation, but could not find what exit code 7 means (I am not a programmer).

I had this same issue with Thorium v112, on Hyprland v0.25 as well.

Regular Chromium (Version 114.0.5735.90 (Official Build) Arch Linux (64-bit)) does not have this issue and launches without error when “Preferred Ozone platform” is set to “Wayland”, with hardware acceleration enabled.

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 5
  • Comments: 36 (9 by maintainers)

Most upvoted comments

@vampywiz17 @archerallstars @feakuru @Fiffian @Cir-0 I will be adding a flag to chrome://flags to control the VaapiVideoDecodeLinuxGL flag, since I have it enabled by default, but there are some instances you would want it disabled.

It might also help y’all to pass the --gtk-version=4 commandline flag

@vampywiz17 @archerallstars @feakuru @Fiffian @Cir-0 Added a chrome://flags/#vaapi-video-decode-linux-gl flag to M120.

I saw this reported on Arch Linux forum.

Will it finally improve hardware acceleration on native Wayland from v119?

It seems that this patch is only merged in the main branch for the time being, and the corresponding version is 120

@Digitalone1

@feakuru

If you’re on NVIDIA, check my post here for flags (I managed to get full hardware acceleration in the past): https://www.reddit.com/r/wayland/comments/16gcci4/comment/k08acat/

I ended up switching to AMD and here’s my updated/current flags: https://github.com/Alex313031/thorium/issues/207#issuecomment-1757130735

Chiming in myself here, I noticed that decoding and encoding actually worked pretty well by ENABLING UseChromeOSDirectVideoDecoder up until 114. (i5-6300U, Intel® HD Graphics 520 (SKL GT2)) 113 looked like this: image Then 114 started doing this??? image

The VDA decoder never worked for me personally, it has always shown hardware acceleration on with H.264 encoding and decoding in the Video Acceleration Information, but I always see logs like this:

[4389:4389:0729/130008.904971:ERROR:gl_display.cc(520)] : EGL Driver message (Critical) eglInitialize: Could not make the initialization pbuffer current.
[4389:4389:0729/130008.909743:ERROR:gl_display.cc(520)] : EGL Driver message (Critical) eglInitialize: Could not make the initialization pbuffer current.

Let me know if more information is needed from me, I’m on Debian 12 using the intel-media-va-driver-non-free. Using the free one causes nothing to show up in Video Acceleration Information, with video encode and decode still being hardware accelerated at the top of the page???

@oksakhartman Yeah then it must be my patches. Might have to remove some or all of them, or refactor them.

@Alex313031, is there any way to run Thorium with VAAPI under Wayland session with i965 driver for intel HD 4000 graphics?

@konradmb @oksakhartman @ariankordi @Cir-0 @kreaninw

Try passing only the following startup parameters

--enable-features=VaapiVideoDecoder,VaapiVideoDecodeLinuxGL

If there are corresponding function switches in chrome://flags, they can also be turned on.

If no other hardware acceleration patches are added, the hardware acceleration of the current Linux version should only support VAAPI, and it is best to ensure that the graphics card driver is working properly and is up to date.

Please note that passing the above two startup parameters on the Linux platform may not necessarily enable hardware acceleration, and a soft solution is required for final guarantee.