Akmod-nvidia-470xx fails to compile in Rocky 9.4?

Hi,

Anyone else having trouble compiling akmod-nvidia-470xx from RPMFusion?

I just updated to 9.4.

Akmods fails to rebuild my NVIDIA 470xx kernel module.

More specifically, looking in the akmods logs in /var/cache/akmods/nvidia-470xx, I see:

ERROR: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol ‘__rcu_read_unlock’
ERROR: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol ‘__rcu_read_lock’

2024/05/14 06:44:53 akmodsbuild: make -f ./scripts/Makefile.modpost
2024/05/14 06:44:53 akmodsbuild: sed 's/.ko$/.o/' /tmp/akmodsbuild.5xAocjqW/BUILD/nvidia-470xx-kmod-470.223.02/_kmod_build_5.14.0-427.16.1.el9_4.x86_64/modules.order | scripts/mod/modpost -m -a  -o /tmp/akmodsbuild.5xAocjqW/BUILD/nvidia-470xx-kmod-470.223.02/_kmod_build_5.14.0-427.16.1.el9_4.x86_64/Module.symvers -e -i Module.symvers   -T -
2024/05/14 06:44:53 akmodsbuild: ERROR: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol '__rcu_read_unlock'
2024/05/14 06:44:53 akmodsbuild: ERROR: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol '__rcu_read_lock'
2024/05/14 06:44:53 akmodsbuild: make[2]: *** [scripts/Makefile.modpost:134: /tmp/akmodsbuild.5xAocjqW/BUILD/nvidia-470xx-kmod-470.223.02/_kmod_build_5.14.0-427.16.1.el9_4.x86_64/Module.symvers] Error 1
2024/05/14 06:44:53 akmodsbuild: make[2]: *** Deleting file '/tmp/akmodsbuild.5xAocjqW/BUILD/nvidia-470xx-kmod-470.223.02/_kmod_build_5.14.0-427.16.1.el9_4.x86_64/Module.symvers'
2024/05/14 06:44:53 akmodsbuild: make[1]: *** [Makefile:1848: modules] Error 2
2024/05/14 06:44:53 akmodsbuild: make[1]: Leaving directory '/usr/src/kernels/5.14.0-427.16.1.el9_4.x86_64'
2024/05/14 06:44:53 akmodsbuild: make: *** [Makefile:80: modules] Error 2
2024/05/14 06:44:53 akmodsbuild: error: Bad exit status from /var/tmp/rpm-tmp.SrNOvQ (%build)

I’ve made sure to have the appropriate kernel-devel and kernel-headers modules before attempting to reinstall the drivers.

# uname -r
5.14.0-427.16.1.el9_4.x86_64

#rpm -q kernel-headers
kernel-headers-5.14.0-427.16.1.el9_4.x86_64

#rpm -q kernel-devel
kernel-devel-5.14.0-362.18.1.el9_3.0.1.x86_64
kernel-devel-5.14.0-362.24.1.el9_3.0.1.x86_64
kernel-devel-5.14.0-427.16.1.el9_4.x86_64

Any hints appreciated.

Not there yet, so can’t say.

Overall, NVidia ends support for R470 in July NVIDIA Driver | endoflife.date (and active support did end already in 2021), so 470xx is running on thin fumes and not for long. Someone at RPMFusion must have older card to test the 470xx-packages on (or they would not build those at all). Do they have “report bug here” links?

Perhaps Red Hat has backported into the “5.14.0-427” more strictness?

Is “470” that same thing as “470xx”?
I just noticed in big letters
legacy driver version 470 is no longer provided
https://github.com/ublue-os/akmods

Yes 470xx is Nvidia driver version 470.

Thanks for the link with the info.

I’m surprised that it is broken on kernel 5.15 though. The page says kernel 6.8 breaks nvidia470.

The driver ran fine on Rocky 9.3 and is still provided in RPMFusion btw.

When I reboot using the older 5.14.0-362.24 kernel from Rocky 9.3, akmods keeps trying to rebuild the Nvidia kernel modules for kernel 5.14.0-427.16.

Where can I tell akmods to stop trying to rebuild the Nvidia module on boot?

I don’t want to disable the akmods service completely as I need it for other (working) drivers.

Again, any hints appreciated!

Despite, running on fumes, it seems that Nvidia is still updating R470 drivers.

It seems that version 470.239.06 fixes the bug causing the rcu_read_lock/unlock errors.

470-239-06 Release notes here.

  • The NVIDIA GPU driver fixed compatibility with Linux 6.8-rc kernels, by removing the driver’s unnecessary use of the Linux function pfn_valid(). To maintain driver compatibility with upstream Linux changes, support for importing IO_URING buffers into the NVIDIA GPU driver has been removed. 4336331

See this thread for more information.

Now where can I get this 470.239.06 driver for Rocky Linux? RPMFusion is only providing 470.223.02

470.239 has been out for almost two months… so I’m guessing they don’t plan on updating the akmod-nvidia-470xx package?

RPMFusion is the only one that I know to have built 470 packages for el9. NVidia’s own repo has 470 built for el8.

If anyone stumbles on this thread:

“ELRepo - Testing” provides an up-to-date Nvidia 470.xx driver that is compatible with the latest Rocky Linux kernel.

I am running Nvidia 470.256.02 driver on kernel 5.14.0-427.22.1 sucessfully on an old Macbook Pro GeForce GT 750M Mac Edition.

dnf info kmod-nvidia-470xx
ELRepo.org Community Enterprise Linux Repository - el9                                  7.0 kB/s | 3.0 kB     00:00    
Installed Packages
Name         : kmod-nvidia-470xx
Version      : 470.256.02
Release      : 1.el9_4.elrepo
Architecture : x86_64
Size         : 82 M
Source       : kmod-nvidia-470xx-470.256.02-1.el9_4.elrepo.nosrc.rpm
Repository   : @System
From repo    : elrepo-testing
Summary      : nvidia-470xx kernel module(s)
URL          : http://www.nvidia.com/
License      : GPLv2
Description  : This package provides the proprietary NVIDIA OpenGL kernel driver modules.
             : It is built to depend upon the specific ABI provided by a range of releases
             : of the same variant of the Linux kernel and not on any one specific build.

Annoyingly, there is an out of date package with the same name in RPMFusion, so make sure ELRepo Testing is above RPMFusion in your repo priorities (or disable RPMFusion).

dnf install elrepo-release
sudo nano /etc/yum.repos.d/elrepo.repo

[elrepo-testing]
name=ELRepo.org Community Enterprise Linux Testing Repository - el9
baseurl=http://elrepo.org/linux/testing/el9/$basearch/;http://mirrors.coreix.net/elrepo/testing/el9/$basearch/;http://mirror.rackspace.com/elrepo/testing/el9/$basearch/;http://linux-mirrors.fnal.gov/linux/elrepo/testing/el9/$basearch/
mirrorlist=http://mirrors.elrepo.org/mirrors-elrepo-testing.el9
enabled=1
countme=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-elrepo.org
priority=90

Make sure [elrepo-testing] enabled=1, priority=90. (Default priority is 99, lower numbers have priority).

If you installed the Nvidia-470xx driver from RPMFusion, make sure to uninstall it completely before installing the ELRepo one:

sudo dnf remove xorg-x11-drv-nvidia-470xx*

Install Nvidia driver from ELRepo-Testing:

sudo dnf install kmod-nvidia-470xx

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.