Hi there,
Trying to debug basic issues with the nvarguscamerasrc that seems to refuse to work with our AR1335 and IMX565 cameras.
Running on a jAXi on a custom carrier board.
The cameras seems to work when using the sample camera_recording program from /usr/src/jetson_multimedia_api/samples/10_camera_recording/
$ /usr/src/jetson_multimedia_api/samples/10_camera_recording/camera_recording -r 4208x3120 -t H265 -d 2 -f /dev/null
Set governor to performance before enabling profiler
PRODUCER: Creating output stream
[ 8904.185176] nvmap_alloc_handle: PID 11104: camera_recordin: WARNING: All NvMap Allocations must have a tag to identify the subsystem allocating memory.Please pass the tag to the API call NvRmMemHanldeAllocAttr() or relevant.
PRODUCER: Launching consumer thread
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 8
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 8
892744264
842091865
create video encoder return true
NVMEDIA: H265 : Profile : 1
PRODUCER: Starting repeat capture requests.
CONSUMER: Got EOS, exiting...
CONSUMER: Done.
PRODUCER: Done -- exiting.
************************************
Total Profiling Time = 0 sec
************************************
This is the simplest test I could almost get running, except for nvbuf_utils errors:
$ gst-launch-1.0 nvarguscamerasrc sensor-id=0 sensor-mode=3 timeout=2 ! 'video/x-raw(memory:NVMM),format=(string)NV12,framerate=(fraction)24/1' ! nvvidconv ! 'video/x-raw,format=(string)NV12' ! fakesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 4208 x 3120 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 24.000000; Exposure Range min 2000, max 660000000;
GST_ARGUS: 3840 x 2160 FR = 40.000000 fps Duration = 25000000 ; Analog Gain range min 1.000000, max 24.000000; Exposure Range min 2000, max 660000000;
GST_ARGUS: 1920 x 1080 FR = 77.999999 fps Duration = 12820513 ; Analog Gain range min 1.000000, max 24.000000; Exposure Range min 2000, max 660000000;
GST_ARGUS: 4208 x 3120 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 24.000000; Exposure Range min 2000, max 660000000;
GST_ARGUS: 3840 x 2160 FR = 40.000000 fps Duration = 25000000 ; Analog Gain range min 1.000000, max 24.000000; Exposure Range min 2000, max 660000000;
GST_ARGUS: 1920 x 1080 FR = 77.999999 fps Duration = 12820513 ; Analog Gain range min 1.000000, max 24.000000; Exposure Range min 2000, max 660000000;
GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 3
Output Stream W = 4208 H = 3120
seconds to Run = 2
Frame Rate = 28.000001
GST_ARGUS: Setup Complete, Starting captures for 2 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
nvbuf_utils: Can not get HW buffer from FD... Exiting...
CONSUMER: ERROR OCCURRED
ERROR: from element /GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0: CANCELLED
Additional debug info:
Argus Error Status
Execution ended after 0:00:00.638147328
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
GST_ARGUS: Cleaning up
(Argus) Error Timeout: (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137)
(Argus) Error Timeout: (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
(Argus) Error Timeout: (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137)
(Argus) Error Timeout: (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
Setting pipeline to NULL ...
Freeing pipeline ...
(Argus) Error Timeout: (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137)
(Argus) Error Timeout: (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
(Argus) Error InvalidState: Argus client is exiting with 3 outstanding client threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 357)
These are the logs for nvargus-daemon (which needs restarting in order to reproduce the problem… seems to get stuck after first run).
[ 4076.800220] nvargus-daemon[9813]: === NVIDIA Libargus Camera Service (0.98.3)=== Listening for connections...=== gst-launch-1.0[9855]: Connection established (7F7B7051D0)OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module0
[ 4076.823382] nvargus-daemon[9813]: OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module2
[ 4076.855144] nvargus-daemon[9813]: OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module4
[ 4076.878702] nvargus-daemon[9813]: NvPclHwGetModuleList: WARNING: Could not map module to ISP config string
[ 4076.878702] nvargus-daemon[9813]: NvPclHwGetModuleList: No module data found
[ 4076.878702] nvargus-daemon[9813]: NvPclHwGetModuleList: WARNING: Could not map module to ISP config string
[ 4076.878702] nvargus-daemon[9813]: NvPclHwGetModuleList: No module data found
[ 4076.879863] nvargus-daemon[9813]: NvPclHwGetModuleList: WARNING: Could not map module to ISP config string
[ 4076.879863] nvargus-daemon[9813]: NvPclHwGetModuleList: No module data found
[ 4077.058887] nvargus-daemon[9813]: OFParserGetVirtualDevice: NVIDIA Camera virtual enumerator not found in proc device-tree
[ 4077.058887] nvargus-daemon[9813]: ---- imager: No override file found. ----
[ 4077.143836] nvargus-daemon[9813]: (NvCamV4l2) Error ModuleNotPresent: V4L2Device not available (in /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function findDevice(), line 256)
[ 4077.144514] nvargus-daemon[9813]: (NvCamV4l2) Error ModuleNotPresent: (propagating from /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function initialize(), line 60)
[ 4077.144897] nvargus-daemon[9813]: (NvOdmDevice) Error ModuleNotPresent: (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function initialize(), line 107)
[ 4077.145306] nvargus-daemon[9813]: NvPclDriverInitializeData: Unable to initialize driver v4l2_sensor
[ 4077.145619] nvargus-daemon[9813]: NvPclInitializeDrivers: error: Failed to init camera sub module v4l2_sensor
[ 4077.145952] nvargus-daemon[9813]: NvPclStartPlatformDrivers: Failed to start module drivers
[ 4077.146380] nvargus-daemon[9813]: NvPclStateControllerOpen: Failed ImagerGUID 0. (error 0xA000E)
[ 4077.146677] nvargus-daemon[9813]: NvPclOpen: PCL Open Failed. Error: 0xf
[ 4077.147021] nvargus-daemon[9813]: SCF: Error BadParameter: Sensor could not be opened. (in src/services/capture/CaptureServiceDeviceSensor.cpp, function getSourceFromGuid(), line 593)
[ 4077.147332] nvargus-daemon[9813]: SCF: Error BadParameter: (propagating from src/services/capture/CaptureService.cpp, function addSourceByGuid(), line 437)
[ 4077.147576] nvargus-daemon[9813]: SCF: Error BadParameter: (propagating from src/api/CameraDriver.cpp, function addSourceByIndex(), line 305)
[ 4077.147818] nvargus-daemon[9813]: SCF: Error BadParameter: (propagating from src/api/CameraDriver.cpp, function getSource(), line 471)
[ 4077.148384] nvargus-daemon[9813]: Acquiring SCF Camera device source via index 0 has failed. ---- imager: No override file found. ----
[ 4077.229660] nvargus-daemon[9813]: (NvCamV4l2) Error ModuleNotPresent: V4L2Device not available (in /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function findDevice(), line 256)
[ 4077.230133] nvargus-daemon[9813]: (NvCamV4l2) Error ModuleNotPresent: (propagating from /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function initialize(), line 60)
[ 4077.230447] nvargus-daemon[9813]: (NvOdmDevice) Error ModuleNotPresent: (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function initialize(), line 107)
[ 4077.230879] nvargus-daemon[9813]: NvPclDriverInitializeData: Unable to initialize driver v4l2_sensor
[ 4077.231180] nvargus-daemon[9813]: NvPclInitializeDrivers: error: Failed to init camera sub module v4l2_sensor
[ 4077.231479] nvargus-daemon[9813]: NvPclStartPlatformDrivers: Failed to start module drivers
[ 4077.231811] nvargus-daemon[9813]: NvPclStateControllerOpen: Failed ImagerGUID 2. (error 0xA000E)
[ 4077.232201] nvargus-daemon[9813]: NvPclOpen: PCL Open Failed. Error: 0xf
[ 4077.232516] nvargus-daemon[9813]: SCF: Error BadParameter: Sensor could not be opened. (in src/services/capture/CaptureServiceDeviceSensor.cpp, function getSourceFromGuid(), line 593)
[ 4077.232829] nvargus-daemon[9813]: SCF: Error BadParameter: (propagating from src/services/capture/CaptureService.cpp, function addSourceByGuid(), line 437)
[ 4077.233070] nvargus-daemon[9813]: SCF: Error BadParameter: (propagating from src/api/CameraDriver.cpp, function addSourceByIndex(), line 305)
[ 4077.233302] nvargus-daemon[9813]: SCF: Error BadParameter: (propagating from src/api/CameraDriver.cpp, function getSource(), line 471)
[ 4077.233723] nvargus-daemon[9813]: Acquiring SCF Camera device source via index 1 has failed. ---- imager: No override file found. ----
[ 4077.512161] nvargus-daemon[9813]: LSC: LSC surface is not based on full res!
[ 4077.532404] nvargus-daemon[9813]: E/ libnvphs:socket: Error[2]: socket connection /var/lib/nvphs/nvphsd.ctl to PHS failed: No such file or directory
[ 4077.532800] nvargus-daemon[9813]: D/ libnvphs:socket: Warning: connecting to Power Hinting Service failed. Is PHS running?
[ 4077.533103] nvargus-daemon[9813]: === gst-launch-1.0[9855]: CameraProvider initialized (0x7f749a2d00)SCF: Error BadValue: NvPHSSendThroughputHints (in src/common/CameraPowerHint.cpp, function sendCameraPowerHint(), line 56)
[ 4077.533375] nvargus-daemon[9813]: E/ libnvphs:socket: Error[2]: socket connection /var/lib/nvphs/nvphsd.ctl to PHS failed: No such file or directory
[ 4077.533579] nvargus-daemon[9813]: D/ libnvphs:socket: Warning: connecting to Power Hinting Service failed. Is PHS running?
[ 4077.533816] nvargus-daemon[9813]: E/ libnvphs: Error: NvPHSSendThroughputHints[usecase=camera, hint=MinCPU, value=4294967295, timeout_ms=1000]: queue_or_send() failed
[ 4077.558561] nvargus-daemon[9813]: LSC: LSC surface is not based on full res!
[ 4077.946928] kernel: [RCE] vi5_hwinit: firmware CL2018101701 protocol version 2.2
[ 4078.160408] nvargus-daemon[9813]: (NvCapture) Error BadParameter: Invalid NvCsi pixelBitDepth: 0x8 (in /dvs/git/dirty/git-master_linux/camera/capture/nvcapture/capture.c, function NvCaptureCsiGetDataType(), line 2212)
[ 4078.161822] nvargus-daemon[9813]: (NvCapture) Error BadParameter: Unsupported source color format 1709208a10 (in /dvs/git/dirty/git-master_linux/camera/capture/nvcapture/capture_t19x.c, function NvCaptureConfigSetSourceFormatT19x(), line 181)
[ 4078.162114] nvargus-daemon[9813]: (NvCapture) Error BadParameter: (propagating from /dvs/git/dirty/git-master_linux/camera/capture/nvcapture/capture.c, function NvCaptureRequestSetAttribute(), line 1770)
[ 4078.162359] nvargus-daemon[9813]: SCF: Error BadParameter: (propagating from src/services/capture/NvCaptureViCsiHw.cpp, function startCaptureInternal(), line 649)
[ 4078.162656] nvargus-daemon[9813]: SCF: Error BadParameter: (propagating from src/services/capture/CaptureRecord.cpp, function doCSItoMemCapture(), line 532)
[ 4078.162937] nvargus-daemon[9813]: SCF: Error BadParameter: (propagating from src/services/capture/CaptureRecord.cpp, function issueCapture(), line 469)
[ 4078.163237] nvargus-daemon[9813]: SCF: Error BadParameter: (propagating from src/services/capture/CaptureServiceDevice.cpp, function issueCaptures(), line 1295)
[ 4078.163496] nvargus-daemon[9813]: SCF: Error BadParameter: (propagating from src/services/capture/CaptureServiceDevice.cpp, function issueCaptures(), line 1126)
[ 4078.163865] nvargus-daemon[9813]: SCF: Error BadParameter: (propagating from src/common/Utils.cpp, function workerThread(), line 116)
[ 4078.164181] nvargus-daemon[9813]: SCF: Error BadParameter: Worker thread CaptureScheduler frameStart failed (in src/common/Utils.cpp, function workerThread(), line 133)
[ 4078.264328] nvargus-daemon[9813]: SCF: Error Timeout: (propagating from src/api/Buffer.cpp, function waitForUnlock(), line 643)
[ 4078.264328] nvargus-daemon[9813]: SCF: Error Timeout: (propagating from src/components/CaptureContainerImpl.cpp, function returnBuffer(), line 363)
[ 4086.758497] nvargus-daemon[9813]: SCF: Error Timeout: (propagating from src/services/capture/CaptureServiceEvent.cpp, function wait(), line 59)
[ 4086.766325] nvargus-daemon[9813]: Error: Camera HwEvents wait, this may indicate a hardware timeout occured,abort current/incoming cc
[ 4138.531295] nvargus-daemon[9813]: SCF: Error InvalidState: 1 buffers still pending during EGLStreamProducer destruction (propagating from src/services/gl/EGLStreamProducer.cpp, function freeBuffers(), line 309)
[ 4138.532537] nvargus-daemon[9813]: SCF: Error InvalidState: (propagating from src/services/gl/EGLStreamProducer.cpp, function ~EGLStreamProducer(), line 50)
[ 4143.541443] nvargus-daemon[9813]: waitForIdleLocked remaining request 102
[ 4143.541443] nvargus-daemon[9813]: SCF: Error Timeout: waitForIdle() timed out (in src/api/Session.cpp, function waitForIdleLocked(), line 927)
[ 4143.541443] nvargus-daemon[9813]: (Argus) Error Timeout: (propagating from src/api/CaptureSessionImpl.cpp, function destroy(), line 169)
As usual, gst-launch does not give many hints about parameters that need to be specified, etc… e.g. I needed to specify the framerate to avoid a complain about exceeding framerate, etc.
Any ideas of what could be wrong?
Let me know if some DT or any other information is needed.
P.S.
Some version info.
$ sudo apt list gstreamer1.0-tools gstreamer1.0-alsa gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav
[sudo] password for sen:
Listing... Done
gstreamer1.0-alsa/now 1.14.5-0ubuntu1~18.04.3 arm64 [installed,local]
gstreamer1.0-libav/now 1.14.5-0ubuntu1~18.04.1 arm64 [installed,local]
gstreamer1.0-plugins-bad/now 1.14.5-0ubuntu1~18.04.1 arm64 [installed,local]
gstreamer1.0-plugins-base/now 1.14.5-0ubuntu1~18.04.3 arm64 [installed,local]
gstreamer1.0-plugins-good/now 1.14.5-0ubuntu1~18.04.3 arm64 [installed,local]
gstreamer1.0-plugins-ugly/now 1.14.5-0ubuntu1~18.04.1 arm64 [installed,local]
gstreamer1.0-tools/now 1.14.5-0ubuntu1~18.04.2 arm64 [installed,local]