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

Share your own howto's etc. Not for support questions!

Postby Eck » 2008-01-09 16:32

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

Postby Eck » 2008-01-10 00:12

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
Eck
 
Posts: 740
Joined: 2007-06-27 16:13

Postby hkoster1 » 2008-01-10 09:37

@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...
hkoster1
 
Posts: 1269
Joined: 2006-12-18 10:10

Postby Eck » 2008-01-11 00:13

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
Eck
 
Posts: 740
Joined: 2007-06-27 16:13

Postby lubor » 2008-01-13 17:05

Code: Select all
m-a a-i nvidia
Last edited by lubor on 2009-12-23 23:18, edited 1 time in total.
lubor
 
Posts: 3
Joined: 2008-01-13 17:02

Postby rickh » 2008-01-13 17:30

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
rickh
 
Posts: 3473
Joined: 2006-06-29 02:13
Location: Albuquerque, NM USA

Postby llivv » 2008-01-14 02:48

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.
User avatar
llivv
 
Posts: 5484
Joined: 2007-02-14 18:10
Location: cold storage

Postby hkoster1 » 2008-01-14 09:33

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...
hkoster1
 
Posts: 1269
Joined: 2006-12-18 10:10

Postby llivv » 2008-01-14 10:14

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.
User avatar
llivv
 
Posts: 5484
Joined: 2007-02-14 18:10
Location: cold storage

Postby hkoster1 » 2008-01-14 18:10

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

Postby hkoster1 » 2008-01-14 18:16

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...
hkoster1
 
Posts: 1269
Joined: 2006-12-18 10:10

Postby bluesdog » 2008-01-15 00:50

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....*
User avatar
bluesdog
 
Posts: 2082
Joined: 2006-02-01 09:02
Location: Similkameen, British Columbia, Canada

Postby hkoster1 » 2008-01-15 09:00

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...
hkoster1
 
Posts: 1269
Joined: 2006-12-18 10:10

Postby lubor » 2008-01-15 13:39

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.
lubor
 
Posts: 3
Joined: 2008-01-13 17:02

Postby bluesdog » 2008-01-15 19:07

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....*
User avatar
bluesdog
 
Posts: 2082
Joined: 2006-02-01 09:02
Location: Similkameen, British Columbia, Canada

PreviousNext

Return to Docs, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable