ERROR from primary_gie: Failed to set buffer pool to active

• Hardware Platform (Jetson / GPU) : Jetson AGX Orin

• DeepStream Version : 7.1

• JetPack Version (valid for Jetson only): 6.2.1

• TensorRT Version: 10.3.0

• Issue Type( questions, new requirements, bugs): bug

I am working with my jetson agx orin from remote GUI access as depicted in What is the best way to control the jetson Orin GUI remotely? - #5 by KevinFFF . I tried to run deepstream sample reference application but it raised following error.

shift@ubuntu:/media/shift/d881e74a-0565-477f-b8f1-bb4f576d281f/opt/nvidia/deepstream/deepstream-7.1/samples/configs/deepstream-app$ deepstream-app -c source30_1080p_dec_infer-resnet_tiled_display_int8.txt
libEGL warning: DRI2: failed to authenticate
libEGL warning: DRI2: failed to authenticate
libEGL warning: DRI2: failed to authenticate
Setting min object dimensions as 16x16 instead of 1x1 to support VIC compute mode.
WARNING: [TRT]: Using an engine plan file across different models of devices is not recommended and is likely to affect performance or even cause errors.
0:00:00.431713003 3863 0xaaaad3246760 INFO nvinfer gstnvinfer.cpp:684:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:2092> [UID = 1]: deserialized trt engine from :/media/shift/d881e74a-0565-477f-b8f1-bb4f576d281f/opt/nvidia/deepstream/deepstream-7.1/samples/configs/deepstream-app/../../models/Primary_Detector/resnet18_trafficcamnet_pruned.onnx_b30_gpu0_int8.engine
INFO: [FullDims Engine Info]: layers num: 3
0 INPUT kFLOAT input_1:0 3x544x960 min: 1x3x544x960 opt: 30x3x544x960 Max: 30x3x544x960
1 OUTPUT kFLOAT output_cov/Sigmoid:0 4x34x60 min: 0 opt: 0 Max: 0
2 OUTPUT kFLOAT output_bbox/BiasAdd:0 16x34x60 min: 0 opt: 0 Max: 00:00:00.432025665 3863 0xaaaad3246760 INFO nvinfer gstnvinfer.cpp:684:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2195> [UID = 1]: Use deserialized engine model: /media/shift/d881e74a-0565-477f-b8f1-bb4f576d281f/opt/nvidia/deepstream/deepstream-7.1/samples/configs/deepstream-app/../../models/Primary_Detector/resnet18_trafficcamnet_pruned.onnx_b30_gpu0_int8.engine
nvbufsurface: Failed to create EGLImage.
0:00:00.453844414 3863 0xaaaad3246760 WARN nvinfer gstnvinfer.cpp:1010:gst_nvinfer_start:<primary_gie> error: Failed to set buffer pool to active
** ERROR: <main:713>: Failed to set pipeline to PAUSED
Quitting
ERROR from primary_gie: Failed to set buffer pool to active
Debug info: /dvs/git/dirty/git-master_linux/deepstream/sdk/src/gst-plugins/gst-nvinfer/gstnvinfer.cpp(1010): gst_nvinfer_start (): /GstPipeline:pipeline/GstBin:primary_gie_bin/GstNvInfer:primary_gie

But that sample reference application works without any issue when I connected jetson into a monitor. But I want to work it in remote GUI access. How to resolve this issue?

I tried this xserver-xorg-video-dummy configuration file, which did not work on my side.

In fact, deepstream does not support x11-forwarding.

If you want to run deepstream-app on a headless device, it is recommended to use filesink instead of eglglesinik.
The enable option is used to switch the sink type

[sink1]
enable=1
type=3
#1=mp4 2=mkv
container=1
#1=h264 2=h265
codec=1
#encoder type 0=Hardware 1=Software
enc-type=0
sync=0
#iframeinterval=10
bitrate=2000000
#H264 Profile - 0=Baseline 2=Main 4=High
#H265 Profile - 0=Main 1=Main10
# set profile only for hw encoder, sw encoder selects profile based on sw-preset
profile=0
output-file=out.mp4
source-id=0

Another option, use the nomachine. nomachine can be used for remote display and control

I enabled filesink. Then following error was raised.

shift@ubuntu:/media/shift/d881e74a-0565-477f-b8f1-bb4f576d281f/opt/nvidia/deepstream/deepstream-7.1/samples/configs/deepstream-app$ deepstream-app -c sample_app.txt
libEGL warning: DRI2: failed to authenticate

(gst-plugin-scanner:3828): GStreamer-WARNING **: 15:40:43.695: Failed to load plugin ‘/media/shift/d881e74a-0565-477f-b8f1-bb4f576d281f/opt/nvidia/deepstream/deepstream-7.1/lib/gst-plugins/libnvdsgst_udp.so’: librivermax.so.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:3828): GStreamer-WARNING **: 15:40:43.705: Failed to load plugin ‘/media/shift/d881e74a-0565-477f-b8f1-bb4f576d281f/opt/nvidia/deepstream/deepstream-7.1/lib/gst-plugins/libnvdsgst_inferserver.so’: libtritonserver.so: cannot open shared object file: No such file or directory

(gst-plugin-scanner:3828): GLib-GObject-CRITICAL **: 15:40:43.720: object GstNvInfer 0xaaaae39b99e0 finalized while still in-construction

(gst-plugin-scanner:3828): GLib-GObject-CRITICAL **: 15:40:43.721: object GstNvInfer 0xaaaae39bd6e0 finalized while still in-construction

(gst-plugin-scanner:3828): GLib-GObject-CRITICAL **: 15:40:43.721: object GstNvDsOsd 0xaaaae39b75b0 finalized while still in-construction

(gst-plugin-scanner:3828): GLib-GObject-CRITICAL **: 15:40:43.721: object Gstnvvideoconvert 0xaaaae39b75b0 finalized while still in-construction

(gst-plugin-scanner:3828): GLib-GObject-CRITICAL **: 15:40:43.721: object GstNvMultiStreamTiler 0xaaaae39c3b00 finalized while still in-construction

(gst-plugin-scanner:3828): GLib-GObject-CRITICAL **: 15:40:43.722: object GstNvTracker 0xaaaae39c5750 finalized while still in-construction

(gst-plugin-scanner:3828): GLib-GObject-CRITICAL **: 15:40:43.722: object GstNvDsAnalytics 0xaaaae39c9880 finalized while still in-construction

(gst-plugin-scanner:3828): GLib-GObject-CRITICAL **: 15:40:43.723: object GstNvMsgConv 0xaaaae39892b0 finalized while still in-construction

(gst-plugin-scanner:3828): GLib-GObject-CRITICAL **: 15:40:43.723: object GstNvMsgBroker 0xaaaae398a390 finalized while still in-construction

(gst-plugin-scanner:3828): GLib-GObject-CRITICAL **: 15:40:43.724: cannot register existing type ‘GstNvMsgConv’

(gst-plugin-scanner:3828): GLib-CRITICAL **: 15:40:43.724: g_once_init_leave: assertion ‘result != 0’ failed

(gst-plugin-scanner:3828): GStreamer-CRITICAL **: 15:40:43.724: gst_element_register: assertion ‘g_type_is_a (type, GST_TYPE_ELEMENT)’ failed

(gst-plugin-scanner:3828): GLib-GObject-CRITICAL **: 15:40:43.726: cannot register existing type ‘GstNvDsAnalytics’

(gst-plugin-scanner:3828): GLib-CRITICAL **: 15:40:43.726: g_once_init_leave: assertion ‘result != 0’ failed

(gst-plugin-scanner:3828): GStreamer-CRITICAL **: 15:40:43.726: gst_element_register: assertion ‘g_type_is_a (type, GST_TYPE_ELEMENT)’ failed

(gst-plugin-scanner:3828): GLib-GObject-CRITICAL **: 15:40:43.731: cannot register existing type ‘GstNvInfer’

(gst-plugin-scanner:3828): GLib-CRITICAL **: 15:40:43.731: g_once_init_leave: assertion ‘result != 0’ failed

(gst-plugin-scanner:3828): GStreamer-CRITICAL **: 15:40:43.731: gst_element_register: assertion ‘g_type_is_a (type, GST_TYPE_ELEMENT)’ failed

(gst-plugin-scanner:3828): GStreamer-WARNING **: 15:40:43.733: Failed to load plugin ‘/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_inferserver.so’: libtritonserver.so: cannot open shared object file: No such file or directory

(gst-plugin-scanner:3828): GStreamer-WARNING **: 15:40:43.735: Failed to load plugin ‘/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_udp.so’: librivermax.so.0: cannot open shared object file: No such file or directory
libEGL warning: DRI2: failed to authenticate

(deepstream-app:3827): GLib-GObject-CRITICAL **: 15:40:43.950: g_object_set_is_valid_property: object class ‘nvv4l2h264enc’ has no property named ‘gpu-id’
** ERROR: main:713: Failed to set pipeline to PAUSED
Quitting
ERROR from sink_sub_bin_sink1: Could not open file “out.mp4” for writing.
Debug info: ../plugins/elements/gstfilesink.c(458): gst_file_sink_open_file (): /GstPipeline:pipeline/GstBin:processing_bin_0/GstBin:sink_bin/GstBin:sink_sub_bin1/GstFileSink:sink_sub_bin_sink1:
system error: Permission denied
ERROR from sink_sub_bin_sink1: GStreamer error: state change failed and some element failed to post a proper error message with the reason for the failure.
Debug info: ../libs/gst/base/gstbasesink.c(5878): gst_base_sink_change_state (): /GstPipeline:pipeline/GstBin:processing_bin_0/GstBin:sink_bin/GstBin:sink_sub_bin1/GstFileSink:sink_sub_bin_sink1:
Failed to start
App run failed

It seems that there is a problem with gstreamer.
Try cleaning the cache rm -rf ~/.cache/gstreamer-1.0. If it still doesn’t work, try reinstalling deepstream/jetpack, etc.

shift@ubuntu:/media/shift/d881e74a-0565-477f-b8f1-bb4f576d281f/opt/nvidia/deepstream/deepstream-7.1/samples/configs/deepstream-app$ deepstream-app -c source30_1080p_dec_infer-resnet_tiled_display_int8.txt

libEGL warning: DRI2: failed to authenticate

(deepstream-app:4308): GLib-GObject-CRITICAL **: 00:19:47.120: g_object_set_is_valid_property: object class ‘nvv4l2h264enc’ has no property named ‘gpu-id’** ERROR: main:713: Failed to set pipeline to PAUSEDQuittingERROR from sink_sub_bin_sink1: Could not open file “out.mp4” for writing.Debug info: ../plugins/elements/gstfilesink.c(458): gst_file_sink_open_file (): /GstPipeline:pipeline/GstBin:processing_bin_0/GstBin:sink_bin/GstBin:sink_sub_bin1/GstFileSink:sink_sub_bin_sink1:system error: Permission deniedERROR from sink_sub_bin_sink1: GStreamer error: state change failed and some element failed to post a proper error message with the reason for the failure.Debug info: ../libs/gst/base/gstbasesink.c(5878): gst_base_sink_change_state (): /GstPipeline:pipeline/GstBin:processing_bin_0/GstBin:sink_bin/GstBin:sink_sub_bin1/GstFileSink:sink_sub_bin_sink1:Failed to startApp run failed

I cleaned the cache. Now above error was raised. I tried reinstalling deepstream/jetpack previously but did not work.

sudo chmod -R a+w /opt/nvidia/deepstream/deepstream

shift@ubuntu:/media/shift/d881e74a-0565-477f-b8f1-bb4f576d281f/opt/nvidia/deepstream/deepstream-7.1/samples/configs/deepstream-app$ sudo chmod -R a+w /opt/nvidia/deepstream/deepstream
shift@ubuntu:/media/shift/d881e74a-0565-477f-b8f1-bb4f576d281f/opt/nvidia/deepstream/deepstream-7.1/samples/configs/deepstream-app$ deepstream-app -c source30_1080p_dec_infer-resnet_tiled_display_int8.txt
libEGL warning: DRI2: failed to authenticate

(deepstream-app:4714): GLib-GObject-CRITICAL **: 09:54:55.434: g_object_set_is_valid_property: object class ‘nvv4l2h264enc’ has no property named ‘gpu-id’
** ERROR: main:713: Failed to set pipeline to PAUSED
Quitting
ERROR from sink_sub_bin_sink1: Could not open file “output.mp4” for writing.
Debug info: ../plugins/elements/gstfilesink.c(458): gst_file_sink_open_file (): /GstPipeline:pipeline/GstBin:processing_bin_0/GstBin:sink_bin/GstBin:sink_sub_bin1/GstFileSink:sink_sub_bin_sink1:
system error: Permission denied
ERROR from sink_sub_bin_sink1: GStreamer error: state change failed and some element failed to post a proper error message with the reason for the failure.
Debug info: ../libs/gst/base/gstbasesink.c(5878): gst_base_sink_change_state (): /GstPipeline:pipeline/GstBin:processing_bin_0/GstBin:sink_bin/GstBin:sink_sub_bin1/GstFileSink:sink_sub_bin_sink1:
Failed to start
App run failed

It did not work.

Why is deepstream installed in this location? This may cause many problems. Please install it to /opt/nvidia/deepstream/deepstream

I installed deepstream from nvidia sdk manager. I flashed jetson in eMMC. Is there any option to install it on that same space(eMMC) in sdk manager. Installed deepstream is available on nvme ssd.

You can install it from the DeepStream tarball

Or try modifying the configuration file to output-file=/a/path/with_write_permission/out.mp4.

shift@ubuntu:/opt/nvidia/deepstream/deepstream-7.1/samples/configs/deepstream-app$ deepstream-app -c source30_1080p_dec_infer-resnet_tiled_display_int8.txt
libEGL warning: DRI2: failed to authenticate

(deepstream-app:3925): GLib-GObject-CRITICAL **: 13:06:22.546: g_object_set_is_valid_property: object class ‘nvv4l2h264enc’ has no property named ‘gpu-id’
** ERROR: main:713: Failed to set pipeline to PAUSED
Quitting
ERROR from sink_sub_bin_sink1: Could not open file “out.mp4” for writing.
Debug info: ../plugins/elements/gstfilesink.c(458): gst_file_sink_open_file (): /GstPipeline:pipeline/GstBin:processing_bin_0/GstBin:sink_bin/GstBin:sink_sub_bin1/GstFileSink:sink_sub_bin_sink1:
system error: Permission denied
ERROR from sink_sub_bin_sink1: GStreamer error: state change failed and some element failed to post a proper error message with the reason for the failure.
Debug info: ../libs/gst/base/gstbasesink.c(5878): gst_base_sink_change_state (): /GstPipeline:pipeline/GstBin:processing_bin_0/GstBin:sink_bin/GstBin:sink_sub_bin1/GstFileSink:sink_sub_bin_sink1:
Failed to start
App run failed

I reinstalled deepstream. Still problem was not resolved.

If you don’t know how to add write permissions, Please modify the configuration file to write the output mp4 to the home directory

output-file=/home/shift/out.mp4

shift@ubuntu:/opt/nvidia/deepstream/deepstream-7.1/samples/configs/deepstream-app$ deepstream-app -c source30_1080p_dec_infer-resnet_tiled_display_int8.txt
libEGL warning: DRI2: failed to authenticate

(deepstream-app:3780): GLib-GObject-CRITICAL **: 14:11:55.927: g_object_set_is_valid_property: object class ‘nvv4l2h264enc’ has no property named ‘gpu-id’
Opening in BLOCKING MODE
Setting min object dimensions as 16x16 instead of 1x1 to support VIC compute mode.
WARNING: Deserialize engine failed because file path: /opt/nvidia/deepstream/deepstream-7.1/samples/configs/deepstream-app/../../models/Primary_Detector/resnet18_trafficcamnet_pruned.onnx_b30_gpu0_int8.engine open error
0:00:00.647107682 3780 0xaaab112a0bf0 WARN nvinfer gstnvinfer.cpp:681:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:2080> [UID = 1]: deserialize engine from file :/opt/nvidia/deepstream/deepstream-7.1/samples/configs/deepstream-app/../../models/Primary_Detector/resnet18_trafficcamnet_pruned.onnx_b30_gpu0_int8.engine failed
0:00:00.647156522 3780 0xaaab112a0bf0 WARN nvinfer gstnvinfer.cpp:681:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2185> [UID = 1]: deserialize backend context from engine from file :/opt/nvidia/deepstream/deepstream-7.1/samples/configs/deepstream-app/../../models/Primary_Detector/resnet18_trafficcamnet_pruned.onnx_b30_gpu0_int8.engine failed, try rebuild
0:00:00.647171437 3780 0xaaab112a0bf0 INFO nvinfer gstnvinfer.cpp:684:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:2106> [UID = 1]: Trying to create engine from model files
WARNING: [TRT]: DLA requests all profiles have same min, max, and opt value. All dla layers are falling back to GPU
WARNING: Serialize engine failed because of file path: /opt/nvidia/deepstream/deepstream-7.1/samples/models/Primary_Detector/resnet18_trafficcamnet_pruned.onnx_b30_gpu0_int8.engine opened error
0:18:59.396707722 3780 0xaaab112a0bf0 WARN nvinfer gstnvinfer.cpp:681:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:2133> [UID = 1]: failed to serialize cude engine to file: /opt/nvidia/deepstream/deepstream-7.1/samples/models/Primary_Detector/resnet18_trafficcamnet_pruned.onnx_b30_gpu0_int8.engine
INFO: [FullDims Engine Info]: layers num: 3
0 INPUT kFLOAT input_1:0 3x544x960 min: 1x3x544x960 opt: 30x3x544x960 Max: 30x3x544x960
1 OUTPUT kFLOAT output_cov/Sigmoid:0 4x34x60 min: 0 opt: 0 Max: 0
2 OUTPUT kFLOAT output_bbox/BiasAdd:0 16x34x60 min: 0 opt: 0 Max: 0

nvbufsurface: Failed to create EGLImage.
0:18:59.831255867 3780 0xaaab112a0bf0 WARN nvinfer gstnvinfer.cpp:1010:gst_nvinfer_start:<primary_gie> error: Failed to set buffer pool to active
** ERROR: main:713: Failed to set pipeline to PAUSED
Quitting
ERROR from primary_gie: Failed to set buffer pool to active
Debug info: /dvs/git/dirty/git-master_linux/deepstream/sdk/src/gst-plugins/gst-nvinfer/gstnvinfer.cpp(1010): gst_nvinfer_start (): /GstPipeline:pipeline/GstBin:primary_gie_bin/GstNvInfer:primary_gie
App run failed

I set output-file=/home/shift/out.mp4.

Do you think that if I use nomachine for remote display instead of changing /etc/X11/xorg.conf file, Whether Can I use EglSink ?

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