Saturday, April 12, 2008

Fedora 9 and Latest Nvidia 173.08 Driver

Nvidia has released its latest version of the xorg 1.5 compatible drivers. You no longer need to follow my techique for 173.08 version driver . See my new blog entry for details

Nvidia has released its latest drivers for Linux which has support for the latest x.org versions (1.5) which are used in the Fedora 9 release (currently beta was released). Follow these steps in order to use the latest Nvidia driver in your Fedora 9

NOTE: I really tested and using these things in my laptop currently, things should work for others too. THIS METHOD IS COMPLETELY UNSUPPORTED BY FEDORA FOLKS, BUT WORKS.

[NOTE] This process works on Latest Fedora 9 Too. But you'll not be able to make use of any of the glx capabilities , so all the commands like glxgears, nvidia-settings will give errors

step-1 : Install the Latest nvidia driver (download rpm from freshrpms or livna)

yum install xorg-x11-drv-nvidia


step-2 : Nvidia suggests that we use the -ignoreABI option to use these drivers with the latest xorg servers. Follow these steps to setup such way.

1. Logout of X ( preferably go to runlevel 3 or 1, anything other than 5)

init 3


2. Rename the /usr/bin/Xorg binary to any other name like /usr/bin/Xorg.o

mv /usr/bin/Xorg /usr/bin/Xorg.0


3. Create a shell script named /usr/bin/Xorg

touch /usr/bin/Xorg
chmod +x /usr/bin/Xorg


4. Now edit the /usr/bin/Xorg and put these two lines

vi /usr/bin/Xorg

#!/bin/sh
exec /usr/bin/Xorg.0 -ignoreABI "$@"


5. close the file

6. Confirm that your /etc/X11/xorg.conf has the driver set as 'nvidia'

my xorg.conf follows


[nareshv@fallenAngel ~]$ cat /etc/X11/xorg.conf

Section "ServerLayout"
Identifier "Default Layout"
Screen 0 "Screen0" 0 0
Option "IgnoreABI" "true"
Option "omit xfree86-dga" # don't initialise the DGA extension
EndSection

Section "Files"
ModulePath "/usr/lib/xorg/modules/extensions/nvidia"
ModulePath "/usr/lib/xorg/modules"
EndSection

Section "Module"
Load "glx"
Load "extmod"
Load "dbe"
Load "dri2"
Load "dri"
Load "xtrap"
Load "GLcore"
EndSection

Section "Device"
Identifier "Videocard0"
Driver "nvidia"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Videocard0"
DefaultDepth 24
Option "AddARGBGLXVisuals" "True"
Option "UseDamageEvents" "True"
Option "OnDemandVBlankInterrupts" "True"
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection

Section "Extensions"
Option "Composite" "Enable"
EndSection


7. Reboot into runlevel 5.

init 5.


8. Now you should see the system using nvidia driver as the default one.


Few Gotchas:

1. Currently only 2D works, NVIDIA is working on getting 3D as soon as x.org 1.5 version is released.

2. None of the 3d commands work glxinfo,glxgears, all because of lack of 3d support.

3. Now i am able to play the movies in mplayer when i've replaced the nvidia's libwfb.so with libwfb.so the xorg itself has.

-- last updated (Fri April 18 2008)

20 comments:

  1. thanks for your howto, works on x86_64 too.
    I haven't tested playing videos, but I can't even get glx to work.
    Had to remove the libglx.so module under /user/lib[64]/xorg/modules/extension/ and set a symlink to nvidia/libglx.so.173.08 to get x.org load the nvidia glx module, but it won't function.
    well, no big deal, this is all beta software, I'm glad to have 2D support for my 30" display anyway :)

    ReplyDelete
  2. Thanks for this wonderful work around

    ReplyDelete
  3. The sha-bang line, mention in /usr/bin/Xorg should be #!/bin/bash in place of #!/bin/sh

    ReplyDelete
  4. /bin/sh is typical unix shell and by default its symlinked to /bin/bash

    [nareshv@fallenAngel ~]$ ls -l /bin/sh
    lrwxrwxrwx 1 root root 4 2008-04-02 23:34 /bin/sh -> bash

    so either should work :-)

    ReplyDelete
  5. This comment has been removed by the author.

    ReplyDelete
  6. I've tried this method in the Final release, with some tinkering it "kinda?" works. I mean, the graphics on the desktop and login screen look much better than without the drivers, and I see the Nvidia screen before login, but beyond that it's quite hard to tell if it's working.

    As a matter of fact, when trying to load "nvidia-settings" from the command line, as either root or a normal user, I get ..

    The program 'nvidia-settings' received an X Window System error.
    This probably reflects a bug in the program.
    The error was 'BadLength (poly request too large or internal Xlib length erro'.
    (Details: serial 127 error_code 16 request_code 144 minor_code 7)
    (Note to programmers: normally, X errors are reported asynchronously;
    that is, you will receive the error a while after causing it.
    To debug your program, run it with the --sync command line
    option to change this behavior. You can then get a meaningful
    backtrace from your debugger if you break on the gdk_x_error() function.)



    So, I'm glad at least something is working, and it'll get me along until an official or better solution arises.

    ReplyDelete
  7. This procedure works with Fedora 9 Also. But the Nvidia driver is not yet fully compatible with the xorg-1.4.99 release and thus all the glx commands fail

    like

    glxgears
    nvidia-settings
    ... etc

    ReplyDelete
  8. This comment has been removed by the author.

    ReplyDelete
  9. Well the NV driver isn't 100% of supporting all the functionality in your NVidia card. As far as I know, it only supports 2D, same with the nouveau driver. But, if you're using Fedora, I suggest adding the Livna-Testing repository and just installing akmod-nvidia and be sure to run nvidia-xconfig. As of right now it seems to accomplish the same task as this guide, but with much ease, and hopefully will hold people off until Livna releases a stable package for the Nvidia driver.

    ReplyDelete
  10. I forgot to add ... when using the packages in the Livna-Testing, you're also only getting 2D support right now, but it makes things look a tad bit better, rather than the pixelated nonsense you get without any drivers installed.

    ReplyDelete
  11. Hi, this is the only tutorial that I've find.. thanks! but I have a little problem. Yum doesn't find xorg-x11-drv-nvidia package (I have the livna repo installed) do you have some suggestion?

    thanks a lot!

    ReplyDelete
  12. Hi ciropom, you can try installing the following package from freshrpms http://sulphur.freshrpms.net/rpm.html?id=383

    In order to sort out the dependencies well, try installing the freshrpms repo package first

    sudo rpm -Uvh http://ftp.freshrpms.net/pub/freshrpms/fedora/linux/9/freshrpms-release/freshrpms-release-1.1-1.fc.noarch.rpm

    yum install nvidia-x11-drv

    freshrpms also has very good set of packages, but sometimes conflicts with packages from livna.

    ReplyDelete
  13. There is a new driver from Nvidia, which works perfectly for me - simply used standard install script by Nvidia!

    http://www.nvidia.com/object/linux_display_ia32_173.14.05.html

    regards,
    Paul

    ReplyDelete
  14. Thanks paul. Yes, nvidia released new driver . I'd blogged about it yesterday http://nareshv.blogspot.com/2008/05/fedora-9-and-nvidia-xorg-15-driver.html

    ReplyDelete
  15. The procedure described did not work for me. I am using a SLI configuration. Is there no support for SLI ??

    ReplyDelete
  16. I am not sure of the SLI support in 173.08 verison. Can you try the latest (as of today) version http://www.nvidia.com/object/linux_display_ia32_173.14.05.html , which works pretty well with xorg-1.5 . This should support SLI.

    ReplyDelete
  17. i get the following error while installing nvidia drivers


    --> Missing Dependency: kernel-uname-r = 2.6.25.14-108.fc9.x86_64 is needed by package kmod-nvidia-2.6.25.14-108.fc9.x86_64-173.14.12-3.lvn9.x86_64 (livna)
    Error: Missing Dependency: kernel-uname-r = 2.6.25.14-108.fc9.x86_64 is needed by package kmod-nvidia-2.6.25.14-108.fc9.x86_64-173.14.12-3.lvn9.x86_64 (livna)


    plz help

    ReplyDelete
  18. seems some build issue with that particular nvidia RPM in livna. why not try the package from freshrpms repository ?

    http://sulphur.freshrpms.net/rpm.html?id=471

    Also the version in my blog is a bit older, nvidia has released newer drivers. http://www.nvidia.com/object/linux_display_ia32_173.14.12.html

    ReplyDelete
  19. Hi, please don't take this the wrong way, but moving the Xorg executable seems a little extreme, just to add one command line option... I admit that I use Debian and not Fedora, but my man page for xorg.conf lists Option "IgnoreABI" in Section "ServerFlags"... I suspect that this would achieve the same result without potentially interfering with the package manager (which still thinks that Xorg is a binary executable distributed by the X consortium, and not a shell script written by the local user). Hope that was of some help to somebody.

    ReplyDelete
  20. Jonathan,

    You are right, but at that time in order to get the X work with the nvidia drivers that was the quickest hack i thought of. Now nvidia has released many updates after that, which no longer requires that hack.

    FYI: current driver from nvidia is 180.16 (as of dec-27-2008)

    ReplyDelete