Nvidia :unable to recognize any device drivers

I am facing this issue since 3 days, i have uninstalled nvidia drivers and reinstalled again and tried searching for many answers, i could not find one satisfactory response

i tried nvidia-smi to check my GPU drivers but my system is unable to recognize them,i don't understand the problem with my installation, could some one suggest me a way to resolve this issue.

uname -a
Linux dev-Lenovo-Legion-5-15ARH05 5.8.0-63-generic #71~20.04.1-Ubuntu SMP Thu Jul 15 17:46:08 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

LSB modules output :

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.2 LTS
Release: 20.04
Codename: focal

GPU information :

cat /proc/driver/nvidia/gpus/0000\:01\:00.0/information
Model: GeForce GTX 1650
IRQ: 91
GPU UUID: GPU-e40be3a1-7830-6e15-7330-30fd6a28ae8f
Video BIOS: ??.??.??.??.??
Bus Type: PCIe
DMA Size: 47 bits
DMA Mask: 0x7fffffffffff
Bus Location: 0000:01:00.0
Device Minor: 0
Blacklisted: No

Drivers installed :

lspci -k | grep -EA3 'VGA|3D|Display'
01:00.0 VGA compatible controller: NVIDIA Corporation Device 1f99 (rev a1) Subsystem: Lenovo Device 3a3f Kernel driver in use: nvidia Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia
--
05:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Renoir (rev c7) Subsystem: Lenovo Renoir Kernel driver in use: amdgpu Kernel modules: amdgpu

output of nvidia-smi

nvidia-smi
No devices were found

Nvidia installations :

nvidia_uvm 1011712 0
nvidia_drm 53248 0
nvidia_modeset 1228800 1 nvidia_drm
nvidia 34168832 2 nvidia_uvm,nvidia_modeset
drm_kms_helper 217088 2 amdgpu,nvidia_drm
nvidiafb 53248 0
vgastate 20480 1 nvidiafb
fb_ddc 16384 1 nvidiafb
i2c_algo_bit 16384 2 nvidiafb,amdgpu
drm 552960 22 gpu_sched,drm_kms_helper,amdgpu,nvidia_drm,ttm

Ubuntu device drivers :

sudo ubuntu-drivers devices
[sudo] password for dev:
== /sys/devices/pci0000:00/0000:00:01.1/0000:01:00.0 ==
modalias : pci:v000010DEd00001F99sv000017AAsd00003A43bc03sc00i00
vendor : NVIDIA Corporation
driver : nvidia-driver-450-server - distro non-free
driver : nvidia-driver-470 - third-party non-free
driver : nvidia-driver-460 - distro non-free recommended
driver : nvidia-driver-460-server - distro non-free
driver : xserver-xorg-video-nouveau - distro free builtin

2 Answers

I have the same laptop the best way to go about it is Switch to 'Switchable Graphics' in BIOS make sure secure boot is disabled then boot into Ubuntu and follow these steps

  1. Purge all nvidia related packages following command will list all nvidia packages and you have to purge all of them

    sudo dpkg -l | grep nvidia

  2. Install recommended driver using

    sudo ubuntu-drivers autoinstall

  3. Select Nvida in prime settings

    sudo prime-select nvidia

  4. Reboot and select 'Discrete Graphics' in your BIOS

1

That command below is just a tip to save time running the solution given by Utkarsh Chandra Srivastava.

It will generate the purge command for all package listed:

sudo dpkg -l | grep nvidia | awk '{ print $2 }' | awk -F: '{ print $1 }' | xargs -I % echo 'sudo dpkg -r %'

The result will be like this:

sudo dpkg -r libnvidia-cfg1-470
sudo dpkg -r libnvidia-common-470
...
sudo dpkg -r libnvidia-compute-470
sudo dpkg -r libnvidia-compute-470
sudo dpkg -r xserver-xorg-video-nvidia-470

Then you just need to check it and copy & paste into the terminal to purge the packages.

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like