Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > Your Distro > Debian Linux Help > compiling nvidia driver on testing (lenny)
 Debian Linux Help   Discussions related to Debian GNU/Linux.

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 01-05-2008   #1 (permalink)
Just Joined!
 
Join Date: Sep 2006
Posts: 8
compiling nvidia driver on testing (lenny)

I am following the instructions to install the nvidia driver from Nvidia Driver Install - The Debian/Nvidia way - MEPIS Documentation Wiki

It falls over as it can't find package 'nvidia-kernel-source'

Indeed, this package exists only in etch and in sid (Debian -- Details of package nvidia-kernel-source in sid)

What is the correct thing to do ?
vooose is offline  

Reply With Quote
Old 01-05-2008   #2 (permalink)
Just Joined!
 
Join Date: Sep 2006
Posts: 8
According to the gents in #debian on freenode, you need to backport.

Make sure /etc/apt/sources.list has a deb-src entry that points to sid.

Get the package source by issusing

apt-get source nvidia-graphics-drivers

This source package contains nvidia-kernel-source and nvidia-kernel-source (amongst others)

One thing to do before building the source package is tp modify debian/control.in so nvidia-glx depends on your xserver-xorg-core(lenny) and not >= 2:1.4.(sid)

Then issue:

dkpg-buildpackage

and install the deb packages.

Now you can return to the original instructions (Nvidia Driver Install - The Debian/Nvidia way - MEPIS Documentation Wiki)

and it should all work.

Any comments appreciated
vooose is offline   Reply With Quote
Old 01-06-2008   #3 (permalink)
Super Moderator
 
devils casper's Avatar
 
Join Date: Jun 2006
Location: Chandigarh, India
Posts: 20,697
Send a message via Yahoo to devils casper
It should work but make sure edit sources.list file correctly.
__________________
It takes a lot of time to be a genius, you have to sit around so much doing nothing, really doing nothing. - Gertrude Stein
New Users: Read This First
devils casper is offline   Reply With Quote
Old 01-06-2008   #4 (permalink)
Linux Engineer
 
coopstah13's Avatar
 
Join Date: Nov 2007
Location: MA, USA
Posts: 1,094
why don't you just download the driver from the nvidia site? The one in the repository is not the latest.
coopstah13 is offline   Reply With Quote
Old 01-14-2008   #5 (permalink)
Linux Newbie
 
Join Date: Aug 2006
Location: england
Posts: 121
Send a message via MSN to markharding557
i used the one from nvidia no install probs except had to change gcc version
markharding557 is offline   Reply With Quote
Old 04-06-2008   #6 (permalink)
Just Joined!
 
Join Date: Apr 2008
Posts: 1
Patch Nvidia source

Quote:
Originally Posted by vooose View Post
One thing to do before building the source package is tp modify debian/control.in so nvidia-glx depends on your xserver-xorg-core(lenny) and not >= 2:1.4.(sid)
Another possibility: patch Nvidia sources instead of modifying control.in

I tried to install the accelerated Nvidia drivers on a system with Debian lenny according to
NvidiaGraphicsDrivers - Debian Wiki
(I used the debian specific method)

Unfortunately there are problems with the current debian package from Nvidia (version 169.09). It has a conflict with the X server of lenny.

The older version (1.0.8776) will produce compiler error with kernel 2.6.23 and newer.

So I made a patch for version 1.0.8776 that it compiles with newer kernels.

* Install nvidia-glx_1.0.8776-4_i386.deb, nvidia-kernel-source_1.0.8776-4_i386.deb,

This will install a source tarball in /usr/src/nvidia-kernel-source.tar.gz. Unpack it in /usr/src. For example, to unpack the source tarball of the current driver:
$ cd /usr/src
# tar -zxf nvidia-kernel-source_1.0.8776-4_i386.tar.gz

* Apply patch below:
Copy everything below "------------------" into a file (e.g. nvpatch)
cd to /usr/lib/modules where the proprietary extension nvidia-kernel is located
patch -p1 < nvpatch

* Build the kernel and the nvidia kernel module:
$ cd /usr/src/linux
# make-kpkg clean
# make-kpkg kernel_image modules_image

* Install the new kernel and kernel module:
$ cd /usr/src
# dpkg -i /path/kernel-image-*.deb /path/nvidia-kernel-*.deb

-------------------------------------------------------------------
diff -Nru modules/nvidia-kernel/nv/nv-linux.h modules_lennypatch/nvidia-kernel/nv/nv-linux.h
--- modules/nvidia-kernel/nv/nv-linux.h 2007-01-05 04:51:29.000000000 +0000
+++ modules_lennypatch/nvidia-kernel/nv/nv-linux.h 2008-03-09 15:01:46.000000000 +0000
@@ -31,6 +31,16 @@
# error This driver does not support development kernels!
#endif

+// #include "conftest.h"
+
+// #if defined(KERNEL_2_4)
+#if 1
+#define NV_KMEM_CACHE_CREATE_PRESENT
+#define NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT 6
+#define NV_IRQ_HANDLER_T_TAKES_PTREGS
+#endif
+
+
#if defined (CONFIG_SMP) && !defined (__SMP__)
#define __SMP__
#endif
@@ -506,17 +516,40 @@
free_pages(ptr, order); \
}

+/*
#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type) \
{ \
kmem_cache = kmem_cache_create(name, sizeof(type), \
0, 0, NULL, NULL); \
}
+*/

+#if defined(NV_KMEM_CACHE_CREATE_PRESENT)
+#if (NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT == 6)
+// taken
+#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type) \
+ { \
+ kmem_cache = kmem_cache_create(name, sizeof(type), \
+ 0, 0, /* NULL, */ NULL); \
+ }
+#elif (NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT == 5)
+#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type) \
+ { \
+ kmem_cache = kmem_cache_create(name, sizeof(type), \
+ 0, 0, NULL); \
+ }
+#else
+//#error "NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT value unrecognized!"
+#endif
#define NV_KMEM_CACHE_DESTROY(kmem_cache) \
{ \
kmem_cache_destroy(kmem_cache); \
kmem_cache = NULL; \
}
+#else
+//#error "NV_KMEM_CACHE_CREATE() undefined (kmem_cache_create() unavailable)!"
+#endif
+

#define NV_KMEM_CACHE_ALLOC(ptr, kmem_cache, type) \
{ \
diff -Nru modules/nvidia-kernel/nv/nv.c modules_lennypatch/nvidia-kernel/nv/nv.c
--- modules/nvidia-kernel/nv/nv.c 2007-01-05 04:51:29.000000000 +0000
+++ modules_lennypatch/nvidia-kernel/nv/nv.c 2008-03-09 15:06:24.000000000 +0000
@@ -99,7 +99,8 @@
int nv_use_cpa = 1;
#endif

-static kmem_cache_t *nv_pte_t_cache = NULL;
+// V8776: static kmem_cache_t *nv_pte_t_cache = NULL;
+static void *nv_pte_t_cache = NULL;

// allow an easy way to convert all debug printfs related to events
// back and forth between 'info' and 'errors'
@@ -1453,8 +1454,9 @@
if (apm_nv_dev[i] != NULL) pm_unregister(apm_nv_dev[i]);
#endif

- if (unregister_chrdev(nv_major, "nvidia") < 0)
- nv_printf(NV_DBG_ERRORS, "NVRM: unregister nv chrdev failed\n");
+ /* if (unregister_chrdev(nv_major, "nvidia") < 0) */
+ // nv_printf(NV_DBG_ERRORS, "NVRM: unregister nv chrdev failed\n");
+ unregister_chrdev(nv_major, "nvidia");

for (i = 0; i < num_nv_devices; i++)
{
@@ -1478,8 +1480,9 @@

nv_printf(NV_DBG_INFO, "NVRM: nvidia_exit_module\n");

- if (unregister_chrdev(nv_major, "nvidia") < 0)
- nv_printf(NV_DBG_ERRORS, "NVRM: unregister nv chrdev failed\n");
+ /* if (unregister_chrdev(nv_major, "nvidia") < 0) */
+ // nv_printf(NV_DBG_ERRORS, "NVRM: unregister nv chrdev failed\n");
+ unregister_chrdev(nv_major, "nvidia");

for (i = 0; i < num_nv_devices; i++)
{
pilkuhn2 is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
FC 3 - Nvidia Sound not working nutta_guy Redhat / Fedora Linux Help 5 01-31-2005 01:27 PM
Help...here is my recent /var/log/messages hyeoncb Linux Security 9 04-16-2004 11:40 AM
Problems with NVIDIA GeForce4 420 Go and RedHat 9 bilskinir Linux Desktop / X-Windows 0 11-13-2003 01:39 AM
Problems with NVIDIA GeForce4 420 Go and RedHat 9 bilskinir Linux Desktop / X-Windows 0 11-13-2003 01:35 AM
Problems with NVIDIA GeForce4 420 Go and RedHat 9 bilskinir Linux Desktop / X-Windows 0 11-13-2003 01:27 AM

Free Magazines
Free Network Mapping Tool for Microsoft® Office Visio® Professional 2007 Users
Don't map your network by hand – let LANsurveyor Express for Microsoft Visio Professional 2007 automatically create network diagrams for you.
subscribe
Free eBook:"Vulnerability Management for Dummies"
Get all the Facts and See How to Implement a Successful Vulnerability Management Program.
subscribe
Google vs The World: The Battle of the Message Security Vendors
With such a powerful name behind it, Google Message Security stands out in a sea of products that do exactly the same thing - or so they say.
subscribe

Safe, Secure Backup


All times are GMT. The time now is 08:45 AM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2