drm_WARN_ON(!found_head) when no monitor connected to the video card
First time I see this, just compiled 6.7.0-rc3 this morning. This happens when booting with monitor connected to VGA on motherboard (i915), while having no monitors connected on GTX-660 [GK106] video card.
54.904978] nouveau 0000:01:00.0: enabling device (0000 -> 0003)
[ 54.918760] nouveau 0000:01:00.0: NVIDIA GK106 (0e6000a1)
[ 54.936861] ACPI: video: Video Device [GFX0] (multi-head: yes rom: no post: no)
[ 54.947153] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input5
[ 54.952146] i915 display info: display version: 9
[ 54.952155] i915 display info: cursor_needs_physical: no
[ 54.952162] i915 display info: has_cdclk_crawl: no
[ 54.952169] i915 display info: has_cdclk_squash: no
[ 54.952176] i915 display info: has_ddi: yes
[ 54.952182] i915 display info: has_dp_mst: yes
[ 54.952189] i915 display info: has_dsb: no
[ 54.952195] i915 display info: has_fpga_dbg: yes
[ 54.952202] i915 display info: has_gmch: no
[ 54.952208] i915 display info: has_hotplug: yes
[ 54.952215] i915 display info: has_hti: no
[ 54.952221] i915 display info: has_ipc: yes
[ 54.952227] i915 display info: has_overlay: no
[ 54.952234] i915 display info: has_psr: yes
[ 54.952240] i915 display info: has_psr_hw_tracking: yes
[ 54.952247] i915 display info: overlay_needs_physical: no
[ 54.952254] i915 display info: supports_tv: no
[ 54.952260] i915 display info: has_hdcp: yes
[ 54.952266] i915 display info: has_dmc: yes
[ 54.952273] i915 display info: has_dsc: no
[ 55.000778] nouveau 0000:01:00.0: bios: version 80.06.10.00.7f
[ 55.095595] fbcon: i915drmfb (fb0) is primary device
[ 55.110540] nouveau 0000:01:00.0: fb: 2048 MiB GDDR5
[ 55.151347] Console: switching to colour frame buffer device 170x48
[ 55.176108] i915 0000:00:02.0: [drm] fb0: i915drmfb frame buffer device
[ 55.356100] nouveau 0000:01:00.0: DRM: VRAM: 2048 MiB
[ 55.356790] nouveau 0000:01:00.0: DRM: GART: 1048576 MiB
[ 55.356912] nouveau 0000:01:00.0: DRM: TMDS table version 2.0
[ 55.369714] nouveau 0000:01:00.0: DRM: MM: using COPY for buffer copies
[ 55.399229] ------------[ cut here ]------------
[ 55.400022] nouveau 0000:01:00.0: drm_WARN_ON(!found_head)
[ 55.400103] WARNING: CPU: 2 PID: 149 at drivers/gpu/drm/nouveau/dispnv50/disp.c:2731 nv50_display_read_hw_state.isra.0+0x2e9/0x7a0 [nouveau]
[ 55.401410] Modules linked in: nouveau(+) i915 dm_mod drm_exec drm_gpuvm gpu_sched i2c_algo_bit drm_buddy hid_generic drm_display_helper usbhid hid cec sd_mod rc_core t10_pi drm_ttm_helper sr_mod ttm crc64_rocksoft crc64 cdrom crc_t10dif crct10dif_generic drm_kms_helper ahci xhci_pci libahci crct10dif_pclmul crct10dif_common crc32_pclmul xhci_hcd i2c_i801 libata crc32c_intel drm usbcore i2c_smbus r8169 scsi_mod realtek mdio_devres libphy scsi_common video usb_common fan wmi button
[ 55.402507] CPU: 2 PID: 149 Comm: (udev-worker) Not tainted 6.7.0-rc3pd1 #2
[ 55.402663] Hardware name: System manufacturer System Product Name/PRIME H310M-C R2.0, BIOS 2208 07/09/2021
[ 55.402881] RIP: 0010:nv50_display_read_hw_state.isra.0+0x2e9/0x7a0 [nouveau]
[ 55.403947] Code: df e8 3b f5 17 c9 48 8b 2b 48 89 df e8 40 1d 94 c9 48 c7 c1 a0 77 db c1 48 89 ea 48 c7 c7 60 77 db c1 48 89 c6 e8 d7 30 c5 c8 <0f> 0b 49 8d 7f 08 e8 0c f5 17 c9 49 8b 47 08 4c 8d 78 f8 48 39 44
[ 55.404330] RSP: 0018:ffff8881a3107058 EFLAGS: 00010286
[ 55.404453] RAX: 0000000000000000 RBX: ffff8881032b80c0 RCX: ffffffff8a83bf6c
[ 55.404608] RDX: 0000000000000000 RSI: 0000000000000008 RDI: 0000000000000001
[ 55.404762] RBP: ffff88810247a2a0 R08: 0000000000000001 R09: ffffed1034620da5
[ 55.404917] R10: ffff8881a3106d2f R11: 0000000000000001 R12: ffff8881a31070d8
[ 55.408925] R13: ffff8881a753c008 R14: 00000000000000ff R15: ffff88816669a000
[ 55.412878] FS: 00007faba187c8c0(0000) GS:ffff8883e7300000(0000) knlGS:0000000000000000
[ 55.416849] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 55.420769] CR2: 00007faba186b5e2 CR3: 000000013a5be006 CR4: 00000000003706f0
[ 55.424703] Call Trace:
[ 55.428536] <TASK>
[ 55.432329] ? __warn+0xa5/0x200
[ 55.436122] ? nv50_display_read_hw_state.isra.0+0x2e9/0x7a0 [nouveau]
[ 55.440870] ? report_bug+0x1b2/0x1e0
[ 55.444672] ? handle_bug+0x79/0xa0
[ 55.448435] ? exc_invalid_op+0x17/0x40
[ 55.452157] ? asm_exc_invalid_op+0x1a/0x20
[ 55.455855] ? _prb_read_valid+0x35c/0x400
[ 55.459512] ? nv50_display_read_hw_state.isra.0+0x2e9/0x7a0 [nouveau]
[ 55.464080] ? nv50_display_read_hw_state.isra.0+0x2e9/0x7a0 [nouveau]
[ 55.468566] ? nv50_display_init+0xd0/0x240 [nouveau]
[ 55.472993] ? __pfx_nv50_display_read_hw_state.isra.0+0x10/0x10 [nouveau]
[ 55.477436] ? lock_release+0xe0/0x3c0
[ 55.480946] ? __pfx_lock_release+0x10/0x10
[ 55.484477] ? lock_release+0x1d5/0x3c0
[ 55.487927] nv50_display_init+0x239/0x240 [nouveau]
[ 55.492258] nouveau_display_init+0x13c/0x190 [nouveau]
[ 55.496553] ? __pfx_nouveau_display_init+0x10/0x10 [nouveau]
[ 55.500840] ? blocking_notifier_chain_register+0x4a/0x70
[ 55.504225] ? nouveau_display_create+0x4eb/0x7f0 [nouveau]
[ 55.508555] nouveau_drm_device_init+0x54c/0x1a80 [nouveau]
[ 55.512850] ? __pfx_nouveau_drm_device_init+0x10/0x10 [nouveau]
[ 55.517116] ? __pfx_pci_update_current_state+0x10/0x10
[ 55.520450] ? drm_debugfs_dev_init+0x3b/0x50 [drm]
[ 55.524073] ? __kasan_check_byte+0x13/0x50
[ 55.527429] ? pci_enable_device_flags+0x4e/0x1e0
[ 55.530785] nouveau_drm_probe+0x194/0x360 [nouveau]
[ 55.535053] ? __pfx_nouveau_drm_probe+0x10/0x10 [nouveau]
[ 55.539311] ? _raw_spin_unlock_irqrestore+0x44/0x60
[ 55.542557] ? _raw_spin_unlock_irqrestore+0x44/0x60
[ 55.545682] ? __pfx_nouveau_drm_probe+0x10/0x10 [nouveau]
[ 55.549590] local_pci_probe+0x76/0xe0
[ 55.552454] pci_device_probe+0x16f/0x420
[ 55.555204] ? kernfs_add_one+0xc3/0x250
[ 55.557875] ? __pfx_pci_device_probe+0x10/0x10
[ 55.560534] ? kernfs_put+0x1c/0x40
[ 55.563020] ? sysfs_do_create_link_sd+0x78/0xe0
[ 55.565382] really_probe+0x28b/0x5c0
[ 55.567724] __driver_probe_device+0xd9/0x210
[ 55.570025] driver_probe_device+0x4a/0x110
[ 55.572318] __driver_attach+0x148/0x2b0
[ 55.574582] ? __pfx___driver_attach+0x10/0x10
[ 55.576872] bus_for_each_dev+0xe6/0x150
[ 55.579150] ? __pfx_bus_for_each_dev+0x10/0x10
[ 55.581412] bus_add_driver+0x1aa/0x300
[ 55.583643] driver_register+0xa0/0x1c0
[ 55.585794] ? __pfx_nouveau_drm_init+0x10/0x10 [nouveau]
[ 55.588850] do_one_initcall+0xd3/0x3c0
[ 55.591030] ? __pfx_do_one_initcall+0x10/0x10
[ 55.593243] ? kasan_unpoison+0x44/0x70
[ 55.595432] do_init_module+0x13a/0x3d0
[ 55.597574] load_module+0x35d7/0x3a80
[ 55.599791] ? __pfx_load_module+0x10/0x10
[ 55.601948] ? ima_post_read_file+0x15a/0x180
[ 55.604127] ? __pfx_ima_post_read_file+0x10/0x10
[ 55.606334] ? __pfx_kernel_read_file+0x10/0x10
[ 55.608493] ? filemap_read+0x4d7/0x650
[ 55.610663] ? init_module_from_file+0xd1/0x130
[ 55.612841] init_module_from_file+0xd1/0x130
[ 55.614986] ? __pfx_init_module_from_file+0x10/0x10
[ 55.617111] ? find_held_lock+0x83/0xa0
[ 55.619277] ? do_raw_spin_unlock+0x88/0xf0
[ 55.621401] idempotent_init_module+0x1be/0x3f0
[ 55.623548] ? __pfx_idempotent_init_module+0x10/0x10
[ 55.625705] ? apparmor_capable+0xa0/0x1b0
[ 55.627848] __x64_sys_finit_module+0x7c/0xd0
[ 55.629946] do_syscall_64+0x61/0x120
[ 55.632025] ? do_syscall_64+0x70/0x120
[ 55.634093] ? mark_held_locks+0x1a/0x90
[ 55.636159] ? lockdep_hardirqs_on_prepare+0x149/0x210
[ 55.638224] ? do_syscall_64+0x70/0x120
[ 55.640267] ? lockdep_hardirqs_on_prepare+0x149/0x210
[ 55.642336] ? do_syscall_64+0x70/0x120
[ 55.644386] ? do_syscall_64+0x70/0x120
[ 55.646388] ? do_syscall_64+0x70/0x120
[ 55.648364] entry_SYSCALL_64_after_hwframe+0x6e/0x76
[ 55.650346] RIP: 0033:0x7faba1f94ee9
[ 55.652356] Code: 08 89 e8 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 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 ff 1e 0d 00 f7 d8 64 89 01 48
[ 55.656952] RSP: 002b:00007fffd8658518 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
[ 55.659352] RAX: ffffffffffffffda RBX: 0000558f0a5a1f80 RCX: 00007faba1f94ee9
[ 55.661765] RDX: 0000000000000000 RSI: 0000558f0a543dc0 RDI: 0000000000000015
[ 55.664210] RBP: 0000000000000000 R08: 0000000000000060 R09: 0000558f0a546f30
[ 55.666639] R10: 0000000000000038 R11: 0000000000000246 R12: 0000558f0a543dc0
[ 55.669087] R13: 0000000000020000 R14: 0000558f0a5ab7b0 R15: 0000558f0a543dc0
[ 55.671550] </TASK>
[ 55.673899] irq event stamp: 363151
[ 55.676274] hardirqs last enabled at (363161): [<ffffffff8a838472>] console_unlock+0x192/0x1b0
[ 55.678810] hardirqs last disabled at (363170): [<ffffffff8a838457>] console_unlock+0x177/0x1b0
[ 55.681315] softirqs last enabled at (362778): [<ffffffff8a73229b>] __irq_exit_rcu+0xfb/0x120
[ 55.683850] softirqs last disabled at (362773): [<ffffffff8a73229b>] __irq_exit_rcu+0xfb/0x120
[ 55.686341] ---[ end trace 0000000000000000 ]---
[ 55.704607] [drm] Initialized nouveau 1.4.0 20120801 for 0000:01:00.0 on minor 1
[ 55.721203] nouveau 0000:01:00.0: [drm] Cannot find any crtc or sizes
[ 55.727119] nouveau 0000:01:00.0: DRM: Disabling PCI power management to avoid bug
[ 55.743053] nouveau 0000:01:00.0: [drm] Cannot find any crtc or sizes
[ 55.756377] nouveau 0000:01:00.0: [drm] Cannot find any crtc or sizes
[ 55.769568] nouveau 0000:01:00.0: [drm] Cannot find any crtc or sizes
[ 55.781929] nouveau 0000:01:00.0: [drm] Cannot find any crtc or sizes
[ 56.074840] raid6: avx2x4 gen() 14004 MB/s
[ 56.142831] raid6: avx2x2 gen() 9348 MB/s
[ 56.210836] raid6: avx2x1 gen() 5255 MB/s
[ 56.210930] raid6: using algorithm avx2x4 gen() 14004 MB/s
root@albukerk:/home/paul# dmesg
[ 0.000000] Linux version 6.7.0-rc3pd1 (paul@albukerk) (gcc (Debian 13.2.0-7) 13.2.0, GNU ld (GNU Binutils for Debian) 2.41) #2 SMP PREEMPT_DYNAMIC Sat Dec 2 11:56:00 EST 2023
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-6.7.0-rc3pd1 root=/dev/mapper/main-myroot ro pcie_aspm=off nouveau.debug=info
While searching the issue I had found this relatively similar: https://lore.kernel.org/lkml/20231111120323.GAZU9tiw8e0RSzCGB9@fat_crate.local/T/
Edited by Paul Dufresne