Fedora Linux Support Community & Resources Center
Old 2nd October 2007, 04:01 AM
jbkt23 Offline
Registered User
Join Date: Mar 2006
Posts: 673
Custom nvidia module for a Custom kernel

I posting this thread to help others who compile custom kernels to get kmod-nvidia drivers working for them. I have a x64 system in F7 that I have had to do a custom compile to re-enable the ide subsystem to be able to use my atapi tape drive. This may be fixed in the 2.6.23 kernels but that is yet to be seen. In the mean time I want to use some of the 3d features only possible with the kmod-nvidia module. I wouldn't call this post a Howto it is more of a hint for those who have compiled there own kernels and are comfortable with interpolating what I have done for themselves.
The first thing is to create a link in /lib/modules/ <kernel version> to you kernel source directory. There are actually two links one called build and the other source, both point to the same place where I build my kernels. Your custom kernel configs and pointers must still be in tact meaning you have not run "make mrproper", you can run " make clean".
Now you need to install the kmod source "yum install kmod-nvidia<card-version><latest-kernel-version> .src.rpm", for me that was:
I should point out that my kernel is based on, but that version was not available so I just took a chance to see if I could make the latest work. I do all my compiling as a normal user. If you have created your build directory with the same structure as is typically found under /usr/src/redhat then go to the /SPECS directory and edit the file "nvidia-96xx-kmod.spec" and find the line:
%{!?kversion: %define kversion}
and change it to your kernel version thus:
%{!?kversion: %define kversion}
Then, issue the command:
rpmbuild -bp --target $(uname -m) nvidia-96xx-kmod.spec
which builds the source tree under /BUILD/nvidia-96xx-kmod-1.0.9639/
Go to the /_kmod_build_/usr/src/nv/ directory and look at the readme file, then do:
"make module" and then as root:
"make install" then "/sbin/depmod -a" then "/sbin/modprobe nvidia".

Now call up your favorite editor as root and open /etc/Xll/xorg.conf and save it with a name like xorg.conf.nv or some such. Close that file and reopen xorg.conf and this time you are going to edit it to contain the usuall lines to get compositing and AIGLX going. Mine is like the following: (yours will differ in the relevant places)
# Xorg configuration created by livna-config-display

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

Section "Files"
ModulePath "/usr/lib64/xorg/modules/extensions/nvidia"
ModulePath "/usr/lib64/xorg/modules"

Section "ServerFlags"
Option "AIGLX" "on"

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

Section "Monitor"
Identifier "Monitor0"
ModelName "Dell D2026T"
HorizSync 31.0 - 96.0
VertRefresh 50.0 - 100.0
Option "dpms"

Section "Device"
Identifier "Videocard0"
Driver "nvidia"
Option "AddARGBGLXVisuals" "True"
Option "DisableGLXRootClipping" "True"

Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1280x1024" "1280x960" "1280x800" "1280x768" "1280x720" "1152x864" "1152x768" "1024x768" "832x624" "800x600" "640x480" "640x400"

Section "Extensions"
Option "Composite" "Enable"

############end of xorg.conf##############

Now reboot, that is the sure way to reload all the related drivers and have nvidia running. It worked for me. The nvidia splash screen appeared and I logged in and confirmed that the nvidia display settings tool in the system tools menu was fully functional, and then enabled desktop effects from the System / preferences / Look & Feel menu.

Desktop Effects has its own quirks that I won't cover hear.

Reply With Quote

custom, kernel, module, nvidia

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Akmods not finding kernel source (& Kernel Module size too large in Custom Compile) jbkt23 Using Fedora 27 18th July 2009 12:05 AM
Trying to build kmod-nvidia on custom kernel therainbow Using Fedora 9 12th September 2008 10:36 PM
livna nvidia driver with custom kernel? Flintz Hardware & Laptops 5 30th December 2007 09:02 PM
Custom kernel+Nvidia scotta3234 Using Fedora 5 17th January 2007 05:12 AM

Current GMT-time: 21:56 (Tuesday, 26-09-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat