nvcamera daemon V4L compatibility

I am developing V4L driver for IMX172 based on the driver for OmniVision sensor that is present on dev board.
It is passing V4L compatibility test but it is not working with nvcamera.
I am trying to test it with command:
gst-launch1.0 nvcamerasrc fpsRange=“20 20” ! nvvidconv ! autovideosink

But it prints the following error:

0:00:00.722205228 2056 0x428000 INFO nvcamerasrc gstnvcamerasrc.cpp:2046:send_request_to_camera_daemon: NvCameraSrc: CameraDaemon_REQ CREATE SESSION

Socket read error. Camera Daemon stopped functioning…
0:00:00.722837508 2056 0x428000 INFO nvcamerasrc gstnvcamerasrc.cpp:2063:send_request_to_camera_daemon: CREATE SESSION DONE ret=0

0:00:00.722867924 2056 0x428000 ERROR nvcamerasrc gstnvcamerasrc.cpp:2370:gst_nvcamera_open: REQ_NVCAM_CREATE_SESSION to camera_daemon failed

gst_nvcamera_open() failed ret=0

My question is: how can I debug my driver or nvcamera daemon to understand the reason for such errors?
I want to capture frames processed with ISP so plain V4L is not an option.
However I have plain V4L driver was working in older versions of L4T but not for the 24.1.

Possibly your device tree not modify well. You could download the document from http://developer.nvidia.com/embedded/dlc/l4t-documentation-24-2 and follow the “Sensor Driver Programming Guide” to check your driver is miss any things. Notice this document is base r24.2, if you have no plan on the 24.1 it’s a good time to move to 24.2 and follow the document to implement your sensor driver.

Thank you for your response!
I made a mistake in first message - I am already working on L4T 24.2 and my driver is written using this documentation.
That is why I’m asking for help - everything seems valid, but does not work.
The daemon does not even opens the device (/dev/video0), which is present and properly working (at least with V4L API).
Can you suggest something else?

Did you using the plugin manager? You should use Main Platform Device Tree File like document as below describe.
Could you share your implement of the device tree.

Using Main Platform Device Tree File
Register your new device by updating main platform DTSI file to include your new device DTSI file. Because Tegra X1 uses Plugin Manager by default, you must first unregister Plugin Manger support first and then add your device information to the main device tree DTSI file.
To register a device using main-platform device tree files

  1. In kernel/arch/arm64/boot/dts/tegra210-plugin-manager/tegra210-jetson-cv-plugin-manager.dtsi, remove the following line:
    #include “tegra210-jetson-cv-camera-plugin-manager.dtsi”
  2. In kernel/arch/arm64/boot/dts/tegra210-jetson-cv-base-p2597-2180-a00.dts, replace the following line:
    #include “tegra210-platforms/tegra210-jetson-cv-camera-modules.dtsi”
    With an #include statement specifying your new device DTSI file.

I use the following file

#include <dt-bindings/media/camera.h>
#include <dt-bindings/platform/t210/t210.h>

#define CAM0_RST_L  TEGRA_GPIO(S, 4)
#define CAM1_RST_L  TEGRA_GPIO(S, 5)
#define CAM0_PWDN   TEGRA_GPIO(S, 7)
#define CAM1_PWDN   TEGRA_GPIO(T, 0)


/ {
    host1x 
    {
        vi_base: vi 
        {
            num-channels    =   <1>;
            
            ports 
            {
                vi_port0: port@0 {
                    status = "okay";
                    vi_in0: endpoint {
                        status = "okay";
                    };
                };
            };
        };
    
        gpio: gpio@6000d000 
        {
            camera-control 
            {
                gpio-output-low = <
                    CAM0_RST_L
                    CAM0_PWDN
                    CAM1_RST_L
                    CAM1_PWDN
                    >;
            };
        };
        
        vi 
        {
            num-channels = <1>;
            ports 
            {
                #address-cells  = <1>;
                #size-cells     = <0>;

                port@0 
                {
                    reg = <0>;
                    imx172_a_csia_in0: endpoint 
                    {
                        csi-port        = <0>;
                        bus-width       = <4>;
                        remote-endpoint = <&imx172_out0>;
                    };
                };
            };
        };

        i2c@546c0000 
        {
            status          = "okay";
            #address-cells  = <1>;
            #size-cells     = <0>;

            imx172_a@52 
            {
                status                          = "okay";
                
                compatible                      = "nvidia,imx172";
                reg                             = <0x52>;          
                physical_w                      = "4.000";  
                physical_h                      = "3.000";
                sensor_model                    = "imx172";
                avdd-reg                        = "vana";
                iovdd-reg                       = "vif";
                post_crop_frame_drop            = "0";

                clocks                          = <&tegra_car TEGRA210_CLK_ID_CLK_OUT_3>;
                clock-names                     = "mclk";
                clock-frequency                 = <24000000>;

                mclk                            = "cam_mclk1";
                reset-gpios                     = <&gpio CAM0_RST_L GPIO_ACTIVE_HIGH>;
                pwdn-gpios                      = <&gpio CAM0_PWDN GPIO_ACTIVE_HIGH>;
                vana-supply                     = <&en_vdd_cam_hv_2v8>;
                vif-supply                      = <&en_vdd_cam>;
                
                
                
                mode0
                {
                    mclk_khz                    = "24000";
                    num_lanes                   = "4";
                    tegra_sinterface            = "serial_a";
                    discontinuous_clk           = "yes"; 
                    dpcm_enable                 = "false";
                    cil_settletime              = "0";
                    active_w                    = "3200";
                    active_h                    = "3040";
                    pixel_t                     = "bayer_rggb";
                    readout_orientation         = "0";
                    line_length                 = "4320";
                    inherent_gain               = "1";
                    mclk_multiplier             = "25";
                    pix_clk_hz                  = "400000000";

                    min_gain_val                = "1.0";
                    max_gain_val                = "22.5";
                    min_hdr_ratio               = "1";
                    max_hdr_ratio               = "64";
                    min_framerate               = "2.2290";
                    max_framerate               = "30";
                    min_exp_time                = "44";
                    max_exp_time                = "33000";
                    embedded_metadata_height    = "0";
                }; 
                ports {
                    #address-cells              = <1>;
                    #size-cells                 = <0>;

                    port@0 
                    {
                        reg                     = <0>;
                        imx172_out0: endpoint 
                        {
                            status              = "okay";
                            csi-port            = <0>;
                            bus-width           = <4>;
                            remote-endpoint     = <&imx172_a_csia_in0>;
                        };
                    };
                };
            };
        };
    };

    tegra-camera-platform 
    {
        compatible = "nvidia, tegra-camera-platform";

        modules 
        {
            module0
            {
                status                  = "okay";
                badge                   = "e3326_front_P5V27C";
                position                = "rear";
                orientation             = "1";
                drivernode0 
                {
                    status              = "okay";
                    pcl_id              = "v4l2_sensor";    /* Declare PCL support driver (classically known as guid)  */
                    devname             = "imx172 6-0052";  /* Driver's v4l2 device name */
                                                            /* Declare the device-tree hierarchy to driver instance */
                    proc-device-tree    = "/proc/device-tree/host1x/i2c@546c0000/imx172_a@52";  
                };
                drivernode1 
                {                                           /* Declare PCL support driver (classically known as guid)  */
                    pcl_id              = "v4l2_focuser_stub";          
                };
            };
        };
    };
};

Could you collect the log by below command
sudo su
stop nvcamera-daemon
export enableCamPclLogs=1
/usr/sbin/nvcamera-daemon&
gst-launch-1.0 nvcamerasrc fpsRange=“20 20” ! nvvidconv ! autovideosink

You should see some message like below

NvPclOpen: ++++++++++++++++++++++
NvPclHwGetModuleList: OFParserListModules Succeeded
NvPclHwMatchPartNum: Found calibration Part#:P5V27CCV:“P5V27C”
NvPclHwGetModuleData: Misc Driver v4l2_focuser_stub already exists. Avoiding duplicate drivers
NvPclHwPrintModuleDefinition – Name: e3326_front_P5V27C
NvPclHwPrintModuleDefinition – Position: 0
NvPclHwPrintModuleDefinition – CalibrationData Found: 1
NvPclHwPrintCameraSubModule – HwCamSubModule[0].Name: v4l2_focuser_stub
NvPclHwPrintCameraSubModule – HwCamSubModule[1].Name: v4l2_sensor
NvPclHwGetModuleList: OFParserListModules Succeeded
NvPclStateControllerOpen: Found GUID 0 match at index[0]
NvPclStateControllerOpen: NvPclHwModule list[0]: e3326_front_P5V27C position0
NvPclCreateDriver: Found NvPcl Driver Hal dev_name match (v4l2_focuser_stub)

Setting pipeline to PAUSED ...
Inside NvxLiteH264DecoderLowLatencyInitNvxLiteH264DecoderLowLatencyInit set DPB and MjstreamingInside NvxLiteH265DecoderLowLatencyInitNvxLiteH265DecoderLowLatencyInit set DPB and Mjstreaming/usr/sbin/nvcamera-daemon: symbol lookup error: /usr/lib/aarch64-linux-gnu/tegra/libscf.so: undefined symbol: NvPclSetHotplugCallback
Socket read error. Camera Daemon stopped functioning.....
gst_nvcamera_open() failed ret=0
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstNvCameraSrc:nvcamerasrc0: GStreamer error: state change failed and some element failed to post a proper error message with the reason for the failure.
Additional debug info:
gstbasesrc.c(3354): gst_base_src_start (): /GstPipeline:pipeline0/GstNvCameraSrc:nvcamerasrc0:
Failed to start
Setting pipeline to NULL ...
Freeing pipeline ...

Didn’t see any log from the NvPcl, may sure you are run both of those command at supervisor mode. If still see any NvPcl string add below vale “export enableCamScfLogs=1”

Nothing has changed, the terminal displays a previous message.

That’s unreasonable. Make sure your origin code base working for ov5693. And after that you can base on the origin code base to override the ov5693 to imx172 only replace the ov5693 to imx172 don’t have any other changes.

I’m sorry that I introduced you to the confusion, here are the correct log:

root@tegra-ubuntu:/home/ubuntu# DISPLAY=:0 gst-launch-1.0 nvcamerasrc fpsRange="20 20" ! nvvidconv ! autovideosink
Setting pipeline to PAUSED ...
Inside NvxLiteH264DecoderLowLatencyInitNvxLiteH264DecoderLowLatencyInit set DPB and MjstreamingInside NvxLiteH265DecoderLowLatencyInitNvxLiteH265DecoderLowLatencyInit set DPB and MjstreamingThread 1 getting next capture
Thread 1 is waiting
Thread 2 getting next capture
Thread 2 is waiting
Thread 3 getting next capture
Thread 3 is waiting
Thread 4 getting next capture
Thread 4 is waiting
Starting services...
getInstance: s_instance(0x7f991a2e80)
doCreateSensor: create SensorType(gyroscope) sensor(0x7f991a2f80)
doCreateSensor: create SensorType(accelerometer) sensor(0x7f991a32c0)
doCreateSensor: create SensorType(magnetometer) sensor(0x7f991a3350)
doCreateSensor: create SensorType(temperature) sensor(0x7f9921f5f0)
doCreateSensor: create SensorType(proximity) sensor(0x7f992229d0)
doCreateSensor: create SensorType(rotation vector) sensor(0x7f99225db0)
doCreateSensor: create SensorType(linear acceleration) sensor(0x7f99229190)
getInstance: s_instance(0x7f991a2e80)

AC plugin not present: dlopen "acplugin.so", acplugin.so: cannot open shared object file: No such file or directory

Services are started

NvPclSetHotplugCallback: ++++++++++++++++++++++
###### imager: Calibration blob file handling NOT supported in this build ######

NvPclHwGetModuleList: OFParserListModules Succeeded
NvPclModuleListInitialize: no built in modules on platform
NvPclHwScanExternalCameras -- adding video0 to discover list
NvPclHwScanExternalCameras -- adding video0 to discover list
initialize: /dev/video0
getHotplugMonitor: Getting hotplug monitor instance
 initializeHotplug++
 hotPlugfunc ++
 addWatch: Watch added wd='1'
setHotplugCallback: Registered new callback client
NvPclSetHotplugCallback: ----------------------
SCF: Error BadParameter: index out of range (in src/api/CameraDriver.cpp, function getSource(), line 413)
Socket read error. Camera Daemon stopped functioning.....
gst_nvcamera_open() failed ret=0
ERROR: Pipeline doesn't want to pause.
Setting pipeline to NULL ...
Freeing pipeline ...
root@tegra-ubuntu:/home/ubuntu#

Your log shows there’s no sensor module detect by the user space camera driver. That means your device tree have not modify well. You can check the “/proc/device-tree/tegra-camera-platform/modules/modules0/” to cat the badeg and status with your modify dtsi.

“NvPclModuleListInitialize: no built in modules on platform”

Any change you could help me with my log? nvcamera-daemon segfaults when trying to start nvcamerasrc pipeline
This all is for the default ov5693 with default sensor coming with devboard.

root@tegra-ubuntu:~# /usr/sbin/nvcamera-daemon&
[1] 3159
root@tegra-ubuntu:~# gst-launch-1.0 nvcamerasrc fpsRange="20 20" ! nvvidconv ! nvoverlaysink
Setting pipeline to PAUSED ...
Inside NvxLiteH264DecoderLowLatencyInitNvxLiteH264DecoderLowLatencyInit set DPB and MjstreamingInside NvxLiteH265DecoderLowLatencyInitNvxLiteH265DecoderLowLatencyInit set DPB and MjstreamingThread 1 getting next capture

Thread 1 is waiting

Thread 2 getting next capture

Thread 2 is waiting

Thread 3 getting next capture

Thread 3 is waiting

Starting services...

Thread 4 getting next capture

Thread 4 is waiting

getInstance: s_instance(0x7fa9198910)

doCreateSensor: create SensorType(gyroscope) sensor(0x7fa9198a10)

doCreateSensor: create SensorType(accelerometer) sensor(0x7fa9198d50)

doCreateSensor: create SensorType(magnetometer) sensor(0x7fa9198de0)

doCreateSensor: create SensorType(temperature) sensor(0x7fa9215090)

doCreateSensor: create SensorType(proximity) sensor(0x7fa9218470)

doCreateSensor: create SensorType(rotation vector) sensor(0x7fa921b850)

doCreateSensor: create SensorType(linear acceleration) sensor(0x7fa921ec30)

getInstance: s_instance(0x7fa9198910)

AC plugin not present: dlopen "acplugin.so", acplugin.so: cannot open shared object file: No such file or directory

Services are started

NvPclSetHotplugCallback: ++++++++++++++++++++++
###### imager: Calibration blob file handling NOT supported in this build ######

NvPclHwGetModuleList: OFParserListModules Succeeded
NvPclHwMatchPartNum: Found calibration Part#:P5V27C:"P5V27C"
NvPclHwGetModuleData: Misc Driver v4l2_focuser_stub already exists. Avoiding duplicate drivers
NvPclHwPrintModuleDefinition -- Name: e3326_front_P5V27C
NvPclHwPrintModuleDefinition -- Position: 0
NvPclHwPrintModuleDefinition -- CalibrationData Found: 1
NvPclHwPrintCameraSubModule -- HwCamSubModule[0].Name: v4l2_focuser_stub
NvPclHwPrintCameraSubModule -- HwCamSubModule[0].DevName: lc898212 6-0072
NvPclHwPrintCameraSubModule -- HwCamSubModule[1].Name: v4l2_sensor
NvPclHwPrintCameraSubModule -- HwCamSubModule[1].DevName: ov5693 6-0036
NvPclHwGetModuleList: OFParserListModules Succeeded
NvPclModuleListInitialize: NvPclModule list[0]: e3326_front_P5V27C position0
NvPclHwScanExternalCameras -- adding video0 to discover list
NvPclHwScanExternalCameras -- adding video0 to discover list
initialize: /dev/video0
getHotplugMonitor: Getting hotplug monitor instance
 initializeHotplug++
 hotPlugfunc ++ 
 addWatch: Watch added wd='1'
setHotplugCallback: Registered new callback client
NvPclSetHotplugCallback: ----------------------
NvPclOpen: ++++++++++++++++++++++
NvPclStateControllerOpen: Found GUID 0 match at index[0]
NvPclCreateDriver: Found NvPcl Driver Hal dev_name match (v4l2_focuser_stub)
NvPclCreateDriver: Found a Driver name match (v4l2_focuser_stub)
NvPclCreateDriver: Found NvPcl Driver Hal dev_name match (v4l2_sensor)
NvPclCreateDriver: Found a Driver name match (v4l2_sensor)
NvPclConnectDrivers: hImager was NULL, creating new imager
NvPclInitializeDrivers: v4l2_focuser_stub ++++++++++++++++++
NvPclDriver_V4L2_Focuser_Stub_Initialize WARNING: No focuser object, allocating for lens
NvPclDriver_V4L2_Focuser_Stub_Initialize: Loaded focuser static properties--------------
NvPclInitializeDrivers: NvOdmLensStub ------------------
NvPclInitializeDrivers: v4l2_sensor ++++++++++++++++++
OFDPropertyGetString: could not read property [devnode-bus]
initialize: ov5693 6-0036
OFDPropertyGetString: could not read property [use_decibel_gain]
OFDPropertyGetString: could not read property [use_sensor_mode_id]
OFDPropertyCopyToLong: could not read property [has-eeprom]
Control Frame Rate not found
Control Exposure not found
Sensor_FindCustomCIDs: calculated MaxCoarseDiff 6
Sensor_LoadBinaryBlob: Binary read 8
Sensor_LoadBinaryBlob: Binary read 512
OFDPropertyGetString: could not read property [type]
Sensor_LoadSubType: Sensor type missing in DT, 502

OFDPropertyCopyToLong: could not read property [mode0.csi_pixel_bit_depth]
OFDPropertyCopyToLong: could not read property [mode0.dynamic_pixel_bit_depth]
OFDPropertyGetString: could not read property [mode0.mode_type]
Sensor_LoadModeModeType: mode 0: Failed to load pixeltype
OFDPropertyGetString: could not read property [mode0.pixel_phase]
Sensor_LoadModePixelPhase: mode 0: Failed to load pixeltype
OFDPropertyGetString: could not read property [mode0.x_start]
OFDPropertyGetString: could not read property [mode0.y_start]
OFDPropertyGetString: could not read property [mode0.x_end]
OFDPropertyGetString: could not read property [mode0.y_end]
OFDPropertyGetString: could not read property [mode0.h_scaling]
OFDPropertyGetString: could not read property [mode0.v_scaling]
OFDPropertyCopyToLong: could not read property [mode1.csi_pixel_bit_depth]
OFDPropertyCopyToLong: could not read property [mode1.dynamic_pixel_bit_depth]
OFDPropertyGetString: could not read property [mode1.mode_type]
Sensor_LoadModeModeType: mode 1: Failed to load pixeltype
OFDPropertyGetString: could not read property [mode1.pixel_phase]
Sensor_LoadModePixelPhase: mode 1: Failed to load pixeltype
OFDPropertyGetString: could not read property [mode1.x_start]
OFDPropertyGetString: could not read property [mode1.y_start]
OFDPropertyGetString: could not read property [mode1.x_end]
OFDPropertyGetString: could not read property [mode1.y_end]
OFDPropertyGetString: could not read property [mode1.h_scaling]
OFDPropertyGetString: could not read property [mode1.v_scaling]
OFDPropertyCopyToLong: could not read property [mode2.csi_pixel_bit_depth]
OFDPropertyCopyToLong: could not read property [mode2.dynamic_pixel_bit_depth]
OFDPropertyGetString: could not read property [mode2.mode_type]
Sensor_LoadModeModeType: mode 2: Failed to load pixeltype
OFDPropertyGetString: could not read property [mode2.pixel_phase]
Sensor_LoadModePixelPhase: mode 2: Failed to load pixeltype
OFDPropertyGetString: could not read property [mode2.x_start]
OFDPropertyGetString: could not read property [mode2.y_start]
OFDPropertyGetString: could not read property [mode2.x_end]
OFDPropertyGetString: could not read property [mode2.y_end]
OFDPropertyGetString: could not read property [mode2.h_scaling]
OFDPropertyGetString: could not read property [mode2.v_scaling]
NvPclDriver_V4L2_Sensor_Initialize: Loaded Driver: 3 Modes Available--------------
NvPclInitializeDrivers: v4l2_sensor ------------------
NvPclOpen: ----------------------
populateStaticProperties

populateStaticProperties

sourceRegistry[0] assigned

ispRegistry[0] assigned

Using Source GUID 0

NvPclPowerOn: +++++++++++
NvPclPowerOn: -----------
Using ISP A

AC plugin not present: dlopen "acplugin.so", acplugin.so: cannot open shared object file: No such file or directory

No library found, disabling AC plugin.

SCF: Error InsufficientMemory: Unable to create GL context (in src/services/gl/GLService.cpp, function createContextInternal(), line 314)
SCF: Error InsufficientMemory:  (propagating from src/services/gl/GLService.cpp, function createGLES2Context(), line 379)
SCF: Error InsufficientMemory:  (propagating from src/components/stages/AOHDRDeinterleaveStage.cpp, function doAsyncInitialize(), line 113)
SCF: Error InsufficientMemory: AoHdrDeinterleaveStage initialization failed (in src/components/stages/AOHDRDeinterleaveStage.cpp, function doAsyncInitialize(), line 138)
FNET: Error in /dvs/git/dirty/git-master_linux/camera/utils/nvfnet/src/backends/OpenGL/OpenGLEGL.cpp function createContext() line 212
	Unable to create GL context
FNET: Error in /dvs/git/dirty/git-master_linux/camera/utils/nvfnet/src/backends/OpenGL/OpenGLEGL.cpp function initialize() line 93
	(propagating)
SCF: Error InsufficientMemory: Unable to create GL context (in src/services/gl/GLService.cpp, function createContextInternal(), line 314)
SCF: Error InsufficientMemory:  (propagating from src/services/gl/GLService.cpp, function createGLContext(), line 354)
SCF: Error InsufficientMemory:  (propagating from src/components/stages/GpuBlitStage.cpp, function initialize(), line 55)
SCF: Error InsufficientMemory:  (propagating from src/components/stages/GpuBlitStage.cpp, function doAsyncInitialize(), line 692)
FNET: Error in /dvs/git/dirty/git-master_linux/camera/utils/nvfnet/src/backends/OpenGL/OpenGLEGL.cpp function createContext() line 212
	Unable to create GL context
FNET: Error in /dvs/git/dirty/git-master_linux/camera/utils/nvfnet/src/backends/OpenGL/OpenGLEGL.cpp function createContext() line 212
	Unable to create GL context
FNET: Error in /dvs/git/dirty/git-master_linux/camera/utils/nvfnet/src/backends/OpenGL/OpenGLEGL.cpp function createGLContext() line 219
	(propagating)
FNET: Error in /dvs/git/dirty/git-master_linux/camera/utils/nvfnet/src/backends/OpenGL/OpenGLEGL.cpp function createGLContext() line 219
	(propagating)
FNET: Error in /dvs/git/dirty/git-master_linux/camera/utils/nvfnet/src/backends/OpenGL/OpenGL.cpp function initialize() line 146
	(propagating)
FNET: Error in /dvs/git/dirty/git-master_linux/camera/utils/nvfnet/src/backends/OpenGL/OpenGL.cpp function initialize() line 146
	(propagating)
FNET: Error in /dvs/git/dirty/git-master_linux/camera/utils/nvfnet/src/backends/OpenGL/backendOpenGL.cpp function initialize() line 173
	(propagating)
FNET: Error in /dvs/git/dirty/git-master_linux/camera/utils/nvfnet/src/backends/OpenGL/backendOpenGL.cpp function initialize() line 173
	(propagating)
FNET: Error in /dvs/git/dirty/git-master_linux/camera/utils/nvfnet/src/backends/backend.cpp function create() line 34
	(propagating)
FNET: Error in /dvs/git/dirty/git-master_linux/camera/utils/nvfnet/src/backends/backend.cpp function create() line 34
	(propagating)
SCF: Error InsufficientMemory:  (propagating from src/components/stages/AoltmStage.cpp, function doAsyncInitialize(), line 77)
SCF: Error InsufficientMemory: AoltmStage initialization failed (in src/components/stages/AoltmStage.cpp, function doAsyncInitialize(), line 129)
SCF: Error InsufficientMemory:  (propagating from src/components/stages/HdfxStage.cpp, function doAsyncInitialize(), line 121)
SCF: Error InsufficientMemory: HdfxStage initialization failed (in src/components/stages/HdfxStage.cpp, function doAsyncInitialize(), line 243)
FNET: Error in /dvs/git/dirty/git-master_linux/camera/utils/nvfnet/src/backends/OpenGL/OpenGLEGL.cpp function createContext() line 212
	Unable to create GL context
FNET: Error in /dvs/git/dirty/git-master_linux/camera/utils/nvfnet/src/backends/OpenGL/OpenGLEGL.cpp function createGLContext() line 219
	(propagating)
FNET: Error in /dvs/git/dirty/git-master_linux/camera/utils/nvfnet/src/backends/OpenGL/OpenGL.cpp function initialize() line 146
	(propagating)
FNET: Error in /dvs/git/dirty/git-master_linux/camera/utils/nvfnet/src/backends/OpenGL/backendOpenGL.cpp function initialize() line 173
	(propagating)
FNET: Error in /dvs/git/dirty/git-master_linux/camera/utils/nvfnet/src/backends/backend.cpp function create() line 34
	(propagating)
SCF: Error InsufficientMemory:  (propagating from src/components/stages/DeFogStage.cpp, function doAsyncInitialize(), line 69)
SCF: Error InsufficientMemory: DeFogStage initialization failed (in src/components/stages/DeFogStage.cpp, function doAsyncInitialize(), line 146)
FNET: Error in /dvs/git/dirty/git-master_linux/camera/utils/nvfnet/src/backends/OpenGL/OpenGLEGL.cpp function createContext() line 212
	Unable to create GL context
FNET: Error in /dvs/git/dirty/git-master_linux/camera/utils/nvfnet/src/backends/OpenGL/OpenGLEGL.cpp function createGLContext() line 219
	(propagating)
FNET: Error in /dvs/git/dirty/git-master_linux/camera/utils/nvfnet/src/backends/OpenGL/OpenGL.cpp function initialize() line 146
	(propagating)
FNET: Error in /dvs/git/dirty/git-master_linux/camera/utils/nvfnet/src/backends/OpenGL/backendOpenGL.cpp function initialize() line 173
	(propagating)
FNET: Error in /dvs/git/dirty/git-master_linux/camera/utils/nvfnet/src/backends/backend.cpp function create() line 34
	(propagating)
SCF: Error InsufficientMemory:  (propagating from src/components/stages/SharpenStage.cpp, function doAsyncInitialize(), line 152)
SCF: Error InsufficientMemory: AoltmStage initialization failed (in src/components/stages/SharpenStage.cpp, function doAsyncInitialize(), line 178)

Available Sensor modes : 
2592 x 1944 FR=30.000000 CF=0x1009208a10 SensorModeType=4 CSIPixelBitDepth=10 DynPixelBitDepth=10
2592 x 1458 FR=30.000000 CF=0x1009208a10 SensorModeType=4 CSIPixelBitDepth=10 DynPixelBitDepth=10
1280 x 720 FR=120.000000 CF=0x1009208a10 SensorModeType=4 CSIPixelBitDepth=10 DynPixelBitDepth=10
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock

NvCameraSrc: Trying To Set Default Camera Resolution. Selected 640x480 FrameRate = 30.000000 ...

NvPclSettingsUpdate: Sending Updated Settings through PCL
NvPclSettingsApply: Applying last settings through PCL
NvPclDriver_V4L2_Sensor_Write:+++++++++++++++++++++++
Sensor_WriteMode: Target mode Id(1): Resolution 2592x1458
Sensor_GetV4LPixelType: pixel type 0x101 invalid
setActiveBufferMemory: 2
setActivePixelFormat: 808535890
INPUT: Width 2592 Height 1944 pixelformat RG10

INPUT: Width 2592 Height 1458 pixelformat RG10

Sensor_WriteFrameRate:	INPUT frameLength:1984, frameRate:30.000000
Sensor_WriteGain:	INPUT gainCtrl:100 analogGain:1.000000
Sensor_WriteExposure:	INPUT coarseTime:1978, expTime:0.033230
NvPclDriver_UpdateOutputSettings:	OUTPUT frameLength:1984, frameRate:30.001921
NvPclDriver_UpdateOutputSettings:	OUTPUT analogGain:1.000000
NvPclDriver_UpdateOutputSettings:	OUTPUT coarseTime:1978, expTime:0.033230
NvPclDriver_V4L2_Sensor_Write:-----------------------
NvPclSettingsApply: Reading PCL settings
NvPclSettingsUpdate: Sending Updated Settings through PCL
NvPclSettingsApply: Applying last settings through PCL
NvPclDriver_V4L2_Sensor_Write:+++++++++++++++++++++++
Socket read error. Camera Daemon stopped functioning.....
ERROR: from element /GstPipeline:pipeline0/GstNvCameraSrc:nvcamerasrc0: Internal data flow error.
Additional debug info:
gstbasesrc.c(2948): gst_base_src_loop (): /GstPipeline:pipeline0/GstNvCameraSrc:nvcamerasrc0:
streaming task paused, reason not-negotiated (-4)
Execution ended after 0:00:00.037850225
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

Below error should be the key point. The possible cause should be relative to the display or the X11 didn’t launch.

SCF: Error InsufficientMemory: Unable to create GL context (in src/services/gl/GLService.cpp, function createContextInternal(), line 314)

Actually, X11 did launch and works fine.

I have had only one successfull kernel build which made nvcamerasrc work. And there does not seem to be much difference among that build and other ones.

Is there anything specific I should look at concerning GL?
As I said X11 did launch and works fine. Since we do not have access to the specified source code - could you please point what exactly should I check to make it work?

Hi sergeyk789

Your problem seems didn’t relative with this topic. Could you please post you problem to another topic? And please write down detail information like JEP version and how do you repo this problem.

Hi, I will be working on the same task to make IMX219 work with nvcamerasrc, I will keep you posted with the progress

Hello ShaneCCC

I’ve create topic on my issue: https://devtalk.nvidia.com/default/topic/975737/jetson-tx1/scf-error-insufficientmemory-unable-to-create-gl-context-/

It would be greate if you could help! Thank you in advance!

About nvcamerasrc working with other camera sensors we were able to get it up and running with other sensors:

https://devtalk.nvidia.com/default/topic/975962/support-for-raspberry-pi-v2-imx219-and-v1-ov5647-cameras-using-isp-multi-camera/