Chromium runs without hardware acceleration when using Checkbox remote

Bug #1991058 reported by Pierre Equoy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Next Generation Checkbox (CLI)
Fix Released
High
Pierre Equoy

Bug Description

[Environment]

Ubuntu 22.04, Wayland

checkbox-ng: 1.19.0
checkbox-support: 0.55.0
certification-client: 0.50.0
plainbox-provider-resource-generic: 0.51.0
plainbox-provider-tpm2: 1.19.0
com.canonical.certification:kivu: 1.0
plainbox-provider-checkbox: 0.66.0.dev0

Chromium snap 105.0.5195.19-hwacc (2108) installed from the beta/hwacc channel

[Summary]

This experimental version of Checkbox has the ability to run with Hardware acceleration to decode video streams.

I created a job that calls Chromium with a H264 video. When run using Checkbox local, it works as expected. When run with Checkbox remote, the following error is displayed in the logs, and the Hardware acceleration does not kick in (instead, software decoding is being used):

libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)

[Test]

1. Create the following job:

id: chromium_capture_logs_h264_video
flags: simple
command:
  chromium --enable-logging=stderr 2>&1 path/to/h264_video.mp4

2. Run it using Checkbox local:

checkbox-cli run .*chromium_capture_logs_h264_video

3. and run it using Checkbox remote (you will probably need to put this job in a test plan to be able to select it from another computer).

[Expected results]

The output is the same when run from local or from remote.

[Actual result]

When run locally:

------------------------------
[27049:27049:0928/120455.996341:WARNING:wayland_object.cc(106)] Binding to gtk_shell1 version 4 but version 5 is available.
[27049:27049:0928/120455.996371:WARNING:wayland_object.cc(106)] Binding to zwp_pointer_gestures_v1 version 1 but version 3 is available.
[27049:27049:0928/120455.996381:WARNING:wayland_object.cc(106)] Binding to zwp_linux_dmabuf_v1 version 3 but version 4 is available.
[27049:27049:0928/120456.124260:WARNING:account_consistency_mode_manager.cc(70)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured.
[27177:27177:0928/120456.143678:ERROR:gpu_init.cc(486)] Passthrough is not supported, GL is egl, ANGLE is
[27049:27049:0928/120456.145477:WARNING:wayland_surface.cc(130)] Server doesn't support zcr_alpha_compositing_v1.
[27049:27049:0928/120456.145490:WARNING:wayland_surface.cc(141)] Server doesn't support overlay_prioritizer.
[27049:27049:0928/120456.145494:WARNING:wayland_surface.cc(151)] Server doesn't support surface_augmenter.
[27049:27049:0928/120456.145500:WARNING:wayland_surface.cc(130)] Server doesn't support zcr_alpha_compositing_v1.
[27049:27049:0928/120456.145502:WARNING:wayland_surface.cc(141)] Server doesn't support overlay_prioritizer.
[27049:27049:0928/120456.145504:WARNING:wayland_surface.cc(151)] Server doesn't support surface_augmenter.
[27049:27049:0928/120456.145617:WARNING:cursor_loader.cc(119)] Failed to load a platform cursor of type kNull
[27177:27177:0928/120456.146105:WARNING:sandbox_linux.cc(376)] InitializeSandbox() called with multiple threads in process gpu-process.
[27049:27049:0928/120456.178819:WARNING:wayland_surface.cc(130)] Server doesn't support zcr_alpha_compositing_v1.
[27049:27049:0928/120456.178833:WARNING:wayland_surface.cc(141)] Server doesn't support overlay_prioritizer.
[27049:27049:0928/120456.178836:WARNING:wayland_surface.cc(151)] Server doesn't support surface_augmenter.
[27049:27049:0928/120456.178841:WARNING:wayland_surface.cc(130)] Server doesn't support zcr_alpha_compositing_v1.
[27049:27049:0928/120456.178843:WARNING:wayland_surface.cc(141)] Server doesn't support overlay_prioritizer.
[27049:27049:0928/120456.178844:WARNING:wayland_surface.cc(151)] Server doesn't support surface_augmenter.
[27049:27049:0928/120456.180126:WARNING:bluez_dbus_manager.cc(247)] Floss manager not present, cannot set Floss enable/disable.
WARNING: Kernel has no file descriptor comparison support: Operation not permitted
[27215:14:0928/120456.271600:INFO:decoder.cc(41)] DecryptingVideoDecoder
[27177:27361:0928/120456.272743:INFO:decoder.cc(65)] VDAVideoDecoder
[27215:14:0928/120456.274060:INFO:decoder.cc(65)] VDAVideoDecoder
[27215:14:0928/120456.274100:INFO:decoder.cc(65)] VDAVideoDecoder
[27049:27137:0928/120458.262701:ERROR:udev_watcher.cc(98)] Failed to begin udev enumeration.
------------------------------

When run using Remote:

------------------------------
Gtk-Message: 12:03:35.662: Failed to load module "canberra-gtk-module"
Gtk-Message: 12:03:35.663: Failed to load module "canberra-gtk-module"
[25717:25717:0928/120335.680703:WARNING:account_consistency_mode_manager.cc(70)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured.
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
[25825:25825:0928/120335.715668:WARNING:sandbox_linux.cc(376)] InitializeSandbox() called with multiple threads in process gpu-process.
WARNING: Kernel has no file descriptor comparison support: Operation not permitted
[25717:25717:0928/120335.791116:WARNING:bluez_dbus_manager.cc(247)] Floss manager not present, cannot set Floss enable/disable.
[25863:14:0928/120335.856867:INFO:decoder.cc(41)] DecryptingVideoDecoder
[25825:26002:0928/120335.884471:INFO:decoder.cc(65)] VDAVideoDecoder
[25863:14:0928/120335.884650:INFO:decoder.cc(65)] VDAVideoDecoder
[25863:14:0928/120335.884760:INFO:decoder.cc(32)] VpxVideoDecoder
[25863:14:0928/120335.884804:INFO:decoder.cc(44)] Dav1dVideoDecoder
[25863:14:0928/120335.886163:INFO:decoder.cc(29)] FFmpegVideoDecoder
[25863:14:0928/120335.886208:INFO:decoder.cc(29)] FFmpegVideoDecoder
[25717:25836:0928/120337.864456:ERROR:udev_watcher.cc(98)] Failed to begin udev enumeration.
[25825:25825:0928/120339.609360:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
------------------------------

When looking at the CPU usage (using `pidstat 10 1 -uhlH -G .*chrom.*`) or GPU usage (using `sudo intel_gpu_top`), it's clear that the hardware decoder does not kick in when using remote compared to local (in my test on an Alder Lake device, with hardware decoding I'm at around 25% CPU usage, whereas without I am around 50%).

Revision history for this message
Pierre Equoy (pieq) wrote :
Download full text (3.6 KiB)

When using Xorg, it seems Chromium runs as expected:

-------------------[ chromium_capture_logs_h264_video ]--------------------
ID: com.canonical.certification::chromium_capture_logs_h264_video
--------------------------------------------------------------------------------
Gtk-Message: 15:18:04.344: Failed to load module "canberra-gtk-module"
Gtk-Message: 15:18:04.345: Failed to load module "canberra-gtk-module"
[34312:34312:0928/151804.364289:WARNING:account_consistency_mode_manager.cc(70)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured.
[34414:34414:0928/151804.441314:WARNING:sandbox_linux.cc(376)] InitializeSandbox() called with multiple threads in process gpu-process.
WARNING: Kernel has no file descriptor comparison support: Operation not permitted
[34312:34312:0928/151804.467334:WARNING:bluez_dbus_manager.cc(247)] Floss manager not present, cannot set Floss enable/disable.
[34445:14:0928/151804.569470:INFO:decoder.cc(41)] DecryptingVideoDecoder
[34414:34651:0928/151804.570643:INFO:decoder.cc(65)] VDAVideoDecoder
[34445:14:0928/151804.572488:INFO:decoder.cc(65)] VDAVideoDecoder
[34445:14:0928/151804.572607:INFO:decoder.cc(65)] VDAVideoDecoder
[34312:34400:0928/151806.556642:ERROR:udev_watcher.cc(98)] Failed to begin udev enumeration.
[34312:34312:0928/151815.191042:WARNING:zygote_communication_linux.cc(285)] Error reading message from zygote: Connection reset by peer (104)
[34312:34312:0928/151815.193255:ERROR:zygote_communication_linux.cc(275)] Failed to send GetTerminationStatus message to zygote
[34312:34312:0928/151815.193270:WARNING:zygote_communication_linux.cc(287)] Socket closed prematurely.
--------------------------------------------------------------------------------
Outcome: job passed
-----------------------------[ Running job 2 / 8 ]------------------------------
------------[ chromium_capture_logs_h264_video_vaapi_disabled ]------------
ID: com.canonical.certification::chromium_capture_logs_h264_video_vaapi_disabled
--------------------------------------------------------------------------------
Gtk-Message: 15:18:16.067: Failed to load module "canberra-gtk-module"
Gtk-Message: 15:18:16.068: Failed to load module "canberra-gtk-module"
[34682:34682:0928/151816.084974:WARNING:account_consistency_mode_manager.cc(70)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured.
[34788:34788:0928/151816.137342:WARNING:sandbox_linux.cc(376)] InitializeSandbox() called with multiple threads in process gpu-process.
WARNING: Kernel has no file descriptor comparison support: Operation not permitted
[34682:34682:0928/151816.191534:WARNING:bluez_dbus_manager.cc(247)] Floss manager not present, cannot set Floss enable/disable.
[34827:14:0928/151816.265405:INFO:decoder.cc(41)] DecryptingVideoDecoder
[34827:14:0928/151816.265578:INFO:decoder.cc(32)] VpxVideoDecoder
[34827:14:0928/151816.265780:INFO:decoder.cc(44)] Dav1dVideoDecoder
[34827:14:0928/151816.266935:INFO:decoder.cc(29)] FFmpegVideoDecoder
[34827:14:0928/151816.267012:INFO:decoder.cc(29)] FFmpegVideoDecoder
[34682:34799:0928/151818.281582:ERROR:udev_watcher.cc(98)] F...

Read more...

Revision history for this message
Bram Stolk (b-stolk) wrote :

I have hit the "vaGetDriverNameByIndex() failed" when libva can't read the wayland socket.

For me, that socket is at:
/run/user/1000/snap.chromium/wayland-0

But this depends on your uid.

It should be a symlink to a socket one directory higher.

Maybe running remote causes issues with getting to that socket?

Revision history for this message
Pierre Equoy (pieq) wrote :

The issue is due to a missing variable environment (WAYLAND_DISPLAY) in Checkbox remote session assistant.

I proposed a PR here: https://github.com/canonical/checkbox/pull/5

Changed in checkbox-ng:
assignee: nobody → Pierre Equoy (pieq)
milestone: none → 1.20.0
importance: Undecided → High
status: New → In Progress
Changed in checkbox-ng:
status: In Progress → Fix Committed
Pierre Equoy (pieq)
Changed in checkbox-ng:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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