Debian – How to install Nvidia proprietary drivers on Debian 9 stretch – rc3

debian

I've been trying to install Nvidia proprietary drivers on Debian 9 stretch – rc3. Without any success.


Why did I installed testing Debian branch?

Debian Jessie is kind of outdated for me. I am developing c++ programs on regular basis and I need c++14 / c++17 features (at least g++-6.3). Besides that stretch is in state of full freeze now. And I suspect it will be moved to the stable branch in the nearest future.


Problem description:

After installing the nvidia graphics card driver from non-free Debian repository (followed by laptop reboot), the system is trying to start, but this error occurs.


What did I tried ?

Everything that I could find with google. Nevertheless i can distinguish this:

Method #1:

  1. Add noveau module to the blacklist (via /etc/modprobe.d/nouveau.conf file)
  2. Reboot. After rebooting my computer, I check whether I have disabled the module: lsmod | grep nouveau. (it didn't report anything therefore i believe i have succeed).
  3. Boot into text mode. Run apt-get install nvidia-driver as root.
  4. Reboot once again. When X-server starts i get following error: Link

Method #2:

  1. Same as steps 1, and 2 from method #1.
  2. Install *.run file dowloaded from official Nvidia site. Result is the same.

Method #3:

  1. Same as steps 1, 2 and 3 from method #1.
  2. Run: nvidia-xconfig. Result: broken OS (After reboot I get only blinking cursor)

Information:

I am kind of new to the linux, so if you would like more specific information, about my problem, please tell me what to do, and I will provide those information.

My root is currently on LVM partition with a snapshot – there is no need to worry about destroying my OS – i will recover it later with LVM.


Edit #1:

I have performed clean installation of Debian 9 -rc3. Just to be sure that I didn't mess anything. I have completed steps described by Knud Larsen. Result is same. I am still getting the same error.


Edit #2:

It turns out that I am on hybrid-graphics system. Problems that I have been experiencing are a result of that. Otherwise answer proposed by Knud Larsen would have solved them.

Best Answer

Debian 9 : # apt-get update && apt install nvidia-driver : version 375.39 is installed..

Conditions : A line in /etc/apt/sources.list with non-free, like

deb http://ftp.funet.fi/pub/linux/mirrors/debian/ stretch contrib non-free

Reboot, and you have NVIDIA graphics. (Unless your other actions disturbed something.)

Related Question