Nvbufsurface: Failed to create EGLImage

My env: NVIDIA Jetson Xavier NX Developer Kit Jetpack 5.1.2 L4T 35.4.1

deepstream-test1# deepstream-test1-app dstest1_config.yml
Added elements to bin
Using file: dstest1_config.yml
Opening in BLOCKING MODE
0:00:03.309415124 5963 0xaaaafa5ec750 INFO nvinfer gstnvinfer.cpp:682:gst_nvinfer_logger: NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1988> [UID = 1]: deserialized trt engine from :/opt/nvidia/deepstream/deepstream-6.3/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine
INFO: [Implicit Engine Info]: layers num: 3
0 INPUT kFLOAT input_1 3x368x640
1 OUTPUT kFLOAT conv2d_bbox 16x23x40
2 OUTPUT kFLOAT conv2d_cov/Sigmoid 4x23x40

0:00:03.367932427 5963 0xaaaafa5ec750 INFO nvinfer gstnvinfer.cpp:682:gst_nvinfer_logger: NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2091> [UID = 1]: Use deserialized engine model: /opt/nvidia/deepstream/deepstream-6.3/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine
nvbufsurface: Failed to create EGLImage.
0:00:03.406348234 5963 0xaaaafa5ec750 WARN nvinfer gstnvinfer.cpp:994:gst_nvinfer_start: error: Failed to set buffer pool to active
Running…
ERROR from element primary-nvinference-engine: Failed to set buffer pool to active
Error details: /dvs/git/dirty/git-master_linux/deepstream/sdk/src/gst-plugins/gst-nvinfer/gstnvinfer.cpp(994): gst_nvinfer_start (): /GstPipeline:dstest1-pipeline/GstNvInfer:primary-nvinference-engine
Returned, stopping playback
Deleting pipeline