Chromium Browser

../_images/thirdparty_chromium_screenshot.png

IoT Yocto has integrated a patched version of the open source Chromium browser via a fork of the meta-chromium Yocto layer, with GPU and Video Codec acceleration for the following SoCs:

  • Genio 510

  • Genio 700

  • Genio 1200

IoT Yocto provides a image recipe, rity-browser-image, which includes the Chromium browser in the image. The build time of the rity-browser-image recipe is roughly three times longer than rity-demo-image.

Note

For performance evaluation on Genio EVK, we recommend you to download the prebuilt rity-browser-image binaries from Download due to the long compile times.

Chromium hardware acceleration enablement is a collaboration between MediaTek and Collabora. The required modifications are being contributed to the upstream projects. This process is ongoing thus IoT Yocto v24.1 uses forked repositories that includes necessary patches for hardware acceleration and system integration. The forked open source repositories are developed and hosted by Collabora:

The Yocto layer above contains the patches applied on top of the Chromium 132.0.6834.6 release tarball. See patches list here.

The following sections shows you how to launch and evaluate performances with prebuilt rity-browser-image binaries and Genio EVK.

Hardware Setup

Chromium browser is a GUI application that requires keyboard and pointing device to use. To evaluate it, prepare the following hardware:

  • Genio 510/700/1200 EVK

  • USB keyboard

  • USB mouse

  • USB-C hub if using Genio 510/700 EVK

  • (optional) USB web camera for video conference and encoding scenario

  • (optional) external monitor

Connect the keyboard and mouse to Genio EVK, as shown below:

Connect a USB-C hub to USB-C PD port, and then connect keyboard and mouse to the board.

Ports of |G510-G700-EVK-REF-BOARD| main board

Ports of Genio 510/700-EVK main board

To use external monitor, follow the instructions in Display .

Flash Image

Download rity-browser-image from Download. Flash the image to Genio EVK following the instructions in Flash Image to Board.

Launch Chromium Browser

After flashing the rity-browser-image to Genio EVK, a graphical desktop should appear on the display. Follow these steps to launch Chromium browser:

  1. Use the mouse and click the terminal icon on the top-left corner of the displayed desktop. This launches the built-in terminal console.

  2. Connect to the internet. Use the terminal console in step 1 and follow the commands inc Ethernet or on-board Wi-Fi module.

  3. Run the following commands in the terminal console:

    chromium
    

Chromium Command Switches

The chromium command is a wrapper. It has pre-defined command switches to enable hardware acceleration, e.g. --ozone-platform=wayland.

You may need to adjust the command switches for your product. For example, the --no-sandbox flag allows Chromium to run as the root user, which is the default user configured in rity-browser-image. In an actual production image, root user should be disabled, and normal users do not need to use the --no-sandbox flag.

Chromium Hardware Acceleration Support

To check which hardware-acceleration features have been enabled, type the following URL in the Chromium browser’s address bar:

chrome://gpu

The report indicates if hardware video decode and encode acceleration is enabled and the backend GPU driver version, as shown below:

Chromium chrom://gpu report

Chromium Graphics Feature Status on Genio 700 EVK

This modified version of Chromium enables hardware acceleration for the following formats:

Decode

Encode

H.264

V

V

HEVC(H.265)

V

V

VP8

V

Not Supported

VP9

V

Not Supported

Browser Use Cases

The Chromium integration in IoT Yocto is a POC(Proof-of-Concept) for hardware acceleration. The following browser use cases are known to work on this Chromium integration, but any other use cases have not been validated.

Visiting a Web Site

  1. Visit https://www.google.com and Google home page loads properly.

  2. Search for “MediaTek” and scroll the page. It should be reasonably responsive.

File Download

  1. Visit https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/

  2. Scroll down and click on the debian-12.8.0-amd64-netinst.iso entry to start downloading it

  3. The download succeeds and the downloaded debian-12.8.0-amd64-netinst.iso should have sha256sum of 04396d12b0f377958a070c38a923c227832fa3b3e18ddc013936ecf492e9fbb3.

Video Decoding

  1. Visit https://www.youtube.com/watch?v=LXb3EKWsInQ

  2. Use the YouTube UI to adjust resolution to 4K and skip ads if necessary. The video playback should be smooth on Genio 1200 and Genio 700.

  3. Right-click in the video area and open “Stats for nerds”

    • The Codecs row should start with vp09

    • If the row starts with av01, expect degraded performance, since av01 is not hardware accelerated.

Local File Video Playback

  1. Download https://download.blender.org/demo/movies/BBB/bbb_sunflower_2160p_60fps_normal.mp4.zip and unzip it with the following commands:

    curl -o ~/bbb.zip "https://download.blender.org/demo/movies/BBB/bbb_sunflower_2160p_60fps_normal.mp4.zip"
    unzip ~/bbb.zip -d ~/bbb
    
  2. Start Chromium and play the downloaded video file in full screen kiosk mode:

    chromium --kiosk ~/bbb/bbb_sunflower_2160p_60fps_normal.mp4
    

WebCodecs Decode

  1. Visit https://w3c.github.io/webcodecs/samples/video-decode-display/

  2. For each of: H264, H265, VP8, VP9:

    • Select corresponding entry and start playback

    • Video contents are displayed properly

    • Video rendering rate should be higher than 150 FPS

WebCodecs Encode and Decode

  1. Connect USB webcam to EVK

  2. Visit https://w3c.github.io/webcodecs/samples/encode-decode-worker/index.html

  3. For each of H264, H265:

    • Select corresponding codec entry

    • Set Encoder Hardware Acceleration Preference: Prefer Hardware

    • Set Decoder Hardware Acceleration Preference: Prefer Hardware

  4. Set Resolution: Full HD - Press Start - Source captured from the webcam should be displayed smoothly under “Video Source” - Decoded video should be displayed smoothly under “Local Video”

To compare performance between hardware acceleration and software implementation, change the Hardware Acceleration Preference options to Perfer Software.

You can use command line tools such as htop to observe CPU usage, or use sar 1 10 to record CPU usage.

As a reference, the following table shows the result comparison between hardware and software codecs on Genio 1200-EVK:

Software Codec

Hardware Accelerated

H.264 Decode

283 FPS

339 FPS

H.265 Decode

Not Supported

339 FPS

VP8 Decode

180 FPS

233 FPS

VP9 Decode

259 FPS

335 FPS

H.264 Encode-Decode Latency

72 ~ 317ms

100 ~ 160ms

Known Issues and Limitations

The integrated Chromium browser on IoT Yocto has only been tested with basic scenarios to validate hardware acceleration for video and graphics. The list below collects known issues and limitations:

  • Chromium browser does not support videos playback for DRM(digital rights management) protected contents.

  • Genio 350 EVK is not suitable to run Chromium browser due to DRAM size and CPU/GPU performance.

  • WebGL and WebGL2 use cases have not been validated.

  • On Genio 510 EVK, 4K 60 FPS video playback in browser is not smooth, due to lower DRAM memory bandwidth.

  • IoT Yocto lacks full support for a system-wide audio mixer framework, allowing only one audio source at a time. Consequently, playing multiple videos in different browser tabs does not work.