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.