Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Unsupported Software
  • Search

Making IPU6 cam in X1 Carbon 12th gen working (nearly there)

This forum covers all Gentoo-related software not officially supported by Gentoo. Ebuilds/software posted here might harm the health and stability of your system(s), and are not supported by Gentoo developers. Bugs/errors caused by ebuilds from overlays.gentoo.org are covered by this forum, too.
Post Reply
Advanced search
7 posts • Page 1 of 1
Author
Message
nagmat84
Guru
Guru
Posts: 325
Joined: Tue Mar 27, 2007 7:31 pm

Making IPU6 cam in X1 Carbon 12th gen working (nearly there)

  • Quote

Post by nagmat84 » Fri Jun 06, 2025 12:30 pm

My sister owns an Lenovo X1 Carbon 12th with an (officially still) unsupported IPU6 camera based on an OVTI08F4 camera sensor. I was finally able to get the kernel side and libcamera to work. Yipeeh! Thanks to the amazing work of Hand De Goede who implements IPU6 support for Fedora I could port his patches to Gentoo and created my own ebuilds at https://github.com/nagmat84/mhnnet-ebuild-repository for
  • media-video/ipu6
  • virtual/gst-plugins-icamerasrc
  • virtual/ipu6-camera-bins
  • virtual/ipu6-camera-hal
  • media-plugins/gst-plugins-icamerasrc-mtl-rpl
  • media-video/pipewire
  • sys-firmware/ipu6-camera-bins-mtl-rpl
  • sys-libs/ipu6-camera-hal-mtl-rpl
  • media-libs/libcamera
Note, you also need some additional kernel patches for kernel 6.14 which I maintain manually at the moment, because I have not yet figured out how to make my own kernel package plus Intel UsbIO kernel modules plus some more patches again. If anybody is interested in helping me there, any help is welcome. Let us bring IPU6 support to Gentoo.

Now, if I run "qcam" which is part of libcamera I can grab a decent video from the OVTI08F4 camera sensor. QCam is a small test program which uses libcamera directly and by-passes Pipewire as well as GStreamer. Good!

So I know that libcamera and the kernel side works. However, no other user-space application (Kamose, Firefox, Chrome, instant messangers) can use the camera through Pipewire/Gstreamer. Those application simply do not see any camera. Before all the patches, those application had shown a bunch of unusable IPU6 cameras via V4L2 (I believe 128 times!). With the patches those cameras are gone, because GStreamer hides them. This is definitely a step into the right direction, but now those applications show no camera at all.

GStreamer itsself shows the following output

Code: Select all

$ gst-device-monitor-1.0

Probing devices...

[0:20:00.491185629] [5667]  INFO Camera camera_manager.cpp:326 libcamera v0.5.0
[0:20:00.511750844] [5669] ERROR V4L2 v4l2_subdevice.cpp:1196 'ov08x40 4-0010': Unable to get rectangle 2 on pad 0/0: Inappropriate ioctl for device
[0:20:00.511779781] [5669]  WARN CameraSensor camera_sensor_legacy.cpp:401 'ov08x40 4-0010': The PixelArraySize property has been defaulted to 3856x2416
[0:20:00.511793232] [5669] ERROR V4L2 v4l2_subdevice.cpp:1196 'ov08x40 4-0010': Unable to get rectangle 1 on pad 0/0: Inappropriate ioctl for device
[0:20:00.511802727] [5669]  WARN CameraSensor camera_sensor_legacy.cpp:412 'ov08x40 4-0010': The PixelArrayActiveAreas property has been defaulted to (0, 0)/3856x2416
[0:20:00.511813631] [5669] ERROR V4L2 v4l2_subdevice.cpp:1196 'ov08x40 4-0010': Unable to get rectangle 0 on pad 0/0: Inappropriate ioctl for device
[0:20:00.511821823] [5669]  WARN CameraSensor camera_sensor_legacy.cpp:420 'ov08x40 4-0010': Failed to retrieve the sensor crop rectangle
[0:20:00.511830041] [5669]  WARN CameraSensor camera_sensor_legacy.cpp:426 'ov08x40 4-0010': The sensor kernel driver needs to be fixed
[0:20:00.511836688] [5669]  WARN CameraSensor camera_sensor_legacy.cpp:428 'ov08x40 4-0010': See Documentation/sensor_driver_requirements.rst in the libcamera sources for more information
[0:20:00.512216657] [5669]  WARN CameraSensorProperties camera_sensor_properties.cpp:463 No static properties available for 'ov08x40'
[0:20:00.512228592] [5669]  WARN CameraSensorProperties camera_sensor_properties.cpp:465 Please consider updating the camera sensor properties database
[0:20:00.512241917] [5669]  WARN CameraSensor camera_sensor_legacy.cpp:501 'ov08x40 4-0010': No sensor delays found in static properties. Assuming unverified defaults.
[0:20:00.515100062] [5669]  WARN IPAProxy ipa_proxy.cpp:177 Configuration file 'ov08x40.yaml' not found for IPA module 'simple', falling back to 'uncalibrated.yaml'
[0:20:00.515153213] [5669] ERROR V4L2 v4l2_subdevice.cpp:1196 'ov08x40 4-0010': Unable to get rectangle 0 on pad 0/0: Inappropriate ioctl for device
[0:20:00.515165374] [5669]  WARN CameraSensor camera_sensor_legacy.cpp:880 'ov08x40 4-0010': The analogue crop rectangle has been defaulted to the active area size

Device found:

        name  : \_SB_.PC00.LNK1
        class : Source/Video
        caps  : video/x-raw, format=RGBA, width=160, height=120
                ...
                video/x-raw, format=BGRx, width=[ 2, 3848, 2 ], height=[ 2, 2416, 2 ]
        gst-launch-1.0 libcamerasrc camera-name="\\_SB_.PC00.LNK1" ! ...


Device found:

        name  : LENOVO-21KCCTO1WW-ThinkPadX1CarbonGen12
        class : Audio/Sink
        caps  : audio/x-raw, format={ (string)S32LE, (string)S24_32LE, (string)S16LE }, layout=interleaved, rate=48000, channels=2, channel-mask=0x0000000000000003
        properties:
                device.api = alsa
                ...
                alsa.mixername = Realtek ALC287
        gst-launch-1.0 ... ! alsasink device="hw:0\,31"


Device found:

        name  : LENOVO-21KCCTO1WW-ThinkPadX1CarbonGen12
        class : Audio/Sink
        caps  : audio/x-raw, format={ (string)S32LE, (string)S16LE }, layout=interleaved, rate=[ 32000, 192000 ], channels=2, channel-mask=0x0000000000000003
                ...
                audio/x-raw, format={ (string)S32LE, (string)S16LE }, layout=interleaved, rate=[ 32000, 192000 ], channels=8, channel-mask=0x0000000000000c3f
        properties:
                device.api = alsa
                ...
                alsa.mixername = Realtek ALC287
        gst-launch-1.0 ... ! alsasink device="hw:0\,5"


Device found:

        name  : LENOVO-21KCCTO1WW-ThinkPadX1CarbonGen12
        class : Audio/Sink
        caps  : audio/x-raw, format={ (string)S32LE, (string)S16LE }, layout=interleaved, rate=[ 32000, 192000 ], channels=2, channel-mask=0x0000000000000003
                ...
                audio/x-raw, format={ (string)S32LE, (string)S16LE }, layout=interleaved, rate=[ 32000, 192000 ], channels=8, channel-mask=0x0000000000000c3f
        properties:
                device.api = alsa
                ...
                alsa.mixername = Realtek ALC287
        gst-launch-1.0 ... ! alsasink device="hw:0\,4"


Device found:

        name  : LENOVO-21KCCTO1WW-ThinkPadX1CarbonGen12
        class : Audio/Sink
        caps  : audio/x-raw, format={ (string)S32LE, (string)S16LE }, layout=interleaved, rate=[ 32000, 192000 ], channels=2, channel-mask=0x0000000000000003
                ...
                audio/x-raw, format={ (string)S32LE, (string)S16LE }, layout=interleaved, rate=[ 32000, 192000 ], channels=8, channel-mask=0x0000000000000c3f
        properties:
                device.api = alsa
                ...
                alsa.mixername = Realtek ALC287
        gst-launch-1.0 ... ! alsasink device="hw:0\,3"


Device found:

        name  : LENOVO-21KCCTO1WW-ThinkPadX1CarbonGen12
        class : Audio/Sink
        caps  : audio/x-raw, format={ (string)S32LE, (string)S24_32LE, (string)S16LE }, layout=interleaved, rate=48000, channels=2, channel-mask=0x0000000000000003
        properties:
                device.api = alsa
                ...
                alsa.mixername = Realtek ALC287
        gst-launch-1.0 ... ! alsasink device="hw:0\,0"


Device found:

        name  : LENOVO-21KCCTO1WW-ThinkPadX1CarbonGen12
        class : Audio/Source
        caps  : audio/x-raw, format=S32LE, layout=interleaved, rate=48000, channels=2, channel-mask=0x0000000000000003
        properties:
                device.api = alsa
                ...
                alsa.mixername = Realtek ALC287
        gst-launch-1.0 alsasrc device="hw:0\,6" ! ...


Device found:

        name  : LENOVO-21KCCTO1WW-ThinkPadX1CarbonGen12
        class : Audio/Source
        caps  : audio/x-raw, format={ (string)S32LE, (string)S24_32LE, (string)S16LE }, layout=interleaved, rate=48000, channels=2, channel-mask=0x0000000000000003
        properties:
                device.api = alsa
                ...
                alsa.mixername = Realtek ALC287
        gst-launch-1.0 alsasrc device="hw:0\,0" ! ...
So Gstreamer has the libcamera plugin and finds a device named \\_SB_.PC00.LNK1. This is as it should be. However if I try invoke "" I get

Code: Select all

LC_ALL=C gst-launch-1.0 libcamerasrc camera-name="\\_SB_.PC00.LNK1" ! xvimagesink
Setting pipeline to PAUSED ...
ERROR: from element /GstPipeline:pipeline0/GstAutoVideoSrc:autovideosrc0/
GstPipeWireSrc:autovideosrc0-actual-src-pipewir: stream error: no more input formats
Additional debug info:
../pipewire-1.4.2/src/gst/gstpipewiresrc.c(748): on_state_changed (): /
GstPipeline:pipeline0/GstAutoVideoSrc:autovideosrc0/
GstPipeWireSrc:autovideosrc0-actual-src-pipewir
ERROR: pipeline doesn't want to preroll.
Failed to set pipeline to PAUSED.
Setting pipeline to NULL ...
ERROR: from element /GstPipeline:pipeline0/GstAutoVideoSrc:autovideosrc0/
GstPipeWireSrc:autovideosrc0-actual-src-pipewir: Internal data stream error.
Additional debug info:
../gstreamer-1.24.11/libs/gst/base/gstbasesrc.c(3177): gst_base_src_loop (): /
GstPipeline:pipeline0/GstAutoVideoSrc:autovideosrc0/
GstPipeWireSrc:autovideosrc0-actual-src-pipewir:
streaming stopped, reason not-negotiated (-4)
ERROR: pipeline doesn't want to preroll.
Freeing pipeline ...
I searched for that bug online and I found reports which pointed me to some more patches for PipeWire and libcamera (also by Hand De Goede). However, those patches are already included in the versions of PipeWire and libcamery I use in my ebuilds. Probably, something very trivial is missing (like a single patch or configuration file I overlooked).

If anybody also owns an Lenovo X1 Carbon 12gen and volunteered to help me to do some debugging that would be awesome and very much appreciated. Maybe there is already someone who got the IPu6 to work (even better). Previously, when QCam did not work at all, I missed to include a kernel patch which drives GPIO pin 12 of the Lattice USBIO expander to power up the camera sensor. I could have sworn that I included that patch into my kernel built, but I hadn't. Currently, I am drawing a blank again. As Libcamera finally works and GStreamer enumerates the camera, there is probably something very stupid which I missed.
Top
dmpogo
Advocate
Advocate
Posts: 3713
Joined: Thu Sep 02, 2004 9:21 pm
Location: Canada

  • Quote

Post by dmpogo » Fri Jun 06, 2025 4:15 pm

Fantastic ! Just what I need - I have X1 Carbon 12th still unopened collecting dust from last Fall, because I cannot use laptop without camera for work. Still on my 2017 gen 7 X1. Was going to sit and apply De Goede patches, thanks a lot to moving in that direction !

PS. Hate to be in winmodem world again, now with cameras :(
Top
nagmat84
Guru
Guru
Posts: 325
Joined: Tue Mar 27, 2007 7:31 pm

  • Quote

Post by nagmat84 » Fri Jun 06, 2025 4:34 pm

Don get your hopes too high, yet. As I said:
  • Using my ebuild is not enough.
    There are still some patches which need to be applied manually to sys-kernel/gentoo-sources-6.14. I have a working patch set, but there is no ebuild for it. Mostly, because I haven't found out how to do it (lack of time) and because it works "well enough" for me.
  • While QCam works and can grab a video from the camera (via libcamera), Pipewire/GStreamer still fail to provide a camera to user-land applications.
    Probably, I missed something very trivial along the way. I cross-posted my question to Hans' blog. Hopefully he has an idea or hint what I might have missed.
Top
dmpogo
Advocate
Advocate
Posts: 3713
Joined: Thu Sep 02, 2004 9:21 pm
Location: Canada

  • Quote

Post by dmpogo » Fri Jun 06, 2025 4:58 pm

nagmat84 wrote:Don get your hopes too high, yet. As I said:
  • Using my ebuild is not enough.
    There are still some patches which need to be applied manually to sys-kernel/gentoo-sources-6.14. I have a working patch set, but there is no ebuild for it. Mostly, because I haven't found out how to do it (lack of time) and because it works "well enough" for me.
  • While QCam works and can grab a video from the camera (via libcamera), Pipewire/GStreamer still fail to provide a camera to user-land applications.
    Probably, I missed something very trivial along the way. I cross-posted my question to Hans' blog. Hopefully he has an idea or hint what I might have missed.
I don't get hopes high, but at least there is some set to start with. I have followed Hans blog, but also Fedora bugs it points to. I guess these were your comments
there (based on username) about attempts on Gentoo ?

There is also a Gentoo bug https://bugs.gentoo.org/867670 about adding libcamera to the tree. Maybe it will get some traction
Top
elvanor
Developer
Developer
User avatar
Posts: 179
Joined: Mon Oct 11, 2004 8:14 am
Location: France
Contact:
Contact elvanor
Website

  • Quote

Post by elvanor » Tue Jun 17, 2025 1:54 pm

Hello, I am very much interested in this effort as well. I have a Lenovo Yoga laptop, it's working great under Gentoo except for two things, sleep and the webcam. It's an IPU6 webcam and it never worked.
Today I tried to revisit this topic and made some progress. Under kernel 6.15.2 and with linux-firmware, the kernel part seems to work:

[ 4.090799] intel-ipu6 0000:00:05.0: Found supported sensor OVTI02C1:00
[ 4.090916] intel-ipu6 0000:00:05.0: Connected 1 cameras
[ 4.097055] intel-ipu6 0000:00:05.0: Sending BOOT_LOAD to CSE
[ 4.105186] intel-ipu6 0000:00:05.0: Sending AUTHENTICATE_RUN to CSE
[ 4.172865] intel-ipu6 0000:00:05.0: CSE authenticate_run done
[ 4.172876] intel-ipu6 0000:00:05.0: IPU6-v3[465d] hardware version 5

However, there seems to be an issue with the HAL, as when I launch qcam it does not detect any sensor. I installed libcamera from your overlay; I wanted to install virtual/ipu6-camera-bins and virtual/ipu6-camera-hal but I ran into issues, because it seems there is no support for the Alder Lake version of ipu6-camera-hal (and I have an Intel Core i7-1280P CPU, so an Alder Lake). I faked a Raptor Lake install, but maybe this is the reason why it does not work. Could you add Alder Lake support to your overlay?

(Also something I noted: the kernel part would work only when the IPU6 module was built as a loadable module, not built-in into the kernel).
Top
dmpogo
Advocate
Advocate
Posts: 3713
Joined: Thu Sep 02, 2004 9:21 pm
Location: Canada

  • Quote

Post by dmpogo » Sun Oct 26, 2025 4:08 pm

I finally came to setting up my X1 Carbon Gen 12, and, to my surprise, found that it has a regular uvcvideo camera !
Indeed, when it was under Windows, I saw that Lenovo provides two type of updates to Gen 12 models - one USB and the other is IPU6,
and my seem to have only usb ones installed.
Top
blursmurf
n00b
n00b
Posts: 49
Joined: Mon Jan 06, 2003 7:09 am

  • Quote

Post by blursmurf » Sun Nov 23, 2025 9:52 am

Hey everyone,

I’ve been trying to get the camera on my XPS 13 9320 (i7-1260P, OV01A10) working properly. libcamera + qcam technically worked, but the colors were way off because there’s no tuning for this sensor. I stumbled onto this thread while troubleshooting, but it didn’t quite get me there. Ended up piecing the whole IPU6 stack together manually and it is working now.

Basically with kernel >=6.17, while there is ipu6 support in kernel, it is still lacking the intel-ipu6-psys driver. So we'll get that from the ipu6-drivers repo, coupled with ipu6-camera-bins (just the library would do, the firmware can be found in linux-firmware), ipu6-camera-hal and icamerasrc, we have working camera support using gstreamer. Then we just need to set up v4l2loopback for a dummy video device and forward the gstreamer stream to it using v4l2-relayd. Now the camera is exposed as a standard v4l2 camera.
elvanor wrote:Hello, I am very much interested in this effort as well. I have a Lenovo Yoga laptop, it's working great under Gentoo except for two things, sleep and the webcam. It's an IPU6 webcam and it never worked.
Today I tried to revisit this topic and made some progress. Under kernel 6.15.2 and with linux-firmware, the kernel part seems to work:
Not sure if you managed to get it working or not but I threw together some ebuilds to automate most of it. Not sure how well they work for others though.
You can find the overlay repo @ https://github.com/melynx/nekochigura

After the overlay is set up, just emerge -av ipu6-camera-meta should do.

If you’ve got feedback or run into issues, I’m happy to fix things up.
Top
Post Reply

7 posts • Page 1 of 1

Return to “Unsupported Software”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic