intel / icamerasrc

icamerasrc
24 stars 35 forks source link

Could not open display #17

Open junocomp opened 1 year ago

junocomp commented 1 year ago

Running on Jaspelake on Manjaro with Phosh (wayland)

sudo -E gst-launch-1.0 icamerasrc device-name=ov13858-uf af-mode=2 ! video/x-raw,format=NV12,width=1280,height=720 ! videoconvert ! ximagesink

Setting pipeline to PAUSED ...
ERROR: from element /GstPipeline:pipeline0/GstXImageSink:ximagesink0: Could not initialise X output
Additional debug info:
../gstreamer/subprojects/gst-plugins-base/sys/ximage/ximagesink.c(885): gst_x_image_sink_xcontext_get (): /GstPipeline:pipeline0/GstXImageSink:ximagesink0:
Could not open display
ERROR: pipeline doesn't want to preroll.
Failed to set pipeline to PAUSED.
Setting pipeline to NULL ...
Freeing pipeline ...
lsmod | grep ipu 
intel_ipu6_isys       139264  0
videobuf2_dma_contig    28672  1 intel_ipu6_isys
videobuf2_v4l2         40960  2 intel_ipu6_isys,uvcvideo
videobuf2_common       86016  6 videobuf2_vmalloc,videobuf2_dma_contig,videobuf2_v4l2,intel_ipu6_isys,uvcvideo,videobuf2_memops
intel_ipu6_psys       110592  0
intel_ipu6            131072  2 intel_ipu6_isys,intel_ipu6_psys
v4l2_fwnode            32768  4 ov01a10,intel_ipu6_isys,ov13858,gc5035
v4l2_async             32768  5 v4l2_fwnode,ov01a10,intel_ipu6_isys,ov13858,gc5035
videodev              307200  8 v4l2_async,videobuf2_v4l2,ov01a10,intel_ipu6_isys,ov13858,uvcvideo,gc5035,videobuf2_common
mc                     69632  9 v4l2_async,videodev,videobuf2_v4l2,ov01a10,intel_ipu6_isys,ov13858,uvcvideo,gc5035,videobuf2_common
sudo dmesg | grep ipu
[    2.798120] intel-ipu6 intel-ipu: enabling device (0000 -> 0002)
[    2.798334] intel-ipu6 intel-ipu: Device 0x4e19 (rev: 0x0)
[    2.798362] intel-ipu6 intel-ipu: physical base address 0x6000000000
[    2.798364] intel-ipu6 intel-ipu: mapped as: 0x000000002e3667c2
[    2.798477] intel-ipu6 intel-ipu: IPU in secure mode
[    2.799811] intel-ipu6 intel-ipu: IPC reset done
[    2.799813] intel-ipu6 intel-ipu: cpd file name: intel/ipu6se_fw.bin
[    2.803731] intel-ipu6 intel-ipu: FW version: 20210414
[    2.804878] intel-ipu6 intel-ipu: Sending BOOT_LOAD to CSE
[    2.818748] intel-ipu6 intel-ipu: Sending AUTHENTICATE_RUN to CSE
[    2.888900] intel-ipu6 intel-ipu: CSE authenticate_run done
[    2.888934] intel-ipu6 intel-ipu: IPU driver version 1.0
[    4.016841] intel-ipu6-psys intel-ipu6-psys0: pkg_dir entry count:4
[    4.017022] intel-ipu6-psys intel-ipu6-psys0: psys probe minor: 0
[    4.247188] intel-ipu6-isys intel-ipu6-isys0: no subdev found in graph
[ 2560.946567] intel-ipu6 intel-ipu: IPU in secure mode
[ 3461.949082] intel-ipu6 intel-ipu: IPU in secure mode
[ 3464.285910] intel-ipu6 intel-ipu: IPU in secure mode
[ 3464.288270] intel-ipu6 intel-ipu: Sending BOOT_LOAD to CSE
[ 3469.340353] intel-ipu6 intel-ipu: Expect magic number timeout 0x0
[ 3469.340388] intel-ipu6 intel-ipu: FW authentication failed(-110)
[ 3469.345276] intel-ipu6-psys intel-ipu6-psys0: fw com close failed.
[ 3469.345288] intel-ipu6-psys intel-ipu6-psys0: Device close failure: -16
[ 4526.207606] intel-ipu6 intel-ipu: IPU in secure mode
[ 4526.219584] intel-ipu6 intel-ipu: Sending BOOT_LOAD to CSE
[ 4526.311571] intel-ipu6 intel-ipu: expected resp: 0x1, IPC response: 0x220 
[ 4526.311586] intel-ipu6 intel-ipu: CSE boot_load failed
[ 4526.311591] intel-ipu6 intel-ipu: FW authentication failed(-5)
[ 4528.757271] intel-ipu6 intel-ipu: IPU in secure mode
[ 4528.763445] intel-ipu6 intel-ipu: Sending BOOT_LOAD to CSE
[ 4528.811217] intel-ipu6 intel-ipu: Sending AUTHENTICATE_RUN to CSE
[ 4528.955045] intel-ipu6 intel-ipu: CSE authenticate_run done
brmarkus commented 1 year ago

Not sure what exactly "Phosh (wayland)" is, sounds like it is a Wayland-protocol-based window-manager?

Your gstreamer pipeline uses ximagesink, which is used in the context of X and X11 based window-manager.

Can you first try e.g. autovideosink or use waylandsink? Then you won't see the Could not initialise X output error message anylonger. (so, instead of setting the ENV variable DISPLAY you likely would need to export XDG_RUNTIME_DIR)

junocomp commented 1 year ago

waylandsink got rid of the error but I am still facing another one.

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/Gstcamerasrc:camerasrc0: src pad: Internal data flow error.
Additional debug info:
gstcambasesrc.cpp(3143): gst_cam_base_src_loop (): /GstPipeline:pipeline0/Gstcamerasrc:camerasrc0:
streaming task paused, reason not-negotiated (-4)
Execution ended after 0:00:00.002329428
Setting pipeline to NULL ...
Freeing pipeline ...
brmarkus commented 1 year ago

Is the following still your pipeline?

sudo -E gst-launch-1.0 icamerasrc device-name=ov13858-uf af-mode=2 ! video/x-raw,format=NV12,width=1280,height=720 ! videoconvert ! waylandsink

Are you sure your camera can provide raw NV12-format?

Which version if icamerasrc and IPU are you using, which Linux, which kernel do you use - can you provide more details about your environment and how the camera is integrated? Which camera do you actually use, how is it integrated and connected?

Can you run sample-pipelines listed under for instance "https://github.com/intel/icamerasrc/tree/icamerasrc_slim_api", like creating test-patters?

Was it required to update/modify the underlying IPU-camera-HAL config like "libcamhal_profile.xml" (see e.g. "https://github.com/intel/ipu6-camera-hal/blob/main/config/linux/ipu6/libcamhal_profile.xml"), or adding your own camera-sensor specific profile like under "https://github.com/intel/ipu6-camera-hal/tree/main/config/linux/ipu6/sensors"?

junocomp commented 1 year ago

I am using Manjaro.

Kernel: 5.19.8-1-MANJARO

I have firmware, icamerasrc and hal from jsl_penguin_peak

CPU Intel Celeron N5100

I haven't added any additional sensors. I did notice on Windows my rear camera is called GC5035, but I am not sure if this is related to IPU6

brmarkus commented 1 year ago

Hmm, don't know "Manjaro" or don't understand your HW, how the camera is connected (MIPI-CSI?), camera-spec.

Is there a way to test the camera without icamerasrc first to confirm the spec, format/color-space, supported resolutions, framerate? (UVC? v4lv2?)

junocomp commented 1 year ago

I think I know why I may be having this issue. I compiled the master from ipu6-drivers. When compiling the jsl_pengin_peak I get an error.

https://github.com/intel/ipu6-drivers/issues/37

If someone can help me with that issue first, icamerasrc may work after all.