470xx drivers and linux 6.2 kernel

today i updated my opensuse tumbleweed system to linux kernel 6.2.
but when i tried to create the nvidia driver (version: 470.161.03) for that kernel it failed.
i uploaded the installer log to this post.
the first errors is:

/tmp/NVIDIA-Linux-x86_64-470.161.03/kernel/nvidia/nv-acpi.c:84:19: error: initialization of ‘void (*)(struct acpi_device *)’ from incompatible pointer type ‘int (*)(struct acpi_device *, int)’ [-Werror=incompatible-pointer-types]
      84 |         .remove = nv_acpi_remove_two_args,
         |                   ^~~~~~~~~~~~~~~~~~~~~~~

then

   /tmp/NVIDIA-Linux-x86_64-470.161.03/kernel/nvidia-drm/nvidia-drm-drv.c:245:21: error: ‘struct drm_mode_config’ has no member named ‘fb_base’
     245 |     dev->mode_config.fb_base = 0;
         |                     ^

and

  /tmp/NVIDIA-Linux-x86_64-470.161.03/kernel/nvidia-drm/nvidia-drm-connector.c:101:18: error: ‘struct drm_connector’ has no member named ‘override_edid’
     101 |     if (connector->override_edid) {
         |                  ^~

nvidia-installer.log (58.4 KB)

1 Like

Same here in my Gentoo-box

Iade

i found a solution:
https://gist.github.com/joanbm

it works for me.

1 Like

Here too :)
Thanks a lot!!!

Iade

Same error, but with RHEL-9.3 / kernel-5.14.0-362.8.1.el9_3.x86_64

  • Latest release: RHEL-9.3 - 8 November 2023; 15 days ago

And driver: 390.157 => NVIDIA-Linux-x86_64-390.157.run

  • Release Date: 2022.11.22
/tmp/selfgz44321/NVIDIA-Linux-x86_64-390.157/kernel/nvidia-drm/
* nvidia-drm-drv.c:244:21: error: 'struct drm_mode_config' has no member named 'fb_base'
* nvidia-drm-connector.c:101:18: error: 'struct drm_connector' has no member named 'override_edid'
* nvidia-drm-fb.c:180:5: error: implicit declaration of function 'drm_helper_mode_fill_fb_struct' [-Werror=implicit-function-declaration]

For the record, I also tried RHEL-9.3’s builtin nouveau driver and got “BUG” … “Oops: …” messages:

  • [drm] Initialized nouveau 1.3.1 20120801 for 0000:01:00.0 on minor 1
  • BUG: kernel NULL pointer dereference, address: 0000000000000020
#  modprobe nouveau

Extract of /var/crash/*-*-*/vmcore-dmesg.txt:

[   19.030117] block dm-0: the capability attribute has been deprecated.
[  245.669307] MXM: GUID detected in BIOS
[  245.669438] ACPI Warning: \_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20221020/nsarguments-61)
[  245.669669] pci 0000:01:00.0: optimus capabilities: enabled, status dynamic power, hda bios codec supported
[  245.669676] VGA switcheroo: detected Optimus DSM method \_SB_.PCI0.PEG0.PEGP handle
[  245.669710] nouveau 0000:01:00.0: enabling device (0000 -> 0003)
[  245.670011] nouveau 0000:01:00.0: NVIDIA GF119 (0d9100a1)
[  245.713659] nouveau 0000:01:00.0: bios: version 75.19.23.00.03
[  245.857864] nouveau 0000:01:00.0: fb: 1024 MiB DDR3
[  245.942577] vga_switcheroo: enabled
[  245.942877] nouveau 0000:01:00.0: DRM: VRAM: 1024 MiB
[  245.942887] nouveau 0000:01:00.0: DRM: GART: 1048576 MiB
[  245.942895] nouveau 0000:01:00.0: DRM: TMDS table version 2.0
[  245.942900] nouveau 0000:01:00.0: DRM: DCB version 4.0
[  245.942905] nouveau 0000:01:00.0: DRM: DCB outp 00: 020003a6 0f220010
[  245.942912] nouveau 0000:01:00.0: DRM: DCB outp 01: 02000362 00020010
[  245.942918] nouveau 0000:01:00.0: DRM: DCB conn 00: 00101046
[  245.944495] nouveau 0000:01:00.0: DRM: MM: using COPY0 for buffer copies
[  245.948317] [drm] Initialized nouveau 1.3.1 20120801 for 0000:01:00.0 on minor 1
[  245.948442] BUG: kernel NULL pointer dereference, address: 0000000000000020
[  245.950225] #PF: supervisor read access in kernel mode
[  245.952488] #PF: error_code(0x0000) - not-present page
[  245.954829] PGD 0 P4D 0 
[  245.957375] Oops: 0000 [#1] PREEMPT SMP PTI
[  245.959023] CPU: 2 PID: 3246 Comm: modprobe Kdump: loaded Tainted: P           OE     -------  ---  5.14.0-362.8.1.el9_3.x86_64 #1
[  245.961985] Hardware name: Dell Inc. XPS L412Z/0178M3, BIOS A03 11/15/2011
[  245.964293] RIP: 0010:nvif_object_mthd+0x139/0x1f0 [nouveau]
[  245.966438] Code: 48 8d 7c 24 20 66 89 04 24 c6 44 24 18 00 e8 8e 0c 77 d8 41 8d 55 20 49 8b 46 08 83 fa 17 76 6e 49 39 c6 74 38 4c 89 74 24 10 <48> 8b 78 20 c6 44 24 06 ff 48 8b 40 38 31 c9 48 89 e6 48 8b 40 28
[  245.970954] RSP: 0018:ffffb43f41d9f768 EFLAGS: 00010282
[  245.973173] RAX: 0000000000000000 RBX: ffff8d66eabb0000 RCX: 0000000000000000
[  245.975278] RDX: 0000000000000028 RSI: ffffb43f41d9f830 RDI: ffffb43f41d9f790
[  245.978265] RBP: ffff8d66eabb0540 R08: 0000000000000000 R09: ffffb43f41d9f9b0
[  245.981280] R10: ffff8d66d39d7078 R11: ffffb43f420b1000 R12: ffffb43f41d9f828
[  245.984227] R13: 0000000000000008 R14: ffff8d66eabb0540 R15: 0000000000000000
[  245.987109] FS:  00007f702b8a5740(0000) GS:ffff8d6817a80000(0000) knlGS:0000000000000000
[  245.989943] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  245.992757] CR2: 0000000000000020 CR3: 0000000128d5a001 CR4: 00000000000606e0
[  245.995561] Call Trace:
[  245.998336]  <TASK>
[  246.001030]  ? show_trace_log_lvl+0x1c4/0x2df
[  246.003662]  ? show_trace_log_lvl+0x1c4/0x2df
[  246.006196]  ? nvif_conn_hpd_status+0x32/0xf0 [nouveau]
[  246.009089]  ? __die_body.cold+0x8/0xd
[  246.011607]  ? page_fault_oops+0x134/0x170
[  246.014061]  ? kernelmode_fixup_or_oops+0x84/0x110
[  246.016524]  ? exc_page_fault+0x62/0x150
[  246.018901]  ? asm_exc_page_fault+0x22/0x30
[  246.021230]  ? nvif_object_mthd+0x139/0x1f0 [nouveau]
[  246.023856]  ? nvif_object_mthd+0x122/0x1f0 [nouveau]
[  246.026500]  ? gk20a_instmem_new+0x20/0x130 [nouveau]
[  246.029149]  ? __pfx_read_tsc+0x10/0x10
[  246.031414]  ? ktime_get+0x38/0xa0
[  246.033641]  ? nvkm_object_init+0x8c/0x120 [nouveau]
[  246.036213]  ? nvkm_object_insert+0x6b/0x80 [nouveau]
[  246.038730]  nvif_conn_hpd_status+0x32/0xf0 [nouveau]
[  246.041205]  nouveau_dp_detect+0x33d/0x3f0 [nouveau]
[  246.043722]  nouveau_connector_detect+0x96/0x5a0 [nouveau]
[  246.046144]  drm_helper_probe_detect+0x81/0xb0 [drm_kms_helper]
[  246.048290]  drm_helper_probe_single_connector_modes+0x461/0x530 [drm_kms_helper]
[  246.050352]  drm_client_modeset_probe+0x1f3/0x5d0 [drm]
[  246.052495]  __drm_fb_helper_initial_config_and_unlock+0x3d/0x1c0 [drm_kms_helper]
[  246.054648]  ? mutex_lock+0xe/0x30
[  246.056784]  drm_fbdev_client_hotplug+0x67/0xa0 [drm_kms_helper]
[  246.059000]  drm_fbdev_generic_setup+0x88/0x130 [drm_kms_helper]
[  246.061256]  nouveau_drm_probe+0x1f8/0x220 [nouveau]
[  246.063874]  local_pci_probe+0x45/0x80
[  246.066094]  pci_call_probe+0x56/0x160
[  246.068265]  pci_device_probe+0x7c/0x100
[  246.070443]  ? driver_sysfs_add+0x59/0xc0
[  246.072603]  really_probe+0xe1/0x390
[  246.074769]  ? pm_runtime_barrier+0x50/0x90
[  246.076869]  __driver_probe_device+0x105/0x180
[  246.078927]  driver_probe_device+0x1e/0x90
[  246.080955]  __driver_attach+0xd2/0x1c0
[  246.082853]  ? __pfx___driver_attach+0x10/0x10
[  246.084630]  bus_for_each_dev+0x78/0xd0
[  246.086378]  bus_add_driver+0xc2/0x1f0
[  246.088111]  driver_register+0x70/0xd0
[  246.089848]  ? __pfx_init_module+0x10/0x10 [nouveau]
[  246.091829]  do_one_initcall+0x44/0x210
[  246.093550]  ? kmem_cache_alloc_trace+0x17e/0x300
[  246.095248]  do_init_module+0x5c/0x270
[  246.096929]  __do_sys_init_module+0x12e/0x1b0
[  246.098592]  do_syscall_64+0x5c/0x90
[  246.100266]  ? vfs_read+0x13c/0x190
[  246.101884]  ? syscall_exit_work+0x103/0x130
[  246.103503]  ? syscall_exit_to_user_mode+0x12/0x30
[  246.105112]  ? do_syscall_64+0x69/0x90
[  246.106733]  ? exit_to_user_mode_prepare+0xec/0x100
[  246.108364]  ? sysvec_irq_work+0x3c/0x90
[  246.109980]  entry_SYSCALL_64_after_hwframe+0x72/0xdc
[  246.111636] RIP: 0033:0x7f702b03f69e
[  246.113306] Code: 48 8b 0d 85 a7 1b 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 49 89 ca b8 af 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 52 a7 1b 00 f7 d8 64 89 01 48
[  246.117026] RSP: 002b:00007ffc99528ab8 EFLAGS: 00000246 ORIG_RAX: 00000000000000af
[  246.118979] RAX: ffffffffffffffda RBX: 0000556dd1678fc0 RCX: 00007f702b03f69e
[  246.120965] RDX: 0000556dd03bf962 RSI: 0000000000619b48 RDI: 0000556dd1e8d460
[  246.122982] RBP: 0000556dd1e8d460 R08: 0000556dd167ca60 R09: 0000000000618010
[  246.124997] R10: 0000000000000005 R11: 0000000000000246 R12: 0000556dd03bf962
[  246.127021] R13: 0000556dd16790f0 R14: 0000556dd1678fc0 R15: 0000556dd167ccb0
[  246.129067]  </TASK>
[  246.131088] Modules linked in: nouveau(+) drm_ttm_helper nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ip_set vboxnetadp(OE) vboxnetflt(OE) nf_tables nfnetlink vboxdrv(OE) qrtr bnep intel_rapl_msr intel_rapl_common x86_pkg_temp_thermal intel_powerclamp coretemp uvcvideo kvm_intel btusb uvc videobuf2_vmalloc btrtl btbcm videobuf2_memops videobuf2_v4l2 btintel videobuf2_common btmtk iTCO_wdt iTCO_vendor_support kvm snd_hda_codec_realtek videodev snd_hda_codec_generic snd_hda_codec_hdmi bluetooth ledtrig_audio snd_hda_intel snd_intel_dspcfg snd_intel_sdw_acpi snd_hda_codec dcdbas dell_smm_hwmon zfs(POE) iwldvm irqbypass rapl mc intel_cstate mac80211 intel_uncore snd_hda_core snd_hwdep libarc4 snd_seq snd_seq_device pcspkr snd_pcm i2c_i801 wmi_bmof i2c_smbus sparse_keymap dell_wmi_descriptor iwlwifi snd_timer lpc_ich cfg80211 mei_me snd mei rfkill soundcore

Driver 390 is out of support for a year now, the runfile driver won’t compile on any recent kernel. Please try using rpmfusion, YMMV: https://rpmfusion.org/Howto/NVIDIA#Legacy_GeForce_400.2F500

1 Like

Maybe drm_device.fb_base was removed an earlier version of kernel5, before kernel6 was released?

File: ~/rpmbuild/BUILD/nvidia-390xx-kmod-390.157/kernel/nvidia-drm/nvidia-drm-drv.c

// Rel. commit "drm: Remove drm_mode_config::fb_base" (Zack Rusin, 18 Oct 2022)
#if defined(CONFIG_FB) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 2, 0))
    /* Currently unused. Update when needed. */
    dev->mode_config.fb_base = 0;
#endif

Missing from: linux/include/drm/drm_mode_config.h at v6.2 · torvalds/linux · GitHub

It turns out my local kernel 5.14.0-427.20.1.el9_4.x86_64 drm_mode_config.h file does not match v5.14-rc7 drm_mode_config.h.

Indeed my local version is identical to v6.4

It look very much like someone has backported drm_mode_config.h v6.4 to 5.14.0-427.20.1.el9_4 and thereby broken NVIDIA graphics cards, and CUDA, generally including the driver for all NVIDIA’s GeForce 400 series up to the GeForce 700 series. (I speculate that the backport also broke the nouveau driver too!)