I deleted my grafics driver (nvidia) help!

So when i switch on my pc , its written there “Nvidia kernal module missing, falling back to nouveau”. So i want to update my grafics driver from nouveau to nvidia official grafics driver. Then i took help of an AI called Claud, so i followed its steps and ended up with no grafics drivers. ill post Claud AI instrustion down , please try to help me ill answer all of your questions

Claud AI instructions :-

ME -

so i have nvidia geforce 920m grafics card , and i want to install the latest grafics driver and i am only fedora operating system

CLAUD -

To install the latest graphics driver for your NVIDIA GeForce 920M on Fedora, you’ll need to use the NVIDIA proprietary drivers. Here’s a step-by-step process:

  • First, ensure your system is up to date:

sudo dnf update

  • Install the RPM Fusion repositories, which contain the NVIDIA drivers:

sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm

sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

  • Install the NVIDIA driver:

sudo dnf install akmod-nvidia

  • Install the CUDA repository (optional, but recommended for full functionality):

sudo dnf install nvidia-cuda-libs

  • Reboot your system:

sudo reboot

  • After rebooting, your system should be using the NVIDIA driver. You can verify the installation by running:

nvidia-smi

ME - > Last metadata expiration check: 1:01:46 ago on Wed 10 Jul 2024 04:10:38 AM IST.

No match for argument: nvidia-cuda-libs
Error: Unable to find a match: nvidia-cuda-libs

CLAUD -

I apologize for the confusion. It seems the package name has changed or is not available in your current Fedora version. Let’s try an alternative approach:

  • First, let’s check which NVIDIA packages are available:

sudo dnf search nvidia

  • This will list all available NVIDIA-related packages.

Look for packages that include CUDA functionality. They might be named something like nvidia-driver-cuda or similar.

If you find a suitable package, install it using:

sudo dnf install package-name

  • Replace “package-name” with the actual package name you found.

If you don’t see any CUDA-related packages, we can proceed without it. The basic NVIDIA driver should still work for most purposes.

  • To ensure you have the necessary kernel modules, install:

sudo dnf install kernel-devel

sudo dnf install akmod-nvidia

  • After installation, reboot your system:

  • sudo reboot

  • After rebooting, verify the installation:

nvidia-smi

ME -

i run the code - sudo dnf search nvidia i found multiple cuda drivers in that list

CLAUD -

That’s good news. Let’s go through this step-by-step:

  1. Can you list the CUDA-related drivers you found? This will help me guide you to choose the most appropriate one.
  2. Generally, you’ll want to install the latest version that’s compatible with your system. Look for packages named something like nvidia-driver-cuda or cuda.
  3. Once you’ve identified the appropriate package, you can install it using:

sudo dnf install package-name

  • Replace “package-name” with the actual name of the CUDA package you want to install.

  • After installing the CUDA package, make sure you also have the basic NVIDIA driver installed:

sudo dnf install akmod-nvidia

  • reboot

  • After reboot nvidia-smi

ME -

these are all cuda stuff i can find in that list . xorg-x11-drv-nvidia-340xx-cuda.x86_64 : CUDA libraries for xorg-x11-drv-nvidia-340xx , xorg-x11-drv-nvidia-390xx-cuda.x86_64 : CUDA driver for xorg-x11-drv-nvidia-390xx , xorg-x11-drv-nvidia-390xx-cuda-libs.i686 : CUDA libraries for xorg-x11-drv-nvidia-390xx , xorg-x11-drv-nvidia-390xx-cuda-libs.x86_64 : CUDA libraries for xorg-x11-drv-nvidia-390xx , xorg-x11-drv-nvidia-470xx-cuda.x86_64 : CUDA driver for xorg-x11-drv-nvidia-470xx , xorg-x11-drv-nvidia-470xx-cuda-libs.i686 : CUDA libraries for xorg-x11-drv-nvidia-470xx , xorg-x11-drv-nvidia-470xx-cuda-libs.x86_64 : CUDA libraries for xorg-x11-drv-nvidia-470xx , xorg-x11-drv-nvidia-cuda.x86_64 : CUDA driver for xorg-x11-drv-nvidia , xorg-x11-drv-nvidia-cuda-libs.x86_64 : CUDA libraries for xorg-x11-drv-nvidia , xorg-x11-drv-nvidia-cuda-libs.i686 : CUDA libraries for xorg-x11-drv-nvidia.

CLAUD - > Thank you for providing that list. Based on the information you’ve shared, here’s what I recommend:

For your GeForce 920M, you should use the latest driver version available. From the list you provided, the newest version appears to be the non-numbered one (which is likely the most recent). So, let’s install these packages: sudo dnf install xorg-x11-drv-nvidia-cuda xorg-x11-drv-nvidia-cuda-libs

This will install both the CUDA driver and the CUDA libraries.

If for some reason that doesn’t work, the next best option would be the 470xx version:sudo dnf install xorg-x11-drv-nvidia-470xx-cuda xorg-x11-drv-nvidia-470xx-cuda-libs

Once the installation is complete, reboot your system: sudo reboot

After rebooting, verify the installation by running: nvidia-smi

ME -

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

CLAUD -> I see. This error suggests that the NVIDIA driver isn’t properly installed or running. Let’s troubleshoot this step by step:

First, let’s check if the NVIDIA kernel module is loaded:lsmod | grep nvidia

If you don’t see any output, the module isn’t loaded.

Try to load the module manually:sudo modprobe nvidia

If you get an error, note it down as it might provide useful information.

Check if the NVIDIA kernel module was built for your current kernel:sudo dkms status

Look for a line mentioning NVIDIA. It should show as “installed” for your current kernel version.

If the module isn’t built, try rebuilding it: sudo akmods --force

sudo dracut --force

Check if there are any errors in the system log related to NVIDIA:sudo journalctl | grep nvidia

Make sure that Secure Boot is disabled in your BIOS settings, as it can prevent the NVIDIA driver from loading.

If none of the above steps work, let’s try reinstalling the NVIDIA driver:sudo dnf remove "*nvidia*"

sudo dnf install akmod-nvidia

After any of these steps, reboot your system:sudo reboot

After rebooting, try running nvidia-smi again.

If you’re still having issues, please provide the output of the following commands:uname -r

sudo dkms status

lspci | grep -i nvidia

ME -

After running sudo modprobe nvidia the result is - modprobe: ERROR: could not insert ‘nvidia’: No such device

CLAUD - > This error suggests that the NVIDIA driver module couldn’t be loaded because it couldn’t find your NVIDIA GPU. Let’s investigate further:

First, let’s confirm that your system can see the NVIDIA GPU:lspci | grep -i nvidia

This should show your NVIDIA GeForce 920M. If it doesn’t, there might be a hardware issue.

Check if your system is using an integrated GPU instead:lspci | grep -i vga

This will show all graphics adapters. You might see both your NVIDIA GPU and an integrated Intel GPU.

If your NVIDIA GPU is visible, let’s check the kernel log for any NVIDIA-related messagessudo dmesg | grep -i nvidia

It’s possible that your system is using Nouveau (the open-source NVIDIA driver) instead. Check if it’s loaded:lsmod | grep nouveau

If it is, we need to blacklist it.

Create a file to blacklist Nouveausudo nano /etc/modprobe.d/blacklist-nouveau.conf

Add these lines to the file:blacklist nouveau

options nouveau modeset=0

Save and exit (Ctrl+X, then Y, then Enter).

Regenerate the kernel initramfs

sudo dracut --force

Now, let’s try to reinstall the NVIDIA driver:sudo dnf remove "*nvidia*"

sudo dnf install akmod-nvidia

sudo reboot

After these steps, try modprobe nvidia and nvidia-smi again.

If you’re still having issues, please provide the output of these commands:uname -r

sudo dmesg | grep -i nvidia

lspci | grep -i vga

ME-

00:02.0 VGA compatible controller: Intel Corporation Skylake GT2 [HD Graphics 520] (rev 07)

  • AFTER THIS IT SAID THATS ITS UR HARDWARE ISSUE AND SAID TO ENABLE THE GRAFICS CARD IN BIOS. PLEASE HELP ME

I didn’t read your complete interactions with Claude, primarily because it’s sort of irrelevant. LLMs do not guarantee correctness—they do not know/understand what they are saying. They’re just regurgitating the next word/phrase based on the statistical probability of what the next word/phrase should be.

The official documentation on installing Nvidia drivers is here:

https://rpmfusion.org/Howto/NVIDIA

Please follow the steps there and see how you get on and we humans can debug it from there :slight_smile:

5 Likes

The AI missed two important details (also often overlooked by we humans):

  • sudo dnf remove "*nvidia*" will also remove the nvidia firmware package. The correct command is: sudo dnf remove '*nvidia*' --exclude nvidia-gpu-firmware, but you can fix the issue with sudo dnf install nvidia-gpu-firmware.
  • sudo dnf install akmod-nvidia fires up a background process to build the driver. You need to ensure that the background process has finished before rebooting, either by using systemctl list-jobs or just waiting 5 minutes before rebooting.
2 Likes