nV News Forums

 
 

nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=14)
-   -   4191 driver and Red Hat Phoebe HOWTO (http://www.nvnews.net/vbulletin/showthread.php?t=6997)

ppieti 02-01-03 05:12 AM

4191 driver and Red Hat Phoebe HOWTO
 
Here's details on how to get the NVidia driver to work with RH Phoebe (8.0.93) and reasons why you need to do it like this.

First of all, Phoebe has some backports from the 2.5.x kernel series (threading and VM/scheduler).

This creates two issues, first being that the kernel module required by the driver doesn't compile since some of the interfaces have changed. This is solved by using the 2.5/2.4-rmap patch from http://www.minion.de/

The second problem is the new threading code NPTL, which uses something called Thread Local Storage (TLS). This code uses x86 segment registers to do its work. Unfortunately the NVidia library wants to use them too, which causes segmentation faults whenever some program wants to use it (X server, OpenGL app, whatever).

There are a few ways to disable it, one is booting with the "nosysinfo" boot flag, which disables kernel support for TLS, making glibc fall back to the old threading code.
This didn't work some time ago, should be fixed now but I'd have to reboot to try it.

Another way to disable it is by setting the environment variable LD_ASSUME_KERNEL=2.2.5 before starting X.

A third approach is mv /lib/tls /lib/notls

The real fix, of course, is a NVIDIA_GLX that doesn't use segment registers. While this is only an issue for a Red Hat beta now, the same issue will come up with all distros once the move to 2.6 kernels with glibc 2.3 is made.

TenBaseT 02-01-03 03:03 PM

I'm not familar in patching anything. Is there somebody, who can give a short discription, how to install the rmap patch.

Thanks
Hans

bwkaz 02-01-03 04:48 PM

Get the .tar.gz 4191 driver (versions are important here).

Decompress it somewhere.

Change to the new NVIDIA_kernel-* directory.

Do a patch -Np1 --dry-run </path/to/file.diff, and make sure you don't get any "x of y hunks failed" messages. If you don't, then you can do the same command without the --dry-run, to actually apply the patch.

If you do, then make sure the p option's argument is correct (almost all the time, it should be 1, though), and make sure you're in the NVIDIA_kernel directory. Also make sure that (in general) the patch you're applying was meant for the version of whatever that you have -- a patch against kernel 2.4.18, for example, will probably not apply to a 2.4.20 source tree right away. You can do it, but it takes a lot of work.

TenBaseT 02-01-03 05:04 PM

Sorry my mistake,

you ar talking about RH 8.x. I'm using RH 8.0. But my system ist crashing too with segemntation faults:mad:

Hans

jeffmcclure 02-26-03 09:31 AM

Re: Phoebe HOWTO
 
Have these steps worked for anyone? I'm trying to get the NVIDIA driver to work under Redhat 8.1 beta3 (Phoebe). I've applied the two patches, but the _kernel part of the driver still does not compile.

bwkaz 02-26-03 11:07 AM

Someone else had a similar problem with RH 8.0.94 (is that beta 3? or is that beta 4?) -- or at least, since you haven't actually given much real information (like the error message), I assume it was a similar problem.

According to what I guessed in that thread, RH changed their kernel again, so you need more than just this one patch. But I could be wrong, I don't run RH.

rebus 02-28-03 06:14 AM

RedHat Phoebe-3 8.0.94
 
There are some more changes to do to nvidia kernel drivers to go with 8.0.94.

Interface of remap_page_range changed.

In patch from www.minion.de you need to use:
# define REMAP_PAGE_RANGE(a...) remap_page_range(vma, ## a)

Some functions are not so easy to patch.
Some functions are out of the scope of variable vma and I don't find any way hoe to get it from the inputs I have. Happily making those functions to always fail (return NULL) works too. It seems to me really nasty, but it works.

If you like prebuild src.rpm for Phoebe 8.0.94 or patches for its kernel you can find it at:
http://rebus.webz.cz

jeffmcclure 02-28-03 09:11 AM

Re: RedHat Phoebe-3 8.0.94
 
rebus, thanks for the suggestion. Unfortunately it does not work for me. I downloaded both of the .src.rpm files, and they built fine. I installed them, made the necessary changes to XFConfig, and updated /etc/X11/prefdm (note: It seems odd that we're specifying kernel 2.2.5?)

When I start X the familiar Nvidia log displays briefly, but then it distorts and my computer locks. I can reboot using control-alt-delete, however the standard control-alt-f1 and similar does not work.

Do you have any additional suggestions? I'm running the NVidia 4 chip on a Dell Inspiron laptop.

ppieti 02-28-03 10:35 AM

the prefdm trick will only work if you use xdm/gdm/kdm. If you use startx, a change in prefdm won't affect X at all. You can do something like "LD_ASSUME_KERNEL=2.2.5 startx" (or edit /usr/X11R6/bin/startx, it's a shell script) to get the same effect without xdm.

The 2.2.5 might make more sense if you look at it as "kernel version that didn't have the features required for supporting the features that don't work". Anyway, it does the trick.

Might be, that even something "newer" would work too, 2.2.5 is the standard to make random binary-only software work (eg. older versions of java), which is why I chose it. It'd also disable less features in glibc, which would probably be advantageous.

Easiest way is probably starting up X with 2.2.5, then trying glxinfo with various values until it segfaults. Can't easily test it currently myself, alas.

jeffmcclure 02-28-03 11:36 AM

Worked like a champ!!!!

I added

export LD_ASSUME_KERNEL=2.2.5

to /usr/X11R6/bin/startx as you suggested and everything works great now! 3D is also working well, tux racer looks great!

I did not realize /etc/X11/prefdm was only for KDE users. Thanks for the heads up.

Thanks to everyone for all the assitance. Hopefully other people will find the added information useful.

rebus 02-28-03 04:12 PM

LD_ASSUME_KERNEL
 
LD_ASSUME_KERNEL=2.4.19 is the last that works for phoebe-3

sphincter 03-03-03 07:34 PM

They've apparently merged some more stuff. There's a slightly newer kernel available via rawhide that's breaking it in the same place. Again. I'm half tempted to just go with the 2.5.x kernel tree and see what happens. The whole thread local storage thing is troubling too. Quite a bit of my system is borked right now thanks to that, not the least of which is wine.


All times are GMT -5. The time now is 12:27 AM.

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.