# nvidia-kernel driver won't work with RAM > 960MB

## Yama

Okay, here's what happened. I did a fresh installation of Gentoo on my system, an Athlon XP 2100+ with 1024MB of RAM. The kernel (gentoo-sources r5) was compiled for Athlons, but I had forgotten to turn on high-memory support (in the Processor type and features section of the kernel config). I didn't realise this at the time, and after a reboot I emerged nvidia-kernel and nvidia-glx. The NVIDIA drivers worked fine with my GeForce 3 Ti200, but then I realised that free was reporting that I only had 880MB RAM total. I recompiled my kernel, changing High memory support (CONFIG_NOHIGHMEM) to 4GB but keeping everything else the same. I rebooted into the new kernel, and all my memory was now visible.

Then things became screwy. The emerge nvidia-kernel nvidia-glx went fine, but X refused to start. The XFree86 nv driver worked fine. After reading through these fora, I decided to try changing some kernel options in the hope of fixing the problem. I've tried compiling for Pentium III and compiling without MTRR support, with high memory support and without. On these kernels the NVIDIA driver would only load when high memory is disabled.

This means that I have to choose between having all my RAM visible with mediocre graphics or having less RAM with a good graphics driver. I've chosen the latter, but I'm not too happy about it. Any ideas, people?

----------

## delta407

I'm running a GeForce 4 Ti 4400 on a dual P3 system with 1 GB of RAM and the full GB is being reported. It can work, it's just a matter of finding out why it doesn't want to.

----------

## Yama

 *delta407 wrote:*   

> I'm running a GeForce 4 Ti 4400 on a dual P3 system with 1 GB of RAM and the full GB is being reported. It can work, it's just a matter of finding out why it doesn't want to.

 Maybe that's because you have SMP? Is there anyone out there who has the NVdriver working with 1 CPU and >960MB RAM, with all of that RAM being detected?

----------

## Yama

I tried recompiling the kernel again (using gentoo-r7 this time round), leaving CONFIG_NOHIGHMEM at 4GB but this time modularising agpgart (the AGP driver), which before I had compiled into the kernel itself. I tried both with and without the module loaded. I also tried altering the NvAgp option in /etc/x11/XFree86config, trying all possible values (0-3). Still no luck  :Sad: 

delta407, would you please be so kind as to post your kernel .config file so that I may compare it with my own? It's probably too long for a forum like this so you can mail me at Yama_I@yahoo.com.au. Thanks.

----------

## delta407

E-mailed.

----------

## format c:

On my K7 with 1024 MB RAM single CPU the nvidia-driver and nvidia-glx work with the new vanilla 2.4.19 and with the gentoo-patched kernel.

curt@joy curt$ cat /proc/meminfo

        total:    used:    free:  shared: buffers:  cached:

Mem:  1058848768 1051144192  7704576        0 11538432 846032896

Swap: 1998700544   827392 1997873152

MemTotal:      1034032 kB

MemFree:          7524 kB

MemShared:           0 kB

----------

## fmalabre

Ram is so cheap nowadays...

----------

## delta407

 *fmalabre wrote:*   

> Ram is so cheap nowadays...

 

I picked up a pair of 512 MB sticks around February for $140 total, which was (and still is) an excellent deal.

----------

## fmalabre

That's amazing, I used to have 64Mb for this price few years ago, and I was at the top of the tech!

----------

## phong

 *fmalabre wrote:*   

> That's amazing, I used to have 64Mb for this price few years ago, and I was at the top of the tech!

 

Back in "the day" ram was like $45 bucks a meg, and it was that way for a long time (a couple years at least), then it started to drop really suddenly.  I was SO cool for having 8 megs in my beast 486 but it wasn't cheap.  I had Norton Commander and command.com, and a custom console font and a bunch of other little things stuffed in a big fat 1 meg ramdrive to speed things up.  Doom hardly had to touch the disk while playing...  Hyperdisk was the bomb, and I had the RAM to spare (and the guts to risk fat inconsistancies on a sudden untimely power outage).  Ahh, nostalgia.

----------

## fmalabre

Well, I remember before that, I had my first PC, a 8088, and I think my memory was like 128Kb, which was pretty good at this time...

You were rich to afford a 1Mb ram drive!

----------

## pjp

Wasn't this a thread about nvidia and more RAM than 960MB?  :Very Happy: 

----------

## fmalabre

Nvidia didn't exist at this time, and I was happy with my Hercule card.

Sorry, stop talking about unrelated subject...

----------

## Yama

Thank you so much delta407!

 *format c: wrote:*   

> On my K7 with 1024 MB RAM single CPU the nvidia-driver and nvidia-glx work with the new vanilla 2.4.19 and with the gentoo-patched kernel.
> 
> curt@joy curt$ cat /proc/meminfo
> 
>         total:    used:    free:  shared: buffers:  cached:
> ...

 

Hi format c:,

Do you think you could please post your kernel .config to me as well? That would help immensely, as I can compare it to my own .config. My e-mail address in Yama_I@yahoo.com.au. Thank you.

----------

## format c:

e-mailed

----------

## Yama

Everything's working now   :Very Happy: 

After comparing my .config file to that of delta407 and format c: (thanks guys), and doing lots of experimentation, I managed to get a 2.4.19-gentoo-r7 kernel that gives me the full 1024MB of RAM and works with the NVIDIA graphics drivers. As a cool side-effect, my system no longer hangs when I try fo switch to a virtual console and back again   :Smile: 

I compared my new working .config to the original one and found two main differences. Firstly, the new kernel is far more modularised. Secondly, the new kernel has Grsecurity completely turned off. I think that Grsecurity was the problem in the first place. The fact that the NVIDIA driver only worked with Highmem switched off was a red herring, and was the reason why I had so much trouble. Since this machine sits behind a separate firewall box, there's no pressing need for Grsecurity.

Thanks to all those who tried to help.

----------

## Pigeon

The "hang when switching to a virtual console and back again" is very, very likely because you had the riva framebuffer installed. (haven't seen your .config so I couldn't tell ya)  The damned thing is broken in so many ways it's ridiculous.  IMO it should get booted from the kernel until it goes after active development again...

----------

## Yama

 *Pigeon wrote:*   

> The "hang when switching to a virtual console and back again" is very, very likely because you had the riva framebuffer installed.

 That's right. My original kernel had the Riva framebuffer compiled into it. Not only did it freeze my system when I tried to switch to the console and back, it also refused to accept my 'vga=xxx' kernel boot parameters (which made the text look huge on my 21 in. monitor). I'm now using the standard VESA driver, and it works great.

What's the point in graphics chipset-specific drivers for the console, anyway? Isn't VESA enough for simple text?

----------

## Pigeon

 *Quote:*   

> That's right. My original kernel had the Riva framebuffer compiled into it. Not only did it freeze my system when I tried to switch to the console and back, it also refused to accept my 'vga=xxx' kernel boot parameters (which made the text look huge on my 21 in. monitor). I'm now using the standard VESA driver, and it works great.

 

Yup, it also probably made the cursor all green and stretched out whenever you quit X.  Prolly made giant huge bands across the screen if/when you used mplayer also. =)

As for what it's good for... I'm not entirely sure.  Maybe it works (and has better performance) for old Riva128's or something.  Definitely doesn't work on my TNT2, which is about 3 years old, and doesn't work for my geforce.

Come to think of it, I've never heard of it working for anyone, but have talked to plenty of people for whom it's broken.

----------

## Miles

I don't think it's grsecurity because I've got it working with the Gentoo kernel sources with 1GB RAM and the nvidia driver. If you're still interested in finding the root of the problem I'll send you my .config.

----------

## Yama

 *Pigeon wrote:*   

> Yup, it also probably made the cursor all green and stretched out whenever you quit X. Prolly made giant huge bands across the screen if/when you used mplayer also. =)

 That's the one! Except my cursor was red/orange, not green.  :Smile:  *Miles wrote:*   

> I don't think it's grsecurity because I've got it working with the Gentoo kernel sources with 1GB RAM and the nvidia driver. If you're still interested in finding the root of the problem I'll send you my .config.

 From comparing my 'before' and 'after' .config files, I'm pretty sure the problem lies with grsecurity. Grsecurity is a complex beast with loads of options. I wouldn't be surprised if one of those many options was the root of the problem. In that case, I was just unfortunate enough to have turned it on while you didn't and therefore escaped the problem. If I could get a look through your .config that'd be cool. My e-mail address (again) is Yama_I@yahoo.com.au. Thanks.

----------

## Miles

I've sent my .config.

----------

## format c:

I'm interested in a .config with working grsecurity too. Miles would you please so kind sent me ( pop.py@arcor.de ) your .config too? During install gentoo_1.4_beta I compiled a new, smaller kernel. Gnome starts in 6 sec. (with the nvidia-agp-driver, agp-rate 4x) now. Before gnome needs 10 sec. (gentoo_1.2) to come up. That seems to be o.k., but I've no working grsecurity.

----------

## Miles

Done.   :Smile: 

----------

## harv

This thread is rather old now, but I have a similar problem.

I added a 512MB module today so I got 1GB ram, added high memory support and the kernel booted up just fine and showed 1GB ram.. 

Trying to start X results in error messages about DMA, (framebuffer, LUT, context) changing at almost every try.

Rebooting to the old kernel without high memory support made X die even earlier with fatal io error 104 (connection reset by peer).

I've tried both 3123 and 4191 nvidia drivers.

running gentoo-sources 2.4.20-r1

Athlon XP 2200+

Asus MB with kt400 chipset

everything but the nvidia driver compiled into the kernel (not as modules), 

Running XFree's nv driver atm, which works fine.

Does anyone have any idea how to solve this?

----------

## hertog

Harv,

Exactly the same problem here.

I first thought it was the (second) pci card I had in the system, but reading your post, that is not the case...

Something else is amiss, dunno what....

You got any succes yet?

Gr.

Specs:

VIA KT333

GeForce 4 4600 (as primary display device)

SiS 6something (secondery, pci)

1G RAM

Hertog

----------

## harv

No luck yet.. but if you could send your kernel config to whale@linux.nu I could cross-ref it with mine and a friend of mine who got a working very similar setup, might show if we got something enabled or disabled that need to be changed..

----------

## harv

checked the difference between your, mine and my friend's kernel config and found some differences between our non working and my friends working config.

what my friend had:

apic=n

BLK_STAT (partition stats)=n

appletalk: bridge=y

RTC=n

IMON=m

EXECOUNT=y

USB_HID=m

USB_STORAGE=n

I tried lots of different configurations and all did result in the same DMA errors when trying to start X.

Any idea?

----------

## hertog

I would almost think that the APIC is the culprit somewhere.

Since I have less than good experiences with it, I guess... (on via, 2.4.19 kernels will do all kinda freaky stuff with USB ect when NOAPIC isn't added as kernel bootline) 

For the time I have switched to the NV drivers, but will try in a few hours some more things...

(first some real work needs to be done  :Smile: )

----------

## b3x

dual p3 800

1 gig ram

I actually had this all working fine ... but i just did a fresh install with 1.4 rc2 ... and now i am running into problems ... 

a get an error about "setting dma context" when starting X. as others experienced nv works fine.

currently i am recompiling kernel ... to remove riva framebuffer support to see if this fixes it. but, i had this compiled in before (though i never got it to work), so i am not optomistic.

----------

## hertog

The problems with the dma-contents started here when I upgraded to gentoo-sources (2.4.20) Might be a helpful pointer?

----------

## harv

My friend got it working with gentoo-sources 2.4.20-r1, but I've not tried to get it to work with any other kernel. maybe it's time to try some other kernels tomorrow after I've got some sleep..

----------

## mikemooney6023

I've developed this problem too, and it defintely occurred after a kernel upgrade to 2.4.20.

Recompiled the kernel a few times flipping on/off most of the things mentioned in this thread.  Also tried turning off that "High Mem IO" switch in General config, no luck.

Might try switching to the Nvidia AGPGART later.

Running a MSI Geforce  Ti4600  rev  163 on a MSI KT3 Ultra (via KT333 chipset) , 1gig ram

Anyone tried downgrading the Nvidia kernel driver to the 3xxx series?

----------

## hertog

Hey, we share our system specs Mike  :Smile:  unfortunatly, also the troubles  :Sad: 

BTW, the 'old' nvidia drivers have the same problems.

----------

## hertog

I just disabled the High Memory Support from 4GB to off, and now stuff works (and that is the only thing I changed in the kernel).

I also disabled hotplug and lm_sensors (the init.d things, not the kernel stuff), will reenable them now to check if stuff breaks because of that (unlikely, but you never know)

[edit1]

OK, hotplug enabled (all kind of bttv stuff loaded) and still working. Sensors is next.

[edit2]

And also is no problem.

Was a far fetched idea anyway  :Smile: 

[edit3]

Now for the tests to comple.. back to the old kernel, to check if it isn't some quirck that bugged me... And it is not working... cullprit seems to be the HighMem stuff.

[edit4]

Got it all working.

Here is the diff between the working and the not working .config:

```

big-iron root # diff /usr/src/linux/.config ~/config_not_working

69,70c69,70

< CONFIG_NOHIGHMEM=y

< # CONFIG_HIGHMEM4G is not set

---

> # CONFIG_NOHIGHMEM is not set

> CONFIG_HIGHMEM4G=y

72c72,73

< # CONFIG_HIGHMEM is not set

---

> CONFIG_HIGHMEM=y

> CONFIG_HIGHPTE=y

76a78

> # CONFIG_HIGHIO is not set

big-iron root #

```

here is my /etc/modules.d/nvidia:

```

big-iron root # cat /etc/modules.d/nvidia

# Nvidia drivers support

alias char-major-195 nvidia

alias /dev/nvidiactl char-major-195

# To tweak the driver the following options can be used, note that

# you should be careful, as it could cause instability!!

#

#   To enable Side Band Adressing:  NVreg_EnableAGPSBA=1

#

#   To enable Fast Writes: NVreg_EnableAGPFW=1

#

# To enable both for instance, uncomment following line:

#

options nvidia NVreg_EnableAGPSBA=1 NVreg_EnableAGPFW=1 NVreg_EnableVIA4x=1 NVreg_UpdateKernelAGP=1

big-iron root #

```

and last but not least, my /etc/X11/XF86Config:

```

big-iron root # cat /etc/X11/XF86Config

Section "ServerLayout"

        Identifier     "XFree86 Configured"

        Screen      0  "Screen0" 0 0

#       Screen      1  "Screen1" 0 0

        Screen      1  "Screen1" RightOf "Screen0"

        InputDevice    "Mouse0" "CorePointer"

        InputDevice    "Keyboard0" "CoreKeyboard"

EndSection

Section "ServerFlags"

        Option "Xinerama" "true"

EndSection

Section "Files"

        RgbPath      "/usr/X11R6/lib/X11/rgb"

        ModulePath   "/usr/X11R6/lib/modules"

        FontPath     "/usr/X11R6/lib/X11/fonts/misc/"

        FontPath     "/usr/X11R6/lib/X11/fonts/Speedo/"

        FontPath     "/usr/X11R6/lib/X11/fonts/Type1/"

        FontPath     "/usr/X11R6/lib/X11/fonts/CID/"

        FontPath     "/usr/X11R6/lib/X11/fonts/75dpi/"

        FontPath     "/usr/X11R6/lib/X11/fonts/100dpi/"

EndSection

Section "Module"

        Load  "extmod"

#       Load  "dri"

        Load  "dbe"

        Load  "record"

        Load  "xtrap"

        Load  "glx"

#       Load  "speedo"

#       Load  "type1"

#       Load  "ddc"

#       Load  "int10"

        Load  "v4l"

EndSection

Section "InputDevice"

        Identifier  "Keyboard0"

        Driver      "keyboard"

EndSection

Section "InputDevice"

        Identifier  "Mouse0"

        Driver      "mouse"

        Option      "Protocol" "auto"

        Option      "Device" "/dev/mouse"

EndSection

Section "Monitor"

        #DisplaySize      270   200     # mm

        Identifier   "Monitor0"

        VendorName   "API"

        ModelName    "4536"

        Option      "DPMS"

        HorizSync     31-54

        VertRefresh   50-110

EndSection

Section "Monitor"

        Identifier   "Monitor1"

        VendorName   "Monitor Vendor"

        ModelName    "Monitor Model"

#       DisplaySize  330   250     # mm

        HorizSync    30.0 - 68.0

        VertRefresh  47.0 - 120.0

EndSection

Section "Device"

        ### Available Driver options are:-

        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",

        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"

        ### [arg]: arg optional

        #Option     "SWcursor"                  # [<bool>]

        #Option     "HWcursor"                  # [<bool>]

        #Option     "NoAccel"                   # [<bool>]

        #Option     "TurboQueue"                # [<bool>]

        #Option     "FastVram"                  # [<bool>]

        #Option     "NoHostBus"                 # [<bool>]

        #Option     "ForceCRT2Type"             # [<str>]

        #Option     "ShadowFB"                  # [<bool>]

        #Option     "Rotate"                    # [<str>]

        #Option     "NoXvideo"                  # [<bool>]

        #Option     "Vesa"                      # [<bool>]

        #Option     "MaxXFBMem"                 # <i>

        #Option     "ForceCRT1"                 # [<bool>]

        #Option     "DSTN"                      # [<bool>]

        #Option     "XvOnCRT2"                  # [<bool>]

        #Option     "PanelDelayCompensation"    # <i>

        #Option     "TVStandard"                # <str>

        #Option     "UseROMData"                # [<bool>]

        #Option     "NoInternalModes"           # [<bool>]

        #Option     "UseOEMData"                # [<bool>]

        #Option     "BIOSFile"                  # <str>

        #Option     "NoYV12"                    # [<bool>]

        #Option     "CHTVOverscan"              # [<bool>]

        #Option     "CHTVSuperOverscan"         # [<bool>]

        #Option     "CHTVLumaBandwidthCVBS"     # <i>

        #Option     "CHTVLumaBandwidthSVIDEO"   # <i>

        #Option     "CHTVLumaFlickerFilter"     # <i>

        #Option     "CHTVChromaBandwidth"       # <i>

        #Option     "CHTVChromaFlickerFilter"   # <i>

        #Option     "CHTVCVBSColor"             # [<bool>]

        #Option     "CHTVTextEnhance"           # <i>

        #Option     "CHTVContrast"              # <i>

        #Option     "SISTVEdgeEnhance"          # <i>

        #Option     "SISTVAntiFlicker"          # <i>

        #Option     "SISTVSaturation"           # <i>

        #Option     "TVXPosOffset"              # <i>

        #Option     "TVYPosOffset"              # <i>

        #Option     "SIS6326TVAntiFlicker"      # <str>

        #Option     "SIS6326TVEnableYFilter"    # [<bool>]

        #Option     "SIS6326TVYFilterStrong"    # [<bool>]

        Identifier  "Card0"

        Driver      "sis"

        VendorName  "Silicon Integrated Systems [SiS]"

        BoardName   "86C326 5598/6326"

        BusID       "PCI:0:7:0"

EndSection

Section "Device"

        ### Available Driver options are:-

        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",

        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"

        ### [arg]: arg optional

        #Option     "DigitalVibrance"           # <i>

        #Option     "PageFlip"                  # [<bool>]

        #Option     "Dac8Bit"                   # [<bool>]

        #Option     "NoLogo"                    # [<bool>]

        #Option     "Overlay"                   # [<bool>]

        #Option     "UBB"                       # [<bool>]

        #Option     "Stereo"                    # <i>

        #Option     "WindowFlip"                # [<bool>]

        #Option     "SWcursor"                  # [<bool>]

        Option     "HWcursor" "true"            # [<bool>]

        #Option     "VideoKey"                  # <i>

        #Option     "NvAGP"                     # <i>

        #Option     "IgnoreEDID"  "True"        # [<bool>]

        #Option     "NoDDC"                     # [<bool>]

        Option     "ConnectedMonitor" "crt,crt"         # <str>

        #Option     "ConnectedMonitors"         # <str>

        #Option     "TVStandard"                # <str>

        #Option     "TVOutFormat"               # <str>

        #Option     "RenderAccel"               # [<bool>]

        #Option     "CursorShadow"              # [<bool>]

        #Option     "CursorShadowAlpha"         # <i>

        #Option     "CursorShadowXOffset"       # <i>

        #Option     "CursorShadowYOffset"       # <i>

        #Option     "UseEdidFreqs"              # [<bool>]

        #Option     "FlatPanelProperties"       # <str>

        Option     "TwinView" "True"            # [<bool>]

        Option     "TwinViewOrientation" "leftof"       # <str>

        Option     "SecondMonitorHorizSync" "30-70"     # <str>

        #Option     "SecondMonitorVertRefresh" "50-160"         # <str>

        Option     "MetaModes" "1024x768,1024x768"      # <str>

        #Option     "UseInt10Module" "True"     # [<bool>]

        #Option     "SwapReady"                 # [<bool>]

        #Option     "NoTwinViewXineramaInfo"    # [<bool>]

        #Option     "NoRenderExtension"         # [<bool>]

        #Option     "UseClipIDs"                # [<bool>]

        #Option     "CIOverlay"                 # [<bool>]

        #Option     "TransparentIndex"          # <i>

        #Option     "OverlayDefaultVisual"      # [<bool>]

        #Option     "NvEmulate"                 # <i>

        #Option     "NoBandWidthTest"           # [<bool>]

        Identifier  "Card1"

        Driver      "nvidia"

        VendorName  "nVidia Corporation"

        BoardName   "NV25 [GeForce4 Ti4600]"

        BusID       "PCI:1:0:0"

EndSection

Section "Screen"

        Identifier "Screen0"

        Device     "Card0"

        Monitor    "Monitor0"

        DefaultDepth 24

        DefaultBPP   32

        SubSection "Display"

                Depth     24

                Modes "1024x768"

        EndSubSection

EndSection

Section "Screen"

        Identifier "Screen1"

        Device     "Card1"

        Monitor    "Monitor1"

        DefaultDepth 24

        DefaultBPP   32

        SubSection "Display"

                Depth     24

                Modes "1024x768"

        EndSubSection

EndSection

```

So... for now I gotsta work with a little less memory  :Sad:  since the upper 150 (or so) MB are not used.

Gr.

Hertog

----------

## nemo_

hmm, I just noticed my system also does not detect all my RAM.

it shows I have 902492 Kb installed instead of 1Gb.

Since I also use grsec and the nvidia module, I think I'd rather leave it like that then go recompile everything in the hope to fix, unless someone could come up with a better explanation of the problem.

news, anyone ?

----------

## harv

I haven't tried your version.. but not having all ram didn't sound that tempting..

I did go back to my 2.5.47 (2.4.19 doesn't have support for my via ide chipset so its not very tempting option) kernel though and added highmem.

Everything worked very nicely so now I have nvidia drivers and 1GB ram working.. =)

----------

## pfeifer

lostlogix is using rmap 15b for gentoo-source 2.4.20-r1& lolo-sources...

I have found that you can keep highmem if you use lolo-sources 2.4.20 r1_rc2 and earlier. am working on how to fix in release.

Regards,

_j_

----------

## pfeifer

ok. here is the fix for highmem, rmap & nividia:

http://www.minion.de/files/NVIDIA_kernel-1.0-4191-2.5-tl.diff

that file is already in /usr/portage/media-video/nvidia-kernel/files/

just alter the ebuild to apply it (it only does it for 2.5 kernels right now)...

i've logged the bug and the fix on bugs... hopefully we'll find it in the portage tree soon.

regards,

_j_

----------

## linuxknight

I was wondering... does the xfree build in gentoo live 1.4rc2 support a geforce 2 mx/400 out of the box?  I don't know how to install Nvidia's modules, thats why I ask.  Oh yeah... will the new Gentoo work with vmware workstation 3.2?

----------

## hertog

 *cigaraficionado wrote:*   

> 
> 
> just alter the ebuild to apply it (it only does it for 2.5 kernels right now)...
> 
> 

 

That's a bit of a problem  :Smile:  I can't do 2.5 here (Promise RAID)...  :Sad:  So I'll just work with a little bit less of my memory until something new comes out.

----------

## pfeifer

ok, i guess i wasn't clear. when i said it only does it for the 2.5 kernels, i meant the latest ebuild (nvidia-kernel-1.0.4191-r1) only applies this patch to 2.5 kernel based systems. it does not try to apply it to 2.4 (or earlier).

the patch works fine w/ gentoo-sources-2.4.20-r1 & lolo-sources-2.4.20-r1. you just need to modify the nvidia-kernel-1.0.4191-r1.ebuild to apply the patch (ie. remove/modify the if statements in the patch). or get the sample ebuild from https://bugs.gentoo.org/show_bug.cgi?id=15722

regards,

_j_

----------

## linuxknight

nothing to do with the nv modules, but I had a problem with a realtek 8139 onboard lan in the pentium 3 livecd 2-4 build... it couldnt load the modules for it and I couldnt get it to work...  i need to get my pci lan adapter to work or im doomed.

----------

## hertog

 *linuxknight wrote:*   

> nothing to do with the nv modules, but I had a problem with a realtek 8139 onboard lan in the pentium 3 livecd 2-4 build... it couldnt load the modules for it and I couldnt get it to work...  i need to get my pci lan adapter to work or im doomed.

 

linuxknight

n00b

Joined: 15 Feb 2003

Posts: 2

Location: Hell

^^^^^^^^^

That you already are  :Wink: 

----------

## nemo_

I tried to apply the patch as suggested by cigaraficionado, (note that I had to disable the 'minor patch to enable rmap kernels' as both patches would not work together) and the module builds fine but I cannot load it on my 2.4.20-gentoo kernel :

```
/lib/modules/2.4.20-gentoo-r1/video/nvidia.o: unresolved symbol highmem_start_page

/lib/modules/2.4.20-gentoo-r1/video/nvidia.o: unresolved symbol kmap_prot

/lib/modules/2.4.20-gentoo-r1/video/nvidia.o: unresolved symbol kmap_pte

/lib/modules/2.4.20-gentoo-r1/video/nvidia.o: 

Hint: You are trying to load a module without a GPL compatible license

      and it has unresolved symbols.  Contact the module supplier for

      assistance, only they can help you.

/lib/modules/2.4.20-gentoo-r1/video/nvidia.o: insmod /lib/modules/2.4.20-gentoo-r1/video/nvidia.o failed

/lib/modules/2.4.20-gentoo-r1/video/nvidia.o: insmod nvidia failed
```

any idea ?

thanks !

----------

## pfeifer

nemo_ : can you try this please...

get the sample ebuild from bug 15722

name it nvidia-kernel-1.0.4191-r1.ebuild

put it in /usr/portage/media-video/nvidia-kernel/

emerge -C nvidia-glx nvidia-kernel

emerge nvidia-glx

see if that helps.

_j_

----------

## Maz

Thanks, it fixed my problems !

I had to make a -r2, seems there is already a r1.

Well, at least, I learned how the nvidia works with agp, dma, glx and such ...

Cheers Jay

----------

## b3x

worked for me too

thanks!

----------

## nemo_

hi cigaraficionado,

thanks for the support, but I'm getting the same problem with the ebuild from bugzilla (apparently this is the same as my modified ebuild).

I'm seeing these during compilation :

```
/usr/src/linux/include/linux/highmem.h: In function `bh_kmap':

/usr/src/linux/include/linux/highmem.h:20: warning: pointer of type `void *' used in arithmetic

nv.c:1249:47: warning: pasting "(" and "vma" does not give a valid preprocessing token

nv.c:1269:47: warning: pasting "(" and "vma" does not give a valid preprocessing token

nv.c:1353:69: warning: pasting "(" and "start" does not give a valid preprocessing token
```

and I'm getting the same errors as posted above when I try to load the module. I must still have an option compiled into my kernel that the module does not like ? grsec possibly ?

[edit: I disabled grsec and got the same results, so that's not the problem]

I guess I will have to go back to the 'no high mem' kernel and loose 100mb ram for now, if anyone can come up with an explanation please let me know  :Smile: 

----------

## Yama

Hi! I'm the guy who started this thread. I finally managed to fix things by turning off Grsecurity in my kernel. However, a very similar (but different) problem emerged a few months later. It occurred around the time I upgraded glibc to 2.3.1, so I initially thought glibc was to blame. After lots of experimenting with kernel configs, I discovered that I could have a stable system using Nvidia drivers if I turned highmem off, sacrificing just over 100MB of RAM (I have 1GB total).

I then came across cigaraficionado's bug report and updated nvidia-kernel ebuild. I compiled a new kernel, this time turning highmem back on, and installed the new ebuild. The updated ebuild had no effect -- using the Nvidia driver made my system unstable like before.

My hardware seems fine. Memtest86 detects no errors in my RAM (2x Corsair XMS 512MB DDR333 SDRAM). My GeForce 3 Ti200 card works perfectly in Windows and it worked perfectly in Gentoo until December, around the time I upgraded to glibc 2.3.1. I can't figure out where the true problem is, but I strongly suspect it lies with nvidia-kernel.

----------

## nemo_

 *Yama wrote:*   

> Hi! I'm the guy who started this thread. I finally managed to fix things by turning off Grsecurity in my kernel. However, a very similar (but different) problem emerged a few months later.

 

Hello Yama,

There's definitely something wrong with the nvidia driver, as I'm seeing the same segfaults you are getting, alltho not nearly as bad (no apps crash, only during very long compiles like the sun jdk, qt or some kde packages). I did however succeed in compiling them when X wasn't running, and I'm sure my hardware is ok as well. Guess we'll have to be patient ..

----------

## puggy

Have you solved this problem? You know you have to re-emerge nvidia-kernel and nvidia-glx if you recompile the kernel?

Puggy

----------

## Yama

 *puggy wrote:*   

> Have you solved this problem? You know you have to re-emerge nvidia-kernel and nvidia-glx if you recompile the kernel?

 Yes, I know that. No, I haven't solved the problem yet. I think I'll have to wait for Nvidia to fix their drivers.  :Sad: 

----------

## dylix

so as it stands now, there is no way to fix this problem?

----------

## zhenlin

Interestingly, 960MB+64MB = 1024MB = 1GB

This probably means there is something hardcoded into the drivers, probably AGP arpeture mapping to a block with an upper limit just under the 1 GB mark.

I think it is the same for nvidia for Windows though...

----------

## delta407

 *zhenlin wrote:*   

> Interestingly, 960MB+64MB = 1024MB = 1GB

 960 MB is also the upper limit for machines running without 4 GB high memory support.

All I can tell you is that a GeForce 3 or 4 works in several of my boxen with >= 1 GB of RAM. After configuring the kernel with 4 GB highmem support, each of them sees their entire physical address space and has a functioning nVidia driver.

----------

## Yama

 *delta407 wrote:*   

>  *zhenlin wrote:*   Interestingly, 960MB+64MB = 1024MB = 1GB 960 MB is also the upper limit for machines running without 4 GB high memory support.

 Yes, that's what I meant when I started the thread. I had to turn off highmem in the kernel to get things working stably.

 *delta407 wrote:*   

> All I can tell you is that a GeForce 3 or 4 works in several of my boxen with >= 1 GB of RAM. After configuring the kernel with 4 GB highmem support, each of them sees their entire physical address space and has a functioning nVidia driver.

 What kernel are you using? As I've mentioned above, I've tried vanilla 2.4.19 and 2.4.20 (manually patched with EVMS, since my system is based on it), and various versions of gentoo-sources. Could you please post me your kernel .config file? My e-mail address is Yama_I at yahoo dot com dot au

----------

## Yama

I decided to give things a shot again, this time with a gentoo-sources-2.4.20-r2 kernel, nvidia-kernel-1.0.4349-r1 and nvidia-glx-1.0.4349. I compiled the kernel with highmem support, rebooted into it, compiled nvidia-kernel and nvidia-glx for that kernel, loaded the nvidia module and then started X. The problem was still there. GNOME would load, but many applets and other apps would segfault. The story was the same in KDE and Fluxbox.

I compiled another gentoo-sources-2.4.20-r2 kernel, but this time without highmem. As expected, everything worked fine with that kernel, but the free command said I only had 883MB of RAM (I have 1024MB installed).

Going back to the original gentoo-sources-2.4.20-r2 kernel I had (the highmem one), I began to experiment with the mem= kernel boot parameter. I had no problems with mem=800, mem=840 and mem=880, but the segfaults returned when I used mem=900 and mem=920.

Could this mean that I have bad RAM? Memtest86 says my memory is fine, but I still get the occasional segfault when compiling. My memory consists of 2x 512MB sticks of Corsair XMS2700 DDR SDRAM.

----------

## anarchist

weird, i have exactly the same problem as you have got, ... and i can't figure out how to solve it ... it start to think that there is no way of solving it, and it cant be bad ram ... 9 hours of memtest86 can't be wrong i suppose? 

Have you tried just a plain vanilla kernel without any patches? i tried the ck-sources and the xfs-sources and both give me those segfaults from time to time it is not too often but sometimes xmms just segfaults which is really annoying. and i could live with wasting 64 megs of mem but not with wasting over 100megs... because if i compile the kernel without highmem support, just 880 megs are allocated and it doesn't matter how much i pass to the kernel with the mem option the maximum then is 880 and thats way too much loss for me ...

----------

## Yama

 *anarchist wrote:*   

> weird, i have exactly the same problem as you have got, ... and i can't figure out how to solve it ... it start to think that there is no way of solving it, and it cant be bad ram ... 9 hours of memtest86 can't be wrong i suppose?

 I've got no problems with memtest86, either. In my last post I said that I received the occasional segfault while compiling. Just in case, I pulled my RAM timings back a bit. Now I get no segfaults at all, but this Nvidia problem remains. *anarchist wrote:*   

> Have you tried just a plain vanilla kernel without any patches?

 I've tried a vanilla kernel with only EVMS patches (I need them for my system to work). Still no luck.

It's annoying that I wasted so much money on this Corsair XMS2700 DDR SDRAM only to find that I can't use over 10% of it   :Crying or Very sad:  I think I'll try to get my RAM replaced under warranty.

----------

## anarchist

@yama

mhhh well but im absolutely sure that the ram can't be the problem, 9 hours of memtest and no error just can't lie the problem has to be elsewhere is suppose well but just to check it, i will reduce my timings too a bit

----------

## Yama

 *anarchist wrote:*   

> im absolutely sure that the ram can't be the problem, 9 hours of memtest and no error just can't lie

 Memtest86 isn't perfect. There are some errors that only a dedicated memory testing device can detect.

----------

## anarchist

mhhh well okay i will test with the timings a little lower...

----------

## anarchist

im testing right now with the so called memtester and my favorite program to fail "xmms" i will now drive to my nice biologie lessons in school and i'll be back in about 1:30 hours ... im courious if xmms is still running then  :Wink: 

timings are right now at 6 2 2 2 and 200mhz fsb which means 400mhz ram clock speed

----------

## Yama

 *anarchist wrote:*   

> timings are right now at 6 2 2 2 and 200mhz fsb which means 400mhz ram clock speed

 By the looks of it, you're running your RAM quite hard (unless it's RD-RAM?), but theoretically it shouldn't matter if you RAM tests out fine. I doubt that Memtester will find anything if Memtest86 can't see any errors. Do you ever get segfaults when compiling? Gcc can be good stress-tester, particularly when compiling something complex like a kernel, qt, openoffice.org or itself. Try reading the Linux Hardware Stability Guide [Part 1 | Part 2] and trying out the tests mentioned there.

----------

## anarchist

i did, i actually ran right now rc5-72 + memtester + xmms (which was always segfaulting for me) i will right now recompile my kernel just for fun and have a look what happens ... 

Acutally this ram is running hard, but it has always been like that and it is really some good german quality ram  :Smile:  (infineon).

But right now it seems like everything is going fine, i have an nforce 2 board and i didn't just lower one timing, i also changed one ram slot so that slots 2 and 3 (the blue ones on the a7n8x) are occupied and till now everything works 

And i ran memtester just for one reason, to get my mem filled up to the maximum which the memtester did without problems or reckognising something ... 

Well trying a kernel compilation right now done, no segfaulting or similar problems ... looking really good im not sure if the timing is responsible, or if one of my rams was not really stuck in the dimm bank, but i don't care  :Wink:  if its running i like it  :Wink: 

----------

## Dalcius

I _just_ finished getting X and GNOME up, but so far in, I haven't had any problems.

Hardware:

ASUS A7N8X

1 GB Corsair PC2700

MSI GeForce 4 Ti4400 128MB

Software:

gaming-sources 2.4.20-rc2

xfree 4.3.0-r2

nvidia-(glx|kernel) 1.0.4363

Kernel setup:

4G mem support, HIGHMEM I/O on

Software config:

modules.autoload contains "nvidia"

X: driver: nv  GLX: on

If anyone wants anything else, kernel config, XF86Config, etc., let me know (by email preferably: duckmanins@hotmail.com) and I'll send them along.  I'll post here again if I have any problems.[/url]

----------

## paranode

Has anyone yet had this problem and resolved it?  I just installed more memory on a working machine, and it booted into it fine.  As soon as I enabled high memory support in the kernel X stopped working with the nvidia driver.  It will still work with the nv driver but no 3D or anything.  I'd really like to use the accelerated drivers and not waste RAM (about 400MB wasted in my case).  Thanks for any tips or info.

----------

## Fat Elvis

Ok, I had the same problems, and this is how I solved it -- and it seems to work just fine now. I had more RAM than I was using (1.5GB and I was using a standard kernel without the extra memory enabled) - and when I enabled the kernel everything worked EXCEPT the Nvidia driver.

I tried all the solutions on this thread and I wasn't having any joy with any of them so I looked further and found this:

http://www.nvnews.net/vbulletin/showthread.php?threadid=12222 :

 *Quote:*   

> Did you change the EXTRAVERSION in the Makefile in the kernel source directory before you started? You should, otherwise you'll run into problems when you get a combination of kernel version files hanging around (in /lib/modules, in the source tree, and in other places). Did you do a make mrproper before reconfiguring the kernel? (save your config file somewhere else before mrproper'ing.)

 

Basically I just did this:

```

cd /usr/src/linux

mv .config ~

make mrproper

mv ~/.config ./

edited /usr/src/linux/Makefile

changed "EXTRAVERSION = -gentoo-r5" to "EXTRAVERSION = -gentoo-r5-test"

make bzImage modules modules_install

copied my new kernel to /boot, setup grub, rebooted

emerge nvidia-kernel

startx and w00t! It works!

```

I've changed the kernel before (and didn't go thru those steps) and never had a problem - but it seems that enabling the extra memory is a real problem if you have old non-highmem files hanging around, as stated in the quote from the nvnews.net site.

----------

