Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 02-01-03, 06:12 AM   #1
ppieti
Registered User
 
Join Date: Feb 2003
Posts: 8
Default 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.
ppieti is offline   Reply With Quote
Old 02-01-03, 04:03 PM   #2
TenBaseT
Registered User
 
Join Date: Feb 2003
Posts: 4
Default

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

Thanks
Hans
TenBaseT is offline   Reply With Quote
Old 02-01-03, 05:48 PM   #3
bwkaz
Registered User
 
Join Date: Sep 2002
Posts: 2,262
Default

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.
__________________
Registered Linux User #219692
bwkaz is offline   Reply With Quote
Old 02-01-03, 06:04 PM   #4
TenBaseT
Registered User
 
Join Date: Feb 2003
Posts: 4
Default

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

Hans
TenBaseT is offline   Reply With Quote
Old 02-26-03, 10:31 AM   #5
jeffmcclure
Registered User
 
Join Date: Feb 2003
Posts: 3
Default 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.
jeffmcclure is offline   Reply With Quote
Old 02-26-03, 12:07 PM   #6
bwkaz
Registered User
 
Join Date: Sep 2002
Posts: 2,262
Default

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.
__________________
Registered Linux User #219692
bwkaz is offline   Reply With Quote
Old 02-28-03, 07:14 AM   #7
rebus
Registered User
 
Join Date: Feb 2003
Location: Prague, Czech Rep.
Posts: 8
Default 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
rebus is offline   Reply With Quote
Old 02-28-03, 10:11 AM   #8
jeffmcclure
Registered User
 
Join Date: Feb 2003
Posts: 3
Default 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.
jeffmcclure is offline   Reply With Quote

Old 02-28-03, 11:35 AM   #9
ppieti
Registered User
 
Join Date: Feb 2003
Posts: 8
Default

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.
ppieti is offline   Reply With Quote
Old 02-28-03, 12:36 PM   #10
jeffmcclure
Registered User
 
Join Date: Feb 2003
Posts: 3
Default

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.
jeffmcclure is offline   Reply With Quote
Old 02-28-03, 05:12 PM   #11
rebus
Registered User
 
Join Date: Feb 2003
Location: Prague, Czech Rep.
Posts: 8
Default LD_ASSUME_KERNEL

LD_ASSUME_KERNEL=2.4.19 is the last that works for phoebe-3
rebus is offline   Reply With Quote
Old 03-03-03, 08:34 PM   #12
sphincter
Registered User
 
sphincter's Avatar
 
Join Date: Mar 2003
Posts: 154
Default

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.
__________________
It never gets easier, you just go faster. - Greg Lemond
sphincter is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
Red Hat null(limbo beta 3), guide to install Nvidia Drivers utiel NVIDIA Linux 21 09-30-02 06:32 PM
red hat 7.3 driver problems please help war18 NVIDIA Linux 7 09-16-02 01:25 PM

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


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