My ancient nvidia card requires nvidia-drivers-340* series of legacy drivers. I've been using a collection of patches for it to build with recent kernels.
The patches are sourced from various other distros (mostly Arch), and allow the driver to build and function correctly. I'm currently using them to build the module against a 5.2 kernel.
Please consider including these in the current ebuild.
Created attachment 589364 [details, diff]
Created attachment 589366 [details, diff]
Created attachment 589368 [details, diff]
Created attachment 589370 [details, diff]
User Copy Patch
Kernel seems to work without this, but barfs all over your dmesg
Created attachment 589372 [details, diff]
Graceful driver crash handling
You forgot to take notice of the warning the ebuild emits to NOT FILE BUG REPORTS about this. However, since we have epatch_user/eapply_user these days, I tend to leave bug reports open so that people can easily find the patches they might want to apply at their own risk.
Could be my bug:
related to this bug?
Created attachment 590074 [details, diff]
Kernel 5.3 build fix
Supplementary to earlier patches, add it to your user patches for the package. Fixes the errors with smp_call_function() and on_each_cpu().
Derived from Alberto Milone's patch for the Ubuntu DKMS package fixing their 5.3 build bug: https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-340/+bug/1837890
Thank you very much! This worked perfectly!
Created attachment 597974 [details, diff]
Kernel 5.4 build fix
Another supplementary user patch, to be applied after all previous ones (including the 5.3 build fix).
Once again, derived from Alberto Milone's Ubuntu patch: https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-340/+bug/1850824
Created attachment 598862 [details, diff]
Slight revision of the 5.4 patch because it would not apply on top of the 5.1 patch without modification
(In reply to Benjamin Réveillé from comment #12)
> Slight revision of the 5.4 patch because it would not apply on top of the
> 5.1 patch without modification
Hm, I must have used a slightly different patch when I originally installed the driver with 5.1. My mistake.
I shall sync my set of patches with these to ensure future compatibility, assuming the nice folks at Nvidia don't issue an update in the mean time (hint, hint) ;)
Thanks for fixing it!
340.108 is out, if anyone wants to take a look at how much they fixed.
(In reply to Shiba from comment #14)
> 340.108 is out, if anyone wants to take a look at how much they fixed.
it compiles ok for me without patches and kernel 5.4
(In reply to Pacho Ramos from comment #15)
> (In reply to Shiba from comment #14)
> > 340.108 is out, if anyone wants to take a look at how much they fixed.
> it compiles ok for me without patches and kernel 5.4
Likewize compiled and installed by just copying nvidia-drivers-340.107-r1.ebuild to nvidia-drivers-340.108.ebuild in local overlay (along with the adequate files from "files") digesting it and emerging it...