Gstreamer on AGX Xavier


I have a custom filesystem and kernel.
For some reason Gstreamer does not want to work properly.

Gstreamer 1.20.4 is build and can run some ‘default’ Gstreamer stuff gst-launch-1.0 -v videotestsrc pattern=smpte ! video/x-raw,width=1280,height=720 ! fbdevsink
Although, I get some warning error nvbufsurftransform:cuInit failed : 999

I suspect this has something to do with the reason why the kernel panics when executing following pipe gst-launch-1.0 -v videotestsrc pattern=smpte ! video/x-raw,width=1280,height=720 ! nvvidconv ! "video/x-raw(memory:NVMM),format=RGBA,width=1280,height=720" ! nvvidconv ! "video/x-raw(memory:NVMM)" ! nvdrmvideosink.

Please see attached kernel panic.
kernel_panic.txt (3.2 KB)

I used the NVidia binaries under the sample_rootfilesystem for the Gstreamer libraries as an addition on the compiled sources (default Gstreamer plugins).
Before running the pipe, I load nvmap.ko and nvgpu.ko modules, remove the .cache folder (if there is any), set the LD_LIBRARY_PATH to include alle libraries.

Loading the modules gives me teh following dmesg, which seems to be ok.

[ 30.687962] tegra-carveouts tegra-carveouts: vpr :dma coherent mem declare 0x00000000ce000000,704643072
[ 30.688160] tegra-carveouts tegra-carveouts: assigned reserved memory node vpr-carveout
[ 30.688343] nvmap_page_pool_init: Total RAM pages: 7937732
[ 30.688450] nvmap_page_pool_init: nvmap page pool size: 992216 pages (3875 MB)
[ 30.688755] nvmap_background_zero_thread: PP zeroing thread starting.
[ 30.689043] misc nvmap: created heap vpr base 0x00000000ce000000 size (688128KiB)
[ 30.689296] misc nvmap: cvsram :dma coherent mem declare 0x0000000050000000,4194304
[ 30.689454] misc nvmap: created heap cvsram base 0x0000000050000000 size (4096KiB)
[ 30.690188] tegra186-gpio c2f0000.gpio: Failed to set input direction: -517
[ 31.833217] nvgpu: 17000000.gv11b nvgpu_nvhost_syncpt_init:135 [INFO] syncpt_unit_base 60000000 syncpt_unit_size 400000 size 1000
[ 31.833217]
[ 31.860701] tegra186-gpio c2f0000.gpio: Failed to set input direction: -517

Any help on this? Thanks.

Please try to rebuild the plugins and check if it works. The gstreamer plugins are open source and in the package:

Driver Package (BSP) Sources

Every release is tested and passed SQA tests, so we would suggest use default version for reliable stability. For your reference, Jetpack 4 is with gstreamer 1.14.5 and Jetpack 5 is with 1.16.3

Tried it, failed it.

After some testing, it seems to be the kernel panics also when I set the LD_LIBRARY_PATH and execute a simple Gstreamer pipe.

If the LD_LIBRARY_PATH does not contain any libnv* folders, Gstreamer works fine (but without access to the specific hardware handling capabilities)

Any testing I could do to narrow it down?
Could it be I have a wrong X11 lib? (if so, where can those be found?)
(Or, is there some guide/list of libraries of all the libraries I need, and where to find them, for setting up all AGX Xavier specific Gstreamer pipes/hardware)


Narrowed it further down, if is added → a kernel panics

This looks to be a must-have prebuilt lib so it may not work properly if you don’t load it. Are yo able to use 1.16.3? This is the default version and shall be stable.

Hi DaneLLL

I used the sources 1.16.3.
Is it possible it has to do something with other stuff?
eg. the nvgpu/nvmap modules or any other library the NVidia prebuilts are dependent on?

I also get the error:

nvbuf_utils: Could not get EGL display connection
nvbuf_utils: ERROR getting proc addr of eglCreateImageKHR
nvbuf_utils: ERROR getting proc addr of eglDestroyImageKHR

Getting further (I think)

I do not get any kernel panic now.
But my plugin is blacklisted

Plugin Details:
Description Plugin for blacklisted file
Filename /usr/lib/gstreamer-1.0/
Version 0.0.0
Source module BLACKLIST
Binary package BLACKLIST
0 features:

I removed the .cache folder, the problem persists.

output of ls /usr/lib/gstreamer-1.0:

For me jetpack is installing wrong version of gstreamer plugins with jetpack 5.

On agx xavier with jetpack 5.1:
gst-inspect-1.0 version 1.16.3
GStreamer 1.16.3

But if I inspect the encoder plugin: gst-inspect-1.0 nvv4l2h265enc
Plugin Details:
Name nvvideo4linux2
Description Nvidia elements for Video 4 Linux
Filename /usr/lib/aarch64-linux-gnu/gstreamer-1.0/
Version 1.14.0

Should we expect to see different versions here? These packages got installed via “apt install nvidia-jetpack”.

If you compiled it yourself from sources then you may still have multiple versions on system causing conflicts.

The packages are installed through SDKManager and you don’t need to build it from source. Please try to re-flash the system image through image and then try the commands in our user guide:
Multimedia — Jetson Linux Developer Guide documentation

Hi DaneLLL

I do not longer have a kernel panic, so that is something :)
Unofrtunate the error nvbufsurftransform:cuInit failed : 999 keeps popping up.
As a result nvvidconv is blacklisted.

Any ideas on how and what I can do?

running GST_DEBUG=4 gst-inspect-1.0 /usr/lib/gstreamer-1.0/ gives me:

0:00:00.000314942 503 0xaaaad9643800 INFO GST_INIT gst.c:592:init_pre: Using library installed in /usr/lib
0:00:00.000389149 503 0xaaaad9643800 INFO GST_INIT gst.c:610:init_pre: Linux ScioTeq_RNC 5.10.104 #1 SMP PREEMPT Fri Feb 24 08:32:18 CET 2023 aarch64
0:00:00.001031608 503 0xaaaad9643800 INFO GST_INIT gstmessage.c:129:_priv_gst_message_initialize: init messages
0:00:00.002757450 503 0xaaaad9643800 INFO GST_INIT gstcontext.c:86:_priv_gst_context_initialize: init contexts
0:00:00.003481092 503 0xaaaad9643800 INFO GST_PLUGIN_LOADING gstplugin.c:324:_priv_gst_plugin_initialize: registering 0 static plugins
0:00:00.003792833 503 0xaaaad9643800 INFO GST_PLUGIN_LOADING gstplugin.c:232:gst_plugin_register_static: registered static plugin “staticelements”
0:00:00.003838753 503 0xaaaad9643800 INFO GST_PLUGIN_LOADING gstplugin.c:234:gst_plugin_register_static: added static plugin “staticelements”, result: 1
0:00:00.003928992 503 0xaaaad9643800 INFO GST_REGISTRY gstregistry.c:1826:ensure_current_registry: reading registry cache: /root/.cache/gstreamer-1.0/registry.cortex-a76.bin
0:00:00.010893350 503 0xaaaad9643800 INFO GST_REGISTRY gstregistrybinary.c:683:priv_gst_registry_binary_read_cache: loaded /root/.cache/gstreamer-1.0/registry.cortex-a76.bin in 0.006883 seconds
0:00:00.011014789 503 0xaaaad9643800 INFO GST_REGISTRY gstregistry.c:1693:scan_and_update_registry: Validating plugins from registry cache: /root/.cache/gstreamer-1.0/registry.cortex-a76.bin
0:00:00.012127004 503 0xaaaad9643800 INFO GST_REGISTRY gstregistry.c:1785:scan_and_update_registry: Registry cache has not changed
0:00:00.012161436 503 0xaaaad9643800 INFO GST_REGISTRY gstregistry.c:1861:ensure_current_registry: registry reading and updating done
0:00:00.012217531 503 0xaaaad9643800 INFO GST_INIT gst.c:826:init_post: GLib runtime version: 2.72.3
0:00:00.012250651 503 0xaaaad9643800 INFO GST_INIT gst.c:828:init_post: GLib headers version: 2.72.3
0:00:00.012283643 503 0xaaaad9643800 INFO GST_INIT gst.c:830:init_post: initialized GStreamer successfully

Sorry for the late response, is this still an issue to support? Thanks

No this is solved…
apparently some config in the kernel was wrong

Does it work if you use default gstreamer package installed through SDKManager?