ublue-os / bluefin

The next generation Linux workstation, designed for reliability, performance, and sustainability.
https://projectbluefin.io
Apache License 2.0
1.04k stars 142 forks source link

Dell Latitude 7440 MIPI IPU6 webcam not initializing: "Direct firmware load for intel/ipu/ipu6ep_fw.bin failed with error -2" #1633

Closed tomaszn closed 6 days ago

tomaszn commented 2 weeks ago

Describe the bug

Dell Latitude 7440 is one of the laptop models that contain a webcam based on an Intel MIPI IPU6 subsystem. Proper drivers appeared in Linux 6.10, so are now available in aurora-dx:latest. However, while the device is being recognized, the firmware fails to load, and the webcam does not work.

The relevant lines from system journal are as follows:

❯ journalctl -b | grep -i 'ipu6\|edac'
Aug 29 18:30:30 fedora kernel: EDAC MC: Ver: 3.0.0
Aug 29 18:30:30 fedora kernel: EDAC MC: Ver: 3.0.0
Aug 29 16:31:33 fedora kernel: caller igen6_probe+0x2f6/0x800 [igen6_edac] mapping multiple BARs
Aug 29 16:31:33 fedora kernel: EDAC MC0: Giving out device to module igen6_edac controller Intel_client_SoC MC#0: DEV 0000:00:00.0 (INTERRUPT)
Aug 29 16:31:33 fedora kernel: intel-ipu6 0000:00:05.0: enabling device (0000 -> 0002)
Aug 29 16:31:33 fedora kernel: intel-ipu6 0000:00:05.0: IPU6 in secure mode touch 0x0 mask 0x0
Aug 29 16:31:33 fedora kernel: intel-ipu6 0000:00:05.0: Unexpected CSR 0x0
Aug 29 16:31:33 fedora kernel: intel-ipu6 0000:00:05.0: Unexpected CSR 0x0
Aug 29 16:31:33 fedora kernel: intel-ipu6 0000:00:05.0: Unexpected CSR 0x0
Aug 29 16:31:33 fedora kernel: intel-ipu6 0000:00:05.0: Unexpected CSR 0x0
Aug 29 16:31:33 fedora kernel: intel-ipu6 0000:00:05.0: Unexpected CSR 0x0
Aug 29 16:31:33 fedora kernel: intel-ipu6 0000:00:05.0: Unexpected CSR 0x0
Aug 29 16:31:33 fedora kernel: intel-ipu6 0000:00:05.0: Unexpected CSR 0x0
Aug 29 16:31:33 fedora kernel: intel-ipu6 0000:00:05.0: Unexpected CSR 0x0
Aug 29 16:31:33 fedora kernel: intel-ipu6 0000:00:05.0: Unexpected CSR 0x0
Aug 29 16:31:33 fedora kernel: intel-ipu6 0000:00:05.0: Unexpected CSR 0x0
Aug 29 16:31:33 fedora kernel: intel-ipu6 0000:00:05.0: Direct firmware load for intel/ipu/ipu6ep_fw.bin failed with error -2
Aug 29 16:31:33 fedora kernel: intel-ipu6 0000:00:05.0: error -ENOENT: Requesting signed firmware intel/ipu/ipu6ep_fw.bin failed
Aug 29 16:31:33 fedora kernel: intel-ipu6 0000:00:05.0: probe with driver intel-ipu6 failed with error -2
Aug 29 16:31:33 fedora kernel: EDAC MC1: Giving out device to module igen6_edac controller Intel_client_SoC MC#1: DEV 0000:00:00.0 (INTERRUPT)
Aug 29 16:31:33 fedora kernel: EDAC igen6: v2.5.1
Aug 29 16:31:33 fedora kernel: EDAC igen6 MC1: HANDLING IBECC MEMORY ERROR
Aug 29 16:31:33 fedora kernel: EDAC igen6 MC1: ADDR 0x1ffffffffff 
Aug 29 16:31:33 fedora kernel: EDAC igen6 MC0: HANDLING IBECC MEMORY ERROR
Aug 29 16:31:33 fedora kernel: EDAC igen6 MC0: ADDR 0x1ffffffffff 
Aug 29 16:31:33 fedora kernel: Modules linked in: dell_smm_hwmon(+) firmware_attributes_class snd_hda_core(+) wmi_bmof snd_hwdep wl(POE+) pcspkr acpi_cpufreq(-) mac80211 snd_seq snd_seq_device binfmt_misc snd_pcm hid_sensor_als hid_sensor_accel_3d hid_sensor_trigger libarc4 hid_sensor_iio_common snd_timer industrialio_triggered_buffer kfifo_buf processor_thermal_device_pci industrialio spi_intel_pci snd i2c_i801 processor_thermal_device processor_thermal_wt_hint spi_intel processor_thermal_rfim soundcore i2c_smbus processor_thermal_rapl mei_me intel_rapl_common iwlwifi intel_ipu6 mei processor_thermal_wt_req thunderbolt(+) idma64 processor_thermal_power_floor ipu_bridge processor_thermal_mbox igen6_edac vfat fat int3403_thermal soc_button_array int340x_thermal_zone legion_laptop mei_vsc_hw platform_profile intel_skl_int3472_tps68470 intel_pmc_core tps68470_regulator dptf_pch_fivr clk_tps68470 intel_hid intel_vsec sparse_keymap int3400_thermal pmt_telemetry intel_skl_int3472_discrete pmt_class acpi_thermal_rel acpi_tad acpi_pad joydev

Indeed, the filesystem contains no files called ipu6ep_fw.bin:

❯ find / -iname '*ipu6*'
find: ‘/run/user/1000/doc’: Permission denied
/sys/kernel/btf/intel_ipu6
/sys/kernel/debug/printk/index/intel_ipu6
/sys/bus/pci/drivers/intel-ipu6
/sys/module/ipu_bridge/holders/intel_ipu6
/sys/module/intel_ipu6
/sys/module/intel_ipu6/drivers/pci:intel-ipu6
/sysroot/ostree/repo/refs/heads/rpmostree/pkg/ipu6-camera-bins-firmware
/sysroot/ostree/repo/refs/heads/rpmostree/pkg/akmod-intel-ipu6
/sysroot/ostree/repo/refs/heads/rpmostree/pkg/ipu6-camera-bins
/sysroot/ostree/repo/refs/heads/rpmostree/pkg/ipu6-camera-hal
/sysroot/ostree/deploy/fedora/deploy/edf4e989bd7a45abb7dce447d82bd3bf33012414cd83ead86e07adb5c4c8d16c.0/usr/lib/modules/6.10.5-201.fsync.fc40.x86_64/kernel/drivers/media/pci/intel/ipu6
/sysroot/ostree/deploy/fedora/deploy/edf4e989bd7a45abb7dce447d82bd3bf33012414cd83ead86e07adb5c4c8d16c.0/usr/lib/modules/6.10.5-201.fsync.fc40.x86_64/kernel/drivers/media/pci/intel/ipu6/intel-ipu6-isys.ko.xz
/sysroot/ostree/deploy/fedora/deploy/edf4e989bd7a45abb7dce447d82bd3bf33012414cd83ead86e07adb5c4c8d16c.0/usr/lib/modules/6.10.5-201.fsync.fc40.x86_64/kernel/drivers/media/pci/intel/ipu6/intel-ipu6.ko.xz
find: File system loop detected; ‘/sysroot/ostree/deploy/fedora/deploy/edf4e989bd7a45abb7dce447d82bd3bf33012414cd83ead86e07adb5c4c8d16c.1’ is part of the same file system loop as ‘/’.
/usr/lib/modules/6.10.5-201.fsync.fc40.x86_64/kernel/drivers/media/pci/intel/ipu6
/usr/lib/modules/6.10.5-201.fsync.fc40.x86_64/kernel/drivers/media/pci/intel/ipu6/intel-ipu6-isys.ko.xz
/usr/lib/modules/6.10.5-201.fsync.fc40.x86_64/kernel/drivers/media/pci/intel/ipu6/intel-ipu6.ko.xz

What did you expect to happen?

I expected the webcam to start working after switching to :latest with kernel 6.10.

Output of rpm-ostree status

State: idle
AutomaticUpdates: stage; rpm-ostreed-automatic.timer: no runs since boot
Deployments:
● ostree-image-signed:docker://ghcr.io/ublue-os/aurora-dx:latest
                   Digest: sha256:262c593992158da426c08f52dab6ce5c4fe646ec4b5614937f5b0a33a6cb347d
                  Version: 40.20240828.0 (2024-08-29T04:51:36Z)

  ostree-unverified-image:docker://ghcr.io/ublue-os/aurora-dx:latest
                   Digest: sha256:262c593992158da426c08f52dab6ce5c4fe646ec4b5614937f5b0a33a6cb347d
                  Version: 40.20240828.0 (2024-08-29T04:51:36Z)

Output of groups

laptop-user wheel lxd incus-admin libvirt docker

Extra information or context

❯ uname -a
Linux fedora 6.10.5-201.fsync.fc40.x86_64 #1 SMP PREEMPT_DYNAMIC TKG Wed Aug 21 22:29:00 UTC 2024 x86_64 GNU/Linux
castrojo commented 2 weeks ago

Do we know if all we need is a new kernel? Or are there other steps? Wonder if this would work on Fedora. I don't think anyone on the team has this camera would it would be great to figure this out.

tomaszn commented 2 weeks ago

I think the kernel is good, but the firmware is missing:

error -ENOENT: Requesting signed firmware intel/ipu/ipu6ep_fw.bin failed

There is a file that sounds like a firmware package for these types of cameras:

/sysroot/ostree/repo/refs/heads/rpmostree/pkg/ipu6-camera-bins-firmware

How can I check if it is installed, and what files it contains?

npalix commented 1 week ago

Hi,

For me, the installed file was intel/ipu6ep_fw.bin, but the module intel_ipu6 is looking into intel/ipu. Firmware are available at https://github.com/intel/ipu6-camera-bins

I not longer have that error, but the device is still not available for v4l2-ctl.

tomaszn commented 1 week ago

Thanks, that's a step forward! Here is a snippet for an easy copy-paste. Run as root:

rpm-ostree usroverlay
wget 'https://github.com/intel/ipu6-camera-bins/raw/main/lib/firmware/intel/ipu6ep_fw.bin' -O /usr/lib/firmware/intel/ipu/
rmmod intel-ipu6
modprobe intel-ipu6
castrojo commented 6 days ago

Ok I've reopened the old issue in the main repo so we can centralize it, nice work and thank you for digging in!