Fedora IPU6 camera support

tl;dr : For Fedora 39, if your Intel IPU6 webcam still doesn’t work after following Hans de Goede’s instructions (i.e. paused black screen only), you can try with these updated packages:

sudo curl -o /etc/yum.repos.d/marmotte.repo https://dl.marmotte.net/rpms/fedora/marmotte.repo
sudo dnf upgrade

Or cherry-pick from: https://dl.marmotte.net/rpms/fedora/39/x86_64/

After rebooting, the webcam might start working.

Now for the long rant…

It’s now 2024 and I’m still extremely disappointed with the state of webcams on Intel based laptops, which are MIPI based and use the IPU6 driver. It apparently started with Tiger Lake (11th gen), then Alder Lake (12th gen) and now Raptor Lake (13th & 14th gens)… and it looks like Meteor Lake will be the same. The webcam is now a PCIe device with additional sensors instead of a simple internally connected USB device. But even 3 years later, most of its Linux support is still provided as binary blobs and non-upstreamed kernel modules. Yuck.

All of this is shoe-horned into Dell’s pre-installed Ubuntu releases on the XPS 13 Developer Editions that are still available at times. But it’s a mess and consists of deb packages coming from 3rd party repositories, which are prone to breaking over time. And for all other GNU/Linux distribution, you’re on your own. We are far from a simple ./configure && make && make install… to give you an idea, the shared library sitting in the middle of all this needs to be compiled for a single one of the Tiger, Alder/Raptor or Meteor Lake variants. Oh, and there’s currently 22 separate kernel modules involved. Ugh.

For Fedora, Kate Hsuan and Hans de Goede have done some great packaging and patching work which is available in RPM Fusion and explained at https://hansdegoede.livejournal.com/27276.html but only mentions a few laptop models, which are no longer the latest.

My now 6 year old XPS 13 (9370, the last with the webcam below the screen!) just had its LCD backlight stop working, so I now need to revisit the latest available replacement models which are the XPS 13 (9315), the XPS 13 Plus (9320) and the Latitude 7340. All have problematic MIPI IPU6 webcams. There’s also the next XPS just around the corner (Feb 2024, 9335?). When I tried a few months ago, I hadn’t been able to get the webcam of any of these working with Fedora 38 or 39 and the RPM Fusion packages, I would always get a black screen (“paused capture”). But they managed to work with Ubuntu LTS, so Linux support was there, just not in the RPM Fusion packages.

I finally took the time to revisit all of the components involved and decided to update to the latest upstream provided by Intel, since most of them were newer than the versions in RPM Fusion packages, and it finally got things working:

  • ipu6-camera-hal (my rpm fork) now provides a 3rd variant of the library, which I assume is for the upcoming Meteor Lake: ipu_tgl, ipu_adl & ipu_mtl instead of the previous ipu6 & ipu6ep.
  • ipu6-camera-bins (my rpm fork) depends on the same new split and couldn’t be easily bootstrapped.
  • icamerasrc (my rpm fork) is still a big mess that confuses the heck out of me… all of those different sensors and different video formats…
  • ipu6-drivers (my rpm fork) now provides at least 2 new modules (hm2172 and ov02e10), which don’t seem relevant to my hardware, but were required to get things working (?).

It was a bumpy ride with a ton of confusing errors and many reboots, but in the end all of the udev symlink hacks and gstreamer video conversion manages to get the webcam working in Firefox, which is what I need.

If you get the following error:

Device '/dev/video10' does not support 2:0:0:0 colorimetry: ../sys/v4l2/gstv4l2object.c(4213): gst_v4l2_object_set_format_full (): /GstCameraBin:camerabin/GstWrapperCameraBinSrc:camera_source/GstBin:bin37/GstV4l2Src:v4l2src2:
Device wants 2:0:0:0 colorimetry

Then restarting v4l2-relayd.service usually solves it…

For reference, here is a dmesg output on a working Latitude 7340 where the webcam was used twice:

[   12.322696] intel-ipu6 0000:00:05.0: Device 0xa75d (rev: 0x1)
[   12.322712] intel-ipu6 0000:00:05.0: physical base address 0x6052000000
[   12.322714] intel-ipu6 0000:00:05.0: mapped as: 0x000000003d18c266
[   12.322758] intel-ipu6 0000:00:05.0: IPU in secure mode
[   12.322760] intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
[   12.322762] intel-ipu6 0000:00:05.0: IPU camera mask = 0x0
[   12.324616] intel-ipu6 0000:00:05.0: IPC reset done
[   12.324619] intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin
[   12.325071] intel-ipu6 0000:00:05.0: FW version: 20230102
[   12.329705] intel-ipu6 0000:00:05.0: Found supported sensor INT3537:00
[   12.329811] intel-ipu6 0000:00:05.0: Connected 1 cameras
[   12.330843] intel-ipu6 0000:00:05.0: Sending BOOT_LOAD to CSE
[   12.339500] intel-ipu6 0000:00:05.0: Sending AUTHENTICATE_RUN to CSE
[   12.410397] intel-ipu6 0000:00:05.0: CSE authenticate_run done
[   12.410427] intel-ipu6 0000:00:05.0: IPU6-v3 driver version 1.0
[   12.469053] intel-ipu6-psys intel-ipu6-psys0: pkg_dir entry count:8
[   12.469225] intel-ipu6-psys intel-ipu6-psys0: psys probe minor: 0
[   22.558766] intel-ipu6-isys intel-ipu6-isys0: bind hi556 15-0020 nlanes is 2 port is 1
[   22.558909] intel-ipu6-isys intel-ipu6-isys0: All sensor registration completed.
[ 1617.202163] intel-ipu6-isys intel-ipu6-isys0: stream on hi556 15-0020
[ 1620.305880] intel-ipu6-isys intel-ipu6-isys0: stream off hi556 15-0020
[ 3243.889977] intel-ipu6-isys intel-ipu6-isys0: stream on hi556 15-0020
[ 3247.990922] intel-ipu6-isys intel-ipu6-isys0: stream off hi556 15-0020

I loved Intel for its commitment to Linux support using free software. When graphics cards Linux support was a big mess, Intel’s integrated GPUs were a wonderful novelty. When you needed to fight with Atheros and other “cheap” WiFi adapters, Intel’s were always the better choice. Intel was synonym with first class Linux support for a long time, but this seems to have changed, which is very disappointing.

Leave a Reply

Your email address will not be published. Required fields are marked *