I wanted to switch from kernel 5.4.80-r1 to 5.10.61, but the mentioned nvidia driver does not compile for this kernel. I do not want to use a 470.* driver because switching monitor input programmatically does not work there for my gfx card. But 460.91.03 is still available in portage, so it should compile. Reproducible: Always Steps to Reproduce: 1. Try to compile nvidia driver for kernel 5.10.61 2. 3. Actual Results: Compile fails. Expected Results: Should compile. Going to attach the build log.
Created attachment 744423 [details] build.log
Seems nvidia's own fallback PAT implementation is broken with newer kernels. But it's using this fallback most likely because you don't have CONFIG_X86_PAT=y in your kernel's .config (normally this is default and only visible with EXPERT=y), please check. I'll update the ebuild to check for this option after more testing.
Yes, you are right. CONFIG_X86_PAT was not set, I don't know why. After setting this option, the driver compiled. Thanks for the quick response and help!
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b7e8fd33216e094df447d2b5a1a20d15616f8fd9 commit b7e8fd33216e094df447d2b5a1a20d15616f8fd9 Author: Ionen Wolkens <ionen@gentoo.org> AuthorDate: 2021-10-11 13:27:28 +0000 Commit: Ionen Wolkens <ionen@gentoo.org> CommitDate: 2021-10-11 13:58:06 +0000 x11-drivers/nvidia-drivers: check for CONFIG_X86_PAT NVIDIA has a fallback implementation if unset, but it uses __flush_tlb removed on x86 since >=5.8 kernels (albeit fairly unlikely to be unset given default and gated behind EXPERT=y). All versions are affected. Closes: https://bugs.gentoo.org/817764 Signed-off-by: Ionen Wolkens <ionen@gentoo.org> x11-drivers/nvidia-drivers/nvidia-drivers-390.144.ebuild | 2 ++ x11-drivers/nvidia-drivers/nvidia-drivers-460.91.03.ebuild | 2 ++ x11-drivers/nvidia-drivers/nvidia-drivers-470.62.05.ebuild | 2 ++ x11-drivers/nvidia-drivers/nvidia-drivers-470.63.01.ebuild | 2 ++ x11-drivers/nvidia-drivers/nvidia-drivers-470.74.ebuild | 2 ++ 5 files changed, 10 insertions(+)