Hi Nvidia support team,
I’m facing a problem when trying to stream on Wayland graphics using nvarguscamerasrc.
Below is my procedure:
- Start weston
mypc@ubuntu:~$ nvstart-weston.sh
[sudo] password for mypc:
Launching weston...
!!! Weston launched successfully !!!
Weston startup log at:/tmp/weston-startup.log
To exit weston gracefully, execute:
pkill -15 weston
Execute the following steps before starting X11 again:
pkill -15 weston
sudo rmmod tegra-udrm
- Try streaming using v4l2-ctrl
mypc@ubuntu:~$ v4l2-ctl -d /dev/video0 --set-fmt-video=width=3840,height=2160,pixelformat=RG10 --set-ctrl sensor_mode=0 --stream-mmap --stream-count=50
<<<<<<<<<<<<<<<<<<<<<<<<<< 23.44 fps
<<<<<<<<<<<<<<<<<<< 21.64 fps
<<<<<
- Stream video and error
mypc@ubuntu:~$ gst-launch-1.0 -v nvarguscamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM),width=3840,height=2160,format=(string)NV12,framerate=(fraction)30/1' ! nvcompositor ! autovideosink
Setting pipeline to PAUSED ...
Using winsys: x11
Using winsys: x11
Pipeline is live and does not need PREROLL ...
Got context from element 'autovideosink0-actual-sink-nveglgles': gst.egl.EGLDisplay=context, display=(GstEGLDisplay)NULL;
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)3840, height=(int)2160, format=(string)NV12, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)3840, height=(int)2160, format=(string)NV12, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstNvCompositor:nvcompositor0.GstNvCompositorPad:sink_0: caps = video/x-raw(memory:NVMM), width=(int)3840, height=(int)2160, format=(string)NV12, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)3840, height=(int)2160, format=(string)NV12, framerate=(fraction)30/1
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3840 x 2160 FR = 29,999999 fps Duration = 33333334 ; Analog Gain range min 1,000000, max 22,250000; Exposure Range min 13000, max 683709000;
GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 0
Output Stream W = 3840 H = 2160
seconds to Run = 0
Frame Rate = 29,999999
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
/GstPipeline:pipeline0/GstNvCompositor:nvcompositor0.GstAggregatorPad:src: caps = video/x-raw(memory:NVMM), format=(string)RGBA, width=(int)3840, height=(int)2160, framerate=(fraction)30/1, chroma-site=(string)NULL, colorimetry=(string)sRGB
/GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0.GstGhostPad:sink.GstProxyPad:proxypad0: caps = video/x-raw(memory:NVMM), format=(string)RGBA, width=(int)3840, height=(int)2160, framerate=(fraction)30/1, chroma-site=(string)NULL, colorimetry=(string)sRGB
/GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0.GstGhostPad:sink: caps = video/x-raw(memory:NVMM), format=(string)RGBA, width=(int)3840, height=(int)2160, framerate=(fraction)30/1, chroma-site=(string)NULL, colorimetry=(string)sRGB
Redistribute latency...
/GstPipeline:pipeline0/GstNvCompositor:nvcompositor0.GstAggregatorPad:src: caps = video/x-raw(memory:NVMM), format=(string)RGBA, width=(int)3840, height=(int)2160, framerate=(fraction)30/1, chroma-site=(string)NULL, colorimetry=(string)sRGB
/GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0.GstGhostPad:sink.GstProxyPad:proxypad0: caps = video/x-raw(memory:NVMM), format=(string)RGBA, width=(int)3840, height=(int)2160, framerate=(fraction)30/1, chroma-site=(string)NULL, colorimetry=(string)sRGB
/GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0.GstGhostPad:sink: caps = video/x-raw(memory:NVMM), format=(string)RGBA, width=(int)3840, height=(int)2160, framerate=(fraction)30/1, chroma-site=(string)NULL, colorimetry=(string)sRGB
ERROR: from element /GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3072): gst_base_src_loop (): /GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:00.866657344
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
GST_ARGUS: Cleaning up
CONSUMER: Done Success
GST_ARGUS: Done Success
^C
Here is the syslog when streaming using gst-launch-1.0:
root@ubuntu:/home/mypc# tail -f /var/log/syslog
Apr 21 19:58:00 ubuntu kernel: [ 210.181856] [RCE] tegra_nvcsi_stream_close(vm0, stream=0, csi=0)
Apr 21 19:58:29 ubuntu kernel: [ 239.917917] [RCE] VM0 deactivating.VM0 activating.NVCSILP clock rate = 204000000 Hz.
Apr 21 19:58:30 ubuntu nvargus-daemon[1144]: === NVIDIA Libargus Camera Service (0.98.3)=== Listening for connections...=== gst-launch-1.0[2168]: Connection established (FFFFB8A3C900)OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module0
Apr 21 19:58:30 ubuntu nvargus-daemon[1144]: NvPclHwGetModuleList: WARNING: Could not map module to ISP config string
Apr 21 19:58:30 ubuntu nvargus-daemon[1144]: NvPclHwGetModuleList: No module data found
Apr 21 19:58:30 ubuntu kernel: [ 240.098830] tegra-xusb 3610000.xhci: Firmware timestamp: 2022-03-16 11:07:43 UTC, Version: 60.13 release
Apr 21 19:58:30 ubuntu nvargus-daemon[1144]: (NvCamV4l2) Error ModuleNotPresent: V4L2Device not available (in /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function verifyDeviceCaps(), line 206)
Apr 21 19:58:30 ubuntu nvargus-daemon[1144]: (NvCamV4l2) Error ModuleNotPresent: (propagating from /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function initialize(), line 66)
Apr 21 19:58:30 ubuntu nvargus-daemon[1144]: (NvCamV4l2) Error ModuleNotPresent: V4L2Device not available (in /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function verifyDeviceCaps(), line 206)
Apr 21 19:58:30 ubuntu nvargus-daemon[1144]: (NvCamV4l2) Error ModuleNotPresent: (propagating from /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function initialize(), line 66)
Apr 21 19:58:30 ubuntu nvargus-daemon[1144]: OFParserGetVirtualDevice: NVIDIA Camera virtual enumerator not found in proc device-tree
Apr 21 19:58:30 ubuntu nvargus-daemon[1144]: ---- imager: No override file found. ----
Apr 21 19:58:30 ubuntu nvargus-daemon[1144]: LSC: LSC surface is not based on full res!
Apr 21 19:58:30 ubuntu nvargus-daemon[1144]: ---- imager: No override file found. ----
Apr 21 19:58:30 ubuntu nvargus-daemon[1144]: initializeDevNode: Failed to open dev node '/dev/camera/video1'; No such file or directory, trying alternate default location
Apr 21 19:58:30 ubuntu nvargus-daemon[1144]: (NvCamV4l2) Error BadParameter: Control 10094858 not found (in /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function findControlById(), line 1874)
Apr 21 19:58:30 ubuntu nvargus-daemon[1144]: (NvCamV4l2) Error BadParameter: (propagating from /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function getControlRange(), line 331)
Apr 21 19:58:30 ubuntu nvargus-daemon[1144]: initialize: focus query failed
Apr 21 19:58:30 ubuntu nvargus-daemon[1144]: SCF: Error BadParameter: (propagating from src/services/capture/CaptureServiceDeviceSensor.cpp, function open(), line 189)
Apr 21 19:58:30 ubuntu nvargus-daemon[1144]: SCF: Error BadParameter: (propagating from src/services/capture/CaptureServiceDeviceSensor.cpp, function getSourceFromGuid(), line 643)
Apr 21 19:58:30 ubuntu nvargus-daemon[1144]: SCF: Error BadParameter: (propagating from src/services/capture/CaptureService.cpp, function addSourceByGuid(), line 437)
Apr 21 19:58:30 ubuntu nvargus-daemon[1144]: SCF: Error BadParameter: (propagating from src/api/CameraDriver.cpp, function addSourceByIndex(), line 311)
Apr 21 19:58:30 ubuntu nvargus-daemon[1144]: SCF: Error BadParameter: (propagating from src/api/CameraDriver.cpp, function getSource(), line 477)
Apr 21 19:58:30 ubuntu nvargus-daemon[1144]: Acquiring SCF Camera device source via index 1 has failed. ---- imager: No override file found. ----
Apr 21 19:58:30 ubuntu nvargus-daemon[1144]: initializeDevNode: Failed to open dev node '/dev/camera/video2'; No such file or directory, trying alternate default location
Apr 21 19:58:30 ubuntu nvargus-daemon[1144]: (NvCamV4l2) Error NotSupported: Must be capture/output devices (in /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function setActiveBufferType(), line 813)
Apr 21 19:58:30 ubuntu nvargus-daemon[1144]: (NvCamV4l2) Error NotSupported: (propagating from /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function initialize(), line 68)
Apr 21 19:58:30 ubuntu nvargus-daemon[1144]: (NvOdmDevice) Error NotSupported: (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorNonViCsi.cpp, function initialize(), line 146)
Apr 21 19:58:30 ubuntu nvargus-daemon[1144]: NvPclDriverInitializeData: Unable to initialize driver v4l2_sensor_usb
Apr 21 19:58:30 ubuntu nvargus-daemon[1144]: NvPclInitializeDrivers: error: Failed to init camera sub module v4l2_sensor_usb
Apr 21 19:58:30 ubuntu nvargus-daemon[1144]: NvPclStartPlatformDrivers: Failed to start module drivers
Apr 21 19:58:30 ubuntu nvargus-daemon[1144]: NvPclStateControllerOpen: Failed ImagerGUID 2. (error 0x2)
Apr 21 19:58:30 ubuntu nvargus-daemon[1144]: NvPclOpen: PCL Open Failed. Error: 0xf
Apr 21 19:58:30 ubuntu nvargus-daemon[1144]: SCF: Error BadParameter: Sensor could not be opened. (in src/services/capture/CaptureServiceDeviceSensor.cpp, function getSourceFromGuid(), line 646)
Apr 21 19:58:30 ubuntu nvargus-daemon[1144]: SCF: Error BadParameter: (propagating from src/services/capture/CaptureService.cpp, function addSourceByGuid(), line 437)
Apr 21 19:58:30 ubuntu nvargus-daemon[1144]: SCF: Error BadParameter: (propagating from src/api/CameraDriver.cpp, function addSourceByIndex(), line 311)
Apr 21 19:58:30 ubuntu nvargus-daemon[1144]: SCF: Error BadParameter: (propagating from src/api/CameraDriver.cpp, function getSource(), line 477)
Apr 21 19:58:32 ubuntu nvargus-daemon: E/ libnvphs:socket: Error[2]: socket connection /var/lib/nvphs/nvphsd.ctl to PHS failed: No such file or directory
Apr 21 19:58:32 ubuntu nvargus-daemon: D/ libnvphs:socket: Warning: connecting to Power Hinting Service failed. Is PHS running?
Apr 21 19:58:32 ubuntu nvargus-daemon[1144]: Acquiring SCF Camera device source via index 2 has failed. === gst-launch-1.0[2168]: CameraProvider initialized (0xffffb45e70b0)SCF: Error BadValue: NvPHSSendThroughputHints (in src/common/CameraPowerHint.cpp, function sendCameraPowerHint(), line 56)
Apr 21 19:58:32 ubuntu nvargus-daemon: E/ libnvphs:socket: Error[2]: socket connection /var/lib/nvphs/nvphsd.ctl to PHS failed: No such file or directory
Apr 21 19:58:32 ubuntu nvargus-daemon: D/ libnvphs:socket: Warning: connecting to Power Hinting Service failed. Is PHS running?
Apr 21 19:58:32 ubuntu nvargus-daemon: E/ libnvphs: Error: NvPHSSendThroughputHints[usecase=camera, hint=MinCPU, value=4294967295, timeout_ms=1000]: queue_or_send() failed
Apr 21 19:58:32 ubuntu nvargus-daemon[1144]: LSC: LSC surface is not based on full res!
Apr 21 19:58:32 ubuntu kernel: [ 242.669907] [RCE] tegra_nvcsi_stream_tpg_disable(vm0, stream=0, vc=0)
Apr 21 19:58:32 ubuntu kernel: [ 242.669921] [RCE] tegra_nvcsi_stream_tpg_disable: channel 0 is already disabled
Apr 21 19:58:32 ubuntu kernel: [ 242.725915] [RCE] tegra_nvcsi_stream_set_config(vm0, stream=0, csi=0)
Apr 21 19:58:32 ubuntu kernel: [ 242.725942] [RCE] MIPI clock = 437500 kHz, tHS-SETTLE = 11, tCLK-SETTLE = 0
Apr 21 19:58:32 ubuntu kernel: [ 242.725949] [RCE] ===== NVCSI Stream Configuration =====
Apr 21 19:58:32 ubuntu kernel: [ 242.725955] [RCE] stream_id: PP 0, csi_port: PORT A
Apr 21 19:58:32 ubuntu kernel: [ 242.725960] [RCE] Brick: PHY 0, Mode: D-PHY
Apr 21 19:58:32 ubuntu kernel: [ 242.725965] [RCE] Partition: CIL A, LP bypass: Enabled, Lanes: 4
Apr 21 19:58:32 ubuntu kernel: [ 242.725970] [RCE] Clock information:
Apr 21 19:58:32 ubuntu kernel: [ 242.725976] [RCE] MIPI clock rate: 437.50 MHz
Apr 21 19:58:32 ubuntu kernel: [ 242.725981] [RCE] T_HS settle: 11, T_CLK settle: 0
Apr 21 19:58:32 ubuntu kernel: [ 242.725986] [RCE] ======================================
Apr 21 19:58:32 ubuntu kernel: [ 242.725991] [RCE] tegra_nvcsi_stream_open(vm0, stream=0, csi=0)
Apr 21 19:58:32 ubuntu kernel: [ 242.725997] [RCE] nvcsi_calc_tclk_settle tclk_settle 33
Apr 21 19:58:32 ubuntu kernel: [ 242.885471] tegra-xusb 3610000.xhci: entering ELPG done
Apr 21 19:58:33 ubuntu kernel: [ 243.241905] [RCE] ISR PHY 0 CIL_A 0x198
Apr 21 19:58:33 ubuntu kernel: [ 243.241955] [RCE] ISR PHY 0 CIL_B 0x88
Apr 21 19:58:33 ubuntu kernel: [ 243.353920] [RCE] ERROR: camera-ip/vi5/vi5.c:745 [vi5_handle_eof] "General error queue is out of sync with frame queue. ts=265415456864 sof_ts=265508727392 gerror_code=2 gerror_data=400 notify_bits=400000000024"
Apr 21 19:58:38 ubuntu nvargus-daemon[1144]: SCF: Error InvalidState: Timeout waiting on frame start sensor guid 0, capture sequence ID = 14 (in src/services/capture/FusaCaptureViCsiHw.cpp, function waitCsiFrameStart(), line 507)
Apr 21 19:58:38 ubuntu nvargus-daemon[1144]: SCF: Error InvalidState: (propagating from src/common/Utils.cpp, function workerThread(), line 114)
Apr 21 19:58:38 ubuntu nvargus-daemon[1144]: SCF: Error InvalidState: Worker thread ViCsiHw frameStart failed (in src/common/Utils.cpp, function workerThread(), line 133)
Apr 21 19:58:38 ubuntu nvargus-daemon[1144]: SCF: Error Timeout: (propagating from src/services/capture/FusaCaptureViCsiHw.cpp, function waitCsiFrameEnd(), line 593)
Apr 21 19:58:38 ubuntu nvargus-daemon[1144]: SCF: Error Timeout: (propagating from src/common/Utils.cpp, function workerThread(), line 114)
Apr 21 19:58:38 ubuntu nvargus-daemon[1144]: SCF: Error Timeout: Worker thread ViCsiHw frameComplete failed (in src/common/Utils.cpp, function workerThread(), line 133)
Apr 21 19:58:38 ubuntu nvargus-daemon: Module_id 30 Severity 2 : (fusa) Error: Timeout propagating from:/capture/src/fusaViHandler.cpp 776
Apr 21 19:58:39 ubuntu nvargus-daemon[1144]: SCF: Error Timeout: (propagating from src/services/capture/CaptureServiceDeviceViCsi.cpp, function waitCompletion(), line 368)
Apr 21 19:58:39 ubuntu nvargus-daemon[1144]: SCF: Error Timeout: (propagating from src/services/capture/CaptureServiceDevice.cpp, function pause(), line 936)
Apr 21 19:58:39 ubuntu nvargus-daemon[1144]: SCF: Error Timeout: During capture abort, syncpoint wait timeout waiting for current frame to finish (in src/services/capture/CaptureServiceDevice.cpp, function handleCancelSourceRequests(), line 1029)
^C
After that, I can’t stream using v4l2-ctrl anymore except for rebooting the device.
I already flashed the rce debug fw as suggested in Topic 26574 to get more logs.
The attached files include dmesg and trace logs
dmesg_trace_nvarguscamerasrc_notok.txt (2.9 MB)
dmesg_trace_v4l2-ctrl_ok.txt (175.8 KB)
Here is my camera sensor DT:
#include <dt-bindings/media/camera.h>
/ {
tegra-capture-vi {
num-channels = <1>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
mycamera_vi_in0: endpoint {
port-index = <0>;
bus-width = <4>;
remote-endpoint = <&mycamera_csi_out0>;
};
};
};
};
host1x@13e00000 {
nvcsi@15a00000 {
num-channels = <1>;
#address-cells = <1>;
#size-cells = <0>;
channel@0 {
reg = <0>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
mycamera_csi_in0: endpoint@0 {
port-index = <0>;
bus-width = <4>;
remote-endpoint = <&mycamera_out0>;
};
};
port@1 {
reg = <1>;
mycamera_csi_out0: endpoint@1 {
remote-endpoint = <&mycamera_vi_in0>;
};
};
};
};
};
};
i2c@3180000 {
mycamera: mycamera@10 {
compatible = "test,mycamera";
reg = <0x10>;
status = "okay";
/* V4L2 device node location */
devnode = "video0";
/* Physical dimensions of sensor */
physical_w = "3.840";
physical_h = "2.160";
sensor_model = "mycamera";
use_sensor_mode_id = "true";
mode0 {
mclk_khz = "24000";
num_lanes = "4";
tegra_sinterface = "serial_a";
phy_mode = "DPHY";
discontinuous_clk = "no";
dpcm_enable = "false";
cil_settletime = "11";
active_w = "3840";
active_h = "2160";
mode_type = "bayer";
pixel_phase = "rggb";
csi_pixel_bit_depth = "10";
readout_orientation = "90";
line_length = "3840";
inherent_gain = "1";
mclk_multiplier = "80";
pix_clk_hz = "350000000";
gain_factor = "16";
framerate_factor = "1000000";
exposure_factor = "1000000";
min_gain_val = "16"; /* 1.00x */
max_gain_val = "356"; /* 22x */
step_gain_val = "1";
default_gain = "16"; /* 1.00x */
min_hdr_ratio = "1";
max_hdr_ratio = "1";
min_framerate = "2000000"; /* 2.0 fps */
max_framerate = "30000000"; /* 30.0 fps */
step_framerate = "1";
default_framerate = "30000000"; /* 30.0 fps */
min_exp_time = "13"; /* us */
max_exp_time = "683709"; /* us */
step_exp_time = "1";
default_exp_time = "2495"; /* us */
embedded_metadata_height = "2";
};
ports {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
port@0 {
reg = <0>;
mycamera_out0: endpoint {
port-index = <0>;
bus-width = <4>;
remote-endpoint = <&mycamera_csi_in0>;
};
};
};
};
};
};
/ {
tcp: tegra-camera-platform {
compatible = "nvidia, tegra-camera-platform";
num_csi_lanes = <8>;
max_lane_speed = <2500000>;
min_bits_per_pixel = <10>;
vi_peak_byte_per_pixel = <2>;
vi_bw_margin_pct = <25>;
max_pixel_rate = <7500000>;
isp_peak_byte_per_pixel = <5>;
isp_bw_margin_pct = <25>;
modules {
cam_module0: module0 {
badge = "test_rear_mycamera";
position = "rear";
orientation = "1";
status = "okay";
cam_module0_drivernode0: drivernode0 {
status = "okay";
pcl_id = "v4l2_sensor";
devname = "mycamera 2-0010";
proc-device-tree = "/proc/device-tree/i2c@3180000/mycamera@10";
};
};
};
};
};
I’m using the Xavier NX SOM production version (16GB internal EMMC) on Jetpack 5.0.2.
Could you please help me?
Regards,
Vĩnh.