Frozen rendering - buffer flipping issue

On NVidia Nano device, we have two displays and arrange them as a extended screen:
################################################################################
Screen 0: minimum 8 x 8, current 3840 x 2160, maximum 16384 x 16384
HDMI-0 connected 3840x1080+0+1080 (normal left inverted right x axis y axis) 600mm x 340mm
3840x1080 60.00*+
DP-0 connected primary 3840x1080+0+0 (normal left inverted right x axis y axis) 600mm x 340mm
3840x1080 60.00*+
################################################################################
when using TripleBuffer and ForceCompositionPipeline in xorg conf, on an extended screen, chromium rendering is broken (buffer does not flip).
Here is the configuration of xorg.conf:
################################################################################
//model: NX-4
//mode: extended
//resolution: auto “Autodetect”
//resolution: 3840x1080@60 “2x HD 1080 (60Hz)”

Section “ServerLayout”
Identifier “Default Layout”
Screen 0 “Screen0” 0 0
EndSection

Section “Monitor”
Identifier “Monitor0”
ModelName “DFP-0”
#VertRefresh
Option “Primary” “true”
Gamma 1.0 1.0 1.0
EndSection

Section “Monitor”
Identifier “Monitor1”
ModelName “DFP-1”
#VertRefresh
Gamma 1.0 1.0 1.0
VertRefresh 0.0
EndSection

Section “Device”
Identifier “Tegra0”
Driver “nvidia”
VendorName “NVIDIA Corporation”
BoardName “NVIDIA Tegra”

# Options needed by Chromium to work
Option         "AllowEmptyInitialConfiguration" "true"
Option         "TripleBuffer" "true"
# Chromium: End
Option         "ForceCompositionPipeline" "true"

Screen         0
# extoutput: "HDMI-1" "/sys/kernel/debug/lt9611-dp-0"
# extoutput: "HDMI-2" "/sys/kernel/debug/lt9611-dp-1"
Option         "Monitor-DP-0"   "Monitor0"
# extoutput: "HDMI-3" "/sys/kernel/debug/lt9611-hdmi-2"
# extoutput: "HDMI-4" "/sys/kernel/debug/lt9611-hdmi-3"
Option         "Monitor-HDMI-0" "Monitor1"
Option         "SplitterMode"   "extended"

EndSection

Section “Screen”
Identifier “Screen0”
Device “Tegra0”
Monitor “Desktop”

DefaultDepth    24
Option         "UseDisplayDevice" "DP-0, HDMI-0"
Option         "nvidiaXineramaInfoOrder" "DP-0, HDMI-0"
Option         "MetaModes" "DP-0: nvidia-auto-select { Rotation = normal }, HDMI-0: nvidia-auto-select { Rotation = normal }"
Option         "MetaModeOrientation" "DP-0 Above HDMI-0"
SubSection     "Display"
    # Full/Limited
    Option       "ColorRange" "Full"
    # RGB/YCbCr444
    Option       "ColorSpace" "RGB"
    Depth       24
EndSubSection

EndSection
################################################################################
Playing 2x2 pictures in chromium in kiosk mode will cause the screens to desynchronize.
Commenting out below flags, relaunching X, has 2x2 pictures render properly:
################################################################################
Option “TripleBuffer” “true”
Option “ForceCompositionPipeline” “true”
################################################################################
By setting use_compositing=true in /usr/share/xfwm4 can also avoid such issue.
However, the goal is using ForceCompositionPipeline without being impacted by the issue.
We consider it as an issue at the system level, Any advice on this topic ?

Is it on jetpack4.6.4?

It is on Jetpack 4.6.3 [L4T 32.7.3]

Our module is NVidia Jetson Nano (P3448-0002). I do not find any higher issued versions of Jetpack for Jetson Nano. So, if it is a known issue for Nano GPU side?

Following up on this issue. Is there any additional information needed at this time?

Any update on this issue?

bufferflip.zip (4.8 KB)
Tested on t210ref L4T 32.7.4.

Hi,
So if we follow README in bufferflip.zip to set up Jetson Nano developer kit, we can observe the issue. Is it correct?

Yes. Please le me know if the instructions are not clear or I have left anything out.

Hi hugo.at.activia,

I got below errors, can you help check?

$ scripts/chr.sh localhost:8080/2x1.html
launching /opt/chromium.org/chromium-unstable/chromium-browser --allow-outdated-plugins --enable-webfonts-intervention-v2=disabled --gaia-url=http://127.0.0.1 --google-url=http://127.0.0.1 --google-apis-url=http://127.0.0.1 --lso-url=http://127.0.0.1 --gcm-checkin-url=http://127.0.0.1 --gcm-mcs-endpoint=http://127.0.0.1 --gcm-registration-url=http://127.0.0.1 --safebrowsing-disable-auto-update --safebrowsing-disable-download-protection --safebrowsing-disable-extension-blacklist --disable-background-networking --disable-breakpad --disable-client-side-phishing-detection --disable-cloud-import --disable-component-cloud-policy --disable-component-update --disable-contextual-search --disable-default-apps --disable-domain-reliability --disable-download-notification --disable-geolocation --disable-infobars --disable-notifications --disable-permission-action-reporting --disable-pinch --disable-session-crashed-bubble --disable-speech-api --disable-translate --disable-voice-input --no-default-browser-check --no-first-run --noerrdialogs --no-pings --password-store=basic --disable-gpu-sandbox --ignore-gpu-blacklist --ignore-gpu-blocklist --disable-field-trial-config --disable-sync --disable-gpu-vsync --force-coded-size-for-accelerated-video-decode --ignore-resolution-limits-for-accelerated-video-decode --use-gl=egl --use-cmd-decoder=validating --gpu-sandbox-start-early --disable-accelerated-video-encode --enable-accelerated-video-decode --gpu-sandbox-start-early --no-sandbox --enable-gpu-rasterization --enable-gpu-memory-buffer-compositor-resources --enable-gpu-memory-buffer-video-frames --double-buffer-compositing --enable-logging=stderr --vmodule=\*v4l2\*=1 --enable-features=VaapiVideoDecoder,NetworkServiceInProcess --disable-features=UseChromeOSDirectVideoDecoder --disable-field-trial-config --disable-background-media-suspend --disable-background-timer-throttling --kiosk --remote-debugging-port=9009 --window-position=0,0 --window-size=3840,1080 --use-gl=egl --display=:0.0 localhost:8080/2x1.html
[8073:8073:0129/070322.986664:INFO:content_main_runner_impl.cc(1056)] Chrome is running in full browser mode.
[8073:8073:0129/070323.309533:WARNING:account_consistency_mode_manager.cc(64)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured.
[8073:8105:0129/070323.339223:WARNING:web_database.cc(114)] Web database is too new.
[8073:8095:0129/070323.396868:ERROR:login_database.cc(704)] Password store database is too new, kCurrentVersionNumber=29, GetCompatibleVersionNumber=33
[8073:8095:0129/070323.397204:ERROR:password_store_impl.cc(59)] Could not create/open login database.

DevTools listening on ws://127.0.0.1:9009/devtools/browser/38aa0a1d-6518-4984-8a6e-1c533e6ca497
[8102:8102:0129/070323.672111:ERROR:gl_surface_egl.cc(777)] EGL Driver message (Error)eglTerminate: 
[8102:8102:0129/070323.781634:ERROR:gl_surface_egl.cc(777)] EGL Driver message (Error)eglTerminate: 
Opening in O_NONBLOCKING MODE 
[8102:8102:0129/070323.822941:ERROR:gl_surface_egl.cc(777)] EGL Driver message (Error)eglTerminate: 
[8102:8102:0129/070323.857039:WARNING:v4l2_device.cc(1693)] Driver doesn't support QUERY H264 profiles, use default values, Base, Main, High
[8102:8102:0129/070323.857484:WARNING:v4l2_device.cc(1713)] Driver doesn't support QUERY VP9 profiles, use default values, Profile0
[8102:8102:0129/070323.857832:ERROR:gl_surface_egl.cc(777)] EGL Driver message (Error)eglTerminate: 
Opening in O_NONBLOCKING MODE 
[8073:8073:0129/070323.899333:WARNING:gaia_auth_fetcher.cc(994)] Could not reach Google Accounts servers: errno -102
[8073:8073:0129/070324.837548:WARNING:gaia_auth_fetcher.cc(994)] Could not reach Google Accounts servers: errno -102
[8073:8073:0129/070327.809138:WARNING:gaia_auth_fetcher.cc(994)] Could not reach Google Accounts servers: errno -102
[8073:8073:0129/070336.555661:WARNING:gaia_auth_fetcher.cc(994)] Could not reach Google Accounts servers: errno -102
[8073:8085:0129/070353.353574:INFO:database.cc(1281)] Check failed: rc != 1 (1 vs. 1)SQL compile error no such column: publicly_routable
[8073:8085:0129/070353.353713:ERROR:database.cc(1707)] History sqlite error 1, errno 0: no such column: publicly_routable, sql: SELECT id,url,visit_time,from_visit,transition,segment_id,visit_duration,incremented_omnibox_typed_score,publicly_routable FROM visits WHERE visit_time >= ? AND visit_time < ?ORDER BY visit_time LIMIT ?
[8073:8073:0129/070358.989296:WARNING:gaia_auth_fetcher.cc(994)] Could not reach Google Accounts servers: errno -102
[8073:8085:0129/070423.360903:INFO:database.cc(1281)] Check failed: rc != 1 (1 vs. 1)SQL compile error no such column: publicly_routable
[8073:8085:0129/070423.360970:ERROR:database.cc(1707)] History sqlite error 1, errno 0: no such column: publicly_routable, sql: SELECT id,url,visit_time,from_visit,transition,segment_id,visit_duration,incremented_omnibox_typed_score,publicly_routable FROM visits WHERE visit_time >= ? AND visit_time < ? AND (transition & ?) == ?ORDER BY visit_time LIMIT ?

Errors related to the profile come from running chromium after having run a more recent version first.
Errors related to eglTerminate are callbacks from the opengl driver.

Please replace chr.sh with the attached file. It will use a temporary directory for the user profile.
chr.zip (1.4 KB)

Hi hugo.at.activia,

After replaced new chr.sh got below message:

$ ./scripts/chr.sh localhost:8080/2x1.html
Using --user-data-dir=/tmp/tmp.Qby0shU6L8
launching /opt/chromium.org/chromium-unstable/chromium-browser --allow-outdated-plugins --enable-webfonts-intervention-v2=disabled --gaia-url=http://127.0.0.1 --google-url=http://127.0.0.1 --google-apis-url=http://127.0.0.1 --lso-url=http://127.0.0.1 --gcm-checkin-url=http://127.0.0.1 --gcm-mcs-endpoint=http://127.0.0.1 --gcm-registration-url=http://127.0.0.1 --safebrowsing-disable-auto-update --safebrowsing-disable-download-protection --safebrowsing-disable-extension-blacklist --disable-background-networking --disable-breakpad --disable-client-side-phishing-detection --disable-cloud-import --disable-component-cloud-policy --disable-component-update --disable-contextual-search --disable-default-apps --disable-domain-reliability --disable-download-notification --disable-geolocation --disable-infobars --disable-notifications --disable-permission-action-reporting --disable-pinch --disable-session-crashed-bubble --disable-speech-api --disable-translate --disable-voice-input --no-default-browser-check --no-first-run --noerrdialogs --no-pings --password-store=basic --disable-gpu-sandbox --ignore-gpu-blacklist --ignore-gpu-blocklist --disable-field-trial-config --disable-sync --disable-gpu-vsync --force-coded-size-for-accelerated-video-decode --ignore-resolution-limits-for-accelerated-video-decode --use-gl=egl --use-cmd-decoder=validating --gpu-sandbox-start-early --disable-accelerated-video-encode --enable-accelerated-video-decode --gpu-sandbox-start-early --no-sandbox --enable-gpu-rasterization --enable-gpu-memory-buffer-compositor-resources --enable-gpu-memory-buffer-video-frames --double-buffer-compositing --enable-logging=stderr --vmodule=\*v4l2\*=1 --enable-features=VaapiVideoDecoder,NetworkServiceInProcess --disable-features=UseChromeOSDirectVideoDecoder --disable-field-trial-config --disable-background-media-suspend --disable-background-timer-throttling --kiosk --remote-debugging-port=9009 --window-position=0,0 --window-size=3840,1080 --use-gl=egl --display=:0.0 --user-data-dir=/tmp/tmp.Qby0shU6L8 localhost:8080/2x1.html
[9080:9080:0131/062617.000336:INFO:content_main_runner_impl.cc(1056)] Chrome is running in full browser mode.
[9080:9080:0131/062617.348903:WARNING:account_consistency_mode_manager.cc(64)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured.

DevTools listening on ws://127.0.0.1:9009/devtools/browser/b7afb61a-a01f-41ff-8201-b5d7dd7f57f5
[9109:9109:0131/062617.811374:ERROR:gl_surface_egl.cc(777)] EGL Driver message (Error)eglTerminate: 
[9109:9109:0131/062617.967810:ERROR:gl_surface_egl.cc(777)] EGL Driver message (Error)eglTerminate: 
[9080:9080:0131/062617.973383:WARNING:gaia_auth_fetcher.cc(994)] Could not reach Google Accounts servers: errno -102
Opening in O_NONBLOCKING MODE 
[9109:9109:0131/062618.046478:ERROR:gl_surface_egl.cc(777)] EGL Driver message (Error)eglTerminate: 
[9109:9109:0131/062618.077467:WARNING:v4l2_device.cc(1693)] Driver doesn't support QUERY H264 profiles, use default values, Base, Main, High
[9109:9109:0131/062618.077609:WARNING:v4l2_device.cc(1713)] Driver doesn't support QUERY VP9 profiles, use default values, Profile0
[9109:9109:0131/062618.077764:ERROR:gl_surface_egl.cc(777)] EGL Driver message (Error)eglTerminate: 
Opening in O_NONBLOCKING MODE 
[9080:9080:0131/062618.814536:WARNING:gaia_auth_fetcher.cc(994)] Could not reach Google Accounts servers: errno -102
[9080:9080:0131/062621.428227:WARNING:gaia_auth_fetcher.cc(994)] Could not reach Google Accounts servers: errno -102

The output DP and HDMI display only show google page, please reference attached “Jetson-Nano_chromium-kiosk.png” picture.

That would be a typo in the README.

localhost:8080/2x1.html is not a valid URL, since it is missing the http:// prefix.

You can run either ./chr.sh, or ./chr.sh http://localhost:8080/2x1.html

Hi hugo.at.activia,

I can see the output now.
The HDMI display show CONTENT1 → CONTEN2 repeatedly.
But DP display show black screen , is it correct?

No. Your device should be configured in extended mode.
Did you run desktop.sh before launching chr.sh?

The expected behaviour is that both screens change between CONTENT1 and CONTENT2 every 7.5s, starting at midnight.

However, some changes will be skipped, or one screen will display CONTENT1, while the other CONTENT2 if your xorg.conf includes the options:

Option “TripleBuffer” “true”
Option “ForceCompositionPipeline” “true”

Setting both those options to false, restarting X, then relaunching the browser should show the expected behaviour.

Hi,
We are still seeing CONTENT1 and 2 in HDMI out only. And DP out shows black screen.

Would like to know if you don’t enable TripleBuffer and ForceCompositionPipeline, does it work in the use-case? This is defaalt setting and tested in SQA coverage, we would expect it to be working fine.

When we remove these settings, the use-case works, but we see tearing in video rendering.
We avoid using a compositor for performance issues, and rely on the composition pipeline.

Hi hugo.at.activia,

I add below two options in xorg.conf:

Section "Device"
    Identifier  "Tegra0"
    Driver      "nvidia"
# Allow X server to be started even if no display devices are connected.
    Option      "AllowEmptyInitialConfiguration" "true"
    Option	"TripleBuffer" "true"
    Option	"ForceCompositionPipeline" "true"
EndSection

And follow your steps on Jetson-Nano+r32.7.3, but see the output “CONTENT1” and “CONTENT2” show on HDMI display only, DP display show black screen. Can you share your detail steps? then we can try again.

I just reproduced, step-by-step:

Content 1 and Content 2 are running on both screens.