Nvv4l2decoder and encoder on wsl2

Please provide complete information as applicable to your setup.

• RTX 3060
• DeepStream Version 6.0.1
• NVIDIA GPU Driver Version 512.15

When I run the sample deepstream config app, everything loads up well but the nvv4l2decoder plugin is not able to load /dev/nvidia0. Could you please help with this. Attaching the logs file here.

INFO: ../nvdsinfer/nvdsinfer_model_builder.cpp:610 [Implicit Engine Info]: layers num: 2
0   INPUT  kFLOAT input_1         3x224x224       
1   OUTPUT kFLOAT predictions/Softmax 20x1x1          

INFO: ../nvdsinfer/nvdsinfer_model_builder.cpp:610 [Implicit Engine Info]: layers num: 2
0   INPUT  kFLOAT input_1         3x224x224       
1   OUTPUT kFLOAT predictions/Softmax 12x1x1          

INFO: ../nvdsinfer/nvdsinfer_model_builder.cpp:610 [Implicit Engine Info]: layers num: 2
0   INPUT  kFLOAT input_1         3x224x224       
1   OUTPUT kFLOAT predictions/Softmax 6x1x1           

gstnvtracker: Loading low-level lib at /opt/nvidia/deepstream/deepstream-6.0/lib/libnvds_nvmultiobjecttracker.so
gstnvtracker: Batch processing is ON
gstnvtracker: Past frame output is ON
[NvMultiObjectTracker] Initialized
INFO: ../nvdsinfer/nvdsinfer_model_builder.cpp:610 [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         


Runtime commands:
	h: Print this help
	q: Quit

	p: Pause
	r: Resume

NOTE: To expand a source in the 2D tiled display and view object details, left-click on the source.
      To go back to the tiled display, right-click anywhere on the window.

** INFO: <bus_callback:194>: Pipeline ready

econdary_gie_1>e[00m NvDsInferContext[UID 5]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1900> [UID = 5]: deserialized trt engine from :/opt/nvidia/deepstream/deepstream-6.0/samples/configs/deepstream-app/../../models/Secondary_CarColor/resnet18.caffemodel_b16_gpu0_int8.engine
0:00:02.647107767 e[336m 1679e[00m 0x7fd930002380 e[36mINFO   e[00m e[00m             nvinfer gstnvinfer.cpp:638:gst_nvinfer_logger:<secondary_gie_1>e[00m NvDsInferContext[UID 5]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2004> [UID = 5]: Use deserialized engine model: /opt/nvidia/deepstream/deepstream-6.0/samples/configs/deepstream-app/../../models/Secondary_CarColor/resnet18.caffemodel_b16_gpu0_int8.engine
0:00:02.651521124 e[336m 1679e[00m 0x7fd930002380 e[36mINFO   e[00m e[00m             nvinfer gstnvinfer_impl.cpp:313:notifyLoadModelStatus:<secondary_gie_1>e[00m [UID 5]: Load new model:/opt/nvidia/deepstream/deepstream-6.0/samples/configs/deepstream-app/config_infer_secondary_carcolor.txt sucessfully
0:00:02.662726155 e[336m 1679e[00m 0x7fd930002380 e[36mINFO   e[00m e[00m             nvinfer gstnvinfer.cpp:638:gst_nvinfer_logger:<secondary_gie_0>e[00m NvDsInferContext[UID 4]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1900> [UID = 4]: deserialized trt engine from :/opt/nvidia/deepstream/deepstream-6.0/samples/configs/deepstream-app/../../models/Secondary_VehicleTypes/resnet18.caffemodel_b16_gpu0_int8.engine
0:00:02.662970809 e[336m 1679e[00m 0x7fd930002380 e[36mINFO   e[00m e[00m             nvinfer gstnvinfer.cpp:638:gst_nvinfer_logger:<secondary_gie_0>e[00m NvDsInferContext[UID 4]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2004> [UID = 4]: Use deserialized engine model: /opt/nvidia/deepstream/deepstream-6.0/samples/configs/deepstream-app/../../models/Secondary_VehicleTypes/resnet18.caffemodel_b16_gpu0_int8.engine
0:00:02.665673580 e[336m 1679e[00m 0x7fd930002380 e[36mINFO   e[00m e[00m             nvinfer gstnvinfer_impl.cpp:313:notifyLoadModelStatus:<secondary_gie_0>e[00m [UID 4]: Load new model:/opt/nvidia/deepstream/deepstream-6.0/samples/configs/deepstream-app/config_infer_secondary_vehicletypes.txt sucessfully
0:00:02.786567498 e[336m 1679e[00m 0x7fd930002380 e[36mINFO   e[00m e[00m             nvinfer gstnvinfer.cpp:638:gst_nvinfer_logger:<primary_gie>e[00m NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1900> [UID = 1]: deserialized trt engine from :/opt/nvidia/deepstream/deepstream-6.0/samples/configs/deepstream-app/../../models/Primary_Detector/resnet10.caffemodel_b4_gpu0_int8.engine
0:00:02.786954573 e[336m 1679e[00m 0x7fd930002380 e[36mINFO   e[00m e[00m             nvinfer gstnvinfer.cpp:638:gst_nvinfer_logger:<primary_gie>e[00m NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2004> [UID = 1]: Use deserialized engine model: /opt/nvidia/deepstream/deepstream-6.0/samples/configs/deepstream-app/../../models/Primary_Detector/resnet10.caffemodel_b4_gpu0_int8.engine
0:00:02.788686080 e[336m 1679e[00m 0x7fd930002380 e[36mINFO   e[00m e[00m             nvinfer gstnvinfer_impl.cpp:313:notifyLoadModelStatus:<primary_gie>e[00m [UID 1]: Load new model:/opt/nvidia/deepstream/deepstream-6.0/samples/configs/deepstream-app/config_infer_primary.txt sucessfully
0:00:02.790729870 e[336m 1679e[00m 0x7fd930002380 e[33;01mWARN   e[00m e[00m             basesrc gstbasesrc.c:3583:gst_base_src_start_complete:<source>e[00m pad not activated yet
0:00:02.791084543 e[336m 1679e[00m 0x7fd930002380 e[33;01mWARN   e[00m e[00m             basesrc gstbasesrc.c:3583:gst_base_src_start_complete:<source>e[00m pad not activated yet
0:00:02.791659605 e[336m 1679e[00m 0x7fd930002380 e[33;01mWARN   e[00m e[00m             basesrc gstbasesrc.c:3583:gst_base_src_start_complete:<source>e[00m pad not activated yet
0:00:02.791874072 e[336m 1679e[00m 0x7fd930002380 e[33;01mWARN   e[00m e[00m             basesrc gstbasesrc.c:3583:gst_base_src_start_complete:<source>e[00m pad not activated yet
0:00:02.792422633 e[336m 1679e[00m 0x7fd930002380 e[33;01mWARN   e[00m e[00m             basesrc gstbasesrc.c:3583:gst_base_src_start_complete:<source>e[00m pad not activated yet
0:00:02.792724967 e[336m 1679e[00m 0x7fd930002380 e[33;01mWARN   e[00m e[00m             basesrc gstbasesrc.c:3583:gst_base_src_start_complete:<source>e[00m pad not activated yet
0:00:02.795257805 e[336m 1679e[00m 0x7fd930002380 e[33;01mWARN   e[00m e[00m             basesrc gstbasesrc.c:3583:gst_base_src_start_complete:<source>e[00m pad not activated yet
0:00:02.795490727 e[336m 1679e[00m 0x7fd930002380 e[33;01mWARN   e[00m e[00m             basesrc gstbasesrc.c:3583:gst_base_src_start_complete:<source>e[00m pad not activated yet
0:00:02.798414948 e[336m 1679e[00m 0x7fd8940410f0 e[33;01mWARN   e[00m e[00m             qtdemux qtdemux.c:3031:qtdemux_parse_trex:<qtdemux0>e[00m failed to find fragment defaults for stream 1
0:00:02.798455124 e[336m 1679e[00m 0x7fd88001e990 e[33;01mWARN   e[00m e[00m             qtdemux qtdemux.c:3031:qtdemux_parse_trex:<qtdemux1>e[00m failed to find fragment defaults for stream 1
0:00:02.799881552 e[336m 1679e[00m 0x7fd8940410f0 e[33;01mWARN   e[00m e[00m             qtdemux qtdemux.c:3031:qtdemux_parse_trex:<qtdemux0>e[00m failed to find fragment defaults for stream 2
0:00:02.799903383 e[336m 1679e[00m 0x7fd88001e990 e[33;01mWARN   e[00m e[00m             qtdemux qtdemux.c:3031:qtdemux_parse_trex:<qtdemux1>e[00m failed to find fragment defaults for stream 2
0:00:02.800019023 e[336m 1679e[00m 0x7fd87c004590 e[33;01mWARN   e[00m e[00m             qtdemux qtdemux.c:3031:qtdemux_parse_trex:<qtdemux3>e[00m failed to find fragment defaults for stream 1
0:00:02.800494155 e[336m 1679e[00m 0x7fd898034a30 e[33;01mWARN   e[00m e[00m             qtdemux qtdemux.c:3031:qtdemux_parse_trex:<qtdemux2>e[00m failed to find fragment defaults for stream 1
0:00:02.800716988 e[336m 1679e[00m 0x7fd87c004590 e[33;01mWARN   e[00m e[00m             qtdemux qtdemux.c:3031:qtdemux_parse_trex:<qtdemux3>e[00m failed to find fragment defaults for stream 2
0:00:02.800835633 e[336m 1679e[00m 0x7fd898034a30 e[33;01mWARN   e[00m e[00m             qtdemux qtdemux.c:3031:qtdemux_parse_trex:<qtdemux2>e[00m failed to find fragment defaults for stream 2
0:00:02.846730133 e[336m 1679e[00m 0x7fd868013ed0 e[33;01mWARN   e[00m e[00m                v4l2 v4l2_calls.c:653:gst_v4l2_open:<nvv4l2decoder1>e[00m error: Could not open device '/dev/nvidia0' for reading and writing.
0:00:02.847022242 e[336m 1679e[00m 0x7fd868013ed0 e[33;01mWARN   e[00m e[00m                v4l2 v4l2_calls.c:653:gst_v4l2_open:<nvv4l2decoder1>e[00m error: system error: No such file or directory
0:00:02.847227718 e[336m 1679e[00m 0x7fd86c012370 e[33;01mWARN   e[00m e[00m                v4l2 v4l2_calls.c:653:gst_v4l2_open:<nvv4l2decoder3>e[00m error: Could not open device '/dev/nvidia0' for reading and writing.
0:00:02.847375253 e[336m 1679e[00m 0x7fd86c012370 e[33;01mWARN   e[00m e[00m                v4l2 v4l2_calls.c:653:gst_v4l2_open:<nvv4l2decoder3>e[00m error: system error: No such file or directory
0:00:02.846824617 e[336m 1679e[00m 0x7fd894041770 e[33;01mWARN   e[00m e[00m                v4l2 v4l2_calls.c:653:gst_v4l2_open:<nvv4l2decoder2>e[00m error: Could not open device '/dev/nvidia0' for reading and writing.
0:00:02.847661892 e[336m 1679e[00m 0x7fd894041770 e[33;01mWARN   e[00m e[00m                v4l2 v4l2_calls.c:653:gst_v4l2_open:<nvv4l2decoder2>e[00m error: system error: No such file or directory
0:00:02.846735814 e[336m 1679e[00m 0x7fd86c011cf0 e[33;01mWARN   e[00m e[00m                v4l2 v4l2_calls.c:653:gst_v4l2_open:<nvv4l2decoder0>e[00m error: Could not open device '/dev/nvidia0' for reading and writing.
0:00:02.847520258 e[336m 1679e[00m 0x7fd86c012370 e[33;01mWARN   e[00m e[00m        videodecoder gstvideodecoder.c:2535:gst_video_decoder_change_state:<nvv4l2decoder3>e[00m error: Failed to open decoder
0:00:02.847250681 e[336m 1679e[00m 0x7fd868013ed0 e[33;01mWARN   e[00m e[00m        videodecoder gstvideodecoder.c:2535:gst_video_decoder_change_state:<nvv4l2decoder1>e[00m error: Failed to open decoder
0:00:02.847813750 e[336m 1679e[00m 0x7fd894041770 e[33;01mWARN   e[00m e[00m        videodecoder gstvideodecoder.c:2535:gst_video_decoder_change_state:<nvv4l2decoder2>e[00m error: Failed to open decoder
0:00:02.848060406 e[336m 1679e[00m 0x7fd86c011cf0 e[33;01mWARN   e[00m e[00m                v4l2 v4l2_calls.c:653:gst_v4l2_open:<nvv4l2decoder0>e[00m error: system error: No such file or directory
0:00:02.848220202 e[336m 1679e[00m 0x7fd86c012370 e[33;01mWARN   e[00m e[00m           decodebin gstdecodebin2.c:2325:connect_pad:<decodebin0>e[00m Couldn't set nvv4l2decoder3 to READY
0:00:02.848373583 e[336m 1679e[00m 0x7fd868013ed0 e[33;01mWARN   e[00m e[00m           decodebin gstdecodebin2.c:2325:connect_pad:<decodebin2>e[00m Couldn't set nvv4l2decoder1 to READY
0:00:02.848528672 e[336m 1679e[00m 0x7fd894041770 e[33;01mWARN   e[00m e[00m           decodebin gstdecodebin2.c:2325:connect_pad:<decodebin1>e[00m Couldn't set nvv4l2decoder2 to READY
0:00:02.848686878 e[336m 1679e[00m 0x7fd86c011cf0 e[33;01mWARN   e[00m e[00m        videodecoder gstvideodecoder.c:2535:gst_video_decoder_change_state:<nvv4l2decoder0>e[00m error: Failed to open decoder
0:00:02.849752989 e[336m 1679e[00m 0x7fd86c011cf0 e[33;01mWARN   e[00m e[00m           decodebin gstdecodebin2.c:2325:connect_pad:<decodebin3>e[00m Couldn't set nvv4l2decoder0 to READY

1 can you see that GPU after input “ls -l /dev/nvidia*”?
2 which deepstream-app are you testing? What modifications did you do? what is your start command?

  1. Cannot see any device after ls -l /dev/nvidia*
  2. GST_DEBUG=3 deepstream-app -c source4_1080p_dec_infer-resnet_tracker_sgie_tiled_display_int8.txt is the command I use to start the app. Didn’t make any modifications.

Also, I am trying this inside the docker container of nvcr.io/nvidia/deepstream:6.0.1-devel and in windows 11 with wsl2.

1 seemed you did not install GPU driver successfully because you can’t see the device.
2 we recommend to use Ubuntu to test deepstream, please refer to Quickstart Guide — DeepStream 6.0.1 Release documentation

I am able to view the device and nvinfer plugin is able to create the engine file and load the model successfully.

Ubuntu on the laptop is currently unstable in terms of bluetooth and wifi driver support. So have trouble switching to it.

from your terminal log, there is “Could not open device ‘/dev/nvidia0’ for reading and writing.”, and there is no nvidia* in your /dev/, please refer to this link to fix.
Installation Guide Linux :: CUDA Toolkit Documentation

Tried that, it fails to find the module.

Please refer to the official documentation Quickstart Guide — DeepStream 6.0.1 Release documentation, currently wsl2 is not supported, please use Ubuntu to test.

Gotcha,
Thank you for your time.

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