IPU6 camera support in Fedora 41
Oct. 2nd, 2024 07:50 pmI'm happy to announce that the last tweaks have landed and that the fully FOSS libcamera software ISP based IPU6 camera support in Fedora 41 now has no known bugs left. See the Changes page for testing instructions.
Supported hardware
Unlike USB UVC cameras where all cameras work with a single kernel driver, MIPI cameras like the Intel IPU6 cameras require multiple drivers. The IPU6 input-system CSI receiver driver is common to all laptops with an IPU6 camera, but different laptops use different camera sensors and each sensor needs its own driver and then there are glue ICs like the LJCA USB IO-expander and the iVSC (Intel Visual Sensing Controller) and there also is the ipu-bridge code which translates Windows oriented ACPI tables with sensor info into the fwnodes which the Linux drivers expect.
This means that even though IPU6 support has landed in Fedora 41 not all laptops with an IPU6 camera will work. Currently the IPU6 integrated in the following CPU models works if the sensor + glue hw/sw is also supported:
Jasper Lake and Meteor Lake also have an IPU6 but there is some more integration work necessary to get things to work there. Getting Meteor Lake IPU6 cameras to work is high on my TODO list.
The mainline kernel IPU6 CSI receiver + libcamera software ISP has been successfully tested on the following models:
To see which sensor your laptop has run: "ls /sys/bus/i2c/devices" this will show e.g. "i2c-INT3474:00" if you have an ov2740, with INT3474 being the ACPI Hardware ID (HID) for the sensor. See here for a list of currently known HID to sensor mappings. Note not all of these have upstream drivers yet. In that cases chances are that there might be a sensor driver for your sensor here.
We could really use help with people submitting drivers from there upstream. So if you have a laptop with a sensor which is not in the mainline but is available there, you know a bit of C-programming and you are willing to help, then please drop me an email so that we can work together to get the driver upstream.
1) on some ThinkPads the ov2740 sensor fails to start streaming most of the time. I plan to look into this next week and hopefully I can come up with a fix.
MIPI camera Integration work done for Fedora 41
After landing the kernel IPU6 CSI receiver and libcamera software ISP support upstream early in the Fedora 41 cycle, there still was a lot of work to do with regards to integrating this into the rest of the stack so that the cameras can actually be used outside of the qcam test app.
The whole stack looks like this "kernel → libcamera → pipewire | pipewire-camera-consuming-app". Where the 2 currently supported pipewire-camera consuming apps are Firefox and GNOME Snapshot.
Once this was all up and running testing found quite a few bugs which have all been fixed now:
Supported hardware
Unlike USB UVC cameras where all cameras work with a single kernel driver, MIPI cameras like the Intel IPU6 cameras require multiple drivers. The IPU6 input-system CSI receiver driver is common to all laptops with an IPU6 camera, but different laptops use different camera sensors and each sensor needs its own driver and then there are glue ICs like the LJCA USB IO-expander and the iVSC (Intel Visual Sensing Controller) and there also is the ipu-bridge code which translates Windows oriented ACPI tables with sensor info into the fwnodes which the Linux drivers expect.
This means that even though IPU6 support has landed in Fedora 41 not all laptops with an IPU6 camera will work. Currently the IPU6 integrated in the following CPU models works if the sensor + glue hw/sw is also supported:
- Tiger Lake
- Alder Lake
- Raptor Lake
Jasper Lake and Meteor Lake also have an IPU6 but there is some more integration work necessary to get things to work there. Getting Meteor Lake IPU6 cameras to work is high on my TODO list.
The mainline kernel IPU6 CSI receiver + libcamera software ISP has been successfully tested on the following models:
- Various Lenovo ThinkPad models with ov2740 (INT3474) sensor (1)
- Various Dell models with ov01a10 (OVTI01A0) sensor
- Dell XPS 13 PLus with ov13b10 (OVTIDB10/OVTI13B1)
- Some HP laptops with hi556 sensor (INT3537)
To see which sensor your laptop has run: "ls /sys/bus/i2c/devices" this will show e.g. "i2c-INT3474:00" if you have an ov2740, with INT3474 being the ACPI Hardware ID (HID) for the sensor. See here for a list of currently known HID to sensor mappings. Note not all of these have upstream drivers yet. In that cases chances are that there might be a sensor driver for your sensor here.
We could really use help with people submitting drivers from there upstream. So if you have a laptop with a sensor which is not in the mainline but is available there, you know a bit of C-programming and you are willing to help, then please drop me an email so that we can work together to get the driver upstream.
1) on some ThinkPads the ov2740 sensor fails to start streaming most of the time. I plan to look into this next week and hopefully I can come up with a fix.
MIPI camera Integration work done for Fedora 41
After landing the kernel IPU6 CSI receiver and libcamera software ISP support upstream early in the Fedora 41 cycle, there still was a lot of work to do with regards to integrating this into the rest of the stack so that the cameras can actually be used outside of the qcam test app.
The whole stack looks like this "kernel → libcamera → pipewire | pipewire-camera-consuming-app". Where the 2 currently supported pipewire-camera consuming apps are Firefox and GNOME Snapshot.
Once this was all up and running testing found quite a few bugs which have all been fixed now:
- Firefox showing 13 different cameras in its camera selection pulldown for a single IPU6 camera (fix).
- Installing pipewire-plugin-libcamera leads to UVC cameras being powered on all the time causing significant battery drain (bug, bug, discussion, fix).
- Pipewire does not always recognizes cameras on login (bug, bug, bug, fix).
- Pipewire fails to show cameras with relative controls (fix).
- spa_libcamera_buffer_recycle sometimes fails, causing stream to freeze on first frame (bug, fix)
- Firefox chooses bad default resolution of 640x480. I worked with Jan Grulich to get this fixed and this is fixed as of firefox-130.0.1-3.fc41. Thank you Jan!
- Snapshot prefers 4:3 mode, e.g. 1280x1080 on 16:9 camera sensors capable of 1920x1080 (pending fix)
- Added intel-vsc-firmware, pipewire-plugin-libcamera, libcamera-ipa to the Fedora 41 Workstation default package-set (pull, pull, pull)
Testing on Fedora 40
Date: 2024-10-04 06:28 am (UTC)These are good signs.
For firefox-131.0-2.fc40.x86_64, I've this bug showing 13 different cameras. I noticed that I may not have an up-to-date pipewire (pipewire-1.0.8-1.fc40.x86_64). So I will wait for Fedora 41, which is not a big deal (at least for me ;-)). Again, thx a lot Hans !
Olivier.
no subject
Date: 2024-10-04 06:34 am (UTC)Thanks for your work Hans!
I've been trying to make the camera work on my Dell XPS 13 9340 developer edition but so far with no success.
I know there are Linux drivers because the camera does work out of the box in Ubuntu 22 the laptop shipped with but unfortunately even upgrading the official distro stops it from working.
ls /sys/bus/i2c/devicesshows mei2c-HIMX1092:00which I do not see in either supported hardware you linked, that might be the reason for my troubles.no subject
Date: 2024-10-04 09:42 am (UTC)Please drop me an email at hdegoede@redhat.com then we can debug this further over email and hopefully get your system to work.
no subject
Date: 2024-11-15 11:27 pm (UTC)Thanks!
Getting camera working on HP Spectre x360 2-in-1 Laptop 16t-aa000 (Meteor Lake - Debian Sid/Trixie)
Date: 2024-10-20 09:11 pm (UTC)My C/Linux skills are probably not up to the task of making my camera work, but I am willing to try (certainly willing to test!)
My particular situation may be hampered by the fact that this laptop has an electro-mechanical shutter, which shows up as "wmi PNP0C14:04 00000080 00000000" using acpi_listen, and is toggled by the F2 key (which works under linux, I can see/hear the shutter open and close).
I filed a bug with libcamera ([Bug 237] IPU6 Camera with ov08x40 (OVTI08F4 sensor) HP Spectre 16" Meteor Lake doesn't work), and Laurent Pinchart there suggested I send a report to linux-media@vger.kernel.org (which I did)
The output of sudo ls -l /sys/bus/i2c/devices:
lrwxrwxrwx 1 root root 0 Oct 16 18:42 i2c-0 -> ../../../devices/pci0000:00/0000:00:1f.4/i2c-0
lrwxrwxrwx 1 root root 0 Oct 16 18:42 i2c-1 -> ../../../devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-1
lrwxrwxrwx 1 root root 0 Oct 16 18:42 i2c-10 -> ../../../devices/pci0000:00/0000:00:02.0/i2c-10
lrwxrwxrwx 1 root root 0 Oct 16 18:42 i2c-11 -> ../../../devices/pci0000:00/0000:00:02.0/i2c-11
lrwxrwxrwx 1 root root 0 Oct 16 18:42 i2c-12 -> ../../../devices/pci0000:00/0000:00:02.0/i2c-12
lrwxrwxrwx 1 root root 0 Oct 16 18:42 i2c-13 -> ../../../devices/pci0000:00/0000:00:02.0/i2c-13
lrwxrwxrwx 1 root root 0 Oct 16 18:42 i2c-14 -> ../../../devices/pci0000:00/0000:00:02.0/i2c-14
lrwxrwxrwx 1 root root 0 Oct 16 18:42 i2c-15 -> ../../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/i2c-15
lrwxrwxrwx 1 root root 0 Oct 16 18:42 i2c-16 -> ../../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-DP-1/i2c-16
lrwxrwxrwx 1 root root 0 Oct 16 18:42 i2c-17 -> ../../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-DP-2/i2c-17
lrwxrwxrwx 1 root root 0 Oct 16 18:42 i2c-18 -> ../../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-DP-3/i2c-18
lrwxrwxrwx 1 root root 0 Oct 16 18:42 i2c-19 -> ../../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-DP-4/i2c-19
lrwxrwxrwx 1 root root 0 Oct 16 18:42 i2c-2 -> ../../../devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-2
lrwxrwxrwx 1 root root 0 Oct 16 19:19 i2c-20 -> ../../../devices/pci0000:00/0000:00:1c.0/0000:56:00.0/i2c-20
lrwxrwxrwx 1 root root 0 Oct 16 19:19 i2c-21 -> ../../../devices/pci0000:00/0000:00:1c.0/0000:56:00.0/i2c-21
lrwxrwxrwx 1 root root 0 Oct 16 18:42 i2c-3 -> ../../../devices/pci0000:00/0000:00:15.3/i2c_designware.2/i2c-3
lrwxrwxrwx 1 root root 0 Oct 16 18:42 i2c-4 -> ../../../devices/pci0000:00/0000:00:19.0/i2c_designware.3/i2c-4
lrwxrwxrwx 1 root root 0 Oct 16 18:42 i2c-5 -> ../../../devices/pci0000:00/0000:00:19.1/i2c_designware.4/i2c-5
lrwxrwxrwx 1 root root 0 Oct 16 18:42 i2c-6 -> ../../../devices/pci0000:00/0000:00:02.0/i2c-6
lrwxrwxrwx 1 root root 0 Oct 16 18:42 i2c-7 -> ../../../devices/pci0000:00/0000:00:02.0/i2c-7
lrwxrwxrwx 1 root root 0 Oct 16 18:42 i2c-8 -> ../../../devices/pci0000:00/0000:00:02.0/i2c-8
lrwxrwxrwx 1 root root 0 Oct 16 18:42 i2c-9 -> ../../../devices/pci0000:00/0000:00:02.0/i2c-9
lrwxrwxrwx 1 root root 0 Oct 16 18:42 i2c-CSC3551:00-cs35l41-hda.0 -> ../../../devices/pci0000:00/0000:00:19.1/i2c_designware.4/i2c-5/i2c-CSC3551:00-cs35l41-hda.0
lrwxrwxrwx 1 root root 0 Oct 16 18:42 i2c-CSC3551:00-cs35l41-hda.1 -> ../../../devices/pci0000:00/0000:00:19.1/i2c_designware.4/i2c-5/i2c-CSC3551:00-cs35l41-hda.1
lrwxrwxrwx 1 root root 0 Oct 16 18:42 i2c-ELAN07CE:00 -> ../../../devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-1/i2c-ELAN07CE:00
lrwxrwxrwx 1 root root 0 Oct 16 18:42 i2c-ELAN2513:00 -> ../../../devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-2/i2c-ELAN2513:00
lrwxrwxrwx 1 root root 0 Oct 16 19:19 i2c-OVTI00AB:00 -> ../../../devices/pci0000:00/0000:00:15.3/i2c_designware.2/i2c-3/i2c-OVTI00AB:00
lrwxrwxrwx 1 root root 0 Oct 16 18:42 i2c-OVTI08F4:00 -> ../../../devices/pci0000:00/0000:00:19.0/i2c_designware.3/i2c-4/i2c-OVTI08F4:00
lrwxrwxrwx 1 root root 0 Oct 16 19:19 i2c-TXNW3643:00 -> ../../../devices/pci0000:00/0000:00:15.3/i2c_designware.2/i2c-3/i2c-TXNW3643:00
Please let me know what testing or whatnot I can do.
Sincerely,
Duane
Re: Getting camera working on HP Spectre x360 2-in-1 Laptop 16t-aa000 (Meteor Lake - Debian Sid/Trix
Date: 2024-10-25 09:42 am (UTC)I'm currently work with a Fedora 41 user who has a HP Spectre x360 14-eu0xxx which is similar to your model to get things working there.
So far we have failed to get things to work. I have one more thing which I want to try and then I'm going to give up.
I plan to do semi-regular blog-posts with IPU camera support updates. I plan to include something on the success / failure to get the OVTI08F4 / ov08x40 sensor to work in my first update. So I suggest you keep an eye on my blog for further updates.
Note even if I can get the HP Spectre x360 14-eu0xxx to work in Fedora 41, there likely still is a bunch of work to do on the Debian side to enable everything.
Re: Getting camera working on HP Spectre x360 2-in-1 Laptop 16t-aa000 (Meteor Lake - Debian Sid/Trix
Date: 2024-10-25 11:31 am (UTC)I believe I have read up on the HP Spectre 14 user.
Again, I am not expecting anything but to learn the process and tools that is employed in getting something like this running.
Sincerely,
Duane
Sad faces with Dell XPS 16 9640
Date: 2024-10-29 06:44 pm (UTC)Thank you for your work on these cameras. I was looking forward to the release of Fedora 41 after seeing all the posts concerning the IPU6 webcams, hoping to finally use the webcam of my work laptop. But alas, again no werking camera.
I installed a fresh copy of Fedora 41
Checked if all packages are up to date
Checked dmesg and cam -l
[ 23.594593] intel-ipu6 0000:00:05.0: Found supported sensor OVTI02C1:00
[ 23.594666] intel-ipu6 0000:00:05.0: Connected 1 cameras
[ 23.595768] intel-ipu6 0000:00:05.0: Sending BOOT_LOAD to CSE
[ 23.632158] intel-ipu6 0000:00:05.0: Sending AUTHENTICATE_RUN to CSE
[ 23.678498] intel-ipu6 0000:00:05.0: CSE authenticate_run done
[ 23.678506] intel-ipu6 0000:00:05.0: IPU6-v4[7d19] hardware version 6
evert-jelle@2a10-3781-2b7c:~$ sudo cam -l
[0:18:38.662568793] [8127] INFO Camera camera_manager.cpp:325 libcamera v0.3.2
[0:18:38.680902489] [8130] INFO SimplePipeline simple.cpp:1548 No sensor found for /dev/media0
Available cameras:
evert-jelle@2a10-3781-2b7c:~$
Sad to see my laptop has a non supported sensor. Anything I can do to help getting this sensor supported as well? v4l2-ctl --all does see the camera, but I can't get no satisfaction (camera output).
Re: Sad faces with Dell XPS 16 9640
Date: 2024-11-23 10:41 pm (UTC)Re: Sad faces with Dell XPS 16 9640
Date: 2024-11-25 08:22 am (UTC)Work is ongoing to get this sensor driver upstream see:
https://lore.kernel.org/linux-media/20241120015726.778892-1-heimir.sverrisson@gmail.com/
Re: Sad faces with Dell XPS 16 9640
Date: 2024-11-25 06:54 pm (UTC)Re: Sad faces with Dell XPS 16 9640
Date: 2024-12-16 03:21 am (UTC)Status on IPU6 with sensor OVTI08F4:00
Date: 2024-11-23 05:33 pm (UTC)We have an Lenovo X1 Carbon 12th Gen with Meteor Lake and an IPU6 camera with the OVTI08F4:00 sensor. The kernel version is 6.12.1 and the kernel reports
However, no user-land application (Kamoso, Zoom, etc.) is able to grab a video.
Re: Status on IPU6 with sensor OVTI08F4:00
Date: 2024-11-25 08:21 am (UTC)Re: Status on IPU6 with sensor OVTI08F4:00
Date: 2024-11-25 04:25 pm (UTC)Re: Status on IPU6 with sensor OVTI08F4:00
Date: 2024-11-26 09:16 am (UTC)I hope to get access to a Meteor Lake based X1 Carbon myself soonish and then I'll take a look and see what exactly is necessary.
Re: Status on IPU6 with sensor OVTI08F4:00
Date: 2024-11-26 10:20 pm (UTC)Re: Status on IPU6 with sensor OVTI08F4:00
Date: 2024-12-06 03:47 pm (UTC)I have a thinkpad X1 2-in-1 with the OVTI08F4:00 sensor that isn't working yet. I'm an embedded SW/HW developer and would be happy to help with debugging etc. Let me know if there is anything I can help with to get this working.
Edit: I looked into this more and added my findings to the github issue
Re: Status on IPU6 with sensor OVTI08F4:00
Date: 2025-01-11 11:55 am (UTC)while the MIPI sensor OVTI08F4:00 should be supported theoretically, the Lenovo X1 Carbon 12th gen had the additional problem of the new Lattice USB IO expander. Since this January, Lenovo started to sell the X1 Caebon 12th gen with pre-installed Ubuntu and the MIPI camera. Does this mean that the issues with the Lattice USB IO expander have been solved?
Thanks
OVTI8856:00 for Dell 7320 Detachable not working
Date: 2024-12-07 08:21 am (UTC)we've been in contact via email before regarding same matter. I've sent you my dmesg41 output. Not sure if you were able to figure the culprit?
What I noticed reading this blog post carefully, is that there seems to not be a correct ACPI HID mapping to my sensor. If I check ls /sys/bus/i2c/devices following entry comes up: i2c-INT3472:07
For the OVTI8856:00 the code should already be mainlined if I check here: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/media/pci/intel/ipu-bridge.c#n49
Help me, what to do next. Thanks Stefan