I am currently using ubuntu 20.04 and machine model is Intel(R) Xeon(R) CPU ER-2620 v4 @2.10GHz with CUDA version 11.4.
Error message: NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver.
[ 33.467380] NVRM: The NVIDIA Tesla K40m GPU installed in this system is
NVRM: supported through the NVIDIA 470.xx Legacy drivers. Please
NVRM: visit Unix Drivers | NVIDIA for more
NVRM: information. The 495.44 NVIDIA driver will ignore
NVRM: this GPU. Continuing probe…
[ 33.469261] NVRM: No NVIDIA GPU found.
So install a 470 version of the driver (through apt). Reboot.
If that does not work, please create a new bug report.