Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Nvidia driver - Debian way, custom (or not) kernel.

Share your HowTo, Documentation, Tips and Tricks. Not for support questions!.
Post Reply
Message
Author
User avatar
julian67
Posts: 4633
Joined: 2007-04-06 14:39
Location: Just hanging around
Been thanked: 7 times

#136 Post by julian67 »

monacelli wrote:A simple "apt-get install nvidia-glx" worked for me on a fresh testing install with non-free and contrib added to the sources.list. After install nvidia-glx all I had to do was add the appropriate driver line to xorg.conf and restart x. Maybe I'm missing something but it seems like you guys are making the process harder than it really is.
And now try that on a custom kernel with the latest nvidia driver. Yes, you are missing plenty.
Wisdom from my inbox: "do not mock at your pottenocy"

User avatar
mzilikazi
Forum Account
Forum Account
Posts: 3282
Joined: 2004-09-16 02:14
Location: Colorado Springs, CO

#137 Post by mzilikazi »

monacelli wrote:A simple "apt-get install nvidia-glx" worked for me on a fresh testing install with non-free and contrib added to the sources.list. After install nvidia-glx all I had to do was add the appropriate driver line to xorg.conf and restart x. Maybe I'm missing something but it seems like you guys are making the process harder than it really is.
Are you saying that you didn't use module-assistant? What does this say:

Code: Select all

lsmod|grep nv
Debian Sid Laptops:
AMD Athlon(tm) 64 X2 Dual-Core Processor TK-55 / 1.5G
Intel(R) Pentium(R) Dual CPU T2390 @ 1.86GHz / 3G

monacelli
Posts: 9
Joined: 2007-12-20 12:38
Location: Jericho, KS

#138 Post by monacelli »

mzilikazi wrote:Are you saying that you didn't use module-assistant? What does this say:

Code: Select all

lsmod|grep nv
Indeed, I didn't use module-assistant.

lsmod|grep nv returns:

Code: Select all

nvidia               7086148  26 
i2c_core               19828  2 nvidia,i2c_i801
agpgart                28776  2 nvidia,intel_agp
Image

User avatar
mzilikazi
Forum Account
Forum Account
Posts: 3282
Joined: 2004-09-16 02:14
Location: Colorado Springs, CO

#139 Post by mzilikazi »

monacelli wrote:
mzilikazi wrote:Are you saying that you didn't use module-assistant? What does this say:

Code: Select all

lsmod|grep nv
Indeed, I didn't use module-assistant.

lsmod|grep nv returns:

Code: Select all

nvidia               7086148  26 
i2c_core               19828  2 nvidia,i2c_i801
agpgart                28776  2 nvidia,intel_agp
OK then how about this:

Code: Select all

modinfo nvidia
Debian Sid Laptops:
AMD Athlon(tm) 64 X2 Dual-Core Processor TK-55 / 1.5G
Intel(R) Pentium(R) Dual CPU T2390 @ 1.86GHz / 3G

didi
Posts: 901
Joined: 2007-12-04 16:26
Location: the Netherlands

#140 Post by didi »

I can confirm that you can (also) install it by just using aptitude, did it recently on my laptop.

Code: Select all

# modinfo nvidia
filename:       /lib/modules/2.6.26-1-686-bigmem/nvidia/nvidia.ko
license:        NVIDIA
alias:          char-major-195-*
alias:          pci:v000010DEd*sv*sd*bc03sc02i00*
alias:          pci:v000010DEd*sv*sd*bc03sc00i00*
depends:        agpgart,i2c-core
vermagic:       2.6.26-1-686-bigmem SMP mod_unload modversions 686
parm:           NVreg_EnableVia4x:int
parm:           NVreg_EnableALiAGP:int
parm:           NVreg_ReqAGPRate:int
parm:           NVreg_EnableAGPSBA:int
parm:           NVreg_EnableAGPFW:int
parm:           NVreg_Mobile:int
parm:           NVreg_ResmanDebugLevel:int
parm:           NVreg_RmLogonRC:int
parm:           NVreg_ModifyDeviceFiles:int
parm:           NVreg_DeviceFileUID:int
parm:           NVreg_DeviceFileGID:int
parm:           NVreg_DeviceFileMode:int
parm:           NVreg_RemapLimit:int
parm:           NVreg_UpdateMemoryTypes:int
parm:           NVreg_UseVBios:int
parm:           NVreg_RMEdgeIntrCheck:int
parm:           NVreg_UsePageAttributeTable:int
parm:           NVreg_RegistryDwords:charp
parm:           NVreg_NvAGP:int

User avatar
mzilikazi
Forum Account
Forum Account
Posts: 3282
Joined: 2004-09-16 02:14
Location: Colorado Springs, CO

#141 Post by mzilikazi »

didi wrote:I can confirm that you can (also) install it by just using aptitude, did it recently on my laptop.
Well nvidia-glx depends on nvidia-kernel

Code: Select all

# apt-cache depends nvidia-glx
nvidia-glx
  Depends: <nvidia-kernel-180.29>
and nvidia-kernel must be built against your running kernel.
What do these tell you?

Code: Select all

dpkg -l|grep nvidia
apt-cache policy nvidia-kernel-source
Debian Sid Laptops:
AMD Athlon(tm) 64 X2 Dual-Core Processor TK-55 / 1.5G
Intel(R) Pentium(R) Dual CPU T2390 @ 1.86GHz / 3G

didi
Posts: 901
Joined: 2007-12-04 16:26
Location: the Netherlands

#142 Post by didi »

Code: Select all

$ dpkg -l | grep nvidia
ii  nvidia-glx                               173.14.09-5                   NVIDIA binary Xorg driver
ii  nvidia-kernel-2.6-686-bigmem             173.14.09+3                   NVIDIA binary kernel module for 2.6 series c
ii  nvidia-kernel-2.6.26-1-686-bigmem        173.14.09+3                   NVIDIA binary kernel module for Linux 2.6.26
ii  nvidia-kernel-common                     20080825+1                    NVIDIA binary kernel module common files
ii  nvidia-settings                          180.22-1                      Tool of configuring the NVIDIA graphics driv
ii  nvidia-xconfig                           1.0+20080522-2                The NVIDIA X Configuration Tool

Code: Select all

$ apt-cache policy nvidia-kernel-source
nvidia-kernel-source:
  Installed: (none)
  Candidate: 173.14.09-5
  Version table:
     180.29-1 0
        500 http://ftp.nl.debian.org unstable/non-free Packages
     173.14.09-5 0
        990 http://ftp.nl.debian.org testing/non-free Packages

User avatar
mzilikazi
Forum Account
Forum Account
Posts: 3282
Joined: 2004-09-16 02:14
Location: Colorado Springs, CO

#143 Post by mzilikazi »

didi wrote:

Code: Select all

$ dpkg -l | grep nvidia
ii  nvidia-glx                               173.14.09-5                   NVIDIA binary Xorg driver
ii  nvidia-kernel-2.6-686-bigmem             173.14.09+3                   NVIDIA binary kernel module for 2.6 series c
ii  nvidia-kernel-2.6.26-1-686-bigmem        173.14.09+3                   NVIDIA binary kernel module for Linux 2.6.26
ii  nvidia-kernel-common                     20080825+1                    NVIDIA binary kernel module common files
ii  nvidia-settings                          180.22-1                      Tool of configuring the NVIDIA graphics driv
ii  nvidia-xconfig                           1.0+20080522-2                The NVIDIA X Configuration Tool

Code: Select all

$ apt-cache policy nvidia-kernel-source
nvidia-kernel-source:
  Installed: (none)
  Candidate: 173.14.09-5
  Version table:
     180.29-1 0
        500 http://ftp.nl.debian.org unstable/non-free Packages
     173.14.09-5 0
        990 http://ftp.nl.debian.org testing/non-free Packages
Well there you have it. You have a precompiled nvidia-kernel. Note that the title of the thread is for a custom kernel but also applies to any kernel in the event that there is not a precompiled nvidia-kernel available.
Debian Sid Laptops:
AMD Athlon(tm) 64 X2 Dual-Core Processor TK-55 / 1.5G
Intel(R) Pentium(R) Dual CPU T2390 @ 1.86GHz / 3G

didi
Posts: 901
Joined: 2007-12-04 16:26
Location: the Netherlands

#144 Post by didi »

mzilikazi wrote:Well there you have it. You have a precompiled nvidia-kernel. Note that the title of the thread is for a custom kernel but also applies to any kernel in the event that there is not a precompiled nvidia-kernel available.
I know and I've used this howto successfully in the past.
I only confirmed that you can now (also) install the nvidia stuff just through apt-get/aptitude when you're using a stock kernel.

User avatar
mzilikazi
Forum Account
Forum Account
Posts: 3282
Joined: 2004-09-16 02:14
Location: Colorado Springs, CO

#145 Post by mzilikazi »

didi wrote: I know and I've used this howto successfully in the past.
I only confirmed that you can now (also) install the nvidia stuff just through apt-get/aptitude when you're using a stock kernel.
Well I didn't know that and it is very interesting even if it's a very old version.
Debian Sid Laptops:
AMD Athlon(tm) 64 X2 Dual-Core Processor TK-55 / 1.5G
Intel(R) Pentium(R) Dual CPU T2390 @ 1.86GHz / 3G

User avatar
julian67
Posts: 4633
Joined: 2007-04-06 14:39
Location: Just hanging around
Been thanked: 7 times

#146 Post by julian67 »

This situation may change according to the policy of the Linux kernel developers and possibly according to differences of interpretation of the Debian Social Contract amongst Debian developers. If you use Nvidia proprietary drivers you'll probably have noticed how the ability to do a simple apt/aptitude install has not been a permanent fixture and that Linux kernel development and release and Debian updates will go on regardless if it breaks the ability to install a proprietary binary driver. This has happened before and may happen again.
Wisdom from my inbox: "do not mock at your pottenocy"

Eck
Posts: 740
Joined: 2007-06-27 16:13

#147 Post by Eck »

Both the Nvidia Debian team (essentially Randell Donald) and the fglrx team pushed matching kernel modules into Debian before the Lenny release. This was in order to provide easy installation for those using the default Debian kernel on the i386 and x64 arch's.

If on other arch's or if the kernel is manually compiled then those NVidia and fglrx modules no longer match and module assistant must be used instead.

The last NVidia setup I had on my GeForce 6600 GT AGP was using the pre-built module without running module assistant and my current Radeon x850 PRO setup using the pre-built fglrx kernel module, also without running module-assistant.

So as long as a version of Debian stable is used (Etch, with the older drivers included or Lenny with its drivers) and one does not update to squeeze (which would bring in newer fglrx or nvidia versions too) then these modules are brought in as recommends by aptitude. Just gotta be careful to specify the meta-package module for your arch or aptitude also mistakenly installs the 486 modules too! I just ran aptitude in ncurses mode when installing and de-selected those, just installing the 686 version.

Another thing to be careful of is module assistant use for at least the fglrx driver. The m-a a-i fglrx includes the m-a get command. That's bad when installing the packages built by the ATI downloaded driver as it downloads an older module from the Lenny source. Gotta use m-a update, m-a prepare, m-a build, m-a install fglrx-kernel-src instead of a-i. Since I now use the Lenny driver I don't have the problem, but I did when I had the ATI download build its packages. Had to run through the m-a steps separately as a-i would otherwise replace the fglrx-kernel-src package with the one in Lenny (older).

But it's really easy (no m-a at all) for those using the stock default kernel and the included drivers.
Lenovo z560 Laptop Nvidia GeForce 310m Hitachi 500GB HD Intel HD Audio 4GB RAM

didi
Posts: 901
Joined: 2007-12-04 16:26
Location: the Netherlands

#148 Post by didi »

I have an addition to this HOW-TO for ppl who have build the nvidia kernel module (using this method?) before.

Code: Select all

m-a clean nvidia
This will clean up any old nvidia files in /usr/src/modules, which could prevent it from compiling.
At least that was the case with me when trying to upgrade to 180.29.

This was the error part on the (failed) build log:

Code: Select all

In file included from include/acpi/acpi.h:67,
                 from /usr/src/modules/nvidia-kernel/nv-linux.h:181,
                 from /usr/src/modules/nvidia-kernel/nv.c:14:
include/acpi/acutils.h: At top level:
include/acpi/acutils.h:503: error: expected '=', ',', ';', 'asm' or '__attribute__' before '}' token
include/acpi/acutils.h:506: warning: data definition has no type or storage class
include/acpi/acutils.h:506: warning: type defaults to 'int' in declaration of 'rces'
It could be that someone else get's a totally different error msg, but this is what I got.
Running the clean command before executing the steps in this HOW-TO made me able to compile the new nvidia kernel.

I got the idea from the last msg of this bug report: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=367976

jongi
Posts: 472
Joined: 2007-04-15 02:41

#149 Post by jongi »

When I try to build with m-a a-i -t -k /usr/src/linux-headers-$(uname -r) -l $(uname -r) nvidia, the build fails with the below:

Code: Select all

make[4]: *** [/usr/src/modules/nvidia-kernel/nv.o] Error 1
make[3]: *** [_module_/usr/src/modules/nvidia-kernel] Error 2
make[3]: Leaving directory `/usr/src/linux-headers-2.6.28.9'
NVIDIA: left KBUILD.
nvidia.ko failed to build!
make[2]: *** [module] Error 1
make[2]: Leaving directory `/usr/src/modules/nvidia-kernel'
make[1]: *** [build-stamp] Error 2
make[1]: Leaving directory `/usr/src/modules/nvidia-kernel'
make: *** [kdist_image] Error 2
Full log here

This has happened with kernel 2.6.29 from the unstable repo and with a self compiled 2.6.28.9 kernel.
Desktop: Debian (Sid) 64-bit, Gentoo 64-bit and Ubuntu Jaunty 64-bit
Laptop: Gentoo 32-bit
MythTV: Debian (Testing) 32-bit

didi
Posts: 901
Joined: 2007-12-04 16:26
Location: the Netherlands

#150 Post by didi »

2.6.29 is missing a file in the kernel/linux headers: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521472

As for your custom kernel compile error, did you try "m-a clean nvidia" before starting the procedure? It fixed issues with me (see post above yours).

jongi
Posts: 472
Joined: 2007-04-15 02:41

#151 Post by jongi »

removed all things nvidia, then ran an m-a clean nvidia to be sure.

i now have this working with both custom 2.6.28.9 and 2.6.29
Desktop: Debian (Sid) 64-bit, Gentoo 64-bit and Ubuntu Jaunty 64-bit
Laptop: Gentoo 32-bit
MythTV: Debian (Testing) 32-bit

lurch
Posts: 13
Joined: 2006-05-25 09:56

Re: Nvidia driver - Debian way, custom (or not) kernel.

#152 Post by lurch »

Hi
I upgraded to testing by changing my sources from Lenny to Testing.
I have tried to install the nvidia driver with this How-To and it exits with problem at m-a prepare && m-a a-i nvidia. I do not know how to attach the log printout.
The nvidia-glx install removes xorg.
lurch
Made up as i went along
ASRock 939A8X-M
AMD Opteron 175 64 bit
Geforce 7800 GS
2Gb memory

milomak
Posts: 2158
Joined: 2009-06-09 22:20
Been thanked: 1 time

Re: Nvidia driver - Debian way, custom (or not) kernel.

#153 Post by milomak »

see below as to where the versions lie

Code: Select all

$ apt-cache policy nvidia-kernel-source
nvidia-kernel-source:
  Installed: 190.42-2
  Candidate: 190.42-2
  Version table:
 *** 190.42-2 0
        500 http://debian.mirror.ac.za sid/non-free Packages
        500 http://mirror.giantix-server.de sid/non-free Packages
        100 /var/lib/dpkg/status
     173.14.09-5 0
        500 http://debian.mirror.ac.za stable/non-free Packages
        500 http://debian.mirror.ac.za testing/non-free Packages
        500 http://mirror.giantix-server.de stable/non-free Packages
        500 http://mirror.giantix-server.de testing/non-free Packages
Desktop: A320M-A PRO MAX, AMD Ryzen 5 3600, GALAX GeForce RTX™ 2060 Super EX (1-Click OC) - Sid, Win10, Arch Linux, Gentoo, Solus
Laptop: hp 250 G8 i3 11th Gen - Sid
Kodi: AMD Athlon 5150 APU w/Radeon HD 8400 - Sid

lurch
Posts: 13
Joined: 2006-05-25 09:56

Re: Nvidia driver - Debian way, custom (or not) kernel.

#154 Post by lurch »

a very quick reply
This is what I get
apt-cache policy nvidia-kernel-source
nvidia-kernel-source:
Installed: 173.14.09-5
Candidate: 173.14.09-5
Version table:
*** 173.14.09-5 0
990 http://ftp.uk.debian.org testing/non-free Packages
990 http://ftp.us.debian.org testing/non-free Packages
990 http://ftp.debian.org testing/non-free Packages
100 /var/lib/dpkg/status
How does this help?
I am trying to understand this.
lurch
Made up as i went along
ASRock 939A8X-M
AMD Opteron 175 64 bit
Geforce 7800 GS
2Gb memory

milomak
Posts: 2158
Joined: 2009-06-09 22:20
Been thanked: 1 time

Re: Nvidia driver - Debian way, custom (or not) kernel.

#155 Post by milomak »

you clearly are not familiar with Debian

look at what i posted. stable and testing ARE 173.14.09-5 0. Unstable is the 190 version.

lurch - what about the opening post do you not understand
Desktop: A320M-A PRO MAX, AMD Ryzen 5 3600, GALAX GeForce RTX™ 2060 Super EX (1-Click OC) - Sid, Win10, Arch Linux, Gentoo, Solus
Laptop: hp 250 G8 i3 11th Gen - Sid
Kodi: AMD Athlon 5150 APU w/Radeon HD 8400 - Sid

Post Reply