6

I am a Ubuntu user for over 15 years now and love it except for the difficultly in installing display drivers sometimes. This year I have been unable to install one on my Desktop successfully which has a Nvidia Geforce 9800GT card. I can get it to install without errors but every time I reboot it will not boot to the desktop and stops at starting x. It looks like its trying as the screen flashes and some graphical characters flash up and then it tries all over again getting stuck in a continuous loop. I have tried booting to a shell and removing and purging the Nvidia driver but it refuses saying filesystem is read only. It's impossible to get out off unless I do a re-install. I've tried every tutorial online and tried both of the drivers offered by Nvidia & Ubuntu. I always end up having to use the nouveau driver which refuses to play videos without being very jerky.

Any help to get it working?

Jon
  • 61
  • You can uninstall the Nvidia driver from recovery mode, that way you don't need to reinstall – You'reAGitForNotUsingGit Jul 03 '17 at 17:02
  • what kernel do you have? and are you using secure boot? kernels 4.4 and newer will not use unsigned kernel modules if secure boot is on – ravery Jul 03 '17 at 17:03
  • @ravery I think almost all kernel modules have been signed for a very long time. The exceptions being the ones I make and can't figure out how to sign so "force" them to load :D – WinEunuuchs2Unix Jul 03 '17 at 17:08
  • @WinEunUUchs2Unix -- OP said he's installing his own. as far as signing efitools has a tools for creating your own key and adding it to MOK. then you can sign you own modules using sbsigntool. With theese tools you can even sign your own booter and kernels – ravery Jul 03 '17 at 17:13
  • reinstall ubuntu and do what I answered – Egon Stetmann. Jul 03 '17 at 17:56
  • @ravery Thanks for the tips on sbsigntool I'll check that out next time. As far as Nvidia proprietary drivers go I think DKMS automatically compiles a signed version with each new kernel upgrade during the update-initramfs cycle. – WinEunuuchs2Unix Jul 03 '17 at 17:57
  • @WinEunuuchs2Unix actually the nvidia packed in the ubuntu repos do that automatically with 100% success, just doing sudo apt-get install nvidia-375 will automatically install dkms and prime packages that works best with any game or render program, the only thing is thatyou won't be able to switch easily between intel and nvidia gpus, because there no optimus techlology designed for Linux, there's bumblebee but it doesn't work well, and also lows FPS in games and performance because they want to save battery in any app, I tried a lot of these methods, my experience is talking – Egon Stetmann. Jul 03 '17 at 18:06
  • @RenatoA. there are lots of different Nvidia solutions proposed in dozens of answers (possibly 100+) here in AU. Your experience is very welcomed for clearing up the air. I only use my Nvidia GT650M card when I reboot WIndows 8.1 for gaming. In Linux I just stick to Intel HD4000 graphics to avoid the headaches. – WinEunuuchs2Unix Jul 03 '17 at 18:10
  • @WinEunuuchs2Unix yeah that's the best thing to do – Egon Stetmann. Jul 03 '17 at 18:12
  • @Jon Welcome to *Ask Ubuntu*. With your 15 years of Ubuntu experience I hope you visit this site often and share some of your treasure trove knowledge. – WinEunuuchs2Unix Jul 03 '17 at 19:00
  • I tried to uninstall the nvidia drivers from the recovery console but was told it coudn't as the filesystem was read only. i did a clean install of 16.04 and did all the updates before installing the nvidia drivers. – Jon Jul 03 '17 at 20:09
  • @Jon yeah but you screwed up everything making the useless manual installation, so that's why I'm telling you to reinstall Ubuntu and do what I told you, that method works 100%, also that black screen loop is fixed by blacklisting ´xorg-nouveau package´ – Egon Stetmann. Jul 03 '17 at 23:55
  • @WinEunuuchs2Unix I wish I could offer some help on here but even after some 15 years, while I can use and do most things in linux, I am no expert and when I get problems like I have with this Nvidia display driver I have to ask for help every time. Still love linux & have it on all my computers. Just wish I could get the proper nvidia display driver installed like I used to a few years ago. I have no choice but to boot into windows to play videos even on websites What a pain. – Jon Jul 04 '17 at 13:29

2 Answers2

6

I will recommend you to do the most and eficient secure recommended method since you just finished installing Ubuntu from the Live CD.

First update your new system

sudo apt-get update
sudo apt-get dist-upgrade

Read carefully the packages you will install and update the linux-headers if prompt, now
For making sure what graphics driver your system needs.

ubuntu-drivers devices

That command will tell you what packages you will need for using graphics drivers.
Then just make sure to install first the intel driver and then the NVIDIA one.

sudo apt-get install intel-microcode
sudo apt-get install nvidia-xxx

And that's all, note that I told you nvidia-xxx because you must enter the recommended driver version displayed in ubuntu-drivers devices and I must warn you. Updating the kernel may cause you problems, so once you installed that NVIDIA driver, please don't upgrade with this commands (sudo apt dist-upgrade or sudo apt upgrade and sudo apt-get dist-upgrade), please use sudo apt-get upgrade that command will hold new kernel releases.

  • The intel-microcode step is a good idea for all Intel users not just those using nvidia. It's something we often forget to do and should arguably be first step in problem solving. +1 for that alone. – WinEunuuchs2Unix Jul 03 '17 at 18:00
  • This ^^^ and, again, https://askubuntu.com/questions/944575/ubuntu-is-showing-me-update-packages-that-i-dont-need-how-can-i-delete-them#comment1500472_944575 –  Nov 17 '17 at 04:56
1

Recommended by this gist, the following steps will install NVIDIA drivers on your system:

For ubuntu 14.04.5 LTS, the latest version is 352. To install the driver, excute sudo apt-get install nvidia-352 nvidia-modprobe, and then reboot the machine.

For ubuntu 16.04.3 LTS, the latest version is 375. To install the driver, excute sudo apt-get install nvidia-375 nvidia-modprobe, and then reboot the machine.

The nvidia-modprobe utility is used to load NVIDIA kernel modules and create NVIDIA character device files automatically everytime your machine boots up.

Ulad Kasach
  • 1,686