Very bad performance in electron.js app

Issue Description:
We’re encountering severe performance issues with our local GUI Electron app on the Orin development kit. Windows often fail to load or freeze following user interactions. Despite having ample hardware resources, we suspect it’s not a hardware problem. Strangely, the software runs smoothly on Ubuntu 20.4 on AMD64 with similar hardware.

Observations:

  • Disabling hardware acceleration seems to improve performance for the UI interaction, but that’s not a viable solution since one of our Electron instances spawns a frontend with a Babylon scene, and it runs without issues on the Dell machine. However, if we disable hardware acceleration, the frame rate in the Babylon Scene drops drastically, from 60fps to 5fps. This indicates that the app should theoretically be capable of leveraging local hardware.

  • On the Orin device, we’re encountering the error message: “can’t initialize nvrm channel,” which disappears when we launch the Electron instance with the --no-sandbox flag. This suggests that the instance might not have access to the hardware until it’s removed from the sandbox environment.

Current Analysis:
We’ve examined the report from the Chromium instance within Electron, and we suspect that hardware acceleration might not be utilized. Here’s the Chromium instance report on the Orin device:

We conducted a similar analysis on the Dell machine and noticed that “Canvas out-of-process rasterization” and “Direct Rendering Display Compositor” are enabled on the Dell but disabled on the Orin device within the Electron instance. Could this be the root of the problem? Is there a way to influence these settings?

Additionally, we spawned a browser window within Electron and navigated to a page that provides more information about what’s used for rendering:
debug renderer info:
ANGLE (NVIDIA Corporation, NVIDIA Tegra Orin, (nvgpu)/integrated, OpenGL 4.5.0
( cannot post a second image)

Request:
We’d appreciate any insights or suggestions for resolving these performance issues, as we’re currently stumped.

Hi,
Please refer to this post:
Webgl support on orin - #8 by DaneLLL

@DaneLLL after a few tries it looks like that is not the solution for us.

gdebi Downloads/chromium-browser_114.0.5735.45-22.04.2_arm64.deb
Reading package lists… Done
Building dependency tree
Reading state information… Done
Reading state information… Done
This package is uninstallable
Dependency is not satisfiable: libc6 (>= 2.35)

libc6 is not available for our Ubuntu 20.4 distribution. Upgrading from Ubuntu 20.04 is currently not an option.

Any other suggestions how we could fix the issue?

Hi,
Please try and see if you can install this version:
http://launchpadlibrarian.net/660838574/chromium-browser_112.0.5615.49-0ubuntu0.18.04.1_arm64.deb
112.0.5615.49-0ubuntu0.18.04.1 : chromium-browser : arm64 : Bionic (18.04) : Ubuntu

Sadly a similar story:

root@srlu067rnd:/home/nvidia# gdebi chromium-browser_112.0.5615.49-0ubuntu0.18.04.1_arm64.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading state information... Done
This package is uninstallable
Dependency is not satisfiable: chromium-codecs-ffmpeg-extra (= 112.0.5615.49-0ubuntu0.18.04.1)|chromium-codecs-ffmpeg (= 112.0.5615.49-0ubuntu0.18.04.1)

I tried to add the add the Bionic repository since your deb file is from 18.04 the package update was not successful:

root@srlu067rnd:/home/nvidia sudo vim /etc/apt/sources.list
# add bionic sources because we need dependencies from 18.04 for the older version we should install.
deb http://archive.ubuntu.com/ubuntu/ bionic main universe

root@srlu067rnd:/home/nvidia# sudo apt update
....
Ign:9 http://archive.ubuntu.com/ubuntu bionic/main arm64 Packages
Ign:17 http://archive.ubuntu.com/ubuntu bionic/universe arm64 Packages
Ign:9 http://archive.ubuntu.com/ubuntu bionic/main arm64 Packages
Ign:17 http://archive.ubuntu.com/ubuntu bionic/universe arm64 Packages
Err:9 http://archive.ubuntu.com/ubuntu bionic/main arm64 Packages
  404  Not Found [IP: 91.189.91.82 80]
Ign:17 http://archive.ubuntu.com/ubuntu bionic/universe arm64 Packages
Fetched 20.5 MB in 7s (3,083 kB/s)
Reading package lists... Done
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic/main/binary-arm64/Packages  404  Not Found [IP: 91.189.91.82 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.

Hi,
It looks like libc6 is a hard requirement for installing the chromium-browser package, so there is no eligible solution for Ubuntu 20.04.

We will see if we can upgrade to Ubuntu 22.04 in future release. For Jetpack 5 releases, it is same as your observation that OpenGL is disabled in chromium.

Thank you for all your replies so far!
So to clarify: There is currently no solution to run Hardware Acceleration in Chromium on the Orin devices, if we are fixed on Ubuntu 20.04.
In the other Thread, were ongoing discussions mentioned, that this issue is under investigation with Canonical. Does this discussion also includes 20.4 or only 22 and older?

Hi,
The discussion is going on and no conclusion yet. A more feasible solution is to upgrade to 22.04 so that we can manually install chromium-browser - 114.0.5735.45-22.04.2 We will check this first.