Open pepa-cz opened 10 months ago
Try to run:
gst-launch-1.0 -v icamerasrc ! video/x-raw,format=NV12,width=1280,height=720,framerate=30/1 ! videoconvert ! video/x-raw,format=YUY2 ! v4l2sink device=/dev/video0
and then use cheese, if it will work your v4l2-relayd is missing patch https://gitlab.com/vicamo/v4l2-relayd/-/merge_requests/13/diffs .
Hi, I have the same issue on Debian 12. I installed the drivers via dkms, disabled secure boot but cheese wont work and I have the same logs,.
I also have xps 9320 running Ubuntu 22.04, and the webcam had been working until recently (I think around the beginning of August webcam stop working.)
uname -a
Linux xps 6.2.0-26-generic #26~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Jul 13 16:27:29 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
In my case, dmesg
does not show anything (the same as OP).
What I found in my machine is that gstreamer blacklisted icamerasrc.
Here is an output from gst-inspect-1.0
:
gst-inspect-1.0 /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgsticamerasrc.so
(gst-inspect-1.0:181819): GStreamer-WARNING **: 12:58:02.292: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgsticamerasrc.so': /lib/x86_64-linux-gnu/libcamhal.so.0: undefined symbol: _ZN3cca8IntelCCA6getCMCERNS_7cca_cmcE
Could not load plugin file: Opening module failed: /lib/x86_64-linux-gnu/libcamhal.so.0: undefined symbol: _ZN3cca8IntelCCA6getCMCERNS_7cca_cmcE
In my case, the problem is solved. icamerasrc
plugin was blacklisted. I compiled it from source, moved it to the same location /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgsticamerasrc.so
and loaded again (as root):
# rm -rf ~/.cache/gstreamer-1.0 && gst-inspect-1.0 -b
[09-01 06:57:59.168] CamHAL[INF] load_camera_hal_library, the library name: /usr/lib/ipu_adl/libcamhal.so
Then I got working following gst pipeline and at the same time I was able to see the video stream in Google Meet.
# sudo gst-launch-1.0 -v icamerasrc ! video/x-raw,format=NV12,width=1280,height=720,framerate=30/1 ! videoconvert ! video/x-raw,format=YUY2 ! v4l2sink device=/dev/video0
The next step was to get to work v4l2-relayd
service. I modified options for v4l2loopback module so the newly created virtual camera has the label MYCamera
.
# modprobe -r v4l2loopback && modprobe v4l2loopback video_nr=0 card_label=MYCamera exclusive_caps=1
# cat /sys/devices/virtual/video4linux/video0/name
MYCamera
For persistent change
# cat /etc/modprobe.d/v4l2loopback.conf
options v4l2loopback card_label=MYCamera exclusive_caps=1 video_nr=0
And finally
# cat /etc/default/v4l2-relayd
# GStreamer source element name:
#VIDEOSRC="videotestsrc"
VIDEOSRC="icamerasrc"
#SPLASHSRC="filesrc location=/.../splash.png ! pngdec ! imagefreeze num-buffers=4 ! videoscale ! videoconvert"
# Output format, width, height, and frame rate:
#FORMAT=YUY2
FORMAT=NV12
WIDTH=1280
HEIGHT=720
FRAMERATE=30/1
# Virtual video device name:
#CARD_LABEL="Virtual Camera"
CARD_LABEL="MYCamera"
# Extra options to pass to v4l2-relayd:
#EXTRA_OPTS=-d
Service systemctl status v4l2-relayd
was running well and camera is working with sudo cheese -d "MYCamera"
.
@yukim I suppose you installed drivers from the public repository (I don't remember the name of the repository now). I did the same before but the camera stopped working after some time. Then I uninstalled the appropriate packages and compiled everything from the source.
Hello @pepa-cz, I've tried the same instructions, I have the following logs, can you help please ?
hakim@hakim-XPS-9315:~$ sudo gst-launch-1.0 -v icamerasrc ! video/x-raw,format=NV12,width=1280,height=720,framerate=30/1 ! videoconvert ! video/x-raw,format=YUY2 ! v4l2sink device=/dev/video0
[sudo] password for hakim:
[09-05 15:03:19.679] CamHAL[ERR] load_camera_hal_library, failed to open PCI device. error: (null)
[09-05 15:03:19.679] CamHAL[ERR] get_number_of_cameras, function call is nullptr
[09-05 15:03:19.679] CamHAL[ERR] get_number_of_cameras, function call is nullptr
[09-05 15:03:19.679] CamHAL[ERR] get_number_of_cameras, function call is nullptr
(gst-plugin-scanner:15419): GLib-GObject-CRITICAL **: 15:03:19.679: g_param_spec_enum: assertion 'g_enum_get_value (enum_class, default_value) != NULL' failed
(gst-plugin-scanner:15419): GLib-GObject-CRITICAL **: 15:03:19.679: validate_pspec_to_install: assertion 'G_IS_PARAM_SPEC (pspec)' failed
(gst-plugin-scanner:15419): GLib-GObject-CRITICAL **: 15:03:19.679: g_param_spec_ref_sink: assertion 'G_IS_PARAM_SPEC (pspec)' failed
(gst-plugin-scanner:15419): GLib-GObject-CRITICAL **: 15:03:19.679: g_param_spec_unref: assertion 'G_IS_PARAM_SPEC (pspec)' failed
[09-05 15:03:19.679] CamHAL[ERR] get_number_of_cameras, function call is nullptr
[09-05 15:03:19.704] CamHAL[ERR] load_camera_hal_library, failed to open PCI device. error: (null)
[09-05 15:03:19.704] CamHAL[ERR] get_number_of_cameras, function call is nullptr
[09-05 15:03:19.704] CamHAL[ERR] get_number_of_cameras, function call is nullptr
[09-05 15:03:19.704] CamHAL[ERR] get_number_of_cameras, function call is nullptr
(gst-launch-1.0:15418): GLib-GObject-CRITICAL **: 15:03:19.704: g_param_spec_enum: assertion 'g_enum_get_value (enum_class, default_value) != NULL' failed
(gst-launch-1.0:15418): GLib-GObject-CRITICAL **: 15:03:19.704: validate_pspec_to_install: assertion 'G_IS_PARAM_SPEC (pspec)' failed
(gst-launch-1.0:15418): GLib-GObject-CRITICAL **: 15:03:19.704: g_param_spec_ref_sink: assertion 'G_IS_PARAM_SPEC (pspec)' failed
(gst-launch-1.0:15418): GLib-GObject-CRITICAL **: 15:03:19.704: g_param_spec_unref: assertion 'G_IS_PARAM_SPEC (pspec)' failed
[09-05 15:03:19.704] CamHAL[ERR] get_number_of_cameras, function call is nullptr
[09-05 15:03:19.704] CamHAL[ERR] get_number_of_cameras, function call is nullptr
WARNING: erroneous pipeline: could not link camerasrc0 to videoconvert0, camerasrc0 can't handle caps video/x-raw, format=(string)NV12, width=(int)1280, height=(int)720, framerate=(fraction)30/1
@hakimkac99 I have no idea what is happenning in your case I did not have errors like this.
However the first error is load_camera_hal_library, failed to open PCI device. error: (null)
so I would say that is something wrong with /dev/video0
.
Dell XPS 13 9320
is officially supported on both Ubuntu 20.04 and Ubuntu 22.04.
The first device to be certified for Ubuntu Desktop 22.04 LTS is the Dell XPS 13 Plus Developer Edition, Dell’s most powerful 13-inch laptop. https://ubuntu.com/blog/upgrade-your-desktop-ubuntu-22-04-lts,
You should be able to use the MIPI camera in Google Chrome and Mozilla Firefox on Dell XPS 13 9320
just after installing Ubuntu 20.04 or Ubuntu 22.04 and upgrading the system to the latest.
It may break the MIPI camera if you used packages from some PPA or other hacking in your system.
You should be able to use the MIPI camera in Google Chrome and Mozilla Firefox on
Dell XPS 13 9320
just after installing Ubuntu 20.04 or Ubuntu 22.04 and upgrading the system to the latest.
I can confirm this works. But only if you stick with the default (5.19) kernel. I have ubuntu 22.04 with the 6.1 oem kernel, and the camera does not work then.
Greetings, is there any advancement on this issue?
Hello,
When trying to get the camera working I am getting a black screen (does not matter if on Cheese or in the browser). Driver initialization seems to be correct, the camera lights up for a second after boot and nothing suspicious in the log:
When testing with Cheese application (
cheese -d "Intel MIPI Camera"
), I always get black screen and following in the log:What may be wrong in this case? Driver is compiled from source, how can I debug driver more deeply?