2

I have a problem using chromium-browser in kiosk mode on a raspberry pi 4.

I launch a web interface in Html with my video on it. Sometimes there is some drop frame / lag on the video, and I don't know why. I have tried to activate the hardware acceleration on my chromium browser.

Here is the return of the chrome://gpu :

Graphics Feature Status
Canvas: Software only, hardware acceleration unavailable
Flash: Software only. Hardware acceleration disabled
Flash Stage3D: Software only. Hardware acceleration disabled
Flash Stage3D Baseline profile: Software only. Hardware acceleration disabled
Compositing: Software only. Hardware acceleration disabled
Multiple Raster Threads: Enabled
Native GpuMemoryBuffers: Hardware accelerated
Out-of-process Rasterization: Disabled
Hardware Protected Video Decode: Disabled
Rasterization: Software only. Hardware acceleration disabled
Skia Renderer: Disabled
Surface Control: Disabled
Surface Synchronization: Enabled
Video Decode: Software only. Hardware acceleration disabled
Viz Service Display Compositor: Enabled
WebGL: Software only, hardware acceleration unavailable
WebGL2: Software only, hardware acceleration unavailable

I don't know why these two lines are disabled :

  • Out-of-process Rasterization: Disabled
  • Hardware Protected Video Decode: Disabled

Here are the flags that I use for launching chromium-browser :

chromium-browser --noerrdialogs --ignore-gpu-blacklist --enable-native-gpu-memory-buffers --enable-features="CheckerImaging" --disable-infobars --kiosk --autoplay-policy=no-user-gesture-required

In my first version, I managed te resize the orginal video resolution from 1920x1080 to 1560x878 with CSS directly on my interface, but the framerate was very low. In my second version, instead of using CSS to rescale the video, I did it beforehand with Avidemux and I removed the CSS rule. The video has the right size, the framerate is slightly better but the lag problem is still here.

If anyone has already encountered such a problem of if you have any information that could help me solve my problem, thank you in advance.

Other information :

Here is the information about my raspbian :

PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

And my version of the chromium-browser : 74.0.3729.157 (Official Build)

My solution :

First I have update my chromium-browser with the help of @Botspot with that :

sudo apt update
sudo apt full-upgrade

sudo apt full-upgrade --fix-missing

== fake-KMS Activation via raspi-config (see above the answer of Botspot) == 

After that still no Hardware acceleration.

So after some search I have install the following packages (in chrome://gpu there was some errors in logs):

sudo apt-get install libgles2-mesa
sudo apt-get install mesa-utils

sudo apt-get install libsdl2-dev

For enable hardware acceleration :

+-> need to add this flag to chromium : --ignore-gpu-blacklist

After reboot still some error GetVSyncParametersIfAvailable() failed to fix it :

+-> add this flag to chromium : --use-gl=egl

Finaly some tweak there is the list of my chromium flags :

chromium-browser --kiosk --noerrdialogs --use-gl=egl --enable-gpu-rasterization --enable-native-gpu-memory-buffers --ignore-gpu-blacklist --disable-infobars --autoplay-policy=no-user-gesture-required --check-for-update-interval=31536000 'http://localhost:3000'

On chrome://gpu there is still Out-of-process Rasterization disable. But with theses changes the video have less drop and lag.

Hope this will help someone in the future :) .

1

And my version of the chromium-browser : 74.0.3729.157 (Official Build)

Chromium 74!? That's very out of date. The latest version has been Chromium-browser 78 for months.
Run this to update your Raspbian:

sudo apt update
sudo apt full-upgrade

After updating, try chrome:gpu again. WebGL should say "Hardware accelerated" by default.
You should not have to use any gpu-related cmdline flags to enable those.

Still no difference? WebGL still says "hardware acceleration unavailable"? Then make sure Fake KMS is turned on:

sudo raspi-config

Navigate using the arrow keys and Enter: Advanced Options --> GL Driver --> GL (Fake KMS). Reboot afterwards and see if there's any difference.
If WebGL still says "hardware acceleration unavailable" after all that, then I would seriously consider starting over with a fresh Raspbian Buster image.

8
  • So I have made sudo apt update and sudo apt full upgrade. I have to put --fix-missing. After I have reboot style no hardware acceleration. So I have Put Fake KMS with raspi-config. But after rebooting style no hardware acceleration... I need to remove my flags to chromium browser ?
    – Buisson
    May 4 '20 at 10:01
  • Another thing in Log message section on chrome://gpu there is a message : ` Log Messages [687:687:0504/110549.187998:ERROR:gl_implementation.cc(282)] : Failed to load libGLESv2.so.2: libGLESv2.so.2: cannot open shared object file: No such file or directory GpuProcessHost: The GPU process exited with code 1024. ` Maybe here is the problem.
    – Buisson
    May 4 '20 at 10:27
  • I encourage you to start over with a fresh Raspbian image. It looks like you messed it up somehow.
    – Botspot
    May 4 '20 at 12:41
  • But if you still wanna try to fix it, try installing libegl1-mesa and libgles2-mesa. Ref
    – Botspot
    May 4 '20 at 12:42
  • I have fix some issue and I have enable hardware acceleration. I am trying to tweak the chromium flag to get the best render for my video. here what I have done : sudo apt-get install libgles2-mesa sudo apt-get install mesa-utils sudo apt-get install libsdl2-dev
    – Buisson
    May 4 '20 at 13:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.