How to Fix Nvidia Driver Issues on Ubuntu After Trying Some Commands?

0
18
Asked By CoolCoder88 On

I ran into a problem with my Nvidia driver on Ubuntu after using a command I got from an AI chatbot. It all started when I executed the command `gnome-session-quit --logout --no-prompt`, and since then, my second monitor stopped working. Then, I tried to install the Nvidia driver using `sudo apt install nvidia-dkms-`, but I can't remember the version I used. Now, I'm facing a black screen or getting an error that says: 'nvidia probe with driver nvidia failed with error -1' after booting. After a couple of hours of troubleshooting, I managed to make my old system somewhat functional again by forcefully removing Nvidia drivers while booted from a live USB. However, every time I try to reinstall the Nvidia drivers, it fails. Right now, I can only log into Ubuntu via TTY and have to manually start GDM with `sudo systemctl start gdm`. What should I do to fix this?

2 Answers

Answered By PixelPilot42 On

Before jumping to reinstalling drivers, can you share the exact command that's failing? It's also essential to know the error message you're getting. Check your command history to see what might have caused the issue. A good idea could be to spin up a new Ubuntu VM with Nvidia drivers to see which version works for you. And seriously, make sure you're not just copying random commands blindly; it can lead to bigger problems!

CoolCoder88 -

Thanks for the input! My specs are an AMD Ryzen 7 9800X3D CPU, Palit RTX 5070 Ti 16GB GPU, and 32GB RAM, running on Ubuntu 24.04 LTS. I tried following a tutorial to uninstall Nvidia drivers, but it seemed like I messed up, and then I couldn't log in with the GPU driver enabled. What am I doing wrong?

Answered By TechieTom23 On

You might want to use the built-in driver manager in Ubuntu for installing Nvidia drivers instead of relying on random commands. First, try purging the Nvidia driver and restore Nouveau. Check out this guide on how to properly uninstall Nvidia drivers: [How to Uninstall Nvidia Drivers in Ubuntu](https://lunux.net/how-to-uninstall-nvidia-drivers-in-ubuntu/). Also, could you share your computer specs?

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.