intel / ipu6-drivers

GNU General Public License v2.0
178 stars 53 forks source link

Please upstream modules into mainline kernel #22

Open bk2204 opened 2 years ago

bk2204 commented 2 years ago

I recently discovered that my ThinkPad X1 Carbon needs an out-of-tree driver (this one) for my camera. That seems atypical for Intel hardware, which is typically well supported upstream.

I've tried with both Debian sid's 5.18.0-2-amd64 and Ubuntu jammy's 5.15, but the driver is included in neither distro, probably because it isn't upstream. Since this hardware is considered important for most people who use an Alder Lake laptop, could you consider upstreaming this driver (and any dependent pieces) into the mainline kernel relatively soon, even if only in the staging area?

I did try to build this myself with DKMS, but due to #13 (both the missing header and then the modpost error), it's not possible to do so, so there is presently no way to make this hardware work on Debian.

Vascro commented 1 year ago

Has anyone found a way to get the xps 9320 camera working in ubuntu? I don't really want to switch to fedora if I don't have to...

sigboe commented 1 year ago

@Vascro I believe the only distro that is officially supported by Dell is Ubuntu. With I believe packages for drivers and translation relay to the traditional camera formats available in the official repos.

Arch Linux has it working with AUR packages since last year, and Fedora recently got packages in CORP. And I just presume that there are community packages for Gentoo. I have no idea about other distros

ChenYuYeh commented 1 year ago

Has anyone found a way to get the xps 9320 camera working in ubuntu? I don't really want to switch to fedora if I don't have to... @Vascro Maybe you can take this site for reference at first. Dell and Cannonical work together to offer users to enable camera by this apt package.

https://wiki.ubuntu.com/Dell

Dell XPS 9320 $ sudo apt install oem-somerville-tentacool-meta $ sudo apt update $ sudo apt full-upgrade $ sudo systemctl poweroff

loicfavory commented 1 year ago

@Vascro it's supported by dell on ubuntu. You'll find more info here : https://wiki.ubuntu.com/Dell

Search for "LP:#1978757 Cheese can't playback preview not working on 22.04" bug in the page.

Vascro commented 1 year ago

Thanks @ChenYuYeh and @loicfavory , last I looked almost a year ago, the webcam was still not working. Unfortunately I just installed 23.04, but 20.04 is the only officially supported version. Looks like 22.04 may also work, but is currently not supported. Hopefully 23.04 gets a PPA with the IPU6 stack available at some point in the future.

ChenYuYeh commented 1 year ago

@Vascro I suggest this issue should reach Dell to influence Canonical to release 23.04 official PPA, which is Linux distro dependent.

loicfavory commented 1 year ago

@Vascro I confirm that the webcam is enabled with 22.04. My distro is kde neon that used the 22.04 LTS version of ubuntu.

paulmenzel commented 1 year ago

@Vascro I confirm that the webcam is working with 22.04.

Please try to avoid suggesting, that everything is fine. It is not working as it should. No idea, what the right term is, but not all features of the camera are supported and it uses more system CPU resources than necessary. Maybe “rudimentary working” should be used?

loicfavory commented 1 year ago

Maybe “rudimentary working” should be used?

Is "enabled" OK ? For me it's fine, the webcam do what I need, but I don't use it often.

Vascro commented 1 year ago

So I decided to bit the bullet and reinstall 20.04, and Cheese works! However, I'm still getting a read error when I try setting up Howdy face unlock. I set the path to /dev/video0 and /dev/video1. Video0 just hangs on 'howdy add' while video1 says look at the camera but then 'failed to read camera specified in your device_path'. Anybody have an idea if this can get working or not?

ChenYuYeh commented 1 year ago

@Vascro Could you share me the output of "v4l2-ctl --list-devices"? It can help clarify if there is IR camera installed.

My log with Brio camera connected, it has Face login function so multiple cameras (/dev/videoN) should be required.

$ v4l2-ctl --list-devices Logitech BRIO (usb-0000:00:14.0-7): /dev/video0 /dev/video1 /dev/video2 /dev/video3 /dev/media0

Vascro commented 1 year ago

@Vascro Could you share me the output of "v4l2-ctl --list-devices"? It can help clarify if there is IR camera installed.

My log with Brio camera connected, it has Face login function so multiple cameras (/dev/videoN) should be required.

$ v4l2-ctl --list-devices Logitech BRIO (usb-0000:00:14.0-7): /dev/video0 /dev/video1 /dev/video2 /dev/video3 /dev/media0

Hi, turns out the issue is with Howdy not being able to initialize the camera. See the issue here: https://github.com/boltgolt/howdy/issues/796

I can get howdy to see my face if I open cheese at the same time, as cheese is able to initialize the camera. So it appears the driver is fully functional, as far as normal use. The issue is in Howdy.

githubtefo commented 1 year ago

In case useful, I just found out that on Ubuntu 22.04.1 LTS updating from kernel linux-image-5.19.0-43-generic to linux-image-5.19.0-45-generic disrupts webcam recognition when oem-somerville-tentacool-meta is install. Fallback to previous kernel solved the issue, although I am getting tired of this faulty hardware (Dell's proposed solution was sending me a new motherboard and webcam).

UPDATE: This was not accurate - in my case was an issue with the Secure Boot - Following the guidelines to "Enroll MOK" after upgrade solved it.

UPDATE 2: again not working! No idea why this time and totally frustrated.

bt4 commented 1 year ago

In case anyone might find them useful I have made some very rough Gentoo ebuilds based on the Fedora spec files in my overlay.

SmokinCaterpillar commented 1 year ago

What is the current status of the whole thing?

alvinpeters commented 1 year ago

What is the current status of the whole thing?

Still pending review :( https://patchwork.kernel.org/project/linux-media/list/?series=739436

Also check out https://lore.kernel.org/linux-media/20230413100429.919622-1-bingbu.cao@intel.com/T/#ma5a91999da70535394d27d4fe523aa29ea8432a1

pinchartl commented 1 year ago

Any update regarding the processing system driver ? The input system is the easy part :-)

alvinpeters commented 1 year ago

@pinchartl good question lol

I want to ask you a kinda stupid question. How can mere plebs using laptops with an IPU6 camera like me contribute to testing and review? I certainly don't know jack shit about reviewing but I can totally help with testing and stuff so I'd be glad to build and test. Although LKML kinda scares me lol

mdavidsaver commented 1 year ago

After three previous @dell laptops with no surprises, I find my new XPS 13 9315 has a trick webcam. Out of tree kernel driver, firmware blobs, and a closed source userspace library. All for a webcam? If I had noticed this prior to purchasing... I would not have.

pinchartl commented 1 year ago

I want to ask you a kinda stupid question.

It's not a stupid question :-)

How can mere plebs using laptops with an IPU6 camera like me contribute to testing and review? I certainly don't know jack shit about reviewing but I can totally help with testing and stuff so I'd be glad to build and test. Although LKML kinda scares me lol

Testing has limited value at this point I think, as only one piece of the puzzle is there. Review is really the main bottleneck. If anyone is interested, started development of IPU6 support in libcamera could also be useful to help testing.

SmokinCaterpillar commented 1 year ago

Anyway to help with the review process? Is it stuck?

pinchartl commented 1 year ago

The code has been posted to the linux-media mailing list, see https://lore.kernel.org/linux-media/20230727071558.1148653-1-bingbu.cao@intel.com/. You can review the code on the list, replying by e-mail.

HomelessCoder commented 1 year ago

For those who've been experiencing a black screen since yesterday: sudo dnf update --enablerepo=rpmfusion-nonfree-updates-testing 'ipu6-camera-*'

Thanks to https://hansdegoede.livejournal.com/27479.html :pray:

brianpursley commented 1 year ago

For those who've been experiencing a black screen since yesterday

I thought maybe it was just me 😅

Thanks for the link. I guess later today I will see if there is a similar workaround for Ubuntu.

SmokinCaterpillar commented 1 year ago

The code has been posted to the linux-media mailing list, see https://lore.kernel.org/linux-media/20230727071558.1148653-1-bingbu.cao@intel.com/. You can review the code on the list, replying by e-mail.

I wish, I'm a Python Dev, apart from LGTM there's isn't much I could say :-D

githubtefo commented 1 year ago

For those who've been experiencing a black screen since yesterday

I thought maybe it was just me 😅

Thanks for the link. I guess later today I will see if there is a similar workaround for Ubuntu.

Does anyone found out a workaround for Ubuntu? I'm tired of carrying my USB webcam with me. Thanks y'all!

EDIT: manually sudo apt install gstreamer1.0-icamera libgsticamerainterface-1.0-1 fixed the black camera issue.

EDIT2: false alarm - it stopped working after reboot :\

EDIT3: I redo 'EDIT' (1) and now it is working again after reboot :\ :\

alvinpeters commented 1 year ago

So the IVSC driver is now coming to Linux kernel 6.6: https://lore.kernel.org/lkml/20230901142147.096c1b57@sal.lan/

How will we build this on 6.6? Just don't build IVSC together?

Ronan0912 commented 1 year ago

Hello,

Regarding the temporary/hack support for Ubuntu (like for Fedora), I found that there are debian packages available by the “OEM Solutions Group” team:

https://launchpad.net/~oem-solutions-group/+archive/ubuntu/intel-ipu6

It tracks the dfsg branch of userspace intel repositories (bin, hal and gstreamer src) and is up to date.

I added the apt source, installed 'gstreamer1.0-icamera' debian package and built/installed the ipu6-driver kernel module using dkms.

My configuration is Ubuntu 22.04 with kernel 6.2.0-31-generic on a Lenovo X1 Carbon Gen 10.

The driver seems to be probed correctly (kernel logs):

[ 11.889062] intel-ipu6 0000:00:05.0: IPU6-v3 driver version 1.0 [ 11.892450] intel-ipu6-isys intel-ipu6-isys0: bind ov2740 17-0036 nlanes is 2 port is 1 [ 11.894567] intel-ipu6-isys intel-ipu6-isys0: All sensor registration completed. [ 11.894893] intel-ipu6-psys intel-ipu6-psys0: pkg_dir entry count:8 [ 11.895211] intel-ipu6-psys intel-ipu6-psys0: psys probe minor: 0

ronan@ronan-thinkpad:~$ v4l2-ctl --list-devices ipu6 (pci:pci0000:00): /dev/media0

But when giving it a try with a simple gstreamer and no v4l2-replayd/loopback:

ronan@ronan-thinkpad:~$ gst-launch-1.0 -v icamerasrc buffer-count=7 ! video/x-raw,format=NV12,width=1280,height=720 ! videoconvert ! xvimagesink stack smashing detected : terminated Aborted (core dumped)

I tried to understand what was happening with strace but without success. I am new on the subject but it seems from @jwrdegoede previous post that is it not possible to make the driver working without building a kernel:

First of all your users need to be on kernel >= 6.3 and you need to disable the kernels own ov2740 sensor driver. It is ok to disable this on x86_64 builds since I don't believe it is used on x86 outside of IPU6 setups.

Is it still true? As anyone tried the debian packages from the OEM Solution Group?

Thanks,

TekniskSupport commented 1 year ago

I got it working on my X1 Carbon on ubuntu a couple of days ago, Patched with dkms using the current docs on kernel 6.3.3, that got the xvimagesink working. Then i had to to uninstall v4l2loopback and v4l2-relayd that was installed from apt source, and compiled v4l2loopback from source from a commit containing a fix #a6696864

That got the camera working using these commands(below), i put it into a systemd service to be able to turn it on and off using systemctl.

#!/bin/bash
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)
gst-launch-1.0 icamerasrc buffer-count=7 device-name=ov2740-uf ! video/x-raw,format=NV12,width=1280,height=720 ! queue ! videoconvert ! v4l2sink device=${DEVICE}

Thanks to everyone contributed!

trasgu commented 1 year ago

I got it working on my X1 Carbon on ubuntu a couple of days ago, Patched with dkms using the current docs on kernel 6.3.3, that got the xvimagesink working.

@TekniskSupport Which version of Ubuntu are you using? Would you please give us an explanation about how you got it?

Thank you!!

Ronan0912 commented 1 year ago

So it seems a >= 6.3 kernel is still required.

I made it work on Ubuntu 22.04 with my Lenovo using a 6.5 "proposed" kernel version from the Canonical kernel team:

https://launchpad.net/~canonical-kernel-team/+archive/ubuntu/proposed

To summarize the requirements for the ones wiling to use a proposed/experimental kernel:

The webcam should work (with the v4l2-relay daemon consuming way too much CPU due to the copy of the frames).

TekniskSupport commented 1 year ago

@TekniskSupport Which version of Ubuntu are you using? Would you please give us an explanation about how you got it?

Thank you!!

I'm running Ubuntu 22.04.3 LTS

Steps was pretty much what @Ronan0912 stated above.

After i got it working i made myself a small systemd-service and made a little toggle-script in order to not waste CPU when the camera is not used thou.

lukemarsden commented 1 year ago

@Ronan0912 Thank you so much! Following the above instructions I have the strange behavior that the camera has to "retry" several times (camera light is on for a while, then blinks off and on again) before it does eventually work. v4l2-relayd.service logs below.

The only step I wasn't able to follow was "copy the firmware binaries" - maybe this is why I'm getting this intermittent behavior. What did you do specifically to copy the firmware binaries?

This is on a ThinkPad X1 Carbon Gen 11 (21HMCTO1WW)

Sep 06 15:11:27 rocket sh[771]: [09-06 14:38:59.11] CamHAL[ERR] invalid media format, default value used.
Sep 06 15:11:27 rocket sh[771]: [09-06 14:38:59.11] CamHAL[ERR] GetControl: Device node /dev/v4l-subdev16 IOCTL VIDIOC_G_EXT_CTRLS error: Invalid argument
Sep 06 15:11:27 rocket sh[771]: [09-06 14:38:59.60] CamHAL[ERR] sensor output sub device is not set
Sep 06 15:11:27 rocket sh[771]: Enter ia_aiq_get_aiqd_data()
Sep 06 15:11:27 rocket sh[771]: Out-aiqd data size: 41480
Sep 06 15:11:27 rocket sh[771]: [09-06 14:39:08.374] CamHAL[WAR] Failed to open file /run/camera/ov2740-uf_VIDEO.aiqd, error No such file or directory
Sep 06 15:11:27 rocket sh[771]: [09-06 14:39:08.422] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
Sep 06 15:11:27 rocket sh[771]: [09-06 14:39:08.422] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
Sep 06 15:11:27 rocket sh[771]: [09-06 14:39:08.422] CamHAL[ERR] invalid media format, default value used.
Sep 06 15:11:27 rocket sh[771]: [09-06 14:39:08.422] CamHAL[ERR] GetControl: Device node /dev/v4l-subdev16 IOCTL VIDIOC_G_EXT_CTRLS error: Invalid argument
Sep 06 15:11:27 rocket sh[771]: [09-06 14:39:08.477] CamHAL[ERR] sensor output sub device is not set
Sep 06 15:11:27 rocket sh[771]: [09-06 14:39:13.832] CamHAL[ERR] Poll: Device node fd 22 poll timeout.
Sep 06 15:11:27 rocket sh[771]: [09-06 14:39:13.832] CamHAL[INF] Time out or thread is not running, ret = 0
Sep 06 15:11:27 rocket sh[771]: Enter ia_aiq_get_aiqd_data()
Sep 06 15:11:27 rocket sh[771]: Out-aiqd data size: 41480
Sep 06 15:11:27 rocket sh[771]: [09-06 14:39:17.910] CamHAL[WAR] Failed to open file /run/camera/ov2740-uf_VIDEO.aiqd, error No such file or directory
Sep 06 15:11:27 rocket sh[771]: [09-06 14:39:17.955] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
Sep 06 15:11:27 rocket sh[771]: [09-06 14:39:17.955] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
Sep 06 15:11:27 rocket sh[771]: [09-06 14:39:17.955] CamHAL[ERR] invalid media format, default value used.
Sep 06 15:11:27 rocket sh[771]: [09-06 14:39:17.955] CamHAL[ERR] GetControl: Device node /dev/v4l-subdev16 IOCTL VIDIOC_G_EXT_CTRLS error: Invalid argument
Sep 06 15:11:27 rocket sh[771]: [09-06 14:39:18.57] CamHAL[ERR] sensor output sub device is not set
Sep 06 15:11:27 rocket sh[771]: Enter ia_aiq_get_aiqd_data()
Sep 06 15:11:27 rocket sh[771]: Out-aiqd data size: 41480
Sep 06 15:11:27 rocket sh[771]: [09-06 14:51:00.483] CamHAL[WAR] Failed to open file /run/camera/ov2740-uf_VIDEO.aiqd, error No such file or directory
Sep 06 15:11:27 rocket sh[771]: [09-06 14:51:02.10] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
Sep 06 15:11:27 rocket sh[771]: [09-06 14:51:02.10] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
Sep 06 15:11:27 rocket sh[771]: [09-06 14:51:02.10] CamHAL[ERR] invalid media format, default value used.
Sep 06 15:11:27 rocket sh[771]: [09-06 14:51:02.11] CamHAL[ERR] GetControl: Device node /dev/v4l-subdev16 IOCTL VIDIOC_G_EXT_CTRLS error: Invalid argument
Sep 06 15:11:27 rocket sh[771]: [09-06 14:51:02.111] CamHAL[ERR] sensor output sub device is not set
Sep 06 15:11:27 rocket sh[771]: Enter ia_aiq_get_aiqd_data()
Sep 06 15:11:27 rocket sh[771]: Out-aiqd data size: 41480
Sep 06 15:11:27 rocket sh[771]: [09-06 14:52:25.653] CamHAL[WAR] Failed to open file /run/camera/ov2740-uf_VIDEO.aiqd, error No such file or directory
Sep 06 15:11:27 rocket sh[771]: [09-06 15:11:11.937] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
Sep 06 15:11:27 rocket sh[771]: [09-06 15:11:11.937] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
Sep 06 15:11:27 rocket sh[771]: [09-06 15:11:11.937] CamHAL[ERR] invalid media format, default value used.
Sep 06 15:11:27 rocket sh[771]: [09-06 15:11:11.937] CamHAL[ERR] GetControl: Device node /dev/v4l-subdev16 IOCTL VIDIOC_G_EXT_CTRLS error: Invalid argument
Sep 06 15:11:27 rocket sh[771]: [09-06 15:11:11.984] CamHAL[ERR] sensor output sub device is not set
Sep 06 15:11:27 rocket sh[771]: [09-06 15:11:17.338] CamHAL[ERR] Poll: Device node fd 24 poll timeout.
Sep 06 15:11:27 rocket sh[771]: [09-06 15:11:17.338] CamHAL[INF] Time out or thread is not running, ret = 0
Sep 06 15:11:27 rocket sh[771]: Enter ia_aiq_get_aiqd_data()
Sep 06 15:11:27 rocket sh[771]: Out-aiqd data size: 41480
Sep 06 15:11:27 rocket sh[771]: [09-06 15:11:21.400] CamHAL[WAR] Failed to open file /run/camera/ov2740-uf_VIDEO.aiqd, error No such file or directory
Sep 06 15:11:27 rocket sh[771]: [09-06 15:11:21.443] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
Sep 06 15:11:27 rocket sh[771]: [09-06 15:11:21.443] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
Sep 06 15:11:27 rocket sh[771]: [09-06 15:11:21.443] CamHAL[ERR] invalid media format, default value used.
Sep 06 15:11:27 rocket sh[771]: [09-06 15:11:21.444] CamHAL[ERR] GetControl: Device node /dev/v4l-subdev16 IOCTL VIDIOC_G_EXT_CTRLS error: Invalid argument
Sep 06 15:11:27 rocket sh[771]: [09-06 15:11:21.524] CamHAL[ERR] sensor output sub device is not set
Sep 06 15:11:27 rocket sh[771]: Enter ia_aiq_get_aiqd_data()
Sep 06 15:11:27 rocket sh[771]: Out-aiqd data size: 41480
Sep 06 15:11:27 rocket sh[771]: [09-06 15:11:22.21] CamHAL[WAR] Failed to open file /run/camera/ov2740-uf_VIDEO.aiqd, error No such file or directory
Sep 06 15:11:27 rocket sh[771]: [09-06 15:11:22.67] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
Sep 06 15:11:27 rocket sh[771]: [09-06 15:11:22.67] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
Sep 06 15:11:27 rocket sh[771]: [09-06 15:11:22.67] CamHAL[ERR] invalid media format, default value used.
Sep 06 15:11:27 rocket sh[771]: [09-06 15:11:22.67] CamHAL[ERR] GetControl: Device node /dev/v4l-subdev16 IOCTL VIDIOC_G_EXT_CTRLS error: Invalid argument
Sep 06 15:11:27 rocket sh[771]: [09-06 15:11:22.126] CamHAL[ERR] sensor output sub device is not set
Ronan0912 commented 1 year ago

@lukemarsden don´t know. It is a low level error in libcamhal.

Maybe make sure that format in /etc/default/v4l2-relayd is NV12.

fourdollars commented 1 year ago

Regarding Lenovo ThinkPad X1 Carbon Gen 10, it can work with the generic-hwe 6.2 kernel on Ubuntu 22.04 with ppa:oem-solutions-group/intel-ipu6 right now. FYI: https://bugs.launchpad.net/ubuntu/+source/linux-firmware/+bug/1955383/comments/115 Regarding the MIPI camera support with Linux kernel 6.5 on Ubuntu, it is still under the development.

brianpursley commented 1 year ago

FYI: https://bugs.launchpad.net/ubuntu/+source/linux-firmware/+bug/1955383/comments/115

Thanks for this link. It also appears to be working for me on Dell XPS 13 9315 w/ Ubuntu 22.04 and 6.2 kernel.

(Copied from the link w/ typo fixed):

sudo apt install linux-modules-ipu6-generic-hwe-22.04 linux-modules-ivsc-generic-hwe-22.04
sudo apt install linux-modules-ipu6-oem-22.04c linux-modules-ivsc-oem-22.04c
sudo add-apt-repository ppa:oem-solutions-group/intel-ipu6
sudo apt install libcamhal0
sudo reboot
fourdollars commented 1 year ago

FYI, linux-modules-ipu6-oem-22.04c and linux-modules-ivsc-oem-22.04c are for kernel 6.1. You can execute sudo apt autopurge linux-modules-ipu6-oem-22.04c linux-modules-ivsc-oem-22.04c to remove them.

Ronan0912 commented 1 year ago

Regarding Lenovo ThinkPad X1 Carbon Gen 10, it can work with the generic-hwe 6.2 kernel on Ubuntu 22.04 with ppa:oem-solutions-group/intel-ipu6 right now. FYI: https://bugs.launchpad.net/ubuntu/+source/linux-firmware/+bug/1955383/comments/115 Regarding the MIPI camera support with Linux kernel 6.5 on Ubuntu, it is still under the development.

Thanks @fourdollars

Indeed, it is working on my Lenovo ThinkPad X1 Carbon Gen 10 with kernel 6.2.0-31 after installing:

But I had to use firmwares from https://github.com/intel/ipu6-camera-bins and not the ones provided by linux-firmware package to prevent a crash of the driver (I removed the driver module built with dkms).

I didn't install directly linux-modules-ipu6-generic-hwe-22.04 and linux-modules-ivsc-generic-hwe-22.04 because it installs linux-image-6.2.0-32-generic which is a kernel that seems to break touchpad usb detection on my configuration.

So I can confirm it is not needed to install a proposed kernel (6.5.0-1003-oem version in my previous post).

Thanks,

fourdollars commented 1 year ago

@Ronan0912 linux-modules-ipu6-generic-hwe-22.04 and linux-modules-ivsc-generic-hwe-22.04 didn't depend on linux-modules-6.2.0-32-generic.

$ apt depends linux-modules-ipu6-generic-hwe-22.04
linux-modules-ipu6-generic-hwe-22.04
  Depends: linux-modules-ipu6-6.2.0-32-generic
$ apt depends linux-modules-ipu6-generic-hwe-22.04
linux-modules-ipu6-generic-hwe-22.04
  Depends: linux-modules-ipu6-6.2.0-32-generic
Ronan0912 commented 1 year ago

@fourdollars Not directly.

It is linux-modules-ipu6-6.2.0-32-generic / linux-modules-ivsc-6.2.0-32-generic that does depend.

$ apt depends linux-modules-ipu6-6.2.0-32-generic linux-modules-ipu6-6.2.0-32-generic Depends: linux-image-6.2.0-32-generic Depends: linux-image-unsigned-6.2.0-32-generic

$ apt depends linux-modules-ivsc-6.2.0-32-generic linux-modules-ivsc-6.2.0-32-generic Depends: linux-image-6.2.0-32-generic Depends: linux-image-unsigned-6.2.0-32-generic

Ronan0912 commented 1 year ago

@fourdollars

To be clearer: it does depend indirectly on linux-image-6.2.0-32-generic and not linux-modules-6.2.0-32-generic (non existent package - error/typo in a previous post).

mindtheegab commented 1 year ago

the solution posted by brain is almost good but what worked for me on ubuntu 22.04 with kernel 6.2 is this(so after running updates on a regular 22.04)

sudo apt install linux-modules-ipu6-generic-hwe-22.04 linux-modules-ivsc-generic-hwe-22.04
sudo add-apt-repository ppa:oem-solutions-group/intel-ipu6
sudo apt install libcamhal0
sudo apt install v4l2loopback-dkms v4l2-relayd v4l-utils
sudo reboot

this is a big problem we have multiples of these laptops deployed,its a nightmare. it keeps breaking

BrandonNolet commented 1 year ago

the solution posted by brain is almost good but what worked for me on ubuntu 22.04 with kernel 6.2 is this(so after running updates on a regular 22.04)

sudo apt install linux-modules-ipu6-generic-hwe-22.04 linux-modules-ivsc-generic-hwe-22.04
sudo add-apt-repository ppa:oem-solutions-group/intel-ipu6
sudo apt install libcamhal0
sudo apt install v4l2loopback-dkms v4l2-relayd v4l-utils
sudo reboot

this is a big problem we have multiples of these laptops deployed,its a nightmare. it keeps breaking

This was the solution for the Dell Precision 5680. Without this solution, the built-in webcam was not detected whatsoever. Hopefully this helps someone else! :)

lukemarsden commented 1 year ago

@Ronan0912 what steps do you take to "use firmwares from https://github.com/intel/ipu6-camera-bins" please?

Ronan0912 commented 1 year ago

@lukemarsden tu use firmware from intel:

git clone somewhere the ipu6-camera-bins: $ git clone https://github.com/intel/ipu6-camera-bins.git

Then: $ sudo cp ipu6-camera-bins/lib/firmware/intel/*.bin /usr/lib/firmware/intel/

Reboot.

PS: it is possible to restore the previous firmwares by reinstalling linux-firmware debian package.

HomelessCoder commented 1 year ago

It stopped working after an update to 6.5.5-200.fc38.x86_64 (or some related updates). But it works in the 6.4.15-200.fc38.x86_64. Could someone take a look? I can provide any diag information. cc @jwrdegoede

fvbock commented 1 year ago

@Ronan0912 thanks for all the info.

I got it to work at first - sending the machine to sleep seems to have killed the driver somehow. Worked again after a reboot.

I then tried to install the intel firmware and then it stopped working all together. I tried reinstalling the linux-firemware package and then all the packages from the above steps (with --reinstall) but no luck.

the camera is detected, but just gets a black image and the white recording LED does not turn on.

Any ideas?

Thanks!

Ronan0912 commented 1 year ago

@fvbock

Try removing the firmware manually:

$ sudo rm -rf /usr/lib/firmware/intel/ipu6*

Also can you ensure you removed and installed linux-firmware (not linux-fireware)?

PS: regarding sleep, I read somewhere that suspend to ram wasn't supported by the driver.

jwrdegoede commented 1 year ago

It stopped working after an update to 6.5.5-200.fc38.x86_64 (or some related updates). But it works in the 6.4.15-200.fc38.x86_64. Could someone take a look? I can provide any diag information. cc @jwrdegoede

I've tested the Fedora 6.5.5 kernel with the rpmfusion pkgs on a Lenovo Thnkpad X1 Yoga with ov2740 sensor and that works fine. But I guess their might be an issue with 6.5.y and the ivsc driver which is also involved in the camera stack on Dell models. It is probably best to discuss this further in some other venue though as there are already several different topics being discussed here. Please send me an email about this at hdegoede@redhat.com then and let me know which vendor + model your laptop is and then we will see from there.

lukemarsden commented 1 year ago

Thanks for your note @jwrdegoede, inspired by this I just finally got the ov2740 in my X1 Yoga Gen 8 working reliably using Fedora 38 on kernel 6.5.5-200.fc38.x86_64 following your instructions here: https://hansdegoede.livejournal.com/27276.html

It seemed to be broken at first but I think I just needed to reboot twice!? Per https://github.com/intel/ipu6-drivers/issues/22#issuecomment-1742769010 I also tried installing 6.4.15-200.fc38.x86_64 but it didn't seem to work there, but upon rebooting into 6.5.5 it started working!

I've turned the camera off and on maybe 50 times - only one time I got the dreaded black square and had to sudo systemctl restart v4l2-relayd.service

I'll come back to the X1 Carbon Gen 11 another day. Despite having, I think, an idential sensor it seems to be much flakier, per https://github.com/intel/ipu6-drivers/issues/172#issuecomment-1740521437.