Quantcast Manual installation instructions for proprietary NVIDIA binary blob driver on Debian

+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 19
  1. #1

    Join Date
    Sep 2008
    Posts
    6,735
    Rep Power
    50

    Default Manual installation instructions for proprietary NVIDIA binary blob driver on Debian

    FEEDBACK WELCOME


    WARNING: This installs proprietary software on your computer. If you value freedom, you should contribute bug reports or code to the Nouveau project instead of relying on a corporation that does not respect open software principles.

    PLEASE NOTE:
    -I cannot provide support for NVIDIA's proprietary driver. Driver problems should be discussed at nvnews forums: NVIDIA Linux - nV News Forums.

    -Use your distribution's nvidia-glx package instead of this manual method unless you have a specific reason not to.
      -Valid reasons include:
        -Using beta drivers
        -Running a custom kernel and/or patching the NVIDIA driver
        -Using bleeding-edge hardware that requires the latest release
        -Being a 1337 h4x0r



    Table of contents:
    0.) Introduction
    1.) Fundamental concepts
    2.) Other Documentation
    3.) Prerequisites
    4.) Back up your existing setup
    5.) Removing Nouveau and nvidia-glx
    6.) Downloading the driver
    7.) Installing the NVIDIA driver

    A.) How to troubleshoot
    B.) How to remove the proprietary NVIDIA driver
    C.) Using the NVIDIA driver with a patch




    Introduction
    Most current systems are shipping with nouveau as the default driver for NVIDIA cards. This is a free software implementation based on clean room reverse engineering, unfortunately it lacks many features. Most distributions also provide the option to install the proprietary NVIDIA driver in a package called nvidia-glx through some sort of driver program or package manager, however it is almost always out of date. This is a generic guide for manually installing the proprietary NVIDIA binary blob drivers on Debian-derived distros (Ubuntu, Mint, etc.) with the NVIDIA-provided installer, not a distribution-provided package.

    I've found the need to accumulate answers to common questions regarding the proprietary NVIDIA driver into one document, and that is my reason for creating this unofficial guide. It should not be treated as the last word on the topic, nor as a definitive guide to the installation of NVIDIA drivers. There is no special method here, only an accumulation of commonly known techniques in a condensed guide made for Debian-derived distros. I am not responsible for your actions and provide these instructions for reference only. Use this guide at your own risk. Corrections or suggestions are welcome and feel free to reuse this information in any way you'd like.

    Debian Sid and the 260.19.12 NVIDIA 64-bit driver are used for the examples. Since the driver is updated frequently, you will need to substitute the version number and architecture of the latest release for your system in the examples below.

    Unfortunately there is no support for NVIDIA Optimus on Linux at this time. If you are using an Optimus-equipped system, do not attempt to follow this guide.

    Fundamental concepts
    This guide uses sudo to run commands as the superuser. Ubuntu and Mint usually have sudo configured out of the box. If you are running a stock Debian install, you will need to add the following line to your /etc/sudoers file and log out and back in, or you can choose to not do this, and run the commands in a root shell instead of using sudo. You can remove this line after finishing the guide, since it can be a potential security risk.
    Code:
    your_user_name_here    ALL=NOPASSWD: ALL
    Use CTRL+ALT+F1 (press and hold ctrl while also pressing and holding alt and F1) to switch away from the graphical interface and enter the terminal. This should look like an entirely black screen with a login prompt. There are a number of terminals you can log into at the same time, usually from F1 to F6. You use ALT+Fx where x is the F key with the number of the terminal, for example ALT+F2. You can use ALT+F7 or ALT+F8 (depending on your configuration) to switch back to the X server graphical interface if it is running. Holding the CTRL key is only needed to switch away from the graphical interface into a terminal.

    The X server is started and stopped by a generic piece of software called a display manager. This is usually GDM (for Gnome Display Manager), or KDM for KDE installations, and there are others. This guide only covers gdm, so if you use a different display manager you will need to first know how to start and stop it, though most act the same and for KDM you can substitute 'kdm' for 'gdm' in the examples in this guide. To start, stop, and restart gdm:
    Code:
    sudo /etc/init.d/gdm stop
    sudo /etc/init.d/gdm start
    sudo /etc/init.d/gdm restart
    Restarting is the same as stopping and starting in one command. In order to install the NVIDIA driver, the display manager must be in a stopped state. After installation, it can be started again. If you make simple configuration changes, to xorg.conf or similar, restarting is more appropriate.

    Other Documentation
    General information about different NVIDIA drivers: NvidiaGraphicsDrivers - Debian Wiki
    Info here is not current but good for reference: https://help.ubuntu.com/community/NvidiaManual
    This does not cover manual installation but is good for reference: https://help.ubuntu.com/community/Bi...erHowto/Nvidia
    There is full documentation from NVIDIA here: NVIDIA Accelerated Linux Graphics Driver README and Installation Guide

    You can also find options for the installer by running it with the --advanced-options or -A argument as in:
    Code:
    ./NVIDIA-Linux-x86_64-260.19.12.run --advanced-options | less
    (to quit less, type q)

    Prerequisites
    It is important to first make sure your package list is up to date before downloading any prerequisite packages:
    Code:
    sudo apt-get update
    Make sure you have the build-essential and kernel-headers for your kernel version installed:
    Code:
    sudo apt-get install build-essential linux-headers-`uname -r`
    Back up your existing setup
    Before doing anything, you should back up your existing xorg.conf file (if you have one):
    Code:
    sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
    I'd recommend downloading Nouveau and (optionally) nvidia-glx to your local cache. This way you don't need a network connection to get back to working order if things go wrong:
    Code:
    sudo apt-get --download-only install xserver-xorg-video-nouveau
    Code:
    sudo apt-get --download-only install nvidia-glx
    Removing Nouveau and nvidia-glx
    Remove Nouveau to rule out causes of any potential problems you may experience (recommended unless you have a specific reason not to):
    Code:
    sudo apt-get --purge remove xserver-xorg-video-nouveau
    Any updates to nvidia-glx will overwrite your manually installed drivers, so if it is installed, it should be removed before proceeding:
    Code:
    sudo apt-get --purge remove nvidia-glx
    Downloading the driver
    You can always download the latest official (proprietary) NVIDIA driver directly from here: Current NVIDIA Linux graphics driver releases - nV News Forums

    What I do is download the driver binary (64 bit in this example) to my home folder (~/), and make it executable:
    Code:
    wget -P ~ http://us.download.nvidia.com/XFree86/Linux-x86_64/260.19.12/NVIDIA-Linux-x86_64-260.19.12.run
    chmod a+x ~/NVIDIA-Linux-x86_64-260.19.12.run
    Installing the NVIDIA driver
    Log out of your system via the menu, and leave it at the login screen. Hit CTRL+ALT+F1, log in, and then stop the display manager:
    Code:
    sudo /etc/init.d/gdm stop
    Sometimes compiz will not be killed even after gdm has stopped, and any running OpenGL applications will cause the NVIDIA installer to fail. To make sure compiz is not running:
    Code:
    sudo killall compiz
    I run the driver installer with a few options: -Nqa --ui=none

    a automatically accepts the license agreement
    q doesn't prompt for questions
    N to not check for precompiled kernel interfaces (it usually fails when running a custom kernel, you may not need this option)

    --ui=none forces the installer to fall back to a simpler interface that doesn't use ncurses

    You'll want to use --no-cc-version-check to bypass testing the gcc version that the kernel was built with, since it will probably not match with a stock kernel, and in most cases doesn't matter for current Ubuntu releases.

    So put it together and this command line should install the driver for you smoothly:
    Code:
    sudo ./NVIDIA-Linux-x86_64-260.19.12.run -Nqa --ui=none --no-cc-version-check
    After that finishes, configure your settings automatically with:
    Code:
    sudo nvidia-xconfig
    Finally, try restarting gdm:
    Code:
    sudo /etc/init.d/gdm start
    You should have the NVIDIA driver installed now and see your graphical login screen. If something goes wrong, see the troubleshooting and documentation sections.

    How to troubleshoot
    If you start GDM and receive an error message or a garbled screen, hit CTRL+ALT+F1 to get back to the console to check the logs and fix the problem.

    If your system locks up completely, reboot into single user (or safe) mode to fix the problem.

    Error messages starting the xorg server begin with EE (or WW for warnings) and will be needed to track down any problems:
    Code:
    less /var/log/Xorg.0.log
    The NVIDIA installer leaves a log file in /var/log/nvidia-installer.log:
    Code:
    less /var/log/nvidia-installer.log
    (to quit less, type q)

    If anything goes wrong you can restore the backup xorg.conf and get back to normal with:
    Code:
    sudo cp /etc/X11/xorg.conf.backup /etc/X11/xorg.conf
    If you don't have an xorg.conf to begin with, and things get messed up, just delete the existing one to revert to the default settings:
    Code:
    sudo rm /etc/X11/xorg.conf
    If you have removed the Nouveau driver, you can reinstall it with this command:
    Code:
    sudo apt-get --reinstall install xserver-xorg-video-nouveau
    You can alternately use the proprietary NVIDIA driver provided by your distribution in the nvidia-glx package:
    Code:
    sudo apt-get --reinstall install nvidia-glx
    (note: the --reinstall may not be technically required depending on what steps you have taken previously)

    When you make changes to your driver configuration (such as changing or removing the xorg.conf, or installing a new driver), you must restart GDM (or KDM, or whatever display manager you are using) for the changes to take effect. Stopping and starting is covered in the examples above, but if you need to restart (stop and start) it in one go, use:
    Code:
    sudo /etc/init.d/gdm restart
    How to remove the proprietary NVIDIA driver
    Log out, hit CTRL+ALT+F1 and login to the terminal. Stop GDM:
    Code:
    sudo /etc/init.d/gdm stop
    To remove the NVIDIA driver that was installed manually:
    Code:
    sudo ./NVIDIA-Linux-x86_64-260.19.12.run --uninstall
    If you are switching back to the Nouveau or nvidia-glx driver, see the troubleshooting section above to restore your xorg.conf and driver, and then restart GDM.

    Using the NVIDIA driver with a patch
    Sometimes you will find that a newer kernel release requires a patch to get the driver working. These patches can come from anywhere, but normally turn up on nvnews Linux forum on a thread about that kernel release. Patching the driver can be accomplished by extracting the installer binary to a directory.

    Code:
    ./NVIDIA-Linux-x86_64-260.19.12.run --extract-only
    cd NVIDIA-Linux-x86_64-260.19.12
    wget http://url/of/some.patch
    patch -p0 < some.patch
    Depending on the patchlevel of the patch, you may need to change p0 to p1.

    Assuming you have successfully patched with no fatal errors, you can run the installer:
    Code:
    sudo ./nvidia-installer -Nqa --ui=none --no-cc-version-check

  2. #2
    rip dmr
    Join Date
    Apr 2010
    Posts
    890
    Rep Power
    14

    Default Re: Manual installation instructions for proprietary NVIDIA binary blob driver

    Quote Originally Posted by ALLurGroceries View Post
    WORK IN PROGRESS - FEEDBACK WELCOME
    Ok.

    1. Please add to the title that this guide is made for Ubuntu and derivatives. A user of openSuse or Fedora might still find it useful but obviously can't just copy it.
    To be more general (adressed not only to you but to all): If you post any distribution specific how-tos, please always include the distribution in the title. There's more to Linux than just Ubuntu.

    2. I appreciate that you added a warning about nonfree software. But please also add a hint (maybe more that that, e.g. a whole paragraph) that even for the proprietary driver the package provided in the distributions repository should usually be favoured over the direct download from NVIDIA.
    The package management system is a central component of many distributions, and it should be used. There might be good reasons to circumvent it in certain situations (e.g. if the version in the package is too old), but this should only be an exception, not the rule.
    Dell Precision M6500 | Debian Squeeze GNU/Linux 2.6.32-5-amd64 (de) | BIOS A06 | i7-820QM @1,73GHz | 1GB + 2GB + 2x4GB RAM @1066MHz | Intel 310 mSATA SSD 80GB + 2x 500GB + 1x 750GB HDD | NVIDIA FX 2800M | WLED 1920x1200 | 2MPx camera

  3. #3
    Newbie
    Join Date
    Oct 2010
    Posts
    8
    Rep Power
    10

    Default Re: Manual installation instructions for proprietary NVIDIA binary blob driver

    @ALLurGroceries I appreciate your walkthrough but unfortunately the driver doesn't work. The systems hangs up after sudo /etc/init.d/gdm start. when i reboot then the system just displays a violet screen and freezes up there. So i had to get into the recovery mode and remove the xorg.conf file install the nouveau and restart the gdm to get back to old 800*600 state.

    I find the same thing happening when ubuntu 10.10 automatically detects the proprietary drivers and installs the nvidia automatically.

    Any other help greatly appreciated.

    Thanks

  4. #4

    Join Date
    Sep 2008
    Posts
    6,735
    Rep Power
    50

    Default Re: Manual installation instructions for proprietary NVIDIA binary blob driver

    Quote Originally Posted by debguy View Post
    1. Please add to the title that this guide is made for Ubuntu and derivatives. A user of openSuse or Fedora might still find it useful but obviously can't just copy it.
    To be more general (adressed not only to you but to all): If you post any distribution specific how-tos, please always include the distribution in the title. There's more to Linux than just Ubuntu.
    The title will be too long if I add this in, but I'll do it anyway, I understand your concern. This was already mentioned at the top, and I'm not going to sticky this post (at least I don't plan on it), so it's not really a statement about what Linux distro is worth writing about. I don't have a comfort level great enough with anything but Debian to write a kind of guide like this. You are free to take what I write here and write your own guide.

    Quote Originally Posted by debguy View Post
    2. I appreciate that you added a warning about nonfree software. But please also add a hint (maybe more that that, e.g. a whole paragraph) that even for the proprietary driver the package provided in the distributions repository should usually be favoured over the direct download from NVIDIA.
    The package management system is a central component of many distributions, and it should be used. There might be good reasons to circumvent it in certain situations (e.g. if the version in the package is too old), but this should only be an exception, not the rule.
    This guide is specifically for manual installation, that is pretty explicit in that it doesn't use the package management system. I'll add a note at the top but not a paragraph.

    Quote Originally Posted by magnetpest2k7 View Post
    @ALLurGroceries I appreciate your walkthrough but unfortunately the driver doesn't work. The systems hangs up after sudo /etc/init.d/gdm start. when i reboot then the system just displays a violet screen and freezes up there. So i had to get into the recovery mode and remove the xorg.conf file install the nouveau and restart the gdm to get back to old 800*600 state.

    I find the same thing happening when ubuntu 10.10 automatically detects the proprietary drivers and installs the nvidia automatically.

    Any other help greatly appreciated.

    Thanks
    Replied in your other post here.

  5. #5
    Laptop Owner
    Join Date
    Dec 2006
    Posts
    2,085
    Rep Power
    27

    Default Re: Manual installation instructions for proprietary NVIDIA binary blob driver

    What's wrong with xorg.conf that the installer created? I always get a prompt to let the installer create a xorg.conf and it will back up the old one automatically, and that never fails. Of course I'm on opensuse.
    OpenSUSE 11.3 x86_64 | Windows 7 x64 Enterprise

  6. #6

    Join Date
    Sep 2008
    Posts
    6,735
    Rep Power
    50

    Default Re: Manual installation instructions for proprietary NVIDIA binary blob driver

    Quote Originally Posted by f4ding View Post
    What's wrong with xorg.conf that the installer created? I always get a prompt to let the installer create a xorg.conf and it will back up the old one automatically, and that never fails. Of course I'm on opensuse.
    If you run it non-interactively it won't prompt you, so that's the extra step. It's faster if you upgrade with every release to not be prompted because you shouldn't have to update your existing xorg.conf.

    As for why to manually back it up, it's because you can never have too many backups, and I don't want headaches from users trashing their configurations due to this guide.

  7. #7
    rip dmr
    Join Date
    Apr 2010
    Posts
    890
    Rep Power
    14

    Default Re: Manual installation instructions for proprietary NVIDIA binary blob driver

    Quote Originally Posted by ALLurGroceries View Post
    The title will be too long if I add this in, but I'll do it anyway, I understand your concern.
    Thanks a lot! My point is just, that I often find guides that basically say: "How to do X on Linux."
    If you then have a look at it you'll find that "Linux" actually means "Ubuntu" and that many newbies are confused because it doesn't work that way in their distribution and they complain about it because according to the title it should work for every Linux. This sometimes gets frustrating.

    Quote Originally Posted by ALLurGroceries View Post
    I don't have a comfort level great enough with anything but Debian to write a kind of guide like this. You are free to take what I write here and write your own guide.
    Basically it'll work for other distributions too, but one would have to replace the apt-get commands.
    And sudo is still pretty Ubuntu-specific. I know there is a way to make Debian behave like Ubuntu, but As far as I know that's not default by now.


    Quote Originally Posted by ALLurGroceries View Post
    This guide is specifically for manual installation, that is pretty explicit in that it doesn't use the package management system. I'll add a note at the top but not a paragraph.
    I'm fine with the way it is now. I just wanted to make sure that newbies know that the manual installation shouldn't be the default way.
    Dell Precision M6500 | Debian Squeeze GNU/Linux 2.6.32-5-amd64 (de) | BIOS A06 | i7-820QM @1,73GHz | 1GB + 2GB + 2x4GB RAM @1066MHz | Intel 310 mSATA SSD 80GB + 2x 500GB + 1x 750GB HDD | NVIDIA FX 2800M | WLED 1920x1200 | 2MPx camera

  8. #8

    Join Date
    Sep 2008
    Posts
    6,735
    Rep Power
    50

    Default Re: Manual installation instructions for proprietary NVIDIA binary blob driver

    Quote Originally Posted by debguy View Post
    And sudo is still pretty Ubuntu-specific. I know there is a way to make Debian behave like Ubuntu, but As far as I know that's not default by now.
    Valid point. The first thing I do on a stock Debian install is configure sudo.

    Add this to ur /etc/sudoers:
    Code:
    groceries    ALL=NOPASSWD: ALL
    (I added this to the prereq section in the guide).

  9. #9
    rip dmr
    Join Date
    Apr 2010
    Posts
    890
    Rep Power
    14

    Default Re: Manual installation instructions for proprietary NVIDIA binary blob driver

    Quote Originally Posted by debguy View Post
    I know there is a way to make Debian behave like Ubuntu, but As far as I know that's not default by now.
    I just installed a fresh Debian testing with only default settings and it still has a usual root account without enhanced privileges for normal users.

    Quote Originally Posted by ALLurGroceries View Post
    Valid point. The first thing I do on a stock Debian install is configure sudo.

    Add this to ur /etc/sudoers:
    Code:
    groceries    ALL=NOPASSWD: ALL


    Quote Originally Posted by ALLurGroceries View Post
    (I added this to the prereq section in the guide).
    Honestly I'm very unhappy with that. You know what you're doing. But a lot of people following your guide will only copy your instructions without thinking about the consequences.
    Since on one hand this setting creates a huge potential security problem and is not necessary to accomplish the task on the other hand you shouldn't set it as a prerequisite!
    If you wouldn't apply the NOPASSWD option, it would be much safer but still alter Debians default behavior without any need.

    So I'd like to add another general recommendation for how-tos:
    Don't alter the distributions default behavior without any good reason. And "because I feel more comfortable with it" should not count as a good reason.

    Just say that this thread is made for Ubuntu and optionally include a hint that it will work for Debian too if you log into a root shell and ommit the "sudo" in every command.
    Dell Precision M6500 | Debian Squeeze GNU/Linux 2.6.32-5-amd64 (de) | BIOS A06 | i7-820QM @1,73GHz | 1GB + 2GB + 2x4GB RAM @1066MHz | Intel 310 mSATA SSD 80GB + 2x 500GB + 1x 750GB HDD | NVIDIA FX 2800M | WLED 1920x1200 | 2MPx camera

  10. #10

    Join Date
    Sep 2008
    Posts
    6,735
    Rep Power
    50

    Default Re: Manual installation instructions for proprietary NVIDIA binary blob driver

    Quote Originally Posted by debguy View Post
    Honestly I'm very unhappy with that. You know what you're doing. But a lot of people following your guide will only copy your instructions without thinking about the consequences.
    Since on one hand this setting creates a huge potential security problem and is not necessary to accomplish the task on the other hand you shouldn't set it as a prerequisite!
    You're right, it's good to always be super clear about potential security problems.

    I added this to that part of the guide, and relocated it to the introduction:
    If you are running a stock Debian install, you will need to add the following line to your /etc/sudoers file and log out and back in, or you can choose to not do this, and run the commands in a root shell instead of using sudo. You can remove this line after finishing the guide, since it can be a potential security risk.
    Quote Originally Posted by debguy View Post
    If you wouldn't apply the NOPASSWD option, it would be much safer but still alter Debians default behavior without any need.

    Don't alter the distributions default behavior without any good reason. And "because I feel more comfortable with it" should not count as a good reason.
    From Chapter 1 of the Debian Reference:
    it is also common to do as follows to let the non-privileged user, e.g. penguin, to gain administrative privilege without any password.

    # echo "penguin ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers

    This trick should only be used for the single user workstation which you administer and where you are the only user.
    I feel this is probably safe for most people using this guide, and if not, they have a good clear warning that I just added due to your concerns.

 

 
Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -4. The time now is 11:56 AM.
Powered by vBulletin® Version 4.2.2
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
SEO by vBSEO 3.6.1