Summary: for kernel 4.9.0 nvidia-drivers-340.101 compiles without patch, but fails to load, nvidia-drivers-340.98 compiles and runs fine with the patch nvidia-drivers-340.101 compile fine with kernel 4.9.0 without the patch mentioned here: https://devtalk.nvidia.com/default/topic/981852/linux/resolution-patch-attached-for-nvidia-linux-driver-340-98-x86_64-using-linux-kernel-4-9/post/5037819/#5037819 However, it fails to load, see here: https://devtalk.nvidia.com/default/topic/981852/linux/resolution-patch-attached-for-nvidia-linux-driver-340-98-x86_64-using-linux-kernel-4-9/post/5038307/#5038307
Created attachment 456644 [details, diff] nvidia-drivers-linux-4.9.patch With this patch module loaded.
This patch works for me too. Thanks.
"Crashes" how?
(In reply to Jeroen Roovers from comment #3) > "Crashes" how? ERROR: Unable to load the kernel module 'nvidia.ko'. This happens most frequently when this kernel module was built against the wrong or improperly configured kernel sources, with a version of gcc that differs from the one used to build the target kernel, or if a driver such as rivafb, nvidiafb, or nouveau is present and prevents the NVIDIA kernel module from obtaining ownership of the NVIDIA graphics device(s), or no NVIDIA GPU installed in this system is supported by this NVIDIA Linux graphics driver release. Please see the log entries 'Kernel module load error' and 'Kernel messages' at the end of the file '/var/log/nvidia-installer.log' for more information. -> Kernel module load error: No such device -> Kernel messages: [ 1092.921957] [<ffffffffa08da900>] nv_register_procfs+0x3d/0x1a0 [nvidia] [ 1092.922174] [<ffffffffa1789245>] nvidia_init_module+0x245/0x701 [nvidia] [ 1092.922386] [<ffffffffa1789716>] ? nv_drm_init+0x15/0x15 [nvidia] [ 1092.922574] [<ffffffffa1789766>] nvidia_frontend_init_module+0x50/0x8ea [nvidia] [ 1092.922739] [<ffffffffa1789716>] ? nv_drm_init+0x15/0x15 [nvidia] [ 1092.922744] [<ffffffff8100043e>] do_one_initcall+0x90/0x113 [ 1092.922747] [<ffffffff815c3fe9>] ? _cond_resched+0x19/0x23 [ 1092.922750] [<ffffffff811698ce>] ? slab_pre_alloc_hook+0x19/0x1f [ 1092.922753] [<ffffffff8116c717>] ? kmem_cache_alloc_trace+0xbe/0xcd [ 1092.922757] [<ffffffff81122c37>] do_init_module+0x5f/0x1ef [ 1092.922761] [<ffffffff810bd293>] load_module+0x1a9c/0x2003 [ 1092.922764] [<ffffffff8117ea31>] ? fsnotify_access+0x5a/0x61 [ 1092.922766] [<ffffffff810b9bb4>] ? strstarts+0x28/0x28 [ 1092.922769] [<ffffffff810bd987>] SYSC_finit_module+0x83/0x90 [ 1092.922771] [<ffffffff810bd987>] ? SYSC_finit_module+0x83/0x90 [ 1092.922773] [<ffffffff810bd9b2>] SyS_finit_module+0xe/0x10 [ 1092.922776] [<ffffffff815c68e4>] entry_SYSCALL_64_fastpath+0x17/0x98 [ 1092.922779] ---[ end trace a38d66f1d193dd50 ]--- [ 1092.922782] NVRM: failed to register procfs! [ 1092.922851] NVRM: request_mem_region failed for 16M @ 0xe0000000. This can NVRM: occur when a driver such as rivatv is loaded and claims NVRM: ownership of the device's registers. [ 1092.922859] nvidia: probe of 0000:01:00.0 failed with error -1 [ 1092.922900] Error: Driver 'nvidia' is already registered, aborting... [ 1092.922901] NVRM: DRM init failed
Patch works. Thank you
This problem described there https://devtalk.nvidia.com/default/topic/982052/linux/latest-nvidia-driver-340-101-builds-compiles-properly-but-fails-to-load-has-errors-with-linux-kernel-4-9-resolved-with-patch-/post/5039355/#5039355
Same here with x11-drivers/nvidia-drivers-340.101-r1 sys-kernel/gentoo-sources-4.9.3
I confirm the patch fixes the issue. successfully running =x11-drivers/nvidia-drivers-340.101-r1 on =sys-kernel/gentoo-sources-4.9.6 currently
(In reply to Christian Bricart from comment #8) > I confirm the patch fixes the issue. > > successfully running =x11-drivers/nvidia-drivers-340.101-r1 on > =sys-kernel/gentoo-sources-4.9.6 currently Can you please upload the ebuild? I suck at writing ebuilds! Thank you!
(In reply to Kamen Dokov from comment #9) > Can you please upload the ebuild? > I suck at writing ebuilds! > Thank you! Just use eapply_user mechanism with patch provided in attachments https://wiki.gentoo.org/wiki//etc/portage/patches
(In reply to bugs.gentoo.org from comment #10) > (In reply to Kamen Dokov from comment #9) > > Can you please upload the ebuild? > > I suck at writing ebuilds! > > Thank you! > Just use eapply_user mechanism with patch provided in attachments > https://wiki.gentoo.org/wiki//etc/portage/patches Great, thank you!
The patch fixes the issue running x11-drivers/nvidia-drivers-340.101 on sys-kernel/gentoo-sources-4.9.6. Thx!
Thanks - also confirmed working with: aufs-sources-4.9.6 (and the patched nvidia driver) Previous to the patch, dmesg had: [ 10.486983] Error: Driver 'nvidia' is already registered, aborting... [ 10.486983] NVRM: DRM init failed ...
*** Bug 608264 has been marked as a duplicate of this bug. ***
The new nvidia-drivers-340.102 still have this bug. The patch still can fix it. Tested on sys-kernel/gentoo-sources-4.9.9
The bug still persists for x11-drivers/nvidia-drivers-340.102 in combination with sys-kernel/gentoo-sources-4.9.6-r1. If the patch can fix it (Comment 15), is there a reason it has not yet been applied?
(In reply to orionbelt2 from comment #16) > The bug still persists for x11-drivers/nvidia-drivers-340.102 in combination > with sys-kernel/gentoo-sources-4.9.6-r1. If the patch can fix it (Comment > 15), is there a reason it has not yet been applied? I believe it's the maintainer's policy not to apply patches to address kernel compatibility issues as this is often a moving target.
Does this mean that we must keep using an older and potentially unsafe kernel rather than bothering to apply the same patch until the day when Nvidia deigns to issue a fix to its driver?
(In reply to orionbelt2 from comment #18) > Does this mean that we must keep using an older and potentially unsafe > kernel rather than bothering to apply the same patch until the day when > Nvidia deigns to issue a fix to its driver? Yes. Remember that gesture Linus Torvalds made toward Nvidia a few years ago?
I do remember Linus' gesture, but in this case we seem to worsen our situation by self-imposing policies like "do not apply known patches to address kernel compatibility issues" for reasons that escape me: What does "moving target" mean? Aren't all packages "moving targets"? Granted, i could figure out how to apply the patch by myself (haven't had to do it so far), and so could all other affected users, but wouldn't it be more economical if it were done at a single location (the Gentoo repository) and by the capable hands of our beloved Gentoo developers? :-)
If you really don't want to fix this, since both gentoo-sources-4.9.16 and nvidia-drivers-340.101 are flagged stable, I believe you should at least put a ewarn in the ebuild stating that nvidia-drivers is broken with 4.9, the same as you do with the warning for >=4.10. As the things are right now I can't see how this can be considered a "stable" worthy situation.
Hi, This patch also work for: sys-kernel/aufs-sources-4.9.18 x11-drivers/nvidia-drivers-340.102 PS, nouveau driver crash/hang for my old G200, I just rollbacked to nvidia-drivers.
*** Bug 619114 has been marked as a duplicate of this bug. ***
For completeness : Driver version =x11-drivers/nvidia-drivers-340.104 does not require the patch anymore
Octavian, thanks for the heads-up. For some reason i do not recall ever receiving an email notification about your posting even though my email is in the cc list of this bug... Does anyone know whether patching is needed (for x11-drivers/nvidia-drivers-340.x) for the most recent stable kernel (4.19.x)? Did nvidia finally do what they had to do so that no patching will be needed until the next kernel API change? What about the 5.x kernel series, for that matter?
*** Bug 682910 has been marked as a duplicate of this bug. ***