Graphics Hardare Acceleration

We have our own Linux Distro based on Yocto Hardknott using meta-tegra layer running on our
custom PCB with a Jetson Nano Module (emmc or sd). We have meta-browser layer and meta-clang
layer. The glx demo programs seem to be working and show very smooth gears and cubes turning in
3d at a reported 60 fps. We don’t need video or audio playback, but have verified gstreamer does work.
Everything is working great, except for chromium graphics hardware acceleration.

The Jetson Nano Evaluation Board with the JetPack software installed on it has a chromium with
working graphics hardware acceleration. We want to have the same performance on our Linux Distro
as NVIDIA has on their JetPack code. Here is a video of the Jetson Nano with JetPack.

https://streamable.com/18psul

We have downloaded the Chromium accelerated v90.0.4400.4 .deb file from the RidgeRun website and
installed it on our Linux Distro, but the chromium graphics don’t look hardware accelerated as shown
in the video.

https://streamable.com/7e5iya

Building chromium 90.0.4430.93 stable using meta-browser did not improve the chromium graphics.
This includes the RidgeRun patches and PACKAGECONFIG for chromium. Result shown in video.

https://streamable.com/4vp2pb

And building a newer version of chromium 97.0.4692.71 stable gave about the same results as shown
in the video.

https://streamable.com/q51s1k

The JetPack has the following destops: Unity, LXDE, OpenBox, and Ubuntu. First we tried using xfce
and found that the mesa demos were dropping frames. We got better results using gnome as shown in
the videos.

xfce:
https://streamable.com/mekt64

gnome:
https://streamable.com/ffrybw
https://streamable.com/x56ei5
https://streamable.com/rlfskd
https://streamable.com/kennkt

The ctree l4t x11 demo has lots of flashing strips across the screen. The other demos looked good.

gnome:
https://streamable.com/0z6v06
https://streamable.com/c17hse
https://streamable.com/m56bte

We see the below error when running the chromium build from meta-browser. I think this error
indicates it is not using the GPU.

chromium --no-sandbox --show-fps-counter

Passthrough is not supported, GL is egl

We are using the following version of Linux-4-Tegra.

$ uname -a
Linux jetson-nano-hive-emmc 4.9.201-l4t-r32.5+g8f97b4ec4c5b #1 SMP PREEMPT Wed Mar 23
20:47:35 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux

Our current Yocto image setup:

DISTRO_FEATURES = "acl argp ext2 vfat ipv4 ipv6 usbgadget usbhost systemd"
DISTRO_FEATURES += "bluetooth wifi xattr zeroconf pci multiarch ptest"
DISTRO_FEATURES += "largefile virtualization aufs pam opengl x11 wayland vulkan polkit"

NVIDIA_PACKAGES = "\
tegra-firmware-xusb \
tegra-minimal-init \
tegra-tools \
nvidia-docker \
nvidia-container-toolkit \
cuda-toolkit \
cuda-libraries \
tegra-firmware \
tegra-nvpmodel \
tegra-nvphs \
tegra-nvs-service \
tegra-nvstartup \
tegra-configs-udev \
tegra-configs-xorg \
tegra-configs-omx-tegra \
tegra-libraries-libv4l-plugins \
tegra-libraries-libnvosd \
tegra-udrm-probeconf \
kernel-module-nvgpu \
kernel-module-tegra-udrm \
gstreamer1.0-omx-tegra \
gstreamer1.0-plugins-nvvideo4linux2 \
nvgstapps \
libxkbcommon \
libdrm-nvdc \
libffi \
libglvnd \
tegra-nvphs-base \
egl-wayland \
vulkan-loader \
vulkan-tools \
l4t-graphics-demos-x11 \
l4t-graphics-demos-wayland \
l4t-graphics-demos-egldevice"
\

STANDARD_PACKAGES = "\
busybox \
run-postinsts \
u-boot-fw-utils \
kernel-devicetree \
kernel-modules \
util-linux \
sudo \
udev \
dhcpcd \
pciutils \
usbutils \
i2c-tools \
devmem2 \
python3 \
tzdata \
cpufrequtils \
avahi-daemon \
avahi-utils \
iperf3 \
tmux \
htop \
vim-tiny \
ethtool \
e2fsprogs-mke2fs \
e2fsprogs-e2fsck \
file \
linux-firmware-bcm43455 \
wpa-supplicant \
coreutils \
tar \
hostapd \
docker-ce \
gnupg \
stm32flash \
pv \
dfu-util \
openocd \
chromium-x11 \
gstreamer1.0 \
gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-ugly \
gstreamer1.0-python \
pointercal-xinput \
gdb \
mesa \
mesa-demos \
libglapi \
libvdpau \
libgbm \
libdrm \
wayland \
ffmpeg \
xdg-utils \
"

IMAGE_INSTALL = "\
packagegroup-core-boot \
packagegroup-gnome-desktop \
packagegroup-gnome-apps \
packagegroup-core-x11-xserver \
packagegroup-core-x11 \
${STANDARD_PACKAGES} \
${NVIDIA_PACKAGES} \
${PL_PACKAGES} \
"

IMAGE_FEATURES = "\
splash \
hwcodecs \
package-management \
ssh-server-openssh \
x11-base \
"

Here is our chromium-x11_%.bbappend:

DEPENDS += " \
mesa \
libglvnd \
virtual/egl \
virtual/libgl \
virtual/libgles1 \
virtual/libgles2 \
wayland \
wayland-utils \
wayland-protocolswayland-native \
egl-wayland \
vulkan-loader \
vulkan-headers \
vulkan-cts \
vulkan-tools \
vulkan-samples \
"

PACKAGECONFIG += " \
proprietary-codecs \
use-egl \
upower \
"

Here is our mesa_%.bbappends:

PACKAGECONFIG += "dri dri3 libgl libgl1 egl libegl libegl1 gles libgles1 libglesv1-cm1 libgles2
libglesv2-2 libgles3 gallium gbm opengl x11 wayland vulkan unwind"
EXTRA_OECONF += "--enable-texture-float --without-dri-drivers --enable-glx --enable-osmesa --
enable-debug"
DRIDRIVERS = " "
GALLIUMDRIVERS = "nouveau,tegra"

Below is our xserver-xorg_%.bbappends:

DEPENDS += " \
mesa \
virtual/libgles2 \
"

COMPATIBLE_MACHINE = "(tegra)"

OPENGL_PKGCONFIGS = "dri glx dri3 xshmfence"
PACKAGECONFIG = " \
unwind \
dga \
dri \
dri3 \
glx \
udev \
xshmfence \
xinerama \
${XORG_CRYPTO} \
${@bb.utils.contains('DISTRO_FEATURES', 'opengl', '${OPENGL_PKGCONFIGS}', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'opengl wayland', 'xwayland', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd systemd-logind', '', d)} \
"

PACKAGE_ARCH_tegra = "${TEGRA_PKGARCH}"

Some questions:

  1. Does NVIDIA use vulkan for 3d graphics? Or something else?
  2. Does NVIDIA support DRI (Direct Rendering Infrastructure)? DRI1, DRI2, DIR3?
  3. Is DGA (Direct Graphics Access) required? If removed from xserver, then chromium fails to start.
  4. Is chromium version 90.0.4400.4 unstable required (or would chromium version v90.0.4430.93
    stable work)? Or the newer version 97.0.4692.71 stable?
  5. Which is best: wayland, x11, or xwayland?
  6. What are the requirements for libglvnd and mesa?
  7. NVIDIA uses desktops: Unity, LXDE, OpenBox, Ubuntu. Was there a problem with xfce?
    I see glx demos dropping frames on xfce. The glx demo frames are not dropped on gnome.
  8. Does NVIDIA support Meta-Tegra for Yocto?
  9. How did NVIDIA get chromium 3d graphics working?
  10. Any suggestions on how to get graphics hardware acceleration working on our Linux Distro?
1 Like

Could you provide more information on your systems (accelerated and non-accelerated) for investigation?
We need at least:

  1. Output of navigation to “chrome://gpu” link.
  2. cat /proc//maps (where is pid of chromium with --type=gpu-process flag. Take the pid from “ps ax” output)
  1. Results of navigation to “chrome://gpu” link.










  1. The proc maps are attached.

meta-browser chromium 97.0.4692.71:

meta-browser_chromium_97.0.4692.71_proc_maps.txt (49.2 KB)

jetson ubuntu chromium 97.0.4692.71:

jetson_ubuntu_chromium_97.0.4692.71_proc_maps.txt (55.3 KB)

Some additional chromium “chrome://gpu” setup info.

The Graphics Feature Status look the same for the above meta-yocto chromium 97.0.4692.71 (Graphics fails) and the below NVIDIA Jetson chromium 97.0.4692.71 Ubuntu (Graphics works).

NVIDIA Jetson chromium 97.0.4692.71 Ubuntu:

The next two Graphics Feature Status look the same. Graphics fail on both.

RidgeRun chromium 90.0.4400.4 download .deb file:

chromium_90.0.4430.93 (meta-browser + RidgeRun patches/config):

Hi,
Please check replies to some questions:

For vulkan support please check
Vulkan Support on Jetson Linux | NVIDIA Developer

No, DRI is not supported.

We are not sure how DGA is being removed from xserver, but chromium should be relying on it as it’s generally required for full screen apps

Would suggest use X11, as it’s only one HW accelerated. If wayland is required, Weston can be used which is hw accelerated as well but it’s UI with desktop-shell is pretty basic.

Libglvnd libs are maintained by Mesa upstream. Nvidia’s opengl, opengles and egl drivers work with libglvnd. For more information please refer to:
libglvnd/README.md at master · NVIDIA/libglvnd · GitHub

Ideally XFCE should work properly, although we don’t enable it by default.

1 Like

Thanks for the answers!

In the cat /proc/<pid_of_chrome>/maps the meta-browser chromium was missing several libraries as compared to the jetson chromium including the below libraries. These libraries are in the yocto image at /usr/lib/. In chromium-x11_%.bbappend the libraries are listed as a DEPENDS via libglvnd (which lists tegra-libraries via RDEPENDS). Not sure why chromium isn’t using them.

libGL*
libGLX*
libGLX_nvidia*
libnvidia-glcore*
libnvidia-tls*

Completely removing vulkan and egl improved the hardware acceleration as shown in the below video. But the horizontal flashing lines are still present. The ctree l4t x11 demo shows the same horizontal flashing lines. Any idea how to remove the horizontal flashing lines?

https://streamable.com/vfkh0q

https://streamable.com/c17hse

2 Likes

Sometimes the Nano boots up and the display does not have white lines flashing across it when ctree is run. However, most of the time it does have the white lines flashing across it when ctree is run. When ctree has the problem, then our 3D house has the same problem.

Suspect it has to do with the display controller. At the end of the dc probe function, the register dump function is called, and the registers show up in the dmesg in the log files. The display device tree and logs are attached.

Is the device tree correct? Anything in the logs that would indicate what is going on to cause the failure? Any thing else I should look at to solve this problem?

Boot log and dmesg log with no white lines showing on screen.
dc_pass_8_boot_log_and_dmesg.txt (170.0 KB)

Boot log and dmesg log with the error of white lines showing up on the screen.
dc_fail_9_boot_log_and_dmesg.txt (173.3 KB)

pin mux device tree (DP_HPD)

			dp_hpd0_pcc6 {
				nvidia,pins = "dp_hpd0_pcc6";
				nvidia,function = "dp";
				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
				nvidia,enable-input = <TEGRA_PIN_ENABLE>;
			};

top level device tree (includes tegra210-porg-p3448-common.dtsi)

	host1x {
		dc@54200000 {
			status = "disabled";
		};
		dc@54240000 {
			status = "okay";
		};
		sor {
			nvidia,active-panel = <&sor0_dp_display>;
			dp-display {
				nvidia,is_ext_dp_panel = <0>;
				disp-default-out {
					nvidia,out-xres = <1920>;
					nvidia,out-yres = <1200>;
				};
			};
		};
		dpaux {
			status = "okay";
		};
		dsi {
			status = "disabled";
		};
	};

	backlight {
		compatible = "pwm-backlight";
		status = "okay";
		power-supply = <&battery_reg>;
		enable-gpios = <&gpio TEGRA_GPIO(V,1) GPIO_ACTIVE_HIGH>;
		panel-a-edp-1080p-14-0-bl {
			status = "okay";
			pwms = <&tegra_pwm 0 1000000>;
		};
	};

In dmesg the fb0 and fb1 carveout are failing. In the device tree both are set to 0. What is the correct value?

[    0.000000] OF: fdt:Reserved memory: failed to reserve memory for node 'fb0_carveout': base 0x0000000000000000, size 0 MiB
[    0.000000] OF: fdt:Reserved memory: failed to reserve memory for node 'fb0_carveout': base 0x0000000000000000, size 0 MiB
[    0.000000] OF: fdt:Reserved memory: failed to reserve memory for node 'fb1_carveout': base 0x0000000000000000, size 0 MiB
[    0.000000] OF: fdt:Reserved memory: failed to reserve memory for node 'fb1_carveout': base 0x0000000000000000, size 0 MiB

nvidia/soc/t210/kernel-dts/tegra210-soc/tegra210-soc-base.dtsi

		fb0_reserved: fb0_carveout {
			reg = <0x00 0x00 0x00 0x00
			       0x00 0x00 0x00 0x00>;
			reg-names = "surface", "lut";
			no-map;
		};
		fb1_reserved: fb1_carveout {
			reg = <0x00 0x00 0x00 0x00
			       0x00 0x00 0x00 0x00>;
			reg-names = "surface", "lut";
			no-map;
		};

Hi,
We would need to reproduce the issue first and check with our teams. If possible, please try to reproduce it on Jetson Nano/Jetpack 4.6.1 and share us the steps. So that we can give it a try.

I’m not able to reproduce it on Jetson Nano/Jetpack 4.6.1 as it doesn’t have ctree.

After boot the tegradc.0 gives the following results.

# cat /sys/kernel/debug/tegradc.0/edid
 00 ff ff ff ff ff ff 00 38 72 10 59 ae c6 33 01
 00 00 01 04 a0 16 0e 78 02 00 04 00 00 00 00 00
 00 53 5b 00 00 00 01 01 01 01 01 01 01 01 01 01
 01 01 01 01 01 01 5e 3d 80 f0 70 b0 0c 40 50 50
 44 00 d8 87 00 00 00 18 00 00 00 fe 05 47 31 30
 31 55 41 4e 30 31 2e 30 0a 20 00 00 00 fc 00 4e
 43 52 20 35 39 31 30 20 31 30 2e 31 00 00 00 00
 00 00 00 00 00 00 00 00 d8 87 00 00 00 18 00 a6

# cat /sys/kernel/debug/tegradc.0/sor/hw_index
Hardware index: 0

# cat /sys/kernel/debug/tegradc.0/tegrahw_type
real_silicon: 1

# cat /sys/kernel/debug/tegradc.0/stats
underflows: 0
underflows_a: 0
underflows_b: 0
underflows_c: 0
underflows_d: 0
underflows_h: 0
underflows_t: 0

After running bubble, it still shows no underflows.

# /usr/bin/l4t-graphics-demos/x11/bubble 
^C

# cat /sys/kernel/debug/tegradc.0/stats
underflows: 0
underflows_a: 0
underflows_b: 0
underflows_c: 0
underflows_d: 0
underflows_h: 0
underflows_t: 0

After running ctree it shows underflows.


# /usr/bin/l4t-graphics-demos/x11/ctree
^C

# cat /sys/kernel/debug/tegradc.0/stats
underflows: 230
underflows_a: 86187
underflows_b: 0
underflows_c: 0
underflows_d: 0
underflows_h: 0
underflows_t: 0

What is causing the underflows when running ctree?

Hi,
Please execute sudo nvpmodel -m 0 and sudo jetson_clocks to run GPU at max clock, and check again.

Thanks for responding. Even with these commands, the display controller is getting underflows when running ctree.

$ sudo nvpmodel -q
NVPM WARN: fan mode is not set!
NV Power Mode: MAXN
0

$ sudo nvpmodel -m 0

$ sudo nvpmodel -q
NVPM WARN: fan mode is not set!
NV Power Mode: MAXN
0

$ sudo jetson_clocks
[ 214.100150] nvgpu: 57000000.gpu railgate_enable_store:297 [INFO] railgate is disabled.

$ cat /sys/kernel/debug/tegradc.0/stats
underflows: 0
underflows_a: 0
underflows_b: 0
underflows_c: 0
underflows_d: 0
underflows_h: 0
underflows_t: 0

$ /usr/bin/l4t-graphics-demos/x11/ctree
^C

$ cat /sys/kernel/debug/tegradc.0/stats
underflows: 10
underflows_a: 2367
underflows_b: 0
underflows_c: 0
underflows_d: 0
underflows_h: 0
underflows_t: 0

The External Memory Controller (EMC) feeds the display controller. The display underflows are probably caused by slow SDRAM. Comparing my board to the Jetson Nano board, one is set to MinFreq and the other is set to MaxFreq.

$ sudo jetson_clocks --show
...
EMC MinFreq=204000000 MaxFreq=1600000000 CurrentFreq=204000000 FreqOverride=0
$ sudo jetson_clocks --show
...
EMC MinFreq=204000000 MaxFreq=1600000000 CurrentFreq=1600000000 FreqOverride=0

New videos with EMC clock at 1600000000. Display Controller underflows are gone.

External Media External Media

Solution for the EMC clock stuck at 204 MHz. Remove the FDT line in extlinux.conf. Then the encrypted dtb is used instead of the regular version in /boot/.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.