NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver

I am new to ubuntu and NVIDIA graphic card so please help me out.
I was trying to download a software and needed to change permission from the root. However, when I access as root, one of my external monitor went off and I believe it is related to the graphics.
Under my settings >> about >> graphics, it is llvmpipe(LLVM 12.0.0,256 bits) instead of NVIDIA graphic card.

The following output might help to identify the problem:

$ nvidia-smi
NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

$ dkms status
nvidia, 510.73.05, 5.14.0-1045-oem, x86_64: installed

$grep nvidia /etc/modprobe.d/* /lib/modprobe.d/*
/etc/modprobe.d/blacklist-framebuffer.conf:blacklist nvidiafb
/etc/modprobe.d/blacklist-nouveau-nvidiafb.conf:blacklist nvidiafb
/lib/modprobe.d/nvidia-kms.conf:# This file was generated by nvidia-prime
/lib/modprobe.d/nvidia-kms.conf:options nvidia-drm modeset=1

Please run nvidia-bug-report.sh as root and attach the resulting nvidia-bug-report.log.gz file to your post.

nvidia-bug-report.log.gz (135.2 KB)

like this? attach it directly?

Please disable secure boot in bios.

Oh my god thank you! could you please tell me where in the log file that indicate this is my problem?

The lspci -k output showed nvidia modules available but not loaded. The dmesg output said “Secure boot enabled”.

but now I am having a new problem. After doing so, I could not have the computer connected to the network. Is it related?

That would be very unlikely. Please create anew nvidia-bug-report.log in that state.

If I disabled the secure boot in bios, does it mean that I can no longer upgrade my graphic card driver? would that be a concern in the future?
If disabling the secure boot in bios is only a temporary solution, and the conflict between the graphic card version and the computer hard wares is the real problem. Would replacing the graphic card be a better option?

Secure boot does not have anything to do with driver updates etc. It’s a security feature that require boot loader, kernel and all drivers to be signed (per default with a Microsoft key).
The alternative to disabling it would be setting up module signing within Ubuntu. Either through update-secureboot-policy or by reinstalling and choosing the option “Install third party software”.