9

I bought a brand new ThinkPad X1 Gen10 and the MiPi webcam (Camera,FHD,RGB+IR,MIPI,UF,Azw) is not working at all. Ubuntu doesn't even recognize the camera.

Apparently this is a known problem with MiPi cameras:

https://forums.lenovo.com/t5/Ubuntu/X1-Carbon-Gen-10-Ubuntu-IPU6-Webcam-not-working/m-p/5163755?page=1#5939877

and

ThinkPad X1 Carbon gen 10 webcam driver IPU6 Ubuntu 22.04

Did anyone find a suitable workaround until there is an official fix?

Thanks!

1 Answers1

5

I finally got the camera working!

I cloned and followed all instructions in all 4 github repos in order: https://github.com/intel/ipu6-drivers

And in the first repo I chose option 3 to patch the kernel via dkms. Moreover, whenever I had to decide between ipu6 and ipu6ep, I picked ipu6ep.

Caveats:

After cloning https://github.com/intel/icamerasrc/tree/icamerasrc_slim_api you need to checkout the branch icamerasrc_slim_api

And when following the instructions in this last repo

rpm -ivh --force --nodeps icamerasrc-*.rpm

did not work, as the rpm file was found in a subfolder:

rpm -ivh --force --nodeps rpm/icamerasrc-*.rpm

Also I created a file called runcamera.sh in ~/bin and added execution rights (chmod +x ./runcamera.sh) with the final instructions copied from the zip file that is flying around in the lenovo forum:

sudo modprobe v4l2loopback card_label="Intel MIPI Camera" exclusive_caps=1
export GST_PLUGIN_PATH=/usr/lib/gstreamer-1.0/ && rm -rf ~/.cache/gstreamer1.0
DEVICE=$(v4l2-ctl --list-devices | grep platform:v4l2loopback -A 1 | tail -n 1 | xargs echo)
sudo -E gst-launch-1.0 icamerasrc buffer-count=7 device-name=ov2740-uf ! video/x-raw,format=NV12,width=1280,height=720 ! v4l2sink device=${DEVICE}

This, of course, now needs to be run after each and every startup before any camera app is started.

  • Thanks a lot for sharing this! I followed your steps. It now seems to be detected with v4l2-ctl --list-devices. Unfortunately I still get an error with cheese "error playing video from webcam" and the browser doesn't recognize it. There also seems to be 10 different cameras listed now. – GRASBOCK Aug 15 '23 at 23:11