Acer Aspire 7 Ubuntu 20.04 Nvidia Drivers Not working

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.

sudo dkms status
nvidia, 460.39, 5.8.0-40-generic, x86_64: installed

I’ve tried uninstalling and reinstalling the driver several times.
My system specs are -
Processor - AMD Ryzen 5 3550H
RAM - 8 GB

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

Thanks for replying so fast.
I have attached the required file with this message.nvidia-bug-report.log.gz (138.5 KB)

Secure boot is enabled so the driver doesn’t load. Please either disable secure boot in bios or reinstall Ubuntu and select to “install third-party software” during install which will enable module signing.

After disabling Secure Boot,
then running sudo apt purge nvidia*,
then reinstalling drivers
nvidia-smi
Failed to initialize NVML: Driver/library version mismatch

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

You installed too many drivers over one another. Please post the output of
dkms status
dpkg -l |grep nvidia

dpkg -l |grep nvidia
ii libnvidia-cfg1-460:amd64 460.39-0ubuntu0.20.04.1 amd64 NVIDIA binary OpenGL/GLX configuration library
ii libnvidia-common-460 460.39-0ubuntu0.20.04.1 all Shared files used by the NVIDIA libraries
ii libnvidia-compute-460:amd64 460.39-0ubuntu0.20.04.1 amd64 NVIDIA libcompute package
ii libnvidia-compute-460:i386 460.39-0ubuntu0.20.04.1 i386 NVIDIA libcompute package
ii libnvidia-decode-460:amd64 460.39-0ubuntu0.20.04.1 amd64 NVIDIA Video Decoding runtime libraries
ii libnvidia-decode-460:i386 460.39-0ubuntu0.20.04.1 i386 NVIDIA Video Decoding runtime libraries
ii libnvidia-encode-460:amd64 460.39-0ubuntu0.20.04.1 amd64 NVENC Video Encoding runtime library
ii libnvidia-encode-460:i386 460.39-0ubuntu0.20.04.1 i386 NVENC Video Encoding runtime library
ii libnvidia-extra-460:amd64 460.39-0ubuntu0.20.04.1 amd64 Extra libraries for the NVIDIA driver
ii libnvidia-fbc1-460:amd64 460.39-0ubuntu0.20.04.1 amd64 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-fbc1-460:i386 460.39-0ubuntu0.20.04.1 i386 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-gl-460:amd64 460.39-0ubuntu0.20.04.1 amd64 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii libnvidia-gl-460:i386 460.39-0ubuntu0.20.04.1 i386 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii libnvidia-ifr1-460:amd64 460.39-0ubuntu0.20.04.1 amd64 NVIDIA OpenGL-based Inband Frame Readback runtime library
ii libnvidia-ifr1-460:i386 460.39-0ubuntu0.20.04.1 i386 NVIDIA OpenGL-based Inband Frame Readback runtime library
ii nvidia-compute-utils-460 460.39-0ubuntu0.20.04.1 amd64 NVIDIA compute utilities
ii nvidia-dkms-460 460.39-0ubuntu0.20.04.1 amd64 NVIDIA DKMS package
ii nvidia-driver-460 460.39-0ubuntu0.20.04.1 amd64 NVIDIA driver metapackage
ii nvidia-kernel-common-460 460.39-0ubuntu0.20.04.1 amd64 Shared files used with the kernel module
ii nvidia-kernel-source-460 460.39-0ubuntu0.20.04.1 amd64 NVIDIA kernel source package
ii nvidia-prime 0.8.15.3~0.20.04.1 all Tools to enable NVIDIA’s Prime
ii nvidia-settings 440.82-0ubuntu0.20.04.1 amd64 Tool for configuring the NVIDIA graphics driver
ii nvidia-utils-460 460.39-0ubuntu0.20.04.1 amd64 NVIDIA driver support binaries
ii screen-resolution-extra 0.18build1 all Extension for the nvidia-settings control panel
ii xserver-xorg-video-nvidia-460 460.39-0ubuntu0.20.04.1 amd64 NVIDIA binary Xorg driver

Updated bug report is - nvidia-bug-report.log.gz (284.8 KB)

You need to reboot to load the driver.