Quick and Dirty HOW-TO on installing and using FreeBSD Nvidia driver in Dragonfly
+
1. Make sure you got git installed, it is in pkgsrc/devel/scmgit-base
+
2. You should checkout corecode's git repository, by following command:
-git clone git://ww2.fs.ei.tum.de/~corecode/git/nvidia.git
+
+ git clone git://ww2.fs.ei.tum.de/~corecode/git/nvidia.git
+
3. then CD to new repository, make; make install
+
4. add nvidia_load="YES" to your /boot/loader.conf
+
5. Check kldstat, that nvidia.ko is loaded.
+
6. Now you should manually make devfs nodes for nvidia device:
-cd /dev
-mknod nvidia0 c 180 0
-mknod nvidiactl c 180 255
-then you should chmod 644 to both of them
-7. Now you should copy some libraries for GL acceleration to work
-Copy libglx.so.1 to /usr/pkg/lib/xorg/modules
-Copy&Rename libnvidia-wfb.so.1 to /usr/pkg/lib/xorg/modules/libwfb.so
-8. Now starts the most interesting - corecode's wrapper for X.org to make drivers function properly.
- cd to obj/wrap; make
-Copy libnvidia_wrap.so to /usr/pkg/lib/xorg/modules .
-9. Now we should edit xorg.conf, open it in your favourite editor (I prefer ee) and edit it the following way:
+
+ cd /dev
+ mknod nvidia0 c 180 0
+ mknod nvidiactl c 180 255
+ chmod 644 nvidia*
+
+7. Now starts the most interesting - corecode's wrapper for X.org to make drivers function properly.
+
+ cd obj/wrapmodule ; make
+ cp libnvidiawrap.so /usr/pkg/lib/xorg/modules
+
+8. Now you need to link the installed nvidia libs to version-less names
+
+ cd /usr/pkg/lib/xorg/modules
+ ln -fs libnvidia-wfb.so.1 libwfb.so
+ ln -fs libglx.so.1 libglx.so
+
+9. Now create the glue for the nvidia GL libs:
+
+ cd obj/wraplib ; make
+ cd .. ; cp libGL* libXv* /usr/pkg/lib
+ mv /usr/pkg/lib/libGL.so.1 /usr/pkg/lib/libGL.so.w
+ cp wraplib/libGL.so wraplib/libGL.so.1 /usr/pkg/lib
+
+Maybe you'll have to add a symlink to libGL.so in case your pkgsrc/libtool was being stupid:
+
+ cd /usr/pkg/lib
+ ln -fs libGL.so.1 libGL.so.1.0.5
+
+10. Now we should edit xorg.conf, open it in your favourite editor (I prefer ee) and edit it the following way:
Section "Module"
- Load "nvidia_wrap" // Wrapper should be the first module in that section
+ Load "nvidiawrap" // Wrapper should be the first module in that section
Load "glx" // Add it for Nvidia accelerated OpenGL
Section "Device"
Driver "nvidia" //Replace Driver "nv" with that string and comment BusID string
-10. Now start your x.org and check if everything works, if everything is nice, it's time to make working libGL dependend apps:
-You need to do it following way:
-
-cd to obj/wrap;
-cc -shared -Wl,-x -o libGL.so.wrapped -Wl,-soname,libGL.so.wrapped
-cc -shared -Wl,-x -o libGL.so -Wl,-soname,libGL.so.1 exportsyms.So libGL.so.wrapped
-now rename libGL.so.1 from /obj to libGL.so.wrapped and copy it to /usr/pkg/lib
-copy libGL.so from /obj/wrap to /usr/pkg/lib and make necessary symlinks to it (I symlinked it to libGL.so.1.0.5, otherwise 90% of x.org apps won't function properly)
-11. (Not necessary) You probably want nvidia-settings tool for controlling your videocard, so grab it from here:
-http://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-1.0.tar.gz
-extract, run gmake install . It should function out of the box
-If nvidia-settings refuses to start, make symlinks to your version of libraries. It wants (at least on my system):
-libgtk-x11-2.0.so.400, libgdk-x11-2.0.so.400, libatk-1.0.so.600, libgdk_pixbuf-2.0.so.400, libpangoxft-1.0.so.399, libfreetype.so.9, libpangox-1.0.so.399, libpango-1.0.so.399, libgobject-2.0.so.400, libgmodule-2.0.so.400, libglib-2.0.so.400
+11. (Not necessary) You probably want nvidia-settings tool for controlling your
+ videocard, so grab it from here:
+
+ http://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-1.0.tar.gz
+
+extract, run
+
+ gmake install
+
+It should function out of the box
+If nvidia-settings refuses to start, make symlinks to your version of libraries. It wants (at least on my system):
+
+ libgtk-x11-2.0.so.400, libgdk-x11-2.0.so.400, libatk-1.0.so.600,
+ libgdk_pixbuf-2.0.so.400, libpangoxft-1.0.so.399, libfreetype.so.9,
+ libpangox-1.0.so.399, libpango-1.0.so.399, libgobject-2.0.so.400,
+ libgmodule-2.0.so.400, libglib-2.0.so.400