I have a Lenovo laptop with Intel iGPU + NVIDIA 730M dGPU. I use Optimus Manager to switch between the two. The latest compatible driver for my dGPU is 470xx. Switching to the NVIDIA GPU fails on kernel 6.0 with error:
[ 33.460373] nvidia: module license 'NVIDIA' taints kernel.
[ 33.460377] Disabling lock debugging due to kernel taint
[ 33.767109] nvidia-nvlink: Nvlink Core is being initialized, major device number 511
[ 33.767495] nvidia 0000:02:00.0: enabling device (0000 -> 0003)
[ 33.767550] nvidia 0000:02:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=none
[ 33.884242] NVRM: loading NVIDIA UNIX x86_64 Kernel Module 470.141.03 Thu Jun 30 18:45:31 UTC 2022
[ 33.959628] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms 470.141.03 Thu Jun 30 18:34:41 UTC 2022
[ 34.020634] [drm] [nvidia-drm] [GPU ID 0x00000200] Loading driver
[ 34.036003] NVRM: GPU 0000:02:00.0: Failed to copy vbios to system memory.
[ 34.036131] NVRM: GPU 0000:02:00.0: RmInitAdapter failed! (0x30:0xffff:874)
[ 34.036162] NVRM: GPU 0000:02:00.0: rm_init_adapter failed, device minor number 0
[ 34.036233] [drm:nv_drm_load [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000200] Failed to allocate NvKmsKapiDevice
[ 34.036349] [drm:nv_drm_probe_devices [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000200] Failed to register device
[ 34.143445] NVRM: GPU 0000:02:00.0: Failed to copy vbios to system memory.
[ 34.143556] NVRM: GPU 0000:02:00.0: RmInitAdapter failed! (0x30:0xffff:874)
[ 34.143604] NVRM: GPU 0000:02:00.0: rm_init_adapter failed, device minor number 0
[ 34.262159] NVRM: GPU 0000:02:00.0: Failed to copy vbios to system memory.
[ 34.262265] NVRM: GPU 0000:02:00.0: RmInitAdapter failed! (0x30:0xffff:874)
[ 34.262303] NVRM: GPU 0000:02:00.0: rm_init_adapter failed, device minor number 0
...
Rebooting to kernel 5.19 and switching to the NVIDIA GPU works as expected.
I think the relevant error is Failed to copy vbios to system memory. I found a few occurrences of the same error on various forums, they suggested adding a couple of kernel parameters, but in my case it didn’t help.
I switched to the testing branch, ran pacman -Syyu and mhwd -f -i pci video-nvidia-470xx, rebooted and tried switching to dGPU, but I still have the same error.
To make it explicit: the currently installed version is nvidia-470xx-utils-470.141.03-2.
470.141.03-2 uses the patch referenced here kernel-6.0.patch but failed to apply the last changeset
--- a/nvidia/nv.c
+++ b/nvidia/nv.c
@@ -5423,7 +5423,8 @@ NvBool NV_API_CALL nv_s2idle_pm_configured(void)
{
NvU8 buf[8];
-#if defined(NV_SEQ_READ_ITER_PRESENT)
+// FIXME: Avoid this code path because on Linux 6.0-rc1, init_sync_kiocb references a GPL symbol
+#if defined(NV_SEQ_READ_ITER_PRESENT) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0))
struct file *file;
ssize_t num_read;
struct kiocb kiocb;
--
thus preventing the module to be compiled.
You can either make the change by hand or wait for the next release.
On my laptop, the backlight is broken with kernel 6.0 - I tried all available switches.
470.141.03-3 has the complete patch applied; it has been released following the opening of the issue #2.
If it not builds maybe you need to re-install the targeted kernel package, to force a complete DKMS rebuild for it, with fresh headers.
Just do this while running on another kernel (you know, don’t cut the branch you sit on …).
I don’t see anything related to DKMS in your list.
Have you installed nvidia-470xx-dkms ?
It’s this package that is responsible for rebuilding nvidia modules when your kernel is upgraded.
The only difference is the pre-compiled module is still using the 5.19 patch which isn’t necessary anymore. I’ve just rebuilt linux60-nvidia-470xxwithout it and pushed 470.141.03-3 to unstable and 470.141.03-2.1 to testing and stable.
I installed linux60-headers and nvidia-470xx-dkms. I rebooted to kernel 6, but I have the same error. Also, now the mhwd -f -i pci video-nvidia-470xx command gives:
Warning: no matching device for config 'video-nvidia-470xx' found!
> Removing video-nvidia-470xx...
Sourcing /etc/mhwd-x86_64.conf
Has lib32 support: true
Sourcing /var/lib/mhwd/local/pci/video-nvidia-470xx/MHWDCONFIG
Processing classid: 0300
Sourcing /var/lib/mhwd/scripts/include/0300
Processing classid: 0302
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: removing nvidia-470xx-utils breaks dependency 'nvidia-470xx-utils=470.141.03' required by nvidia-470xx-dkms
Error: pacman failed!
Error: script failed!
I’ve never had to build the nvidia module for previous kernels anyway. Why should I do that now?
You still don’t. Wait for the 470.141.03-2.1 update to linux60-nvidia-470xx.
The NVIDIA DKMS packages are not included in the MHWD script. If you’ve used MHWD before to install drivers, just install the NVIDIA DKMS package like any other package. If you want to use MHWD again, install the pre-compiled module again.
I uninstalled nvidia-470xx-dkms and updated linux60-nvidia-470xx to 470.141.03-2.1. Same error.
I switched to the unstable branch and updated the system (470.141.03-3 is installed). Same error. linux519-nvidia-470xx470.141.03-21 on kernel 5.19 works fine.
I’m a little confused with this thread. The error explains the issue why the driver is not working on 6.0. Simply based on License issues with kernel modules. If you look at the patch what gets disabled it is clear: kernel-6.0.patch · master · Packages / Extra / linux60-extramodules / nvidia-470xx · GitLab So we have to wait for Nvidia to adjust their driver to match the changes due to GPL exports.
I also use Optimus Manger. I found out that basically there is no need for me to go into Nvidia mode when I can use Hybrid Mode. It works just fine on kernel 6.0.