# "No EGL Display" error coming while running deepstream python app inside a docker

**URL:** <https://forums.developer.nvidia.com/t/no-egl-display-error-coming-while-running-deepstream-python-app-inside-a-docker/244490>\
**Category:** DeepStream SDK\
**Tags:** deepstream61\
**Created:** [March 1, 2023, 7:47am UTC](https://forums.developer.nvidia.com/t/no-egl-display-error-coming-while-running-deepstream-python-app-inside-a-docker/244490 "2023-03-01T07:47:58Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![vino\_mm](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/vino_mm/32/252108_2.png) [@vino\_mm](https://forums.developer.nvidia.com/u/vino_mm)\
**Post date:** [March 1, 2023, 7:47am UTC](https://forums.developer.nvidia.com/t/no-egl-display-error-coming-while-running-deepstream-python-app-inside-a-docker/244490/1 "2023-03-01T07:47:58Z")

</div>

**• Hardware Platform (Jetson / GPU)** Jetson AGX Orin  
**• DeepStream Version** 6.1.1  
**• JetPack Version (valid for Jetson only)** 5.0.2  
**• TensorRT Version** 8.4.1  
**• Issue Type( questions, new requirements, bugs)** Bugs

While running it locally, ‘xhost +’ fixed the issue.  
But currently the device is running remotely and I’m accessing it through ssh.  
I really don’t want to display the video and I’m using ‘fakesink’.  
I’ve tried unsetting the DISPLAY also tried setting it to :0 and :1, nothing works.

---

<div class="post-metadata">

**Author:** ![yuweiw](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/yuweiw/32/101255_2.png) [@yuweiw](https://forums.developer.nvidia.com/u/yuweiw)\
**Post date:** [March 1, 2023, 10:14am UTC](https://forums.developer.nvidia.com/t/no-egl-display-error-coming-while-running-deepstream-python-app-inside-a-docker/244490/3 "2023-03-01T10:14:00Z")

</div>

You can try to change the python source code like below to use fakesink.

```auto
sink = Gst.ElementFactory.make("fakesink", "nvvideo-renderer")

```

---

<div class="post-metadata">

**Author:** ![vino\_mm](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/vino_mm/32/252108_2.png) [@vino\_mm](https://forums.developer.nvidia.com/u/vino_mm)\
**Post date:** [March 1, 2023, 10:20am UTC](https://forums.developer.nvidia.com/t/no-egl-display-error-coming-while-running-deepstream-python-app-inside-a-docker/244490/4 "2023-03-01T10:20:06Z")

</div>

@yuweiw I was already trying with “fakesink” only. Still it is throwing the error.

---

<div class="post-metadata">

**Author:** ![yuweiw](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/yuweiw/32/101255_2.png) [@yuweiw](https://forums.developer.nvidia.com/u/yuweiw)\
**Post date:** [March 1, 2023, 10:27am UTC](https://forums.developer.nvidia.com/t/no-egl-display-error-coming-while-running-deepstream-python-app-inside-a-docker/244490/5 "2023-03-01T10:27:48Z")

</div>

It’s weird because only render plugin uses display environment. Which demo did you run and how did you change the source code?  
Also, please attach the log with `GST_DEBUG=3 python3 ......`

---

<div class="post-metadata">

**Author:** ![vino\_mm](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/vino_mm/32/252108_2.png) [@vino\_mm](https://forums.developer.nvidia.com/u/vino_mm)\
**Post date:** [March 1, 2023, 10:38am UTC](https://forums.developer.nvidia.com/t/no-egl-display-error-coming-while-running-deepstream-python-app-inside-a-docker/244490/6 "2023-03-01T10:38:45Z")

</div>

@yuweiw

```auto
spotgenius_deepstream_app | No EGL Display
spotgenius_deepstream_app | nvbufsurftransform: Could not get EGL display connection
spotgenius_deepstream_app | 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.
spotgenius_deepstream_app | Deserialize yoloLayer plugin: yolo
spotgenius_deepstream_app | 0:00:05.059060193 19 0x11219440 INFO nvinfer gstnvinfer.cpp:646:gst_nvinfer_logger:<spotgenius_primary-inference_> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1909> [UID = 1]: deserialized trt engine from :/workspace/model_b1_gpu0_fp16.engine
spotgenius_deepstream_app | 0:00:05.207982837 19 0x11219440 INFO nvinfer gstnvinfer.cpp:646:gst_nvinfer_logger:<spotgenius_primary-inference_> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2012> [UID = 1]: Use deserialized engine model: /workspace/model_b1_gpu0_fp16.engine
spotgenius_deepstream_app | 0:00:05.234778048 19 0x11219440 ERROR nvinferallocator gstnvinfer_allocator.cpp:102:gst_nvinfer_allocator_alloc: Error: Could not map EglImage from NvBufSurface for nvinfer
spotgenius_deepstream_app | 0:00:05.234819232 19 0x11219440 WARN GST_BUFFER gstbuffer.c:951:gst_buffer_new_allocate: failed to allocate 88 bytes
spotgenius_deepstream_app | 0:00:05.234848384 19 0x11219440 WARN bufferpool gstbufferpool.c:305:do_alloc_buffer:<bufferpool0> alloc function failed
spotgenius_deepstream_app | 0:00:05.234853985 19 0x11219440 WARN bufferpool gstbufferpool.c:338:default_start:<bufferpool0> failed to allocate buffer
spotgenius_deepstream_app | 0:00:05.234859649 19 0x11219440 ERROR bufferpool gstbufferpool.c:559:gst_buffer_pool_set_active:<bufferpool0> start failed
spotgenius_deepstream_app | 0:00:05.234871489 19 0x11219440 WARN nvinfer gstnvinfer.cpp:943:gst_nvinfer_start:<spotgenius_primary-inference_> error: Failed to set buffer pool to active
spotgenius_deepstream_app | 0:00:05.254981281 19 0x11219440 WARN GST_PADS gstpad.c:1142:gst_pad_set_active:<spotgenius_primary-inference_:sink> Failed to activate pad
spotgenius_deepstream_app | INFO:DEEPSTREAM_PIPELINE:End of stream error
spotgenius_deepstream_app | INFO:DEEPSTREAM_PIPELINE:gst-resource-error-quark: Failed to set buffer pool to active (1),/dvs/git/dirty/git-master_linux/deepstream/sdk/src/gst-plugins/gst-nvinfer/gstnvinfer.cpp(943): gst_nvinfer_start (): /GstPipeline:pipeline0/GstNvInfer:spotgenius_primary-inference_

```

---

<div class="post-metadata">

**Author:** ![yuweiw](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/yuweiw/32/101255_2.png) [@yuweiw](https://forums.developer.nvidia.com/u/yuweiw)\
**Post date:** [March 1, 2023, 10:42am UTC](https://forums.developer.nvidia.com/t/no-egl-display-error-coming-while-running-deepstream-python-app-inside-a-docker/244490/7 "2023-03-01T10:42:26Z")

</div>

Which demo did you run and how did you change the source code?

---

<div class="post-metadata">

**Author:** ![vino\_mm](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/vino_mm/32/252108_2.png) [@vino\_mm](https://forums.developer.nvidia.com/u/vino_mm)\
**Post date:** [March 1, 2023, 10:57am UTC](https://forums.developer.nvidia.com/t/no-egl-display-error-coming-while-running-deepstream-python-app-inside-a-docker/244490/8 "2023-03-01T10:57:49Z")

</div>

@yuweiw This is a custom made code. I’ve tested this code with my local AGX machine and everything is working fine. Currently I’m trying to run it on a remote AGX Orin machine and facing this issue.

---

<div class="post-metadata">

**Author:** ![vino\_mm](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/vino_mm/32/252108_2.png) [@vino\_mm](https://forums.developer.nvidia.com/u/vino_mm)\
**Post date:** [March 1, 2023, 12:41pm UTC](https://forums.developer.nvidia.com/t/no-egl-display-error-coming-while-running-deepstream-python-app-inside-a-docker/244490/9 "2023-03-01T12:41:31Z")

</div>

@yuweiw Solved the issue. The default value for DISPLAY inside docker is :1. So I think the pipeline is always expecting a display to be there.  
I’ve to run unset DISPLAY inside the docker.

> unset DISPLAY

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/system/32/68080_2.png) [@system](https://forums.developer.nvidia.com/u/system)\
**Post date:** [March 15, 2023, 12:42pm UTC](https://forums.developer.nvidia.com/t/no-egl-display-error-coming-while-running-deepstream-python-app-inside-a-docker/244490/10 "2023-03-15T12:42:00Z")

</div>

Closed on March 15, 2023, 12:42pm UTC

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