i installed first installed the latest drives, at that time it said, gpu not suported use 470.XX legacy, then i switched to driver version 470.x and now i nvidia-smi prints:
NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
I see, i have dkms installed, should i shift to the precompiled instead? i used the precompiled with the for latest driver that “worked” if i recall correctly
Error! Your kernel headers for kernel 4.18.0-348.7.1.el8_5.x86_64 cannot be found at /lib/modules/4.18.0-348.7.1.el8_5.x86_64/build or /lib/modules/4.18.0-348.7.1.el8_5.x86_64/source.
Please install the linux-headers-4.18.0-348.7.1.el8_5.x86_64 package or use the --kernelsourcedir option to tell DKMS where it's located.
Was having the wrong kernel headers installed, so installed the correct ones, and now it builds and nvidea-smi displays correct information.