Thursday, May 29, 2008

Fedora 9 and Nvidia xorg 1.5 compatible driver (nvidia 174.14.05 version)

Nvidia has just released its latest xorg-1.5 supported driver. All the Fedora 9 Owners who are eagerly waiting for the latest nvidia driver rejoice !.

Installation of this is pretty easy, just follow these steps.

1. Add Freshrpms to your repository


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


2. Install the nvidia driver


sudo yum install nvidia-x11-drv


3. Logout of X and go to runlevel 1 or 3


sudo init 1


4. Update your /etc/X11/xorg.conf to make use of new nvidia driver. (mine is follows)


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

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 1.0 (buildmeister@builder3) Wed Jun 13 18:39:30 PDT 2007
# Xorg configuration created by system-config-display

Section "ServerLayout"
Identifier "single head configuration"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Synaptics" "CorePointer"
EndSection

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

Section "Module"
Load "glx"
Load "extmod"
Load "dbe"
EndSection

Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection

Section "InputDevice"
Identifier "Synaptics"
Driver "synaptics"
Option "Device" "/dev/input/mice"
Option "Protocol" "auto-dev"
Option "Emulate3Buttons" "yes"
EndSection

Section "Monitor"
Identifier "Monitor0"
VendorName "HP"
ModelName "Unknown"
ModeLine "1280x800_60.00" 83.5 1280 1344 1480 1680 800 801 804 828 -hsync +vsync
Option "DPMS"
#[nareshv@fallenangel ~]$ gtf 1280 800 60
# 1280x800 @ 60.00 Hz (GTF) hsync: 49.68 kHz; pclk: 83.46 MHz
EndSection

Section "Device"
Identifier "Videocard0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce Go 7400"
VideoRam 268435456
EndSection

Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 24
Option "AllowGLXWithComposite" "True"
Option "AddARGBGLXVisuals" "True"
Option "TripleBuffer" "True"
Option "UseDamageEvents" "True"
Option "UseRandR" "True"
#Option "RenderAccel" "True"
Option "NoPowerConnectorCheck" "False"
Option "RandRRotation" "True"
Option "DynamicTwinView" "False"
Option "OnDemandVBlankInterrupts" "True"
Option "ConnectToAcpid" "True"
Option "EnableACPIHotkeys" "True"
Option "UseEvents" "True"
Option "ExactModeTimingsDVI" "True"
Option "NvAGP" "0"
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1280x800" "1024x768" "800x600" "640x480"
EndSubSection
EndSection

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


5. Now follow step-6, only if you have renamed the /usr/bin/Xorg as per my previous blog post

6. Remove the Shell Script


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


7. Load the nvidia kernel module


# modprobe nvidia


8. Go to Run level 5 (GUI)


# init 5


Now you should have the system using the Latest nvidia driver as the default, with all the compiz,3d, everything working!

Here is my screenshot of running glxgears with 1600fps




Now you can start enjoying KDE4 with all the 3d effects !. Many thanks to nvidia for the much awaited compatibility with xorg-1.5

Thursday, May 15, 2008

Fedora 9 and Nouveau Nvidia Driver

Given that the current nvidia driver does not support all the fancy features which are required to run a fully productive desktop, i've tried to see the current state of the nouveau

Fedora 9 currently does not ship the 'nouvea_dri.so' with its mesa rpms. In order to get the feel of the dri using nouveau, i've compiled the mesa drivers from sources.


Instructions follows

NOTE: Do not report any issues to Fedora Bugzilla or Nouveau Bugzilla when using the Gallium Drivers. These are completely experimental.

NOTE: Since the gallium 3d does not support all the Visuals (ARGBGLX) required to run compiz, compiz does not work.

0. Below are my Hardware Details

Smolt profile :: http://www.smolts.org/client/show/pub_af62c229-68e1-4b66-9171-b8be36c7a3fd



[nareshv@fallenAngel mesa]$ /sbin/lspci | grep -i nvidia
01:00.0 VGA compatible controller: nVidia Corporation G72M [GeForce Go 7400] (rev a1)



1. Get the mesa sources (50M sources) using git


cd /tmp
git clone git://anongit.freedesktop.org/git/nouveau/mesa



2. Switch to the gallium-0.1 branch



cd mesa/
git checkout origin/gallium-0.1
git checkout -b gallium-0.1



3. Configure the Library installation paths. (open and edit the file so that below 2 settings should be like this)


[nareshv@fallenAngel configs]$ pwd
/tmp/mesa/configs
[nareshv@fallenAngel configs]$ grep INSTALL_DIR default | grep -v SEARCH
INSTALL_DIR = /usr/
DRI_DRIVER_INSTALL_DIR = /usr/lib/dri/


4. Make sure you have all the Xorg development libraries installed.


[root@fallenAngel ~]# rpm -qa lib\*-devel
libacl-devel-2.2.47-1.fc9.i386
libXfixes-devel-4.0.3-3.fc9.i386
libSM-devel-1.0.2-5.fc9.i386
libattr-devel-2.4.41-1.fc9.i386
libogg-devel-1.1.3-9.fc9.i386
libuser-devel-0.56.9-1.i386
libXau-devel-1.0.3-5.fc9.i386
libXmu-devel-1.0.4-1.fc9.i386
libcap-devel-2.06-4.fc9.i386
libxml2-devel-2.6.32-1.fc9.i386
libxcb-devel-1.1-4.fc9.i386
libX11-devel-1.1.4-1.fc9.i386
libdrm-devel-2.4.0-0.11.fc9.i386
libXt-devel-1.0.4-5.fc9.i386
libsepol-devel-2.0.26-1.fc9.i386
libgdiplus-devel-1.9-4.fc9.i386
libcurl-devel-7.18.1-1.fc9.i386
libXdmcp-devel-1.0.2-5.fc9.i386
libXdamage-devel-1.1.1-4.fc9.i386
libXxf86vm-devel-1.0.1-5.fc9.i386
libselinux-devel-2.0.61-1.fc9.i386
libXext-devel-1.0.4-1.fc9.i386
libXi-devel-1.1.3-4.fc9.i386
libstdc++-devel-4.3.0-8.i386
libidn-devel-0.6.14-7.i386
libvorbis-devel-1.2.0-3.fc9.i386
libICE-devel-1.0.4-3.fc9.i386


5. Start building mesa for your OS (i386 or x86_64)


[nareshv@fallenAngel mesa]$ ls
bin configs doxygen Makefile SConstruct winddk.py
common.py docs include progs src
[nareshv@fallenAngel mesa]$ make DRI_DIRS=nouveau linux-dri-x86

(replace linux-dri-x86 with linux-dri-x86_64 if you are on 64bit Fedora)



8. Try running glxgears with the latest drivers that are built


bash$ LD_LIBRARY_PATH="/tmp/mesa/lib" LIBGL_DRIVERS_PATH="/tmp/mesa/lib" glxgears



9. Verify that the screen has direct rendering enabled


[nareshv@fallenAngel tmp]$ LD_LIBRARY_PATH="/tmp/mesa/lib" LIBGL_DRIVERS_PATH="/tmp/mesa/lib" glxinfo 2>/dev/null | grep ^OpenGL
OpenGL vendor string: Tungsten Graphics, Inc. and nouveau
OpenGL renderer string: Gallium 0.1, NV46 on Nouveau/DRI
OpenGL version string: 1.5 Mesa 7.1
OpenGL extensions:


9. Screenshot with Gallium3d on my desktop ( I am getting from 900fps to 1200fps !, while the nouveau driver without this gallium gives only 250fps [same with nv driver])




10. I dont have any games to test the FPS, but you can try running openarena and see things working


NOTE: Remember, this gallium 3d is completely experimental and may not work with all the nvidia chipsets and might even crash your X when running heavy 3d applications. DONT REPORT ANY ISSUES WITH NOUVEAU TEAM WHEN USING GALLIUM