Score:5

MiPi Webcam with Thinkpad X1 Gen10 not working with Ubuntu 22.04

ng flag

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!

Score:3
ng flag

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.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.