Restart nvidia driver linux

Ubuntu won’t start after updating nvidia drivers from X-swat PPA

After this, I rebooted my pc, launch Ubuntu, then I can see that it’s loading everything (as usual), but then I end up with a black screen and a flashing underscore. (I tried to load the terminal at this point using ctrl + alt + F1 , but that doesn’t work) My videocard model is GT650M How can I fix this?

what is your video card model? why were you using X-swat ppa ? The nvidia driver on Ubuntu 14.04 works well, it’s not the newest but it’s good and stable. There’s a bit problem with manual installing of not proprietary video drivers on 14.04 yet, there’s incompatibility with newer linux kernels, but I guess it will go away soon, with time.

can you get to a Login Screen? if not I’ll help you don’t worry but you gotta have internet connection on your machine, if you have it’s ok.

I’m using a GT650M. Why was I using ‘X-swat ppa’? Well I’m quite new to using Linux and I googled how to update the Nvidia drivers and the first site suggested to use the commands as stated in my post.

What do you mean by getting to a Login screen? I’ve enabled ubuntu to log me in automatically, so before this problem I never used a login screen.

4 Answers 4

To remove the obviously non-working driver, which will get you back to the previous stage:

  1. Boot to a root shell
  2. Install ppa-purge to remove the x-updates ppa:
apt-get update && apt-get install ppa-purge ppa-purge ppa:ubuntu-x-swat/x-updates 

This should replace the updated nvidia-current driver with the version from the repositories.

Alternatively (or if you don’t trust ppa-purge) you can also purge the nvidia-current driver, remove the ppa, and then reinstall the proprietary driver from the repositories from within a root-shell:

apt-get purge nvidia-current add-apt-repository --remove ppa:ubuntu-x-swat/x-updates apt-get update apt-get install nvidia-current 

Note: no sudo needed in the root shell

I solved it, finally! by going to the rootshell, establish a connection and mount the drive. Then I used apt-get purge nvidia-* and then wget http://us.download.nvidia.com/XFree86/Linux-x86_64/331.67/NVIDIA-Linux-x86_64-331.67.run chmod +x NVIDIA-Linux-x86_64-331.67.run sh ./NVIDIA-Linux-x86_64-331.67.run . The problem was that most drivers do not support my graphics card. @Takkat, @JohnnyEnglish Thanks for helping me!

Glad you sorted it out! As you now had not installed the driver from repos or ppa it may be that you will have to manually update the driver after each kernel update (piece of cake, now that you know how to do that). Watch out for updates in the x-swat/x-updates ppa (at present they have the 331.20 driver there).

To fix a similar issue with 16.04 and nvidia-375 I did the following:

  • Pressed Shift to get access GRUB menu Logged into recovery mode (I had to use previous kernel version)
  • Enabled networking
  • Accessed root shell
  • Typed the following to help me identify which package I needed to uninstall

Then I was able to restart and boot regularly. Phew!

you can remove them by first finding out their name with

that will tell you their names. Then you can use

to remove any of them that are installed.

I notice this is an old post regarding the black screen with the flashing underscore after installing the nvidia drivers, but I still want to share with you what worked for me without uninstalling the nvidia drivers.

I had the same problem after installing the nvidia drivers (https://linuxconfig.org/how-to-install-the-nvidia-drivers-on-ubuntu-20-04-focal-fossa-linux) without realizing I would come across this issue with my version 20.1 (BETA). It says on the website that Ubuntu 20.04 Focal Fossa Linux is required, so after upgrading my OS to ubuntu 20.04 focal-fossa, I got it all fixed.

It might seem pretty obvious at the beginnig but because of that we tend to forget the other processes. I hope it works for you!

Sincerely, Juan Carlos (johannes)

Источник

How to recover from a Nvidia fail on Ubuntu 16.04?

I have an older Nvidia video card and my PC crashes when installing the driver for the video card in Ubuntu 16.04. When I get to the login screen but no further: after entering my password, the system went into a loop and returned always back to the login screen [with funny stripes present]. How do I fix this problem?

This is too harsh of a solution. I’ve had the same problem and the solution is in fact simpler than that.

Please put your answer in the answer space rather than in the question. It’s fine to answer your own question.

@WindowsinsiderBoomTech That doesn’t make it too broad. OP just needs to move the answer to an answer.

3 Answers 3

Edited out of the question posted by Rob grune:

To recover, follow these steps:

Ctrl + Alt + F1 [to exit and get into the TTY mode]

sudo apt-get remove --purge nvidia* sudo apt-get install ubuntu-desktop sudo apt-get autoremove sudo rm /etc/X11/xorg.conf echo "nouveau" | sudo tee -a /etc/modules sudo reboot 

[after reboot, you should be back to operational with the nouveau driver, and can login]

sudo add-apt-repository --remove ppa:graphics-drivers/ppa sudo apt-get autoremove sudo apt-get autoclean 

I’m not convinced that sudo apt-get install ubuntu-desktop is necessary as I didn’t nor did I sudo rm /etc/X11/xorg.conf as the file was not in existence in the installation I was working on. There’s also no need to sudo add-apt-repository —remove ppa:graphics-drivers/ppa if you aren’t using that ppa. All that said I can confirm the rest of the process works. As this system does not require high performance graphics, I’ll be sticking with the nouveau driver, however I would imagine that if desired one could try installing the latest nvidia-current package

@LelandWoodbury You are correct regarding apt autoremove (fixex) Keep in mind that once your reputation is high enough you’ll be able to make these corrections yourself.

I know this question is about 16.04. Just as an update these steps didn’t work for me on Ubuntu 17.10

Ubuntu has this guide on their own wiki — but that one was last updated 2013-02-06, so I wouldn’t put too much trust/hope/faith/work/time in it.

Here is a recipe which removes all old video drivers, and reinstalls nouveau:

sudo nvidia-settings --uninstall sudo apt-get remove --purge nvidia* sudo apt-get remove --purge xserver-xorg-video-nouveau xserver-xorg-video-nv sudo apt-get install nvidia-common sudo apt-get install xserver-xorg-video-nouveau sudo apt-get install --reinstall libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core sudo dpkg-reconfigure xserver-xorg 

I was having the same issue with Dell Vostro 1500 (GeForce 8400M GS) after updating to the recent Ubuntu 16.04.2 and using the nvidia-340 driver. It took me almost a day to resolve it. Here in shortcut what you can try:

First of all press CTRL+ALT+F1 to get to the text console. Then log in.

Do cat /var/log/gpu-manager.log . If you see something like this:

Looking for nvidia modules in /lib/modules/4.4.0-72-generic/updates/dkms Found nvidia module: nvidia_340_uvm.ko Is nvidia loaded? yes Was nvidia unloaded? no Is nvidia blacklisted? yes . 

Then the reason for the login loop is most likely that the nvidia kernel DRI module is blacklisted. This might be because bumblebee was previously installed with an older version of the nvidia driver (in my case nvidia-304 ) and now is no longer used. If not purge deleted it leaves config files in /etc , among them also module blacklists. The blacklisted module causes the X server to fail to initialize after logging in, which results in the login loop.

Check whether bumblebee is installed:

apt list --installed | grep bumble 

If not (no output of the above command) check if /etc/modprobe.d/bumblebee.conf exists:

ls -l /etc/modprobe.d/bumblebee.conf 

If it exists just delete it:

sudo rm /etc/modprobe.d/bumblebee.conf 

And now try again either by rebooting or by running:

sudo service lightdm restart 

You can also see the detailed problem analysis in my other post.

Источник

How to reinstall the NVIDIA driver after a Linux kernel upgrade

How to reinstall the NVIDIA driver after a Linux kernel upgrade

In my NVIDIA card-attached PC, the NVIDIA graphic driver always fails to start every time the Linux kernel is upgraded.

Whenever I upgrade the kernel version, after a PC restart, the second display cannot connect. I tried running nvidia-smi , it shows an error message

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

The fact is that when the kernel is upgraded, the NVIDIA driver needs to be re-compiled/reinstalled to be able to be used. Although NVIDIA does support DKMS (Dynamic Kernel Module Support), which means it is automatically rebuilt after a kernel upgrade, my NVIDIA driver continuously fails after any kernel upgrade.

The culprit is that after a kernel upgrade, my ubuntu does not install the associated generic linux headers, which causes the NVIDIA driver to fail to be rebuilt. To install the current generic header, you can use the following command

sudo apt install -y linux-headers-$(uname -r)

Next, there will be several ways to reinstall the NVIDIA driver after the Linux headers are installed

Method 1 (tested): UI only. Require PC restart

  • Press the window/super key, search for Software & Updates, and open it.
  • Navigate to the «Additional Drivers» tab
  • Select any other driver except the latest one. Click «Apply Changes»
  • Select the latest driver. Click «Apply Changes»
  • Restart your PC

Method 2 (not tested): No PC restart required. A logout is required.

Note: I just invented this method while writing this post. I have not tested it yet because I cannot reproduce the case without a reasonable amount of effort. I will try this method next time.

Like method 1, except in the last step, instead of restarting your PC, you need to log out the current user. Press Ctrl-Alt-3 to switch to another console, login to that console, then run the following commands

sudo systemctl restart gdm3

Press Ctrl-Alt-1 to switch back to gnome desktop, and the second display should work.

Method 3 (tested): No PC restart required. A logout is required.

  • Download the latest NVIDIA driver of your graphic card from here.
  • Logout the current user
  • Press Ctrl-Alt-3 to switch to another console, login to that console
  • Run following commands: sudo init 3 && sudo systemctl stop gdm3
  • Install the driver downloaded in the previous step. Ignore the warning about the unsupported kernel version to continue the installation.
  • Run this command to restore the gdm daemon: sudo init 5 && sudo systemctl start gdm3
  • Press Ctrl-Alt-1 to switch back to the gnome-desktop. Now the second display should work.

After one of the above method, to check if the Nvidia driver works, you can use nvidia-smi

$ nvidia-smi Sat Jun 27 10:14:32 2020 +-----------------------------------------------------------------------------+ | NVIDIA-SMI 440.100 Driver Version: 440.100 CUDA Version: 10.2 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |===============================+======================+======================| | 0 GeForce GTX 1060 Off | 00000000:01:00.0 On | N/A | | N/A 62C P8 8W / N/A | 406MiB / 6069MiB | 0% Default | +-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+ | Processes: GPU Memory | | GPU PID Type Process name Usage | |=============================================================================| | 0 1409 G /usr/lib/xorg/Xorg 59MiB | | 0 2301 G /usr/lib/xorg/Xorg 234MiB | | 0 2482 G /usr/bin/gnome-shell 74MiB | | 0 2512 G /opt/teamviewer/tv_bin/TeamViewer 1MiB | | 0 2856 G . AAAAAAAAAAAACAAAAAAAAAA= --shared-files 20MiB | | 0 3327 G . ps/IDEA-U/ch-0/201.7846.76/jbr/bin/java 2MiB | +-----------------------------------------------------------------------------+ 

Источник

Читайте также:  Linux сворачивать thunderbird в трей
Оцените статью
Adblock
detector