nV News Forums


nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=14)
-   -   v2.6.0, 53.36, unable to map framebuffer. (http://www.nvnews.net/vbulletin/showthread.php?t=24193)

gilboa 01-29-04 01:04 AM

v2.6.0, 53.36, unable to map framebuffer. (Solved!)
1 Attachment(s)
Just installed the 53.36 drivers. Install went just fine. (--no-rpms option selected) modprobe nvidia works with both nvidia and agpgart loaded without a problem.
However, when I try to start X, it fails with an "Failed to map framebuffer memory" error. And in the kernel log I get two errors:
"0: NVRM: AGPGART: unable to retrieve symbol table"
"0: NVRM: couldn't find pre-allocated memory!"
(agp mmap fails?!?!?)

The machine worked just fine with the same kernel configuration using the minion.de patched 44.96 drivers.

Machine: Dual Athlon MP 2400, 1GB, SCSI RAID, GF5900/256MB.
OS: RedHat 9, Hand built 2.6.0 kernel (I'll upgrade to 2.6.1 later this week).

I've attached the XFree log file.

gilboa 01-29-04 01:23 AM

I should add that I must manually insmod the nvidia driver before starting the X. Unless I manually load the driver, X will fail on a "Failed to initialize the NVIDIA kernel modules" error. (I had the same error on v44.96.)


gilboa 01-29-04 02:47 AM

2.6.1 produces the same problem. (Must load the nvidia driver by hand; NVRM fails to find pre-allocated memory.)

Tried Option NvAGP 1/2/3 in XF86Config. Neither worked.


gilboa 01-29-04 09:44 AM

OK. I checked the nVidia driver code and it seems that it failes to load symbols from the AGPGART.
I recompiled the AGPGART into the kernel... but still no go.

agpgart: Found an AGP 2.0 compliant device at 0000:00:00.0.
agpgart: Putting AGP V2 device at 0000:00:00.0 into 4x mode
agpgart: Putting AGP V2 device at 0000:01:05.0 into 4x mode
0: NVRM: couldn't find pre-allocated memory!


Andy Mecham 01-29-04 03:15 PM

I'm looking into this.


gilboa 01-30-04 04:19 AM


I've added a couple of printk's to the AMD 760 AGP and into the AGPGART.
As far as I can see, amd-k7-agp does call the agp_add_bridge, which in turn, calls the inter_module_register function. (which registers the drm_agp.)
The nvidia driver inter_module_get_request should not fail!!!

What the **** am I missing here?!?!? Argh!

More on that later... :(

EDIT: Found the source of one problem (after printk'ing it to death :D): when I manually load the amd-k7-agp driver, the backend is being called and inter_module_get_request returns a valid pointer.
Now remains the second problem "couldn't find pre-allocated memory".

Looking into it now...

Edit 2: Things just got worse.
Uninstalled the drivers, tried reverting to the old configuration (2.6.0, 44.96/minion.de) and I'm getting the same problem.
I'm getting a new error before the "couldn't find pre-allocated memory" error.
NV: bad offset / length into frame buffer: 0x0 0xff00000 0x4000000.

Lesson to self, setup a second 2.6 machine to act as a guinea pig, before blowing the main production workstation :(

gilboa 01-30-04 02:32 PM

1 Attachment(s)
Latest XFree86.0.log...
(Just in case...)

gilboa 02-03-04 01:36 AM

I've compiled the drives with NVDEBUG=1 and this is the output.

[root@gilboa-home-dev gilboa]# cat /proc/mtrr
reg00: base=0x00000000 ( 0MB), size=1024MB: write-back, count=1
reg01: base=0xb8000000 (2944MB), size= 64MB: write-combining, count=1
[root@gilboa-home-dev gilboa]# dmesg -c
[root@gilboa-home-dev gilboa]# modprobe nvidia
[root@gilboa-home-dev gilboa]# X

XFree86 Version 4.3.0 (Red Hat Linux 9 release: 4.3.0-2.90.43)
Release Date: 15 August 2003
X Protocol Version 11, Revision 0, Release 6.6
Build Operating System: Linux 2.4.21-2.ELsmp i686 [ELF]
Build Date: 07 November 2003
Build Host: porky.devel.redhat.com
Module Loader present
OS Kernel: Linux version 2.6.1 (root@gilboa-home-dev) (gcc version 3.2.2 2003022
2 (Red Hat Linux 3.2.2-5)) #2 SMP Fri Jan 30 19:43:20 IST 2004 P
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/XFree86.0.log", Time: Tue Feb 3 09:34:20 2004
(==) Using config file: "/etc/X11/XF86Config"
(EE) NVIDIA(0): Failed to map framebuffer memory
(EE) NVIDIA(0): *** Aborting ***

Fatal server error:
AddScreen/ScreenInit failed for driver 0

[root@gilboa-home-dev gilboa]# rmmod nvidia
[root@gilboa-home-dev gilboa]# dmesg -c
nvidia: module license 'NVIDIA' taints kernel.
1: nvidia: loading NVIDIA Linux x86 NVIDIA Kernel Module 1.0-5336 Wed Jan 14 1
8:29:26 PST 2004
agpgart: Found an AGP 2.0 compliant device at 0000:00:00.0.
agpgart: Putting AGP V2 device at 0000:00:00.0 into 4x mode
agpgart: Putting AGP V2 device at 0000:01:05.0 into 4x mode
0: NVRM: couldn't find pre-allocated memory!
1: memory allocations:
1: total amount allocated: 0x0
1: memory allocations:
1: total amount allocated: 0x0
1: memory allocations:
1: total amount allocated: 0x0
1: final mem usage: vm 0x0 km 0x0 fp 0x0
[root@gilboa-home-dev gilboa]#

This didn't enable all the trace messages... going into the code again.

zander 02-03-04 03:03 AM

The problem looks to be that the card misreports the amount of installed video memory: the second PCI base address register reads back 64MB, which is what the kernel side of the NVIDIA driver will be referring to. When the NVIDIA XFree86 driver module attempts to map 256MB, the range isn't recognized by IS_FB_OFFSET() in nv_kern_mmap(), since it exceeds the probed 64MB; this also leads to the couldn't find pre-allocated memory error message. You could try fiddling nvos_probe_devices() to report 256MB, assuming the card really does have that much video memory installed. You'd also want to correct the corresponding MTRR entry. In any case, you'll want to contact the card's vendor requesting that the problem be fixed.

gilboa 02-03-04 07:24 AM

First, thanks for the help!

Reading your commenct I decided to re-check the mtrr settings and found the following:
mtrr: your CPUs had inconsistent fixed MTRR settings
mtrr: probably your BIOS does not setup all CPUs.
mtrr: corrected configuration.

Will rewriting the mtrr settings using the /proc interface solve the problem?
$echo "reg01: base=0xb8000000 size=0x10000000 type=write-combining" > /proc/mtrr
(Hardcoding the driver to detect 256MB seems like a lousy idea...)


zander 02-03-04 07:45 AM

You'll need to delete the old MTRR entry first, the command should be echo "base=0xb8000000 size=0x10000000 type=write-combining" > /proc/mtrr and no, it won't solve the actual problem; you'll want to override the probed value.

gilboa 02-03-04 07:58 AM

Sadly enough I'm at work now and my damn work firewall blocks my SSH access to my home network (baaah!) so I can't access the said machine.

Aside from hard coding the probed values, how can change the probed video memory window size? Is it a video card BIOS problem?
(The card is an Albartron FX5900QV Turbo 256MB card and Albatron doesn't have any BIOS upgrade for it.)


All times are GMT -5. The time now is 01:12 PM.

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