intel / ipu6-drivers

152 stars 49 forks source link

kernel panic on 6.7.0-9.gaedda80-default #205

Closed alinelena closed 2 months ago

alinelena commented 5 months ago

using opensuse tumbleweed and 6.7.0-9.gaedda80-default trying to get the drivers loading with out of tree builds and failing.

building all the stack like this


#!/usr/bin/env bash

pushd ipu6-drivers

git clone https://github.com/intel/ivsc-driver.git
cp -r ivsc-driver/backport-include ivsc-driver/drivers ivsc-driver/include .
rm -rf ivsc-driver

make -j3
sudo make modules_install
sudo depmod -a

popd

for i in ipu_adl  ipu_mtl  ipu_tgl; do 
  sudo cp -r ipu6-camera-bins/include/$i /usr/include/
done

sudo mkdir -p /usr/lib/firmware/intel/
sudo mkdir -p /usr/lib/firmware/intel/unsigned

for i in ipu6epadln_fw.bin  ipu6ep_fw.bin  ipu6epmtl_fw.bin  ipu6_fw.bin; do 
  sudo cp -r ipu6-camera-bins/lib/firmware/intel/$i  /usr/lib/firmware/intel/
  sudo cp -r ipu6-camera-bins/lib/firmware/intel/$i  /usr/lib/firmware/intel/unsigned/
done 

for i in ipu_adl  ipu_mtl  ipu_tgl; do
  sudo cp -r ipu6-camera-bins/lib/$i  /usr/lib
done

sh ./build.sh

sudo cp -r ./out/install/lib/* /usr/lib/
sudo cp -r ./out/install/lib64/* /usr/lib/
sudo cp -r ./out/install/share/* /usr/share/

main error is

[   17.212136] input: Dell Privacy Driver as /devices/platform/PNP0C14:02/wmi_bus/wmi_bus-PNP0C14:02/6932965F-1671-4CEB-B988-D3AB0A901919/input/input21
[   17.212755] spi-nor spi1.0: w25q512jvq (65536 Kbytes)
[   17.220358] input: Dell WMI hotkeys as /devices/platform/PNP0C14:02/wmi_bus/wmi_bus-PNP0C14:02/9DBB5994-A997-11DA-B012-B622A1EF5492/input/input22
[   17.220407] Creating 1 MTD partitions on "0000:00:1f.5":
[   17.220410] 0x000000000000-0x000004000000 : "BIOS"
[   17.221399] intel_tcc_cooling: TCC Offset locked
[   17.221446] BUG: kernel NULL pointer dereference, address: 0000000000000000
[   17.221453] #PF: supervisor read access in kernel mode
[   17.221456] #PF: error_code(0x0000) - not-present page
[   17.221458] PGD 0 P4D 0 
[   17.221462] Oops: 0000 [#1] PREEMPT SMP NOPTI
[   17.221467] CPU: 5 PID: 1028 Comm: (udev-worker) Tainted: G           OE      6.7.0-9.gaedda80-default #1 openSUSE Tumbleweed (unreleased) efa6eaac34d992d2676b5a6b9d2124424bc6ccc9
[   17.221472] Hardware name: Dell Inc. XPS 9320/0CW9KM, BIOS 2.5.0 07/07/2023
[   17.221474] RIP: 0010:__wake_up_common+0x2a/0xa0
[   17.221481] Code: 0f 1f 44 00 00 41 57 41 56 41 55 41 54 55 53 48 89 fb 48 83 c3 08 48 83 ec 08 48 8b 47 08 89 54 24 04 48 39 c3 74 55 4d 89 c7 <4c> 8b 00 41 89 f5 41 89 ce 48 8d 78 e8 4d 8d 60 e8 eb 27 74 0c 83
[   17.221485] RSP: 0018:ffffabb580e6fa20 EFLAGS: 00010082
[   17.221488] RAX: 0000000000000000 RBX: ffff9e7cc1991f20 RCX: 0000000000000000
[   17.221491] RDX: 0000000000000000 RSI: 0000000000000003 RDI: ffff9e7cc1991f18
[   17.221492] RBP: ffff9e7cc1991f18 R08: 0000000000000000 R09: 0000000000000004
[   17.221494] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000003
[   17.221496] R13: 0000000000000246 R14: 0000000000000000 R15: 0000000000000000
[   17.221499] FS:  00007f3bbbf81d40(0000) GS:ffff9e83ef480000(0000) knlGS:0000000000000000
[   17.221502] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   17.221505] CR2: 0000000000000000 CR3: 0000000107038000 CR4: 0000000000f50ef0
[   17.221508] PKRU: 55555554
[   17.221510] Call Trace:
[   17.221514]  <TASK>
[   17.221518]  ? __die+0x23/0x70
[   17.221524]  ? page_fault_oops+0x14d/0x490
[   17.221529]  ? post_alloc_hook+0xad/0xe0
[   17.221534]  ? exc_page_fault+0x71/0x160
[   17.221540]  ? asm_exc_page_fault+0x26/0x30
[   17.221544]  ? __wake_up_common+0x2a/0xa0
[   17.221548]  __wake_up+0x36/0x60
[   17.221553]  __vb2_queue_cancel+0xd2/0x290 [videobuf2_common cf460cab77dd9b0ea08fec5fce1cc292fbd64de6]
[   17.221567]  vb2_core_queue_release+0x22/0x50 [videobuf2_common cf460cab77dd9b0ea08fec5fce1cc292fbd64de6]
[   17.221579]  isys_unregister_subdevices+0x36/0x80 [intel_ipu6_isys 09c680510745fe1ba6fd63424a593389c637245a]
[   17.221596]  isys_probe+0x565/0x9f0 [intel_ipu6_isys 09c680510745fe1ba6fd63424a593389c637245a]
[   17.221609]  ? rwsem_wake.isra.0+0x69/0x90
[   17.221613]  ? up_write+0x45/0x50
[   17.221616]  ? kernfs_add_one+0x10b/0x140
[   17.221622]  ipu_bus_probe+0x5c/0x100 [intel_ipu6 b59c8ff85deb8f230e718fb61d91603f1fd48f29]
[   17.221635]  really_probe+0x19b/0x3e0
[   17.221640]  ? __pfx___driver_attach+0x10/0x10
[   17.221643]  __driver_probe_device+0x78/0x160
[   17.221646]  driver_probe_device+0x1f/0x90
[   17.221649]  __driver_attach+0xd2/0x1c0
[   17.221651]  bus_for_each_dev+0x74/0xc0
[   17.221655]  bus_add_driver+0x116/0x220
[   17.221658]  driver_register+0x59/0x100
[   17.221661]  ? __pfx_isys_driver_init+0x10/0x10 [intel_ipu6_isys 09c680510745fe1ba6fd63424a593389c637245a]
[   17.221677]  do_one_initcall+0x45/0x310
[   17.221682]  ? kmalloc_trace+0x2a/0xa0
[   17.221686]  do_init_module+0x60/0x240
[   17.221689]  init_module_from_file+0x86/0xc0
[   17.221693]  idempotent_init_module+0x109/0x2a0
[   17.221696]  __x64_sys_finit_module+0x5e/0xb0
[   17.221699]  do_syscall_64+0x61/0xe0
[   17.221703]  ? __flush_tlb_all+0x13/0x30
[   17.221706]  ? __flush_smp_call_function_queue+0x9b/0x410
[   17.221710]  ? __irq_exit_rcu+0x3b/0xb0
[   17.221714]  entry_SYSCALL_64_after_hwframe+0x6e/0x76
[   17.221718] RIP: 0033:0x7f3bbb9161dd
[   17.221751] Code: 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 13 4c 0d 00 f7 d8 64 89 01 48
[   17.221753] RSP: 002b:00007ffedd82d0f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
[   17.221756] RAX: ffffffffffffffda RBX: 000055fdbbde2950 RCX: 00007f3bbb9161dd
[   17.221758] RDX: 0000000000000000 RSI: 00007f3bbc0f4061 RDI: 0000000000000013
[   17.221759] RBP: 00007f3bbc0f4061 R08: 0000000000000001 R09: 000055fdbbde2e30
[   17.221760] R10: 0000000000000050 R11: 0000000000000246 R12: 0000000000020000
[   17.221762] R13: 0000000000000000 R14: 000055fdbbe83920 R15: 0000000000000000
[   17.221765]  </TASK>
[   17.221766] Modules linked in: intel_tcc_cooling(-) nls_iso8859_1 iwlmvm(+) intel_ipu6_isys(OE+) snd_intel_dspcfg nls_cp437 x86_pkg_temp_thermal spi_nor(+) intel_powerclamp videobuf2_dma_contig iTCO_wdt snd_intel_sdw_acpi vfat intel_pmc_bxt videobuf2_memops dell_wmi mtd mei_pxp mei_hdcp iTCO_vendor_support intel_rapl_msr dell_smm_hwmon(-) snd_hda_codec videobuf2_v4l2 coretemp fat videobuf2_common snd_hda_core hid_sensor_als processor_thermal_device_pci mac80211 snd_hwdep hid_sensor_trigger processor_thermal_device hid_sensor_iio_common dell_smbios processor_thermal_wt_hint snd_pcm intel_ipu6_psys(OE) ov01a10(OE) industrialio_triggered_buffer libarc4 processor_thermal_rfim dell_wmi_sysman(+) kvm_intel dcdbas kvm iwlwifi mei_csi(OE) snd_timer processor_thermal_rapl kfifo_buf irqbypass intel_ipu6(OE) dell_wmi_ddv ledtrig_audio firmware_attributes_class dell_wmi_descriptor spi_intel_pci wmi_bmof pcspkr i2c_i801 snd intel_rapl_common cfg80211 industrialio processor_thermal_wt_req soundcore spi_intel i2c_smbus mei_me
[   17.221807]  thunderbolt(+) mei_ace(OE) tiny_power_button processor_thermal_power_floor intel_vsc(OE) igen6_edac processor_thermal_mbox v4l2_fwnode intel_skl_int3472_tps68470 v4l2_async tps68470_regulator button mei_vsc(OE) videodev mei int3403_thermal int340x_thermal_zone mc int3400_thermal intel_hid acpi_thermal_rel intel_pmc_core intel_skl_int3472_discrete acpi_pad acpi_tad sparse_keymap joydev ac fuse efi_pstore configfs dmi_sysfs ip_tables x_tables ext4 mbcache jbd2 cmac algif_hash algif_skcipher af_alg dm_crypt essiv authenc trusted asn1_encoder tee bnep btusb btrtl btintel btbcm btmtk bluetooth ecdh_generic rfkill hid_sensor_custom hid_sensor_hub intel_ishtp_hid hid_multitouch spi_pxa2xx_platform hid_generic dw_dmac i915 crct10dif_pclmul crc32_pclmul crc32c_intel polyval_clmulni polyval_generic gf128mul ghash_clmulni_intel sha512_ssse3 i2c_algo_bit drm_buddy sha256_ssse3 ttm xhci_pci xhci_pci_renesas sha1_ssse3 nvme drm_display_helper xhci_hcd nvme_core aesni_intel ucsi_acpi cec intel_lpss_pci typec_ucsi video
[   17.221857]  intel_ish_ipc nvme_auth intel_lpss crypto_simd cryptd usbcore roles intel_ishtp rc_core idma64 t10_pi typec battery i2c_hid_acpi i2c_hid wmi pinctrl_tigerlake serio_raw dm_mod msr efivarfs
[   17.221871] CR2: 0000000000000000
[   17.221873] ---[ end trace 0000000000000000 ]---
[   17.221875] RIP: 0010:__wake_up_common+0x2a/0xa0
[   17.221879] Code: 0f 1f 44 00 00 41 57 41 56 41 55 41 54 55 53 48 89 fb 48 83 c3 08 48 83 ec 08 48 8b 47 08 89 54 24 04 48 39 c3 74 55 4d 89 c7 <4c> 8b 00 41 89 f5 41 89 ce 48 8d 78 e8 4d 8d 60 e8 eb 27 74 0c 83
[   17.221881] RSP: 0018:ffffabb580e6fa20 EFLAGS: 00010082
[   17.221883] RAX: 0000000000000000 RBX: ffff9e7cc1991f20 RCX: 0000000000000000
[   17.221884] RDX: 0000000000000000 RSI: 0000000000000003 RDI: ffff9e7cc1991f18
[   17.221885] RBP: ffff9e7cc1991f18 R08: 0000000000000000 R09: 0000000000000004
[   17.221887] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000003
[   17.221888] R13: 0000000000000246 R14: 0000000000000000 R15: 0000000000000000
[   17.221889] FS:  00007f3bbbf81d40(0000) GS:ffff9e83ef480000(0000) knlGS:0000000000000000
[   17.221891] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   17.221893] CR2: 0000000000000000 CR3: 0000000107038000 CR4: 0000000000f50ef0
[   17.221894] PKRU: 55555554
[   17.221896] note: (udev-worker)[1028] exited with irqs disabled
[   17.221897] note: (udev-worker)[1028] exited with preempt_count 1
[   17.232193] snd_hda_intel 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[   17.234503] snd_hda_intel 0000:00:1f.3: SoundWire enabled on CannonLake+ platform, using SOF driver
[   17.244032] iwlwifi 0000:00:14.3: Detected Intel(R) Wi-Fi 6E AX211 160MHz, REV=0x370
[   17.244111] thermal thermal_zone9: failed to read out thermal zone (-61)
[   17.252126] iwlwifi 0000:00:14.3: WRT: Invalid buffer destination
[   17.395745] sof-audio-pci-intel-tgl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[   17.396011] sof-audio-pci-intel-tgl 0000:00:1f.3: SoundWire enabled on CannonLake+ platform, using SOF driver
[   17.396041] sof-audio-pci-intel-tgl 0000:00:1f.3: enabling device (0000 -> 0002)
[   17.396328] sof-audio-pci-intel-tgl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
[   17.396387] sof-audio-pci-intel-tgl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[   17.404891] sof-audio-pci-intel-tgl 0000:00:1f.3: use msi interrupt mode
[   17.410055] iwlwifi 0000:00:14.3: WFPM_UMAC_PD_NOTIFICATION: 0x20
[   17.410113] iwlwifi 0000:00:14.3: WFPM_LMAC2_PD_NOTIFICATION: 0x1f
[   17.410123] iwlwifi 0000:00:14.3: WFPM_AUTH_KEY_0: 0x90
[   17.410133] iwlwifi 0000:00:14.3: CNVI_SCU_SEQ_DATA_DW9: 0x0
[   17.411899] iwlwifi 0000:00:14.3: loaded PNVM version e28bb9d7
[   17.411953] iwlwifi 0000:00:14.3: RFIm is deactivated, reason = 4
[   17.416302] debugfs: File '\_SB.PC00.HDAS.SNDW' in directory 'domains' already present!
[   17.417227] debugfs: File '\_SB.PC00.HDAS.SNDW' in directory 'domains' already present!
[   17.427885] sof-audio-pci-intel-tgl 0000:00:1f.3: hda codecs found, mask 4
[   17.428208] iwlwifi 0000:00:14.3: Detected RF GF, rfid=0x2010d000
[   17.431039] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware info: version 2:2:0-57864
[   17.431048] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:23:0
[   17.431056] sof-audio-pci-intel-tgl 0000:00:1f.3: unknown sof_ext_man header type 3 size 0x30
[   17.514504] iwlwifi 0000:00:14.3: base HW address: f0:d4:15:b2:91:e3
[   17.533924] iwlwifi 0000:00:14.3 wlp0s20f3: renamed from wlan0
[   17.552847] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware info: version 2:2:0-57864
[   17.552857] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:23:0
[   17.584768] sof-audio-pci-intel-tgl 0000:00:1f.3: Topology: ABI 3:22:1 Kernel ABI 3:23:0
[   17.584935] sof_sdw sof_sdw: ASoC: Parent card not yet available, widget card binding deferred
[   17.608014] sof_sdw sof_sdw: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 3
[   17.633615] input: sof-soundwire HDMI/DP,pcm=5 as /devices/pci0000:00/0000:00:1f.3/sof_sdw/sound/card0/input23
[   17.633723] input: sof-soundwire HDMI/DP,pcm=6 as /devices/pci0000:00/0000:00:1f.3/sof_sdw/sound/card0/input24
[   17.633851] input: sof-soundwire HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:1f.3/sof_sdw/sound/card0/input25
[   18.246154] usbcore: registered new interface driver ljca
[   18.250244] ljca: exports duplicate symbol ljca_register_event_cb (owned by usb_ljca)

full log is here full.log

in the full log i see few interesting things that make me think this is really porcelain territory, missing configs for the default kernel I load, but I am not expert in these things.

bverhagen commented 5 months ago

I seem to have the same issue with OpenSUSE Tumbleweed 6.7.1 ( 4959dd8).

alinelena commented 5 months ago

@bverhagen thanks for confirming, did it ever worked on opensuse?

bverhagen commented 5 months ago

@bverhagen thanks for confirming, did it ever worked on opensuse?

Not for me. The furthest I got (in the past) was where my browser recognizes the camera, tries to read it, the 'active' led flashes on for half a second, after which it all errors out.

Every now and then, I pull the latest version for all the repositories and retry. Currently, I do not get this far and seem to have the same issue as you do.

During my debugging, I found one post of an openSUSE user (no idea whether this user used TW or Leap) who seemingly had it working, but I would not call that solid evidence.

benjiman commented 4 months ago

I'm having the same issue. Also on Tumbleweed. Kernel 6.7.6. Any pointers for helping debug?

jwrdegoede commented 4 months ago

This is fixed by: https://github.com/jwrdegoede/ipu6-drivers/commit/da1fb08fe045a83fbdc585490a3ce3bcc4c658e6 I will submit a pull-request for this soon.

madsl commented 3 months ago

I got it working on 6.8.4 with my Dell XPS 9320 due to aplund finding out what commit made ipu6 not load properly.

https://github.com/stefanpartheym/archlinux-ipu6-webcam/issues/69#issuecomment-2044451305

madsl commented 2 months ago

I'm not able to get it to work with or after this commit though: 92fb37ebd8d7d210e9e1ea5213b848b87da9619a

I tried building the kernel with 0004 and 0005 6.8 kernel patches, and it builds just fine, but icamerasrc stops working . There's so many moving parts here that I don't know how to debug it, so I just revert and build as before.

Dell XPS 9320 has a ov01a10 sensor.