[SOLVED]Nvidia change driver from terminal

Questions about hardware, drivers and peripherals
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
nasair

[SOLVED]Nvidia change driver from terminal

Post by nasair »

[SOLVED] sort of, just formated because couldn't find a solution.

My problem is I changed my driver via the Driver manager and rebooted, now XServer won't start. I'm using Linux Mint 17 Cinnamon.
I changed from nvidia-331 to nvidia-304-updates

What I see on Boot>
http://i61.tinypic.com/119pc77.jpg
http://i58.tinypic.com/33y3kbb.jpg

I tried these steps and nothing>

Code: Select all

sudo rm /etc/X11/xorg.conf
and then since I don't have an ATI I tried>

Code: Select all

# apt-get remove --purge fglrx
# apt-get remove --purge xserver-xorg-video-ati xserver-xorg-video-radeon
# apt-get install --reinstall libgl1-mesa-dri
# apt-get remove --purge xserver-xorg-core
# apt-get install xserver-xorg-core
# rm /etc/X11/xorg.conf
From: http://forums.linuxmint.com/viewtopic.php?f=109&t=91448

And>

Code: Select all

sudo apt-get remove fglrx   fglrx-amdcccle fglrx-pxpress
but that seemed like it was for ATI
From: http://askubuntu.com/questions/319671/h ... a-terminal

Also>

Code: Select all

# apt remove --purge xserver-xorg-video-nouveau libdrm-nouveau1
# sudo nvidia-xconfig
From: http://forums.linuxmint.com/viewtopic.p ... e&start=40

Another>

Code: Select all

# sudo /etc/init.d/mdm stop
# sudo X -configure
#  rm ~/.config/monitors.xml
That last one I couldn't find my monitors.xml file
From: http://askubuntu.com/questions/159663/h ... rg-xserver

You might notice a trend>
From: http://community.linuxmint.com/tutorial/view/176

How can I get back to one of the other drivers?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
roblm
Level 15
Level 15
Posts: 5939
Joined: Sun Feb 24, 2013 2:41 pm

Re: Nvidia change driver from terminal

Post by roblm »

Try restoring the nouveau driver first. Go to the GRUB boot menu and select “Recovery mode”. If no menu shows then hold down
the Shift key while starting. In the menu select “root – drop to root shell prompt”. When asked for the root password, just type your
user password. Then change the file permissions to read and write by typing:
mount -o remount,rw /

Then type: apt-get remove nvidia-304-updates

Then type: apt-get install --reinstall xserver-xorg-video-nouveau libdrm-nouveau2 libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core

Then type: reboot.

EDITED: Also, you created another "xorg.conf" file, so type this command:
rm /etc/X11/xorg.conf
nasair

Re: Nvidia change driver from terminal

Post by nasair »

I followed the instructions but it was saying failed to retrieve the package, so I had to give up and format. Have it working now, but I haven't tried going back to older drivers. The reason I wanted to try older drivers was I was getting a lot of graphic tears and "weirdness" when playing some games on steam.
User avatar
roblm
Level 15
Level 15
Posts: 5939
Joined: Sun Feb 24, 2013 2:41 pm

Re: Nvidia change driver from terminal

Post by roblm »

I just tested that command I told you to use and it worked in Recovery mode. Since you could not copy and paste that long
command but had to type it all out, it's easy to make a mistake with one letter, number or spaces between names. Then you'll
see the message “Unable to locate package”.

In the future always type out the command again if it fails the first time.
davenoob

Re: [SOLVED]Nvidia change driver from terminal

Post by davenoob »

I had the exact same problem today.
Although not so elegance, but roblm solution fixed the problem for me.

Follow his instructions as written, looks like it must be from "Recovery Mode".
Try restoring the nouveau driver first. Go to the GRUB boot menu and select “Recovery mode”. If no menu shows then hold down
the Shift key while starting. In the menu select “root – drop to root shell prompt”. When asked for the root password, just type your
user password. Then change the file permissions to read and write by typing:
mount -o remount,rw /

Then type: apt-get remove nvidia-304-updates

Then type: apt-get install --reinstall xserver-xorg-video-nouveau libdrm-nouveau2 libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core

Then type: reboot.
HTH.
nasair

Re: [SOLVED]Nvidia change driver from terminal

Post by nasair »

To clarify I typed it a few time, I might have had other issues. Glad to see the solution worked for at least another.
mojeto

Re: Nvidia change driver from terminal

Post by mojeto »

nasair wrote:I followed the instructions but it was saying failed to retrieve the package, so I had to give up and format. ....
I got into the same issue. In my case it caused incomplete network configuration in root shell in Recovery mode. My DNS server didn't configure properly so apt-get couldn't resolver nz.archives.ubuntu.com.
I manually added entry into /etc/hosts file for nz.archives.ubuntu.com and it fix the problem for me.

Thanks to 'roblm' for good solution of the problem.
Locked

Return to “Hardware Support”