I had NVIDIA driver running on my CENTOS 8 Stream machine for about 2.5 years without any problems now, also automatic each kernel-update went really well so far together with NVIDIA driver.
I installed the driver acc. this document 2.5 years ago:
But since yesterday after the latest automatic nvidia-driver-update (just started via “dnf update”) I am getting this error “Failed to start NVIDIA persistence Daemon” at start up (and I have only one monitor now with 600x800 resolution…).
When I type “nvidia-smi" I get: "NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.”
In file included from /var/lib/dkms/nvidia/535.86.10/build/nvidia-uvm/uvm_common.h:43,
from /var/lib/dkms/nvidia/535.86.10/build/nvidia-uvm/uvm_migrate.c:24:
/var/lib/dkms/nvidia/535.86.10/build/nvidia-uvm/uvm_linux.h:150:32: Fehler: expected identifier before numeric constant define MPOL_PREFERRED_MANY 5
^
./include/uapi/linux/mempolicy.h:25:2: Anmerkung: bei Substitution des Makros »MPOL_PREFERRED_MANY«
MPOL_PREFERRED_MANY,
^~~~~~~~~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:317: /var/lib/dkms/nvidia/535.86.10/build/nvidia-uvm/uvm_migrate.o] Fehler 1
make[2]: *** Es wird auf noch nicht beendete Prozesse gewartet…
make[1]: *** [Makefile:1619: module/var/lib/dkms/nvidia/535.86.10/build] Fehler 2
make[1]: Verzeichnis „/usr/src/kernels/4.18.0-500.el8.x86_64“ wird verlassen
make: *** [Makefile:82: modules] Fehler 2
The driver modules failed to build. That is why persistence daemon cannot start, as there is no driver installed.
I think in that case you should talk to CentOS and include the make log from:
/var/lib/dkms/nvidia/535.86.10/build/make.log
Proposed workaround:
Downgrade to an older kernel version.
Hi,all
I was able to resolve the issue using the following method.
Download the Linux driver from the NVIDIA official website.
NVIDIA-Linux-x86_64-*.run https://www.nvidia.com/Download/index.aspx
The one I downloaded is as follows:
NVIDIA-Linux-x86_64-535.104.05.run
Extract the NVIDIA driver installer.
./NVIDIA-Linux-x86_64-*.run -x
Move to the extracted directory.
cd NVIDIA-Linux-x86_64-*
Open the /kernel/nvidia-uvm/uvm_linux.h file.
vi kernel/nvidia-uvm/uvm_linux.h
Change the MPOL_PREFERRED_MANY on line 150 to NVIDIA_MPOL_PREFERRED_MANY or another name that does not conflict with other definitions.
#define NVIDIA_MPOL_PREFERRED_MANY 5
Save the changes and close the file.
Stop the graphical desktop environment.
sudo systemctl isolate multi-user.target
Install the modified driver.
sudo ./nvidia-installer
Follow the on-screen instructions to proceed with the installation.
Once the installation is complete, reboot the system.
sudo reboot
Verify that the NVIDIA driver is installed correctly.
nvidia-smi