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