Cannot run any of the sample files under deepstream-app when using deepstream sdk4.0

OS= Ubuntu 18.04
nvidia-smi works fine
devicequery also work fine
When I try to run deepstream-app using the following syntax:
$deepstream-app -c /opt/nvidia/deepstream/deepstream-4.0/samples/configs/deepstream-app/source4_1080p_dec_infer-resnet_tracker_sgie_tiled_display_int8_gpu1.txt

I get he following error:
Unable to set device in gst_nvstreammux_change_state
Unable to set device in gst_nvstreammux_change_state
Unable to set device in gst_nvstreammux_change_state
** ERROR: main:651: Failed to set pipeline to PAUSED
Quitting
Unable to set device in gst_nvstreammux_change_state
App run failed

If you’ll can give me any pointer on how to solve this issue.
Thanks
Bhavesh

How many GPU cards in your system, seems you use GPU 1, if you use default config, source4_1080p_dec_infer-resnet_tracker_sgie_tiled_display_int8_gpu1.txt, if you just have one card, please use other config without
_gpu1 string.

Amy, I only have 1xT4 in my system.
thanks

I am using vncserver for display and when I run one of the config files, it gives this error and nothing shows on vncserver:
Now playing: …/…/…/…/samples/streams/sample_720p.h264
0:00:00.607488184 24 0x5599a7cb1800 INFO GST_STATES gstbin.c:2506:gst_bin_element_set_state: current NULL pending VOID_PENDING, desired next READY
0:00:01.424014191 24 0x5599a7cb1800 ERROR egladaption ext/eglgles/gstegladaptation_egl.c:160:gst_egl_adaptation_init_display: Could not init EGL display connection
0:00:01.424063227 24 0x5599a7cb1800 ERROR egladaption ext/eglgles/gstegladaptation_egl.c:183:gst_egl_adaptation_init_display: EGL call returned error 3000
0:00:01.424085189 24 0x5599a7cb1800 ERROR egladaption ext/eglgles/gstegladaptation_egl.c:185:gst_egl_adaptation_init_display: Couldn’t setup window/surface from handle
0:00:01.424103635 24 0x5599a7cb1800 ERROR nveglglessink ext/eglgles/gsteglglessink.c:536:egl_init: Couldn’t init EGL display
0:00:01.424121263 24 0x5599a7cb1800 ERROR nveglglessink ext/eglgles/gsteglglessink.c:562:egl_init: Failed to perform EGL init
0:00:01.424139136 24 0x5599a7cb1800 INFO GST_STATES gstelement.c:2961:gst_element_change_state: have FAILURE change_state return
0:00:01.424165350 24 0x5599a7cb1800 INFO GST_STATES gstelement.c:2549:gst_element_abort_state: aborting state from NULL to READY
0:00:01.424199448 24 0x5599a7cb1800 INFO GST_STATES gstbin.c:2970:gst_bin_change_state_func: child ‘nvvideo-renderer’ failed to go to state 2(READY)
0:00:01.424254878 24 0x5599a7cb1800 INFO GST_STATES gstelement.c:2676:gst_element_continue_state: completed state change to NULL
0:00:01.424285545 24 0x5599a7cb1800 INFO GST_STATES gstelement.c:2676:gst_element_continue_state: completed state change to NULL
0:00:01.424312439 24 0x5599a7cb1800 INFO GST_STATES gstelement.c:2676:gst_element_continue_state: completed state change to NULL
0:00:01.424337583 24 0x5599a7cb1800 INFO GST_STATES gstelement.c:2676:gst_element_continue_state: completed state change to NULL
0:00:01.424384789 24 0x5599a7cb1800 INFO GST_STATES gstelement.c:2676:gst_element_continue_state: completed state change to NULL
0:00:01.424416339 24 0x5599a7cb1800 INFO GST_STATES gstelement.c:2676:gst_element_continue_state: completed state change to NULL
0:00:01.424444356 24 0x5599a7cb1800 INFO GST_STATES gstelement.c:2676:gst_element_continue_state: completed state change to NULL
0:00:01.424470952 24 0x5599a7cb1800 INFO GST_STATES gstelement.c:2676:gst_element_continue_state: completed state change to NULL
0:00:01.424500526 24 0x5599a7cb1800 INFO GST_STATES gstelement.c:2961:gst_element_change_state: have FAILURE change_state return
0:00:01.424524507 24 0x5599a7cb1800 INFO GST_STATES gstelement.c:2549:gst_element_abort_state: aborting state from NULL to PLAYING

T4 do not have display port, you can follow this to setup virtual display,
Deepstream/FAQ - eLinux.org 5A
or you can change sink type to Fakesink or File in the config.