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

Share your own howto's etc. Not for support questions!
Post Reply
Message
Author
Eck
Posts: 740
Joined: 2007-06-27 16:13

#61 Post by Eck »

Bug #459848 shows that I wasn't crazy (but I know better).

Module Assistant can't build the nvidia-kernel-source because the package has been renamed and m-a can't find it to unpack once it is installed.

A work around regarding renaming the installed package and doing one other change (at least for the 64 bit, maybe just the rename is needed for i386) then allows m-a to build the source.

That's also a good reason why nvidia-glx couldn't install. It depends upon that nvidia-kernel-169.07 installed and aptitude wouldn't install it without that. And I'm glad I didn't get insistent and force it since it wouldn't have worked on the 100.14.19 Kernel that m-a kept installing with auto-install nvidia. If I did the individual steps and had it use the already upgraded source, it would fail to install, but if I did it fresh with auto-install it would install the older source. So either way (no kernel or 100.14.19) I wasn't going to get nvidia-glx to install or work.

The bug reporter requests a different package that will work with m-a, but I think the nvidia-kernel packages are renamed for a reason. They're getting ready for the 2.6.23 Kernels and a newer module-assistant and kernel module packages that WILL work the way he has named them.

That's my read anyway. So ideally for now it is probably best to install it without the use of module-assistant. That way they will have the newer name installed and the new m-a will later on seamlessly be able to see and work with the packages as the upgrades will also have the new style naming.

For me, yeah I could probably learn how to do it without m-a but I really couldn't be bothered. A simple ctrl-alt-F1, /etc/init.d/kdm stop, export CC=gcc-4.1, sh NVIDIA-Linux (tab).run and dpkg-reconfigure xerver-xorg and nvidia-xconfig --composite, and I'm done.

No need to run a mixed Lenny/Sid system or deal with a buggy xserver-1.4. When all this gets to Lenny and actually works properly perhaps I'll go back to the Debian way.

If you're wondering about the export CC=gcc-4.1, that's because the Debian kernels are built with the older 4.1 and the system runs with the newer version so the Nvidia installer warns about mismatched gcc versions. Since Debian does still keep 4.1 installed, and export just before installing the driver will show the 4.1 stuff so NVidia can use it to make a matching kernel module that is built with the same gcc that the Debian Kernel was built with.

The official Debian NVidia stuff includes a script that just has it ignore the mixmatch which is like a user telling the NVidia script to proceed anyway. Actually, having the installer use the same gcc version as was used to build the Kernel is the better way to go. So the NVidia downloaded driver from the NVidia website is actually a better all around method of installation, in my opinion.

Not for the package management system and placement of gl files so xorg, kernel, and mesa upgrades. The Debian way is better in that sense. It was nice having a system that had everything in more logical Debian specific places, similar to how specific Fedora, SUSE packages do it, but NVidia uses symlinks that work just fine. Just needs reinstalling whenever those other things are upgraded as they break the symlinks.

I'm just glad that the NVidia official script is available for times like this when the standard install method, module-assistant, gets buggy and doesn't work. Although it's really just a transition problem right now. But they should get that fixed somehow since lots of folks are going to be trying to get the update installed and will run into this mess. Think everyone's going to find their way to the bug reports on the package? I don't. Most will see the only way to fix this is to uninstall NVidia and use vesa or nv if they insist on not running the official NVidia installer.
Lenovo z560 Laptop Nvidia GeForce 310m Hitachi 500GB HD Intel HD Audio 4GB RAM

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

#62 Post by Eck »

And now bug 454348 regarding the virtualbox-ose modules describes the same problem going on with module assistant not being able to build a module as it doesn't see any with the new naming scheme.

And, the developer responds that the user shouldn't be building the modules with module assistant so this is a no fix bug.

Great. Someone know how to build modules the old, manual way that wants to make guides for NVidia and Virtualbox?

I said in the latest reply that this is supposed to be the new, improved way? No thanks. Let's go back to the semi-automatic module assistant please?

What? Is aptitude supposed to do this automatically now? If it is supposed to, it isn't working as I have the module listed in /etc/modules.conf and unless I use module-assistant (works with virtualbox because an older module is available, but not with NVidia because there isn't an older one). nothing loads and virtualbox cannot start a virtual machine.

A won't fix bug. I don't get it. It's a feature! Debian is turning into Microsoft if making something break so a user can't use it is a won't fix bug.
Lenovo z560 Laptop Nvidia GeForce 310m Hitachi 500GB HD Intel HD Audio 4GB RAM

hkoster1
Posts: 1269
Joined: 2006-12-18 10:10

#63 Post by hkoster1 »

@Eck... why am I getting so tired reading all your stuff? Too many letters, too many words, too many sentences, if you ask me.

OK, let me just summarize the current (10 January 2008) situation:

1. There's a new version of nvidia-glx, etc, in Sid: 169.07-1, that won't install because the corresponding nvidia-kernel module isn't available.

2. Module-assistant won't unpack the nvidia-kernel source archive, so this must be done by hand in /usr/src (as root)

Code: Select all

tar xvjf nvidia-kernel.tar.bz2
Edit: it's a bug http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=459862

3. Now (still as root)

Code: Select all

m-a a-i nvidia-kernel
compiles/installs the new nvidia-kernel-2.6.23-1-amd64_169.07-1+2.6.23-2_amd64.deb package OK, and likely for other kernels too.

4. Still as root,

Code: Select all

aptitude update && aptitude full-upgrade
to install the matching 169.07-1 nvidia-glx, etc package.

5. Clean up (get rid of old 100.14.19 stuff), restart X and enjoy!

@Mzilikazi -- change the title of this thread?
Last edited by hkoster1 on 2008-01-14 09:29, edited 2 times in total.
Real Debian users don't do chat...

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

#64 Post by Eck »

That's all I had to do? Unpack the thing?

Well...

That was easy. Maybe. I'll go try it with Virtualbox, probably sticking with the NVidia official binary since it's installed and working. No Sid needed.

Gosh yes, I do get wordy. But I have so much to say! :)

Edit -

Nope, module assistant will still substitute the older module and warn that it is replacing the newer virtualbox-ose module while it is doing the auto-install. Then Aptitude will offer to upgrade it again, breaking Virtualbox by removing the kernel module.

The Debian Wiki article on Virtualbox saved the day and allowed me to use the newer source and module.

I used its instructions for Etch, which doesn't have pre-built modules for Virtualbox. I extracted the tarball that Aptitude had deposited in /usr/src like you said, but this time cd to the /usr/src/modules/virtualbox-ose.

Instead of running module assistant I did make and make install in that folder. I did modprobe vboxdrv and, magically, it was there to run and lsmod | grep vbox showed me a number. I'll have to remember to make uninstall before this stuff gets upgraded again.

So I've got Virtualbox-ose 2.5.2 running with the latest virtualbox kernel for it. Most won't figure this out, I wouldn't think.

See, this is broken. So sorry everyones so sick of my posts but this is a critical bug. Of course it will be fixed automatically when 2.6.23 and the modules get redone and into Lenny, but until then there is no using module assistant for this stuff unless we use the older packages.

The deb for the older virtualbox-ose module is in /usr/src, and that is what module assistant unpacks even if the newer tarball is extracted. It simply replaces the updated files with the older ones from the deb file it extracts, ignoring the tarball.

Maybe it works for nvidia, but I won't be going through all that, thank you.
Lenovo z560 Laptop Nvidia GeForce 310m Hitachi 500GB HD Intel HD Audio 4GB RAM

lubor
Posts: 3
Joined: 2008-01-13 17:02

#65 Post by lubor »

Code: Select all

m-a a-i nvidia
Last edited by lubor on 2009-12-23 23:18, edited 1 time in total.

User avatar
rickh
Posts: 3473
Joined: 2006-06-29 02:13
Location: Albuquerque, NM USA

#66 Post by rickh »

Ah! My weekly "full-upgrade" hit me hard today. On the 32-bit system I messed around with it trying to do things logically, and, of course, lost X altogether. Fortunately I knew where to come for advice.

Thanks to hkoster1 for cutting through the fog and making it easy.
Debian-Lenny/Sid 32/64
Desktop: Generic Core 2 Duo, EVGA 680i, Nvidia
Laptop: Generic Intel SIS/AC97

User avatar
llivv
Posts: 5484
Joined: 2007-02-14 18:10
Location: cold storage

#67 Post by llivv »

I just finished a sid upgrade and I have two packages left that are not updateable.
nvidia-glx
libbonobo2-common

It took me about a half hour to mess around with the more than 100 upgradeable packages ( I haven't touched this install in about a month) and there were a few tricky sections to deal with, as mentioned above.

I have one more sid install to update, I'll post back after I've finished with it as well.

hkoster1
Posts: 1269
Joined: 2006-12-18 10:10

#68 Post by hkoster1 »

Further to my 10 Jan/08 post: the problem with module-assistant persists with the updated 169.07-2 nvidia-kernel source. It's a bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=459862, so requires unpacking the archive manually for now.
Real Debian users don't do chat...

User avatar
llivv
Posts: 5484
Joined: 2007-02-14 18:10
Location: cold storage

#69 Post by llivv »

I thought I'd beat this dpkg depends issue by holding back nvidia-glx
Long story - short
I'm holding nvidia-glx and I downgraded to the nv driver.

Note: xorg.conf (if it is populated) keeps getting smaller and smaller.

hkoster1
Posts: 1269
Joined: 2006-12-18 10:10

#70 Post by hkoster1 »

llivv wrote:I thought I'd beat this dpkg depends issue by holding back nvidia-glx
Long story - short
I'm holding nvidia-glx and I downgraded to the nv driver.
What are you muttering about? Now the next step is to get the newest nvidia-kernel sources (169.07-2 as I write this), untar them manually in /usr/src, then run "m-a a-i nvidia-kernel", and finally install the matching nvidia-glx (169.07-2) -- all in that precise order.
Then you can change xorg.conf back to nvidia, or -- as you noted -- make a new minimal one with nvidia-xconfig (it's a package).
Real Debian users don't do chat...

hkoster1
Posts: 1269
Joined: 2006-12-18 10:10

#71 Post by hkoster1 »

lubor wrote:I have problem with

Code: Select all

m-a a-i nvidia
Stop right here: the command should be "m-a a-i nvidia-kernel"
My distro is sid, here is problem

Code: Select all

/usr/share/modass/packages/generic.sh: line 74: debian/rules: Adresár alebo súbor neexistuje 
Directory or file isn't , i have 2.6.18-5-k7 kernel, new I won't

Thank
You seem to be running an awfully old kernel in Sid... The current 2.6 kernel in Sid is 2.6.22, while the 2.6.23 kernel is also available (running it myself). So, one thing you could do is to get one of the newer kernels, then run "m-a prepare" to get the headers etc, and then follow the recipe in my earlier post.
Real Debian users don't do chat...

User avatar
bluesdog
Posts: 2082
Joined: 2006-02-01 09:02
Location: Similkameen, British Columbia, Canada

#72 Post by bluesdog »

For those upgrading to nvidia 169.07-2:

Code: Select all

# ln -s /usr/src/nvidia-kernel.tar.bz2 /usr/src/nvidia-kernel-source.tar.bz2
Worked for me
Tips & Tricks

Something more to read while waiting

If you obviously have not read THIS, don't expect too much...




*winter bluesdog....*

hkoster1
Posts: 1269
Joined: 2006-12-18 10:10

#73 Post by hkoster1 »

bluesdog wrote:For those upgrading to nvidia 169.07-2:

Code: Select all

# ln -s /usr/src/nvidia-kernel.tar.bz2 /usr/src/nvidia-kernel-source.tar.bz2
Worked for me
Right, because the bug in module-assistant is that it hasn't yet taken into account the name change in the nvidia-kernel source package (as requested by the kernel people). Since I'm in favour of economy of key strokes, it's clear that the

Code: Select all

tar xvjf nvidia-kernel.tar.bz2
beats the

Code: Select all

ln -s nvidia-kernel.tar.bz2 nvidia-kernel-source.tar.bz2
command hands down. :wink:
Real Debian users don't do chat...

lubor
Posts: 3
Joined: 2008-01-13 17:02

#74 Post by lubor »

Code: Select all

# rm /usr/bin/gcc
# ln -s /usr/bin/gcc-4.1 /usr/bin/gcc
CTRL+ALT+F1
# /etc/init.d/gdm stop
# sh NV*
# /etc/init.d/gdm start 
Last edited by lubor on 2009-12-23 23:19, edited 1 time in total.

User avatar
bluesdog
Posts: 2082
Joined: 2006-02-01 09:02
Location: Similkameen, British Columbia, Canada

#75 Post by bluesdog »

hkoster1 wrote:
bluesdog wrote:For those upgrading to nvidia 169.07-2:

Code: Select all

# ln -s /usr/src/nvidia-kernel.tar.bz2 /usr/src/nvidia-kernel-source.tar.bz2
Worked for me
Right, because the bug in module-assistant is that it hasn't yet taken into account the name change in the nvidia-kernel source package (as requested by the kernel people). Since I'm in favour of economy of key strokes, it's clear that the

Code: Select all

tar xvjf nvidia-kernel.tar.bz2
beats the

Code: Select all

ln -s nvidia-kernel.tar.bz2 nvidia-kernel-source.tar.bz2
command hands down. :wink:
OMG! I could have saved some keystrokes!
:wink:
~~~~
lubor makes a good point regarding gcc compatibility. A module-build requires the same flavour compiler as was used to build the kernel
Tips & Tricks

Something more to read while waiting

If you obviously have not read THIS, don't expect too much...




*winter bluesdog....*

sweelinck
Posts: 31
Joined: 2007-06-21 02:51
Location: Brazil

#76 Post by sweelinck »

Hi. I've just installed lenny 32bits, kernel 2.6.22-3-686. Then I followed this howto, and everything went fine, except that the module seems to work not ; ). So, let me gather what it seems to be relevant.

I did install the nvidia-glx package, and everything went fine about it. When I change from 'nv' to 'nvidia', xorg says that this module doesn't exist, and dies. When I do 'modprobe nvidia', nothing happens. on /etc/modules there are just two lines (besides the #):

Code: Select all

loop
nvidia
But... on /var/log/kern.log:

Code: Select all

Jan 17 05:29:39 mnesala kernel: nvidia: module license 'NVIDIA' taints kernel.
Jan 17 05:29:39 mnesala kernel: ACPI: PCI Interrupt 0000:04:00.0[A] -> GSI 16 (level, low) -> IRQ 16
Jan 17 05:29:39 mnesala kernel: PCI: Setting latency timer of device 0000:04:00.0 to 64
Jan 17 05:29:39 mnesala kernel: NVRM: loading NVIDIA Linux x86 Kernel Module  1.0-8776  Mon Oct 16 21:56:04 PDT 2006
Jan 17 05:37:41 mnesala kernel: PCI: Setting latency timer of device 0000:04:00.0 to 64
Jan 17 05:37:41 mnesala kernel: NVRM: loading NVIDIA Linux x86 Kernel Module  1.0-8776  Mon Oct 16 21:56:04 PDT 2006
I think that means the module started... or not? Ah, and when I do nvidia-xconfig:

Code: Select all

Using X configuration file: "/etc/X11/xorg.conf".
Segmentation fault
I'm puzzled. Not that I need much to be puzzled ; ), after ~ two months of debian, and linux. Well... please, help, i'm stuck : /.

User avatar
llivv
Posts: 5484
Joined: 2007-02-14 18:10
Location: cold storage

#77 Post by llivv »

You're not the only one. Somebody posted a bug concerning the" nvidia-kernel-source-169.07 installed with the linux-2.6.22xxxx kernel".

I had the same problem with lenny, and after triing to build a workaround with sid packages (not really knowing to much about what I'm doing)
I finally decided to purge X and downgrade to etch.

Mind you, I don't recommend this course as it's LOADED with potential issues, no matter how you actually make the switch.

Well anyways, I now have 2 "up to date etch" and 2 "up to date sid" installs on this machine, and I think it's about time
to hibernate the beast for another month or so.

But the visual I have with sid and nvidia 169.07 is wayyy better than anything I've had before....
Lazyweb: Does it look better on a 17" LCD?

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

#78 Post by Eck »

The segfault when running Debian's version of nvidia-xconfig can be solved by adding a Modules section (don't forget the End Section line) to xorg.conf. NVidia's downloaded driver doesn't have this problem as they use a different version of nvidia-xconfig that has a lot of additional features.

For example, nvidia's version has an nvidia-xconfig --composite switch whereas ours does not.

Mostly all we need is to change nv or vesa to nvidia, and put Load "glx" as a line in the Modules section. And for composite just adding OPTION "Composite" "Enable" to the Extensions section.

I've used both Debian's and NVidia's versions of this stuff and the NVidia installer just seems like less hassle to get going. Only have to remember to nvidia-installer --uninstall and then reinstall it following Kernel, Xorg, or Mesa upgrades. It was pretty easy to use the Debian version, especially for Sid users but it was fine for Lenny users who read the guides for mixed systems too, before the current renaming scheme for these packages.

They're doing this for the future 2.6.23 Kernel upgrades but it had made it necessary to do additional steps temporarily until that happens and I found it too bothersome to, well, bother with. The NVidia binary works fine (export CC=gcc-4.1 and then run the NVidia package) and no need for mixing Lenny and Sid.
Lenovo z560 Laptop Nvidia GeForce 310m Hitachi 500GB HD Intel HD Audio 4GB RAM

pszalapski
Posts: 1
Joined: 2008-01-20 03:29

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

#79 Post by pszalapski »

didi wrote: Get updated, install the necesary packages

Code: Select all

apt-get update && apt-get install nvidia-kernel-source/experimental module-assistant nvidia-settings
I'm trying to follow this to install 169, which apt-get downloaded for me by following the above (without the "Experimental".) I've never used the module assitant. Could someone please point me to a good guide for that? I've tried to do the obvious to get it going, but when I try to compile "nvidia-kernel", I get:

Code: Select all

Build of the package nvidia-kernel-source failed! How do you wish to proceed?
The buildlog is empty except for a "starting" line. Any way I can proceed? If not I'd be happy even with the 100-series drivers, which I don't know how to apt-get.

Thanks in advance. [/code]

User avatar
bluesdog
Posts: 2082
Joined: 2006-02-01 09:02
Location: Similkameen, British Columbia, Canada

#80 Post by bluesdog »

module-assistant needs to know the location of the nvidia-kernel source files, as noted in the above posts

Either make a symlink, or manually unpack the source, as described.

As long as you have installed kernel-headers or kernel source to match your running kernel, module-assistant will then be able to build the nvidia-kernel module
Tips & Tricks

Something more to read while waiting

If you obviously have not read THIS, don't expect too much...




*winter bluesdog....*

Post Reply