I am trying to get a patch working for the legacy NVIDIA 304 series driver on the latest release of RedHat Enterprise Linux Server 7.4.
I have applied one of the patches I have found searching through this forum and was able to get it to build but now I am stuck trying to get it to load. Our Lab environment is a bit debilitating so I am still working on the getting the logs.
So the build error was fixed with the patch to nv-drm.c
line 74
.driver_features =0,
.driver_features = DRIVER_LEGACY,
The Load issue:
NVRM: request_mem_region failed for 16M @ 0x… This can
NVRM: occur when a driver such as rivatv is loaded and claims
NVRM: ownership of the device’s registers.
I have already blacklisted nouveau so I believe that driver isn’t causing me heartburn.
Does anyone have any troubleshooting tips or solutions for me?
Besides the NV –uninstall
This is needed
dkms status
nvidia, 340.102, 3.10.0-693.el7.x86_64, x86_64: installed (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!
dkms remove -m nvidia/340.102 --all
I have a path forward for the 7.4 kernel breaking the NVidia driver. The one thing I have not tested yet is the Akmod NVidia driver, I am still waiting to see if NVidia issues a patch or updates their drivers.
dracut /boot/initramfs-current-kernel.img initramfs-current-kernel, or dracut –f the quick route
systemctl reboot
locate nvidia.ko, if none sh ./NVidia … --uninstall, if nvidia.ko go to #16
systemctl isolate graphical.target
systemctl set-default graphical.target
Reboot it should be good, if not reinstall xorg and mesa-GL.
Try this sh ./NVIDIA-Linux-x86_64-###.###.run --no-opengl-files add a –z, if still some nouveau compliants.
Locate nvidia.ko if gone start at #12 to #15, if still have nvidia.ko go #18.
It is probably attached to an old kernel, uname –r < finds your current kernel, locate nvidia.ko will tell where it is located and what kernel it is attached to.
Rpm –q kernel.
Yum install yum-utils.
Package-cleanup –oldkernels –count=2 < you may have to be specific, but it should not be on the current kernel.
Locate nvidia.ko nope! If yes find me. Go to #12 to #15.
I played with it more yesterday and discovered that when the NVIDIA driver failed to install the memory resources were not getting freed. When I was able to reboot the machine without the driver trying to automatically install on reboot (via a service I put in place) I could get the patched driver to load.
Thank you.
the above is the correct solution for redhat 7.4 using the 3.10.0-693 kernel. To provide more detailed steps, I’ve found the following works for the 340.102 driver and 304.135 (use patch appropriate for version)
make sure no nvidia.so file exists under /lib/modules/3.10.0-693.el7.x86_64 --if so, remove it
boot system into multi user mode from grub to the update 693 kernel (add systemd.unit=multi-user.target to boot line)
apply patch to nvidia installer; ./NVIDIA-Linux-x86_64-304.135.run --apply-patch legacy304.patch --add-this-kernel
install driver using new custom installer ./NVIDIA-Linux-x86_64-304.135-custom.run
if using the 340 driver, obviously use the 340 installer and the 340 patch file
304 PATCH FILE
Save as legacy304.patch and put in same directory as nvidia installer
To remove nvidia.ko, do not just delete it or rename.
sh ./NVIDIA-Linux-x86_64-###.###.run --no-opengl-files add a –z if you have Nouveau bits that have not been blacklisted, < you have to specify no-opengl there are other files associated, so if it is still mentioned in /var/log/xorg.0.log you did not remove it correctly.
When it is no longer mention in the /var/log/xorg.0.log file you have successfully removed the nvidia.ko and associated files.