Difference between revisions of "How to Install the proprietary NVIDIA driver"

From Salix OS
Jump to: navigation, search
m (swapped over order of detailed instructions to refelct the order they need to be done in)
m (Installation)
 
(16 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
==Prerequisites==
 
==Prerequisites==
 
* Download the [http://www.nvidia.com/object/unix.html proprietary NVIDIA driver] and save it to a known location. Throughout this guide we assume you used your home directory.
 
* Download the [http://www.nvidia.com/object/unix.html proprietary NVIDIA driver] and save it to a known location. Throughout this guide we assume you used your home directory.
* [[#Blacklisting nouveau|Blacklist nouveau driver]]
 
 
* [[#Installation of kernel sources|Install the kernel sources]]
 
* [[#Installation of kernel sources|Install the kernel sources]]
  
==Blacklisting nouveau==
+
==Installation of kernel sources==
Run the following as root:
+
Run the following:
  slapt-get --update
+
  sudo slapt-get --update
  slapt-get -i xf86-video-nouveau-blacklist
+
  sudo slapt-get -i kernel-source
  
When finished you need to reboot your computer. Afterwards you need to continue with the [[#Installation of kernel sources|installation of kernel sources]] or if you have already installed the kernel-source package, you can go directly to the [[#Installation|installation of the driver]].
+
This first updates your local package cache and then installs the kernel-source package, which is quite big and thus can take a while.
  
 +
Make sure the kernel-source package you are installing matches your current kernel. You can check the currently installed kernel packages with:
 +
ls /var/log/packages/kernel-*
  
 +
If the kernel-source package version does not match your current kernel, you need to upgrade your kernel packages first. See [https://docs.salixos.org/wiki/How_to_install_a_different_kernel] for how to do this.
  
==Installation of kernel sources==
+
When you're finished [[#Installation|install the actual driver]].
As root run the following:
+
slapt-get --update
+
slapt-get -i kernel-source
+
 
+
This first updates your local package cache and then installs the kernel-source package, which is quite big and thus can take a while. When you're finished [[#Installation|install the actual driver]].
+
  
 
==Installation==
 
==Installation==
 
# Close all your applications and save all data. Also log out if possible.
 
# Close all your applications and save all data. Also log out if possible.
# Now press ''Ctrl + Alt + F1'' to go to the first terminal in text-mode and login as ''root''.
+
# Now press ''Ctrl + Alt + F2'' to go to a terminal in text-mode and login.
# Now terminate X by dropping to runlevel 3 (text-mode only). <br/><pre>init 3</pre>
+
# Now terminate X by dropping to runlevel 3 (text-mode only). <br/><pre>sudo init 3</pre>
 
# Now change to the folder where you saved the NVIDIA driver. Replace <youruser> with your user name. <br/><pre>cd ~<youruser></pre>
 
# Now change to the folder where you saved the NVIDIA driver. Replace <youruser> with your user name. <br/><pre>cd ~<youruser></pre>
# Now start the installer. <br/><pre>sh NVIDIA-Linux-*.run</pre>
+
# Now start the installer. <br/><pre>sudo sh NVIDIA-Linux-*.run</pre>
 
# Follow the instructions of the installer. Select to update your xorg.conf. Otherwise you need to do so manually.
 
# Follow the instructions of the installer. Select to update your xorg.conf. Otherwise you need to do so manually.
# When finished return to X by going to runlevel 4. <br/><pre>init 4</pre>
+
# Reboot, '''and repeat''' (run the installer again). The first run blacklists the nouveau driver and the second installs the new one. See https://forum.salixos.org/viewtopic.php?f=16&t=5452&hilit=nouveau+blacklist&start=20
 +
# When finished return to X by going to runlevel 4. <br/><pre>sudo init 4</pre>
 +
 
 +
You can tweak some settings with the ''nvidia-settings'' tools now, if you need/want to. To be able to save any such changes to your ''xorg.conf'' you need to run the ''nvidia-settings'' tool as root.
  
You can tweak some settings with the ''nvidia-settings'' tools now, if you need/want to. To be able to save changes to your ''xorg.conf'' you need to run the ''nvidia-settings'' tool as root.
+
[[category:User Documentation|Nvidia]]

Latest revision as of 17:43, 12 March 2018

You need to close all running applications during the installation of the driver. Therefore if you want to be able to view these instructions while working through them you should open them on another computer or create a printout.

Prerequisites

Installation of kernel sources

Run the following:

sudo slapt-get --update
sudo slapt-get -i kernel-source

This first updates your local package cache and then installs the kernel-source package, which is quite big and thus can take a while.

Make sure the kernel-source package you are installing matches your current kernel. You can check the currently installed kernel packages with:

ls /var/log/packages/kernel-*

If the kernel-source package version does not match your current kernel, you need to upgrade your kernel packages first. See [1] for how to do this.

When you're finished install the actual driver.

Installation

  1. Close all your applications and save all data. Also log out if possible.
  2. Now press Ctrl + Alt + F2 to go to a terminal in text-mode and login.
  3. Now terminate X by dropping to runlevel 3 (text-mode only).
    sudo init 3
  4. Now change to the folder where you saved the NVIDIA driver. Replace <youruser> with your user name.
    cd ~<youruser>
  5. Now start the installer.
    sudo sh NVIDIA-Linux-*.run
  6. Follow the instructions of the installer. Select to update your xorg.conf. Otherwise you need to do so manually.
  7. Reboot, and repeat (run the installer again). The first run blacklists the nouveau driver and the second installs the new one. See https://forum.salixos.org/viewtopic.php?f=16&t=5452&hilit=nouveau+blacklist&start=20
  8. When finished return to X by going to runlevel 4.
    sudo init 4

You can tweak some settings with the nvidia-settings tools now, if you need/want to. To be able to save any such changes to your xorg.conf you need to run the nvidia-settings tool as root.