Page 1 of 32 12311 ... LastLast
Results 1 to 10 of 320

Thread: HowTo: NViDIA 185.18 Drivers in Ubuntu

  1. #1
    Join Date
    Jan 2008
    Beans
    4,757

    HowTo: NViDIA 185.18 Drivers in Ubuntu

    Preface
    This is HowTo is intended for Intrepid and/or Jaunty users who are experiencing oddball issues, such as glyphs, artifacts, and glitches from applications that use lots of small pixmaps/images.

    For users of Ubuntu Hardy, in my testing, there is no such problem evident in the 2.6.24 and prior kernels, so you can blissfully ignore this thread. But, the way I will present HowTo installing NViDIA drivers may be true for almost any Debian-based distribution.

    This HowTo may not necessarily be for users with any card that predates the Geforce 8 series, as mentioned here.
    Infact, it should be noted that all the success stories I've had have mostly come from people using 8400 and up cards.

    You are expected to be an experienced user, adept in the commandline, and have the ability to work out some Xorg related problems for yourself.

    As of June, the 185.18 drivers have been officially released as stable. More about other recent driver versions can be found here.

    List of known working cards through testimonials and my own testing:
    Quadro-NVS 110M, GeForce Go7400, GTX260, GTX280, 6150SE, 7050PV, 7300SE, 7800GS, 8400GS, 8500GT, 8600GT, 8600GTS, 8800GT, 8800GTS, 9300MGS 9500GT, 9600GT, 9800GT, 9800GX2

    If this guide works for you, please post your GFX card name/model so I can add it to the list.


    Introduction
    On the 6th of April, AaronP announced that the NViDIA 185.19 drivers are out for testing. In the list of updates, one stuck out of the crowd, as highlighted in this NViDIA thread.

    This led to an affiliate asking about if this resulted in an improvement on the the way Firefox runs on Linux if you use an NViDIA driver.
    The reply:
    Not Firefox in particular, just performance in general. Any application that uses small pixmaps should see an improvement.
    Since then, NViDIA have improved upon that initial release, renamed 185.19 to 185.18 and, as of the 27th May 2009, have now released the driver as officially supported.

    "Wow", thought I. That is a very compelling reason, and I am crazy enough to risk breaking my system to try it.


    Reset Xorg back to Failsafe Defaults
    Before doing anything, it's time to say goodbye to nvidia for the moment and bring back the original Xorg configuration. This is done by opening a terminal and running:
    Code:
    sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.original
    sudo dpkg-reconfigure -phigh xserver-xorg
    It is not required, but you can logout and log back in again after running this. Doing so means you are now on the default VESA drivers, so Composite features (compiz) will be disabled.

    Also, we won't be needing the xorg.conf.orginal file, but it serves:
    1) As a backup incase you wish to reinstall the NViDIA drivers through the 'Hardware Drivers' utility.
    2) As a reference for those who have specially tweaked xorg.conf files (such as dual-monitor, etc).


    Installing Build Deps
    Next, we need to be ensured that we have all build-essential programs and our current kernel headers.
    Code:
    sudo apt-get install build-essential pkg-config linux-headers-$(uname -r)

    Ubuntu and Hardware Drivers
    If you run Ubuntu and have an NViDIA card, you more than likely used the 'Hardware Drivers' utility to install them. This can lead to conflicts later down the line, as New drivers/Old drivers will cause API conflicts that will prevent X from starting.
    So you are required to uninstall/remove any nvidia modules and references before beginning.
    Code:
    sudo apt-get --purge remove nvidia-glx nvidia-glx-legacy nvidia-glx-new nvidia-settings
    Next, it is a good idea to check to ensure that dpkg shows that there are no extraneous packages left installed on your system.
    Code:
    dpkg -l | grep nvidia
    If that outputs something, then these package needs removing. Use this aptitude command below to remove/purge them.
    Code:
    sudo aptitude purge $(dpkg -l | grep nvidia | awk '{print $2}')
    Note: In some terminal emulators (hint: xterm) I have been informed that the above doesn't work. If this is the case, run the following instead:
    Code:
    sudo aptitude purge $(aptitude search -F%p '~c nvidia' '~i nvidia')

    As an optional step, for some people who may find a conflict during installation, removing the xorg-nv drivers beforehand appears to work for them.
    Code:
    sudo apt-get --purge remove xserver-xorg-video-nv
    Note: doing this means that the next time you restart X, you will have a 800x600, or an other low screen resolution, so do not be alarmed.


    Another optional step, is to disable the nv and nvidia_new drivers from loading too, for those who have further problems.
    Code:
    gksudo gedit /etc/default/linux-restricted-modules-common
    And on the line that says DISABLED_MODULES="" change it to
    Code:
    DISABLED_MODULES="nv nvidia_new"

    Downloading the Drivers
    Depending on your OS architechture, you will need to get the right one for your kernel.

    If you are on 32bit Ubuntu, run:
    Code:
    wget ftp://download.nvidia.com/XFree86/Linux-x86/185.18.36/NVIDIA-Linux-x86-185.18.36-pkg0.run -O NVIDIA-Linux-185.18.pkg.run
    If you are on 64bit Ubuntu, run:
    Code:
    wget ftp://download.nvidia.com/XFree86/Linux-x86_64/185.18.36/NVIDIA-Linux-x86_64-185.18.36-pkg0.run -O NVIDIA-Linux-185.18.pkg.run
    Now, move the installer to the /usr/src folder and make a link to the file.
    Code:
    sudo install NVIDIA-Linux-185.18.pkg.run /usr/src
    sudo ln -fs /usr/src/NVIDIA-Linux-185.18.pkg.run /usr/src/nvidia-driver
    The nvidia-driver symlink will be needed for later + post installation configuration.


    Downloading the Release Candidate Drivers
    Optional Step: If you'd rather install the latest RC drivers, do the following instead.

    If you are on 32bit Ubuntu, run:
    Code:
    wget ftp://download.nvidia.com/XFree86/Linux-x86/190.42/NVIDIA-Linux-x86-190.42-pkg0.run -O NVIDIA-Linux-190.42.pkg.run
    If you are on 64bit Ubuntu, run:
    Code:
    wget ftp://download.nvidia.com/XFree86/Linux-x86_64/190.42/NVIDIA-Linux-x86_64-190.42-pkg0.run -O NVIDIA-Linux-190.42.pkg.run
    And again, move the installer to the /usr/src folder and make a link to the file.
    Code:
    sudo install NVIDIA-Linux-190.42.pkg.run /usr/src
    sudo ln -fs /usr/src/NVIDIA-Linux-190.42.pkg.run /usr/src/nvidia-driver

    Kill X
    Now, it's time to stop X and the gdm (or kdm for Kubuntu Users)
    This requires that you logout and switch to another tty console ( Ctrl+Alt+F1 ).

    Login to the shell, and kill gdm:
    Code:
    sudo /etc/init.d/gdm stop
    This may take a while to complete.

    In some rare instances, stopping gdm won't stop Xorg, due to the Xsession being busy with whatever error has occurred (Ubuntu goes into Low Resolution mode, X failed to start, etc).
    In these instances, it is required that you run a kill of Xorg before you can continue with the installation of the driver.
    Code:
    sudo killall Xorg

    Installing NViDIA
    Afterwards, its time to install the drivers.
    Code:
    sudo sh /usr/src/nvidia-driver
    Follow the instructions, and everything should run smoothly. A few points that I'd like to reassure first though:
    • Don't worry about pre-compiled binaries, just let the script compile the drivers itself.
    • If you run a 64bit OS, then let NViDIA install the 32bit backward compatibility modules.
    • When asked, double check to ensure you select 'NO' when the NViDIA installer asks to reconfigure the xorg.conf file.
      We don't want to change the xorg.conf file just yet, at least not until we are back in X.


    Once finished, it is now time to reboot:
    Code:
    sudo reboot

    Before you Initiate the Driver
    Now, since NViDIA didn't reconfigure the xorg.conf file, you will boot into the VESA drivers. To setup the xorg.conf file for nvidia, login, open a terminal, and run:
    Code:
    sudo cp /etc/X11/xorg.conf.original /etc/X11/xorg.conf
    sudo nvidia-xconfig
    Note: You may see this being outputted into the console
    Using X configuration file: "/etc/X11/xorg.conf".

    VALIDATION ERROR: Data incomplete in file /etc/X11/xorg.conf.
    Device section "Configured Video Device" must have a Driver
    line.

    Backed up file '/etc/X11/xorg.conf' as '/etc/X11/xorg.conf.backup'
    New X configuration file written to '/etc/X11/xorg.conf'
    Ubuntu uses an automagically configured xorg.conf file, and nvidia-xconfig flags it only as a parser warning, and serves only as a warning. This does not affect the outputted xorg.conf file generated by the nvidia script, and you blissfully ignore it.

    Now, not everyone may experience a smooth transition, and there are a number of small problems that you may run into that need addressing first. The most common one probably being a non-existent module listed in the xorg.conf file.

    And if you have had a successful transition, and everything works. The first thing you may notice is a nice new NViDIA splash logo that you probably want to be removed too. If you get this, just run the following:
    Code:
    sudo sed -i '/Section\s*.Screen./a\    Option         "NoLogo" "True"' /etc/X11/xorg.conf
    For further information on fixing common problems, scroll down the thread to see if you are affected by one of them.


    X Time
    And that is it! To reload into your new nvidia drivers, close all running applications and logout/login again.
    If you are running Ubuntu Hardy/Intrepid, this can be done by pressing Ctrl+Alt+Backspace.
    If you are running Ubuntu Jaunty, then you'll have to manually logout, or in some cases, reboot your machine in order for the new driver to load and work.


    Keep in sync with kernel updates
    Now with custom compiled nvidia modules, you'll have to ensure that the drivers get recompiled whenever a new kernel gets released.
    For reference on how to do this, follow this thread to set it up: http://ubuntuforums.org/showthread.php?t=835573

    But, for clarification, open a new file named update-nvidia
    Code:
    gedit update-nvidia
    Paste in the script listed in the thread, save and quit. Then run:
    Code:
    sudo mkdir -p /etc/kernel/postinst.d
    sudo install update-nvidia /etc/kernel/postinst.d
    to install the script.


    Setting up Twin Graphics Cards
    Some people I have been supporting use twin view with two NViDIA graphics cards. While this is perfectly fine, you may run into problems if your xorg.conf file is setup to handle only one card.

    Such a setup will look like this when you go to edit the xorg.conf file.
    PHP Code:
    Section "Device"
        
    Identifier     "Device0"
        
    Driver         "nvidia"
        
    VendorName     "NVIDIA Corporation"
    EndSection 
    To work around the issue, it is best advised to remove the secondary card from the computer, boot up and acquire the output of the following.
    Code:
    lspci | grep VGA
    and you should see something like this:
    04:00.0 VGA compatible controller: nVidia Corporation GeForce 9800 GX2 (rev a2)
    Make a note of the Bus ID of the card, and edit the xorg.conf file.
    Code:
    sudo nano /etc/X11/xorg.conf
    Scroll to the Device section and add the Bus ID to the conf file, except remove all leading zeros, replace the period with a colon, and add 'PCI' as a prefix.
    So, our example of 04:00.0 becomes:
    PHP Code:
    Section "Device"
        
    BUSID          "PCI:4:0:0"
        
    Identifier     "Device0"
        
    Driver         "nvidia"
        
    VendorName     "NVIDIA Corporation"
    EndSection 
    After doing this, save the file, then shutdown the workstation and reinsert the second GFX card back into the machine.


    Folding@Home
    Please don't ask any support questions on F@H, I am not the one to ask. There have been a few notes of people not being able to get F@H working after running through this guide.

    Just for reference, someone has written a general walkthrough here.

    When I get round to it, I'll look into setting it up cleanly and you'll see it here.


    EDID Issues
    This is a work-in-progress section that will be updated over the next week or so.
    In this section I will attempt to address the rare cases that the EDID of the monitor is incorrect/invalid, and this forces the nvidia driver to load into a low resolution.

    The way you can tell if you are affected by this is by running the following:
    Code:
    grep -n "EDID" /var/log/Xorg*log
    If you see something along the lines of the following quote, then you are affect by the issue.
    (WW) NVIDIA(GPU-0): The EDID read for display device DFP-0 is invalid: the
    (WW) NVIDIA(GPU-0): checksum for EDID version 1 extension is invalid.

    Troubleshooting and Errors
    So even after following the guide, it still doesn't work? Your situation is far greater than a simple "it works" or "it doesn't work".
    Taking that small bit of effort into finding out why X won't start and working around it using what utilities you have at your dispense so you can work around it can go a long way, even if there is a small learning curve or eye training involved.

    In the event that it doesn't work, switch to a tty console, login, and use the following techniques to debug X.

    Review your xorg.conf file
    Code:
    grep -n "^(EE)" /var/log/Xorg*log
    This will tell you if there are any errors with your '/etc/X11/xorg.conf' file.

    If there is an error emitted, for example:
    (EE) Failed to load module "type1" (module does not exist, 0)
    The module 'type1' doesn't exist on your system, to fix, open up your xorg.conf file and remove the line which references the module that doesn't exist.

    Review the output of syslog
    Code:
    grep -i "nvidia\|NVRM" /var/log/syslog
    If the Xorg.log errors are vague, this will hopefully return a more verbose answer as to why X is failing.

    Another example of a typical error:
    Apr 7 23:03:57 intrepid kernel: [79531.760530] NVRM: API mismatch: the client has the version 185.18, but
    Apr 7 23:03:57 intrepid kernel: [79531.760531] NVRM: this kernel module has the version 177.82. Please
    Apr 7 23:03:57 intrepid kernel: [79531.760532] NVRM: make sure that this kernel module and all NVIDIA driver
    Apr 7 23:03:57 intrepid kernel: [79531.760534] NVRM: components have the same version.
    We have 2 versions of the same driver in conflict!

    Usually this is because the old module is still in cache, and hasn't been unloaded yet. But in most cases, if a reboot doesn't solve it, then make sure you have removed all installed nvidia references with "--purge"
    Code:
    sudo aptitude purge $(dpkg -l | grep nvidia | awk '{print $2}')
    and then reinstall the driver again for good measure.


    Uninstalling NViDIA Drivers
    If all else fails and you just can't make it work, or you aren't fully satisfied with the driver and wish to return to the maintained driver in the Ubuntu repositories.
    Then you can easily uninstall the driver by running the following:
    Code:
    sudo nvidia-uninstall
    sudo dpkg-reconfigure -phigh xserver-xorg
    sudo apt-get install xserver-xorg-video-all
    sudo rm /usr/src/nvidia-driver /usr/src/NVIDIA-Linux-185.pkg.run /etc/kernel/postinst.d/update-nvidia
    And when you restart X, your desktop will load with the defaulted failsafe drivers, then run the 'Hardware Drivers' utility to restore NViDIA.


    Help and Feedback
    Please review this HowTo, and express anything you think should be added, changed, and/or removed.

    If you would like support, after X fails to start, switch to a tty console, login, and run the following:
    Code:
    sudo /etc/init.d/gdm stop
    sudo nvidia-bug-report.sh
    sudo dpkg-reconfigure -phigh xserver-xorg
    sudo /etc/init.d/gdm start
    Then attach the nvidia-bug-report.log.gz file to your post, and I'll do my best to look into just where you are going wrong.

    Lastly, if it is of any help, you may wish to review the NViDIA Readme documents listed for the x86 (Ubuntu 32bit) or the x86_64 (Ubuntu 64bit) drivers for any further information and help on getting your drivers setup and working properly.
    Also, if you your problem is obscure, you may have better luck asking on the NViDIA forums: http://www.nvnews.net/vbulletin/forumdisplay.php?f=14

    Regards
    Iain
    Last edited by ibuclaw; October 28th, 2009 at 07:32 PM.

  2. #2
    Join Date
    Oct 2008
    Beans
    89

    Re: HowTo: NViDIA 185.19 Beta Drivers in Intrepid

    Continuation of:
    http://ubuntuforums.org/showthread.php?t=1124372&page=4

    I still get the same error... :/

    Nice good though. Really nice! I'm sure it'd work great if it wasn't for this problem.

    Now, your guide did quite a few things more than what I've read previously, and one of the steps generated an intriguing error.
    On 'sudo nvidia-xconfig' I got:

    Code:
    Using X configuration file: "/etc/X11/xorg.conf".
    
    VALIDATION ERROR: Data incomplete in file /etc/X11/xorg.conf.
                      Device section "Configured Video Device" must have a Driver
                      line.
    
    Backed up file '/etc/X11/xorg.conf' as '/etc/X11/xorg.conf.backup'
    New X configuration file written to '/etc/X11/xorg.conf'
    on the first run.

    On the second run, it worked fine.

  3. #3
    Join Date
    Jan 2008
    Beans
    4,757

    Re: HowTo: NViDIA 185.19 Beta Drivers in Intrepid

    Quote Originally Posted by TheDesertDragon View Post
    Continuation of:
    http://ubuntuforums.org/showthread.php?t=1124372&page=4

    I still get the same error... :/

    Nice good though. Really nice! I'm sure it'd work great if it wasn't for this problem.

    Now, your guide did quite a few things more than what I've read previously, and one of the steps generated an intriguing error.
    On 'sudo nvidia-xconfig' I got:

    Code:
    Using X configuration file: "/etc/X11/xorg.conf".
    
    VALIDATION ERROR: Data incomplete in file /etc/X11/xorg.conf.
                      Device section "Configured Video Device" must have a Driver
                      line.
    
    Backed up file '/etc/X11/xorg.conf' as '/etc/X11/xorg.conf.backup'
    New X configuration file written to '/etc/X11/xorg.conf'
    on the first run.

    On the second run, it worked fine.
    That is from the following command:
    Code:
    sudo nvidia-xconfig
    Is it, no?

    If so, just ignore it... Ubuntu uses strange auto-magically-config tricks that flag warnings to the nvidia-xconfig parser. But serve only as warnings, and don't affect the resultant xorg.conf file.

    [EDIT]
    Also, is there anything else in the output of Xorg.log and Syslog that has changed?
    I am really intrigued now.

    Regards
    Iain
    Last edited by ibuclaw; April 20th, 2009 at 03:50 PM.

  4. #4
    Join Date
    Jan 2008
    Beans
    4,757

    Re: HowTo: NViDIA 185.19 Beta Drivers in Intrepid

    * Small Update *
    • I came across this page and decided to include the key bit of it in the HowTO.
    • I have this working in Jaunty too, so am updating the thread title as per say.


    Also, if anyone wants to test this out, you can use LiveCDs to attempt this without messing up your current setup.

    There is just one small difference between an installed system and a LiveCD, that is when asked to run:
    Code:
    sudo reboot
    As this will loose all data in the LiveCD environment; instead just run:
    Code:
    sudo /etc/init.d/gdm start
    and follow the rest as seen above.

    Regards
    Iain
    Last edited by ibuclaw; April 20th, 2009 at 03:57 PM.

  5. #5
    Join Date
    Nov 2007
    Beans
    331
    Distro
    Ubuntu 12.04 Precise Pangolin

    Smile Re: HowTo: NViDIA 185.19 Beta Drivers in Ubuntu

    Thank you very much indeed for this How To!
    I used the experimental NVIDIA-Linux-x86_64-185.19-pkg2.run drivers on Jaunty alternate 64.

    I am very grateful

    tinivole

  6. #6
    Join Date
    Nov 2004
    Beans
    173

    Re: HowTo: NViDIA 185.19 Beta Drivers in Ubuntu

    thanks it works great here
    Nvidia 8800 Gt
    Jaunty (since alpha6) 64

  7. #7
    Join Date
    Nov 2006
    Beans
    112

    Re: HowTo: NViDIA 185.19 Beta Drivers in Ubuntu

    I find an easier way to install the drivers is to use a PPA such as:

    https://launchpad.net/~rvm/+archive/libs

    And then install "nvidia-180-modaliases". Now the drivers will be available in jockey (Restricted Drivers Manager).

  8. #8
    Join Date
    Nov 2006
    Beans
    12

    Re: HowTo: NViDIA 185.19 Beta Drivers in Ubuntu

    Please edit
    sudo apt-get install build-essential linux-headers-`uname -r`
    uname -r not uname-r

  9. #9
    Join Date
    Jan 2008
    Beans
    4,757

    Re: HowTo: NViDIA 185.19 Beta Drivers in Ubuntu

    Quote Originally Posted by ykpaiha View Post
    thanks it works great here
    Nvidia 8800 Gt
    Jaunty (since alpha6) 64
    Cheers, I use mostly 64bit machines too... It works for me across the board - on Hardy, Intrepid and Jaunty - with the 8500GT, 8600GT and 8400GS cards.

    Also, don't forget to look at the Keep in sync with kernel updates section if you haven't done so already, that is the key to this howto. If the installation works, you need a good maintenance scheme.

    Quote Originally Posted by tin_truc22 View Post
    Please edit

    uname -r not uname-r
    Changed

    I don't know how that happened ... was fine last time I looked

    Regards
    Iain
    Last edited by ibuclaw; April 22nd, 2009 at 04:30 AM.

  10. #10
    Join Date
    Sep 2006
    Beans
    3,170
    Distro
    Ubuntu Karmic Koala (testing)

    Re: HowTo: NViDIA 185.19 Beta Drivers in Ubuntu

    Thanks, great howto!

Page 1 of 32 12311 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •