Correct steps to install NVidia driver + CUDA after fresh install of Ubuntu Desktop 16.04.02 LTS

5,310

(Addition to my earlier answer.)

I can now avoid booting through recovery mode.

The problem was only with the input of the hard disk encryption pass phrase. The workaround was to avoid the "quiet" boot, I found how to do it on this page:
Boot into the command line console in Ubuntu 16.04

The minimal change to /etc/default/grub was to replace

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

with

GRUB_CMDLINE_LINUX_DEFAULT="text"

then run

sudo update-grub

This gives small text (more info on the screen). You can uncomment GRUB_TERMINAL=console to have "normal" text mode (less memory used presumably).

GRUB_CMDLINE_LINUX="text" doesn't seem to be indispensable.


That web page also describes

  • how to boot to text mode and eventually start up the graphic mode afterwards
  • how to set the default mode back to graphic

Booting into text mode can be interesting to leave free the maximum possible amount of video memory, for instance for Blender to GPU render animations in scenes with high resolution HDR environments, of course after using graphic mode and CPU render to setup the scene and create the animation (possibly checking it with OpenGL render to speed up the process).


I have no solution for the corrupted windows frames after suspend-resume, yet. The nvidia driver I'm using is still the most recent, apparently.

EDIT: that is now solved.

A software upgrade applied 2017-vi-02 included a new NVidia driver, 375.66, and new LibCuda version. Automated installation was straightforward, Blender and FlightGear still work perfectly fine, and I can now suspend and resume without having to kill gnome-session or logout and in again.

I only see "garbage" - meaning corrupted graphics - during a couple of seconds on resume on the left of the screen where the auto-hide launcher would appear by moving the mouse cursor there, but the "garbage" disappears without having to go anything.

(I'm still not using the "quiet" boot so I can't tell if the keyboard input of the hard drive encryption pass phrase would now work fine with it.)


Err... sorry I'm a newbie in ask ubuntu: now how do I close this... "issue"? Should I "accept" any answer here? THANKS A LOT AGAIN FOR ALL YOUR REPLIES.

EDIT: I selected this post as the one which carries the information which was most useful to me.

Share:
5,310

Related videos on Youtube

JazzTp
Author by

JazzTp

Updated on September 18, 2022

Comments

  • JazzTp
    JazzTp over 1 year

    I've just downloaded Ubuntu Desktop 16.04.02 LTS and made a fresh install.
    Step by step, how should I install the NVidia driver + CUDA?

    From lspci output:

    VGA compatible controller: NVIDIA Corporation GK106 **[GeForce GTX 660]** (rev a1)
    

    I haven't tried to install the NVidia driver at all, yet. Apart from updating, I have only dowloaded Blender 2.78c from blender.org and manually extracted it to my home folder, and I have installed FlightGear 2017.1.2 from an additional repository.

    With both applications, the desktop freezes permanently just a few seconds or a few minutes after startup, except for the mouse cursor. Maybe it's the Nouveau driver, I don't know and I'm not addressing that issue here, either, because I need CUDA anyway.)

    It's not a UEFI machine => maybe more chances.

    I went to the NVidia support website in order to see what version it is.

    I also downloaded the .run NVidia file but did not launch it, instead I installed the corresponding package:

    sudo apt install nvidia-375
    

    The installation procedure finished with no apparent accident and I got the terminal prompt back.

    Maybe I should have issued the command which is reported to be critical in various threads:

    sudo nvidia-xconfig
    

    Well, I didn't, not to risk messing up with the installation procedure in case it had been fixed by now to a fully automatic procedure.

    First reboot => boot manager OK, then the LUKS pass phrase input field appeared but my input was not being displayed with bullet chars as usual. Ctrl-alt F1...F6: black screen. Ctrl-alt F7: black screen with my passphrase on the top line.

    Second reboot => boot manager OK, then not even the LUKS passphrase input screen, just black screen, ctrl-alt F1...F7 => black screen.

    I'm going to reinstall from scratch right now then give it another try issuing that further nvidia-xconfig command after installing the package.

    • Jean-Marie
      Jean-Marie about 7 years
      Last time I had to use Software & Updates (software-properties-gtk), Additionnal Drivers. Lauch it directly, not from Synaptic. They interfere with each other.
    • Admin
      Admin about 7 years
      We need to know the exact Nvidia model in order to know what drivers to install. It seems you've been trying with wrong driver versions, as usual (you are not alone). Please edit your question accordingly.
  • ubfan1
    ubfan1 about 7 years
    The windows boarder garbage is a problem with the 375 driver. I was using 367 with no problems until it updated. Bug was filed, workaround is to put a script in /lib/systemd/system-sleep/ to kill compiz kill $(ps -C compiz -o pid=)
  • JazzTp
    JazzTp about 7 years
    Thanks for replying. I don't know if I got it right, I've created a script in that folder: The command $ cat /lib/systemd/system-sleep/killcompiz produces this output kill $(ps -C compiz -o pid=) (How do I put a newline or a blank line into a comment here?) Garbage is still there after suspend and resume. If I run the same command from a terminal window, the top bar of the same window disappears, all windows freeze, and after 10-20 seconds the garbage disappears and the system mentions an internal error, offering to report about it.
  • JazzTp
    JazzTp about 7 years
    Thanks, going to analyze more all your answers. CUDA works, problems are 1) need of going through recovery mode at each boot 2) windows frames corrupted after suspend-resume. Updated => kernel 4.8.0-44, nothing changed. I'd post result of ls /etc/modprobe.d/and from inside that folder grep -i nvidia * and content of nvidia-graphics-drivers.conf, but in a comment it would be a mess. Still hoping updates solve it. I would not like to mess up, I'm coming from another distribution which ended up being not upgradeable (by installing the NVidia driver + CUDA through a third party app).
  • JazzTp
    JazzTp about 7 years
    Thank you. That thread also mentions ubuntu 17.04 beta 2, I might just wait for the release and reinstall from scratch.