Announcement

Collapse
No announcement yet.

Nvidia Proprietary Video Driver -- HOW TO

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Nvidia Proprietary Video Driver -- HOW TO

    This post is reconstituted from the original 30 OCT 2009 post, cached here: http://kubuntuforums.net/forums/inde...opic=3107406.0


    Here is what I hope will be a useful reference, especially for the less experienced folks. It is written for Kubuntu ver. 9.10 or later -- note that there are some command variations for prior versions, including the command to start and stop the X server.

    1. The Official Kubuntu Way:

    NOTE: For ver. 11.04 and later, FIRST DO THIS:

    Code:
    sudo apt-get update && sudo apt-get install build-essential linux-headers-`uname -r`
    - Click your "K" menu launcher
    - Choose "Applications > System > Additional Drivers" -- after it scans your hardware, it should pop up a window that looks like this (Kubuntu 11.04):



    If you want the driver that it is offering, you click the "Activate" button and wait patiently -- it has to download the driver in the background and it may appear that nothing is happening for a short while.

    That's it -- you "OK" out of there and if you like the results you can be done.


    2. An unofficial *buntu way:

    New release Nvidia drivers are not added to released *buntu versions, but they go into the "x-swat" repository, so you can use that to get them.

    Code:
    sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
    Code:
    sudo apt-get update
    Code:
    sudo apt-get install nvidia-common nvidia-settings
    This repository conatains the latest nvidia drivers. If you keep the repository enabled, version upgrades will be automatically installed.


    3. The (kinda complicated but always works) official Nvidia way:

    Possibly the official Kubuntu method did not find your Nvidia GPU, or for some other reason did not offer you a driver. Possibly you observed that it is offering a version that is not the most current released version for your GPU. Perhaps you are an adventurer who would like to install and test the latest Beta driver from Nvidia. For any of these reasons, you may want or need to download the Nvidia packaged driver/installer. Here is what you need to do.

    EDIT 5 March 2010: Kubuntu 10.04 "Lucid Lynx" comes with the nouveau driver installed by default. [POLITICS]I'm enthused about an open source driver for Nvidia hardware, and I really hope nouveau keeps improving -- it seems to work well for 2D graphics today, on my GTX260, and I've no doubt 3D will be supported one of these days. I'm looking forward to it.[/POLITICS].

    The nouveau driver must be removed and the system rebooted before the proprietary Nvidia driver can be installed. So, if you want the proprietary driver on Lucid, you must

    sudo apt-get remove --purge linux-backports-modules-nouveau-`uname -r`

    Code:
    sudo apt-get --purge remove xserver-xorg-video-nouveau
    and add the following to the end of /etc/modprobe.d/blacklist.conf:

    Code:
    blacklist nouveau
    blacklist nvidiafb
    don't forget to add a carriage return at the end. **

    Then reboot and proceed.

    NOTE: If you previously used "Restricted Driver Manager" or "nvidia-xxx-glx" then you're going to have to do these things before you can install the downloaded new driver - otherwise proceed directly to Step #1:

    - Open Adept or Synaptic, or use apt-get, and

    Code:
    sudo apt-get remove --purge linux-restricted-modules-`uname -r`
    - Remove any and all packages beginning with "nvidia-..." (see command line below) *

    - Use your editor in root mode to open the file /etc/default/linux-restricted-modules-common (if it exists on your system), and on the last line where it says

    DISABLED_MODULES=""

    insert "nv" between the quote marks, so it reads:

    DISABLED_MODULES="nv"

    and save it. Next, at the root "you@karmic:/$" prompt

    *
    Code:
    sudo find . -type f -name 'nvidia*' -exec zip -mT junk-nvidia-files.zip {} +
    (Note that an archive file named "junk-nvidia-files.zip" will be created and will hold all the removed files, just in case ...)


    Now proceed to Step #1 and begin.


    Step #1. Download the 32-bit or 64-bit driver, as appropriate, to your /home/user/Downloads folder from here:

    http://www.nvidia.com/Download/index.aspx?lang=en-us

    or here:

    http://www.nvnews.net/vbulletin/showthread.php?t=122606


    Get the ...pkg1.run for 32-bit, or ...pkg2.run for 64-bit. (applicable to driver versions before 256.35)




    Step #2. When it is done downloading, Ctrl-Alt-F1 out of the X server, and log in to the CLI. Stop the X server with the following command:

    Code:
    sudo service kdm stop

    Step #3. Change to the /tmp directory, for two reasons. First, it is bad practice to run "sudo" or root commands, including software installations, from your home directory -- if the .ICEauthority or .Xauthority hidden files are changed by root during your operation, you will be done logging in to KDE (until you figure out how to fix it). Secondly, any residual non-needed files that are left in /tmp will be dropped in the next reboot -- you can be lazy and not worry about cleaning up after yourself when the driver installation is finished.

    Code:
    cd /tmp
    Also, install the linux-headers and build-essential packages for your running kernel:

    Code:
    sudo apt-get update && sudo apt-get install linux-headers-`uname -r` build-essential

    Step #4. Copy your downloaded driver installer file to /tmp:

    Code:
    sudo cp /home/dibl/Download/NV{TAB to complete} .
    NOTICE: (a) you can use the Tab key to finish that awkward file name automatically, and (b) THE "."! The period tells bash to copy the file to the directory where you are working.


    Step #5. Run the installer:

    Code:
    sudo sh NV{TAB to complete}
    and press Enter.

    -- answer the questions as they come up:
    a. Accept the license
    b. Remove prior driver? = Y
    c. Download a kernel interface? = Y
    d. Compile a kernel interface? = OK
    e. Install Nvidia's 32-bit compatibility OpenGL libraries? = Y
    f. Run the nvidia-xconfig utility? = Y (or if you already have a proven good xorg.conf for this driver version, you can answer "N")


    Step #6. Restart the X server:

    Code:
    sudo service kdm start
    Log in and enjoy the view!



    NOTE for 10.04 and later versions: Changes in the booting process for 10.04 may leave you with a call to the nouveau driver embedded in the init ramdisk. If you find you still have the nouveau driver, even after blacklisting it, then you will need to (after making the blacklist entry in /etc/modprobe.d/blacklist.conf), reboot into Recovery Console, and run

    Code:
    sudo update-initramfs -u
    and then proceed (still in Recovery Console) with your Nvidia driver installation as described above.

    http://ubuntuforums.org/showpost.php...14&postcount=5


    But, suppose you are not satisfied with the view -- the screen resolution is not pleasing, you insist on overclocking your $350 GPU, or something like that. With the proprietary driver comes the nvidia-settings utility. Use Alt-F2 to run it. Alt-F2 "nvidia-settings" (with no quote marks) brings up a panel that looks like this:

    [img width=400 height=249]http://img217.imageshack.us/img217/2599/nvidia19042settings.png[/img]


    The second menu item "X Server Display Configuration" opens a dialogue that lets you adjust the resolution and refresh rates. I always advise leaving the refresh rate set to "auto" -- let the X server control that dynamically, for best overall results. You'll see something like this:

    [img width=400 height=323]http://img684.imageshack.us/img684/3629/nvidiaxserver.png[/img]


    If you want to make a permanent change to the default screen resolution, then prefix the "nvidia-settings" command with "kdesudo" to run it in root mode. Click the "Detect Displays" button and if your monitor/LCD has an EDID capability it will be read and used by the driver. After you change the screen resolution, to make it the default click the "Save to X Configuration File" button in the lower right of the dialogue, and it will overwrite that section of the /etc/X11/xorg.conf file.

    (I'm going to show the overclocking/coolbits information below, but as of driver 270-series, it appears Nvidia is no longer providing overclocking support. Instead there is a "PowerMizer" function that allows adaptive clocking on the fly -- it seems to work fine.)

    If you want to accept the risk of overclocking your GPU, and void your warranty, then you add the "Coolbits" option line in your xorg.conf file. That enables the option in the nvidia-settings (see the third-to-last menu item on mine). There is an "Auto Detect" testing function that you can use, in the 3D mode settings, that will test your GPU and graphics memory and recommend maximum settings for you. Here's the dialogue where you can play with it:

    [img width=400 height=244]http://img130.imageshack.us/img130/1613/nvidiaxserver1.png[/img]


    Finally, I will post the /etc/X11/xorg.conf file that driver 270.18 wrote for my GTX480 and NEC monitor, plus the last three options which I added per oshunluvr's advice -- it's doing a great job today with driver 270.41.19:

    # nvidia-xconfig: X configuration file generated by nvidia-xconfig
    # nvidia-xconfig: version 270.18 (buildmeister@swio-display-x86-rhel47-08.nvidia.com) Tue Jan 18 22:06:28 PST 2011


    Section "ServerLayout"
    Identifier "Layout0"
    Screen 0 "Screen0" 0 0
    InputDevice "Keyboard0" "CoreKeyboard"
    InputDevice "Mouse0" "CorePointer"
    EndSection

    Section "Files"
    EndSection

    Section "InputDevice"

    # generated from default
    Identifier "Mouse0"
    Driver "mouse"
    Option "Protocol" "auto"
    Option "Device" "/dev/psaux"
    Option "Emulate3Buttons" "no"
    Option "ZAxisMapping" "4 5"
    EndSection

    Section "InputDevice"

    # generated from default
    Identifier "Keyboard0"
    Driver "kbd"
    EndSection

    Section "Monitor"
    Identifier "Monitor0"
    VendorName "Unknown"
    ModelName "Unknown"
    HorizSync 28.0 - 33.0
    VertRefresh 43.0 - 72.0
    Option "DPMS"
    EndSection

    Section "Device"
    Identifier "Device0"
    Driver "nvidia"
    VendorName "NVIDIA Corporation"
    EndSection

    Section "Screen"
    Identifier "Screen0"
    Device "Device0"
    Monitor "Monitor0"
    DefaultDepth 24
    SubSection "Display"
    Depth 24
    Option "Coolbits" "1"
    Option "UseCompositeWrapper" "True" # Enables the X server's composite wrapper instead of the builtin one.
    Option "BackingStore" "True" # Cache overlayed areas in case they get redisplayed later
    Option "OnDemandVBlankInterrupts" "True" # only fire VBlank interrupts in modes where they are needed
    EndSubSection
    EndSection
    Also, as doctordruidphd points out, a coolbits option of "5" will (dangerously) enable fan control via nvidia-settings. I'm afraid to try it -- you may do that experiment on your Nvidia card, if you want.
    Last edited by dibl; Apr 06, 2012, 08:48 AM.

    #2
    Re: Nvidia Proprietary Video Driver -- HOW TO

    What is the meaning of:

    "Driver is activated but not in use."

    I see this on the Additional Drivers dialog when the "recommended" driver is selected. It has a green dot, but the afore mentioned message beside it.

    TIA

    Comment


      #3
      Re: Nvidia Proprietary Video Driver -- HOW TO

      Looks like useful guidance for that issue is here: http://ubuntuforums.org/showthread.php?t=1433955

      Comment


        #4
        Odd, after using method #3 above, trying to run nvidia-settings I got the following err:

        Code:
        nvidia-settings: error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory
        Install libgtk2.0-0 fixed it.
        Boot Info Script

        Comment

        Working...
        X