6.4. Chromium Browser - User Guide

6.4.1. Overview

On TI devices with IMG Rogue class GPU’s. The Chromium browser (available from https://chromium.googlesource.com/chromium/src/) is accelerated using OpenGLES.

The version of Chromium that is build can be obtained with this command:

$ chromium --version
Chromium 111.0.5563.64 stable

The version of Chromium shown here is the one that GPU acceleration is verified to work with.

6.4.2. Executing Chromium

For security reasons it is suggested never to run Chromium as the root user.

To run the Chromium browser:

Assuming you are logged in as the root user.

Switch to the weston user:

$ su weston

And then run the chromium binary:

$ /usr/bin/chromium [url] [options]

e.g.

$ chromium https://www.ti.com

Will open www.ti.com in a windowed browser on the Weston desktop.

$ chromium https://webglsamples.org/aquarium/aquarium.org --start-fullscreen

Will open the aquarium 3d benchmark in a fullscreen window on the Weston desktop.

The --start-fullscreen switch will make the chromium browser consume the entire screen including overwriting the Weston menu bar.

This will start chromium and provided you have network connectivity to the internet from the TI platform it will connect to an example application that uses WebGL/Javascript and renders fish swimming in a fish bowl using the 3D GPU.

To see the GPU features that are in use, enter chrome://gpu into the Chromium URL/Navigation bar. A web page will be rendered with this information. The below example shows what is enabled/disabled when GPU acceleration is working correctly:

6.4.3. Graphics Feature Status

*   Canvas: Hardware accelerated
*   Canvas out-of-process rasterization: Disabled
*   Direct Rendering Display Compositor: Disabled
*   Compositing: Hardware accelerated
*   Multiple Raster Threads: Enabled
*   OpenGL: Enabled
*   Rasterization: Hardware accelerated
*   Raw Draw: Disabled
*   Video Decode: Hardware accelerated
*   Video Encode: Software Only. Hardware acceleration disabled
*   Vulkan: Disabled
*   WebGL: Hardware accelerated
*   WebGL2: Hardware accelerated
*   WebGPU: Disabled

If for some reason you suspect the GPU is rending something incorrectly, you can run chromium with GPU disabled using the --disable-gpu flag:

$ chromium https://webglsamples.org/aquarium/aquarium.html --start-fullscreen --disable-gpu

To get raw performance numbers from the GPU, you may want to disable frame sync locking in Chromium. This will tell Chromium never to wait for VSYNC and render as fast as the GPU can achieve.

$ chromium https://webglsamples.org/aquarium/aquarium.html --start-fullscreen --disable-gpu-vsync --disable-frame-rate-limit

6.4.4. Running Chromium as the root user

This is absolutely not recommended, as to do so gives a web page too much access to your system. To run in this mode you also have to provide the --no-sandbox switch, which disables all sandboxing of the browser from the base system and could leave you open for a malicious webpage to do something nefarious.

6.4.5. How to build Chromuim under Yocto

Pull in the meta-browser and meta-clang layer into a Kirkstone Yocto build.

meta-browser should be pinned to commit:

commit d3d16b47e17dc899e5298cff698dc32e5e639ab4 (HEAD)
Author: Max Ihlenfeldt <max@igalia.com>
Date:   Wed Mar 8 11:02:47 2023 +0000

    chromium: update to 111.0.5563.64

meta-clang needs to be pinned to HEAD commit of branch kirkstone-clang12, as of the time of writing that equates to this commit:

commit c2e89dc7e1dfcc1bbe432afca2dc43d6560cb007 (HEAD -> origin/kirkstone-clang12)
Author: Randy MacLeod <Randy.MacLeod@windriver.com>
Date:   Tue Jan 17 13:25:56 2023 -0800

With these layers pinned to the correct commit, you need to make sure they are referenced in build/conf/bblayers.conf` This is done automatically if you use the oe-layersetup tool.

$ cd yocto_dir
$ ./oe-layersetup -f config/arago-kirkstone-chromium-config.txt

Once this is done, use bitbake to create the tisdk-default-image. This will detect the meta-browser and meta-clang layers, automatically building and adding Chromium to the root filesystem image.

Note

Build times of Chromium can be very long depending on the size of your build machine. It has been found that you need at least 64Gigs of RAM, and on a 28 thread Intel Core-I9 with an SSD for the build driver it will still take upwards of 2 hours just to build Chromium. A full Yocto kirkstone build that includes Chromium can easily take 400GBytes of SSD.

The following will initiate a full tisdk-default-image build that would include Chromium if the meta-browser and meta-clang layers are present:

$ MACHINE=<machine> bitbake tisdk-default-image

If you want to significantly reduced image size, the IPKs can be built directly using the following:

$ MACHINE=<machine> bitbake core-image-weston
$ MACHINE=<machine> bitbake chromium-ozone-wayland

Where <machine> is defined in the Build Options section of “Building the SDK with Yocto”

tisdk-default-image is the only image that chromium will get built into by default. If you want to build it into another image, then you would need to modify the .bb recipe for the image. Or alternatively add the line:

IMAGE_INSTALL:append = " chromium-ozone-wayland"

Somewhere into your build/conf/local.conf file.

6.4.6. Limitations

  • Audio/video within the browser is not supported.

  • Hardware acceleration of video either decode or encode is not supported.

  • Versions newer than Chromium v111 have rendering artifacts around chromium UI elements and are currently not supported.

6.4.7. Performance

Performance of WebGL Aquarium

Standard WebGL benchmarks available at these URLS: https://webglsamples.org/aquarium/aquarium.html

Run as the weston user with the command line chromium https://webglsamples.org/aquarium/aquarium.html --start-fullscreen

Platform

Performance FPS

GPU Utilisation

AM62Px

40 @ 1080p60

72%

Note

GPU Utilisation is captured using,

root@am62pxx-evm:~# cat /sys/kernel/debug/pvr/status

Performance of MotionMarkv1.3

Standard Javascript benchmarks available at these URLS: https://browserbench.org/MotionMark/

Run as the weston user with the command line chromium https://browserbench.org/MotionMark/ --start-fullscreen use the mouse to click the “Run Benchmark” button.

Platform

MotionMark v1.3

AM62Px

40.35 @ 1080p60