UPDATED, 24 April 2007: After two clean reinstalls without a hitch, I think there’s a better way to get the 9631 driver working on the 420/440/460 Go (and some other Geforce4 cards) than patching and rebuilding the 8776 driver.
Before you rebuild, or if you already have the 9631 (nvidia-glx) driver installed, try this:
- Install the nvidia-glx package from the repositories:
sudo aptitude install nvidia-glx
- Edit your xorg.conf file:
sudo nano -w /etc/X11/xorg.conf
- Under the “Device” section, add this:
Option "UseDisplayDevice" "DFP"
- Restart X.
That should be enough to get proper output, along with all the acceleration and eye candy that you’re due with the 9631 drivers. Where I was getting a dead screen before, the card forces output to the LCD (the Default Flat Panel) and I now have a proper desktop, just like the good old days.
If you already have the patched 8776 driver in place, you can still install the 9631 driver like you normally would (
sudo aptitude install nvidia-glx) and add the above line to your xorg.conf, and it should also work (that was the first way I tried it).
Like I said, I’ve done two clean reinstalls and I’m using only the nvidia-glx package now. I can run Beryl, OpenGL games, and accelerated screensavers, without repatching or rebuilding anything. I’ll leave this post intact for future reference, or if the DFP option still doesn’t do the trick for you.
Woohoo! I managed to compile the 8776 driver against the Feisty kernel! Hooray! This means I’m not left out in no-man’s land with my Geforce4 440 Go! No more lockups! No more legacy drivers! Full video acceleration and eye candy! Whee!
The problem, as I understand it, is that the 8776 driver has to be patched before it can be compiled against kernels 2.6.19 and up. I found the answer on the nv News Linux forums, and after some experimentation, I got it working! :mrgreen:
If you think you’re in the same boat, or if you’re working with Feisty and you have a 440 Go (or 420/460 sister card, or even just a Geforce4 card), here’s my situation. You can decide if this applies to you.
- The 96xx-series drivers packaged in Feisty’s nvidia-glx don’t work. The screen is powered off and eventually X segfaults catastrophically. The 97xx drivers are no better, but in that case Nvidia admits those drivers abandon pre-FX cards. The 8776 nvidia-glx drivers in Edgy were the last ones that worked for me.
- The 7184 drivers in Feisty’s nvidia-glx-legacy have no proper video acceleration (without mangling your xorg.conf) and cause hard X lockups which are only fixable with a complete power-down or a hard reboot with ALT+PRTSCR+B.
- The old 8776 driver installer won’t compile straightaway against Feisty’s 2.6.20 kernel, because of changes between both the Nvidia package and the Linux kernel itself (does that make sense? did I understand that correctly?)
- The nv driver works, and allows you to use your machine “normally,” but doesn’t give you any video acceleration, and the X environment is kind of slow (okay, that one is not a bug, just a gripe). So technically yes, the nv driver is an option, but without full acceleration, I might as well be using a Vanta.
- As a reference, this is the list Nvidia says works with the 8776 driver. If you’re in doubt over whether or not this method is for you, look for your card on that list, and it should give you an idea if your card was meant to run against the 8776.
(Edit: I’ve seen a few fixes or tweaks that might work, depending on your hardware, but in my case just didn’t. This one might help, but again, I think it’s going to depend on what your setup is. Rebuilding the patched driver is the only thing that has worked for me.)
Here’s how I fixed it on my machine. First, purge your system of anything even remotely related to Feisty’s default nvidia-glx or nvidia-glx-legacy drivers. Get them out, because having anything remaining is going to confuse the installer, or the driver, or both. Additionally, get rid of the restricted modules package for your kernel. I’m on linux-386, but I plan to try linux-generic next. (Note: I tried it and it works fine on -generic.)
sudo aptitude remove --purge nvidia-glx nvidia-glx-legacy linux-restricted-modules-386
You might be prompted to remove linux-386 as well; that’s okay, since it’s just a metapackage for the entire 386 substructure. It’s like removing a bottlecap. Everything underneath the bottlecap is fine, it’s just not nicely packaged any longer.
(Note: Make sure you remove the restricted modules. You’ll get driver errors on reboot if you leave the restricted modules in there. Do this even if you never installed a driver from the repositories!)
(Another note: I’ve noticed that removing linux-restricted-modules-generic still leaves linux-restricted-modules-2.6.20-15-generic, so make sure that gets pulled out as well.)
Now you’ll need some tools to build it up. I found this list on the nv News forums for Linux, and so it’s possible there is one or more things here that aren’t absolutely necessary. But I’d rather have it and not need it than need it and not have it. ;)
sudo aptitude install build-essential linux-headers-386 pkg-config xserver-xorg-dev
That can be a bit hefty (it’s about 20Mb altogether); be prepared for a lengthy download. Contrary to what I’ve heard elsewhere, you do not need to install linux-source. And remember to use linux-headers-generic, not linux-headers-386, if you’re not using linux-386 to start with. (I’ve experimented a little with this list and you absolutely need build-essential and linux-headers-generic or -386. But you can get by without pkg-config and xserver-xorg-dev. The installer will spit out errors, but still work.)
Next get the driver and the patch. Download the 8776 driver from the Nvidia site. Then jump to the nv News forums and grab the 8776 patch from here. (I’ve also made a copy of the internal text at the Ubuntu pastebin, just as a security measure. It’s an important little file to me.)
Now drop out of X completely. At this point you might want to cut-and-paste these instructions into a text file, or perhaps fire up your mom’s 733Mhz Windows ME machine so you can read the rest of the steps. However you do it, it doesn’t bother me.
Jump to a terminal with CTRL+ALT+F1. Log in. Then stop GDM (or KDM, or whatever display manager you’re using … if you use one at all).
sudo /etc/init.d/gdm stop
Next, decompress the driver with this command.
sudo sh nvidia-Linux-x86-1.0-8776-pkg1.run -x
That -x flag decompresses the goodies without running the installer. Now change into the directory where the guts are
Here comes the actual patching.
sudo patch Makefile.kbuild ~/NVIDIA_kernel-1.0-8776-20061203.diff.txt
Make sure the path to the patch is correct; in my case I just dropped it into the home directory. If all went well, you should see four or five lines from patch, telling you what it did.
(Edit: Just for the record, you don’t need sudo to patch it if you didn’t use sudo to decompress it. I added it on the first run but I’ve gone without it since. The installer has to be run as root, but you can decompress and patch without root privileges. I don’t know why I mention that, but it might be important to someone. :roll: )
Now jump back up three directories, to where the installer program is, and execute it.
From there, the installer program will take over. You should get options to download a precompiled kernel, and perhaps a license warning or two. Keep your fingers crossed, and if it finishes without a hitch, you’ll be asked if you want it to set up your xorg.conf file. I did, and you might want to also. It makes a backup of your current one.
From there, you can enjoy Warzone 2100 again. You don’t even have to reboot if your xorg.conf is ready. The installer builds and inserts the module, so you can go straight to startx or restarting your display manager. Cool, huh? ;)
I’m going to try this again on a clean and fresh installation to make sure I haven’t left anything out. But for the mean time, I’m glad it worked. And as always, if I’m misunderstanding some of this stuff or if someone has a better way of doing it, please let me know.
P.S.: Of course, the downside of this is, as soon as the kernel changes, the driver has to be rebuilt. When I was finished with this post, I updated to 2.6.20-13-386, and of course, X gives a blue screen of death on reboot. But all you have to do is rebuild and restart X again, and it’s back to working. It’s an inconvenience, but once Feisty is stable there will probably be fewer kernel updates. And it only takes about three minutes on my 1Ghz machine. It’s better than random X lockups or laggy redraws, in my book. ;)
P.P.S: Other updates will also require you to rebuild the driver — things like an xserver-xorg update or a few other things. The nice thing is, once the driver is patched, you can just rerun the Nvidia installer and it will replace the old driver with a new one — no need to repatch or decompress again. So if you want, you could keep a folder in your home directory with the patched driver, and when you get errors from updates or whatever, just rebuild and restart X. Time lost equals about three minutes, depending on the speed of you computer. ;)
P.P.P.S.: This rebuild also worked for me in Arch Linux, using the same procedure but without needing to install any additional packages. I expect it would also work for other distros, although the dependencies for building the driver are something I can’t predict. :(
P.P.P.P.S.: Just once more for the record, I describe using 386 throughout this, but the -generic series kernels work just as well. I’m assuming most people who read this are coming off a borked nvidia-glx dist-upgrade from Edgy. If that’s the case, you’re probably using linux-386, since it should be installed when you install nvidia-glx under Edgy, and in that case, you’ll want the -386 packages. Does that make any sense at all? And if you don’t know what kernel you’re using, find out with
P.P.P.P.P.S.: I should mention that installing the driver this way also gives you access to the nvidia-settings panel and the nvidia-xconfig tool. So once your X is up and running you can trigger the settings panel and really tweak your setup. You can also fine-tune your xorg.conf file with something like
sudo nvidia-xconfig --composite --allow-glx-with-composite --render-accel --add-argb-glx-visuals --no-logo. Fun, huh?