Go Back   Rage3D » Rage3D Discussion Area » Rage3D Computer Forum » Linux » Drivers
Rage3D Subscribe Register FAQ Members List Calendar Mark Forums Read

Drivers Discussion forum for Linux drivers.

Reply
 
Thread Tools Display Modes
Old Oct 14, 2005, 01:47 AM   #1
Advertisement (Guests Only)
Login or Register to remove this ad
SilverTab
Newbie
 
Join Date: Oct 2005
Posts: 8


Exclamation Weird mtrr allocation error...

I tried searching the forums but didnt find a thread corresponding exactly to my problem (I did came accross the multiple mtrr allocation threads ...)

anyway, I have a Radeon 9559 and I have Ubuntu 5.10 installed with all the required driver ( I followed the howto from ubuntu forum...seemed to be working for most of the people)... I installed the driver, ran fglrxconfig, then rebooted, and I still get the Mesa driver when I use fglrxinfo....

Here is the result of dmesg | grep fglrx
Code:
[4294755.314000] fglrx: module license 'Proprietary. (C) 2002 - ATI Technologies, Starnberg, GERMANY' taints kernel.
[4294755.319000] [fglrx] Maximum main memory to use for locked dma buffers: 930 MBytes.
[4294755.320000] [fglrx] module loaded - fglrx 8.16.20 [Aug 16 2005] on minor 0
[4294755.334000] [fglrx:firegl_addmap] *ERROR* mtrr allocation failed (-22)
[4294755.335000] [fglrx] Internal AGP support requested, but kernel AGP support active.
[4294755.335000] [fglrx] Have to use kernel AGP support to avoid conflicts.
[4294755.335000] [fglrx] Kernel AGP support doesn't provide agplock functionality.
[4294755.335000] [fglrx] AGP detected, AgpState   = 0x1f004a1b (hardware caps of chipset)
[4294755.335000] [fglrx:firegl_unlock] *ERROR* Process 8845 using kernel context 0
I though it was just a regular allocation problem so I tried to follow the howto posted on this forum, however, here is the weird part:
result of cat /proc/mtrr only shows:
reg00: base=0x00000000 ( 0MB), size=984064MB: write-back, count=1


which I assume is my ram....

nothing else is showing up...
anyone have an idea on what's going on?? why is nothing else showing up??
SilverTab is offline   Reply With Quote
Old Oct 14, 2005, 10:05 AM   #2
SilverTab
Newbie
 
Join Date: Oct 2005
Posts: 8


Default

One more thing here's part of my /var/log/Xorg.0.log:

(EE) fglrx(0): [agp] unable to acquire AGP, error "xf86_EINVAL"
(EE) fglrx(0): cannot init AGP
(II) fglrx(0): [drm] removed 1 reserved context for kernel
(II) fglrx(0): [drm] unmapping 8192 bytes of SAREA 0xf8bfb000 at 0xb7ab8000
(WW) fglrx(0): ***********************************************
(WW) fglrx(0): * DRI initialization failed! *
(WW) fglrx(0): * (maybe driver kernel module missing or bad) *
(WW) fglrx(0): * 2D acceleraton available (MMIO) *
(WW) fglrx(0): * no 3D acceleration available *
(WW) fglrx(0): ********************************************* *


this part seems to be the error??
(EE) fglrx(0): [agp] unable to acquire AGP, error "xf86_EINVAL"
SilverTab is offline   Reply With Quote
Old Oct 14, 2005, 10:26 AM   #3
offby1
Newbie
 
Join Date: Oct 2005
Posts: 5


Default

I'm getting the same thing, but I have a bit more in my dmesg output (Note the highlights):
Code:
[4294739.156000] fglrx: module license 'Proprietary. (C) 2002 - ATI Technologies, Starnberg, GERMANY' taints kernel.
[4294739.157000] [fglrx] Maximum main memory to use for locked dma buffers: 928 MBytes.
[4294739.157000] ACPI: PCI Interrupt 0000:01:00.0[A] -> GSI 16 (level, low) -> IRQ 16
[4294739.157000] [fglrx] module loaded - fglrx 8.18.6 [Oct 11 2005] on minor 0
 [4294739.180000] mtrr: type mismatch for e8000000,8000000 old: write-back new: write-combining
[4294739.180000] [fglrx:firegl_addmap] *ERROR* mtrr allocation failed (-22)
[4294739.181000] [fglrx] Maximum main memory to use for locked dma buffers: 928 MBytes.
[4294739.181000] [fglrx] Internal AGP support requested, but kernel AGP support active.
[4294739.181000] [fglrx] Have to use kernel AGP support to avoid conflicts.
[4294739.181000] [fglrx] AGP detected, AgpState   = 0x1f004a1b (hardware caps of chipset)
 [4294739.181000] mtrr: type mismatch for f8000000,4000000 old: write-back new: write-combining
[4294739.181000] [fglrx:firegl_unlock] *ERROR* Process 9418 using kernel context 0
offby1 is offline   Reply With Quote
Advertisement (Guests Only)
Login or Register to remove this ad
Old Oct 14, 2005, 10:40 AM   #4
jec0s
Radeon HD 5750
 
Join Date: Feb 2005
Posts: 194


Default

Did you make sure to completely remove the ubuntu drivers that might of been installed previously, including linux-restricted-modules..
Well.. right now.. I can't get X to run with new fglrx module anymore (funny cause it ran fine for a while) (EE) No devices detected.
I'm just gonna wait till its in ubuntu-backports now, cause its not building right with the installer..
__________________


Last edited by jec0s : Oct 14, 2005 at 11:08 AM.
jec0s is offline   Reply With Quote
Old Oct 14, 2005, 11:13 AM   #5
SilverTab
Newbie
 
Join Date: Oct 2005
Posts: 8


Default

Quote:
Originally Posted by jec0s
Did you make sure to completely remove the ubuntu drivers that might of been installed previously, including linux-restricted-modules..
Well.. right now.. I can't get X to run with new fglrx module anymore (funny cause it ran fine for a while) (EE) No devices detected.
I'm just gonna wait till its in ubuntu-backports now, cause its not building right with the installer..
Yup I tried that, no luck....

One interesting thing though, I found someone on ubuntu forum who had the same card as I have (9550)

and he gets the exact same errors...

lspci |grep ATI
0000:01:00.0 VGA compatible controller: ATI Technologies Inc: Unknown device 4153
0000:01:00.1 Display controller: ATI Technologies Inc: Unknown device 4173
SilverTab is offline   Reply With Quote
Old Oct 14, 2005, 03:19 PM   #6
hubick
Radeon HD 5450
 
Join Date: Dec 2004
Location: Canada Edmonton, Alberta, Canada
Posts: 23


Default

When the driver attempts to allocate it's own write-combining MTRR region(s) for your video RAM, it is conflicting with the existing write-back region.

I wrote some information about how MTRR's work, and how I fixed mine, here:
http://www.rage3d.com/board/showthread.php?t=33821469

In short, you need to remove the existing MTRR(s), find out the address(s) of your video RAM the driver is trying to create MTRR(s) for, and recreate your MTRR table with a write-combining region(s) in that spot.
hubick is offline   Reply With Quote
Old Oct 24, 2005, 06:32 PM   #7
complex
Newbie
 
Join Date: Oct 2005
Posts: 1


Talking

I faced with the same problem 2 days ago. Finally I managed to setup a working configuration.

HARDWARE:

Gigabyte GA-8IPE1000 Pro2 mainboard with latest BIOS update
Intel Pentium 4 3.0GHz HT processor
Gigabyte ATI Radeon 9550

SOFTWARE:

Debian 3.1 - Sarge, stable (partially unstable to install OpenOffice.org 2.0)XFree86 4.3.0.1
ATI Proprietary Display Driver 8.18.6 (built using the debian-way)
Custom 2.6.13.4 kernel.
The fglrx kernel module has been built from source package.

RELEVANT KERNEL CONFIGURATION OPTIONS:

CONFIG_MTRR=y
CONFIG_AGP=y # All AGP support modules are turned off! Only AGP support is ON!!!
CONFIG_DRM is not set

SYMPTOM:

dmesg and XFree86.0.log reports MTRR errors and disables direct rendering (accelerated OpenGL). 2D acceleration works fine.

TEST:

$ cat /proc/mtrr
reg00: base=0x00000000 ( 0MB), size=984064MB: write-back, count=1

The exact size may differ slightly, but always a large value, abour 1TB!
(984064MB is about 984GByte ~ 1TB)

This value is surely wrong, since a tipical machine has about 128Mb..2Gb memory.

CAUSE:

It seems that some BIOSes sets wrong MTRR values. The mainboard above is a real-world example. The wrong MTRR write-back region is larger than the 4Gbyte address space. This conflicts with ANY new MTRRs set by X or other driver/application.

SOLUTION:

We must clear the wrong and conficting MTRR entry on every boot with an rcS.d init script.

Create a text file named fix_mtrr in /etc/init.d and copy this text into it:

#!/bin/sh
# Fix wrong MTRR setting
echo "disable=0" >| /proc/mtrr
echo "base=0x0 size=0x40000000 type=write-back" >| /proc/mtrr

Replace 0x40000000 with the size of your main memory (not video memory)! Help:

0x08000000 = 128Mb
0x10000000 = 256Mb
0x40000000 = 1Gb
0x60000000 = 1.5Gb
0x80000000 = 2Gb

Add execute privileges:

chmod +x /etc/init.d/fix_mtrr

Create a symlink: /etc/rcS.d/S02fix_mtrr
The symlink must point to: ../init.d/fix_mtrr

Reboot your system.

It the kernel options above are set correctly and your ATI driver is configured properly, then 2D and 3D acceleration sould work fine.

TEST:

Your can run:

$ cat /proc/mtrr

Your should get something like:

reg00: base=0x00000000 ( 0MB), size=1024MB: write-back, count=1
reg01: base=0xd0000000 (3328MB), size= 128MB: write-combining, count=1
reg02: base=0xf0000000 (3840MB), size= 128MB: write-combining, count=1

Your can run:

$ fglrxinfo

You sould get something like:

display: :0.0 screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: RADEON 9550 Generic
OpenGL version string: 1.3.5395 (X4.3.0-8.18.6)

The above solution should work in ANY situation when the BIOS sets wrong MTRRs.

Greetings, Complex

Last edited by complex : Oct 24, 2005 at 06:34 PM. Reason: Spelling mistake
complex is offline   Reply With Quote
Old Oct 25, 2005, 12:51 AM   #8
armandchinkwiejoe
Newbie
 
Join Date: Jan 2005
Posts: 7


Default

Yeah,
I just figured out the same thing last night.
echo 'disable=0' |>/proc/mtrr
echo 'base=0x00000000 size=0x400000000 type=write-back' |> /proc/mtrr
This is main memory
echo 'base=0xd0000000 size=0x8000000 type=write-combining' |> /proc/mtrr
This is the vga card.

Works great!
Armand
armandchinkwiejoe is offline   Reply With Quote
Old Oct 28, 2005, 08:06 AM   #9
aqua
Radeon HD 5570
 
Join Date: Oct 2004
Posts: 42


Exclamation

Hi guys
I wonder if you could help me a little more with this mtrr problem!?
I created the file /etc/init.d/fix_mtrr like this:
Code:
#!/bin/sh
 # Fix wrong MTRR setting
 echo "disable=0" >| /proc/mtrr
 echo "base=0x00000000  size=0x20000000 type=write-back" >| /proc/mtrr
 echo "base=0x00000000  size=0x08000000 type=wtite-combining" >| /proc/mtrr
And the link: /etc/init.d/rcS.d/S02fix_mtrr.
I have 512Mb mem and 9800Pro (Which has Xt core R360) 128Mb.
Nothing changes and the mtrr file still has the same one line:
reg00: base=0x00000000 ( 0MB), size=983552MB: write-back, count=1
I've SuSE 10, don't know if that's the problem. Can you tell me if I'm doing it right or not? I've tried with menu.1st: nomtrr , mtrr, wram 128 and all other changes I've found i other threads with no luck. And I don't understand if it's bios reporting wrong, then how come memtest or win2k or win xp and even win98 gets the right amount of memory!? Another question:" Does enabling or disabling bios and video cache in bios have anything to do with this problem"? Thanks

Last edited by aqua : Oct 28, 2005 at 08:22 AM.
aqua is offline   Reply With Quote
Old Oct 28, 2005, 05:53 PM   #10
e88z4
Radeon HD 5670
 
Join Date: Jan 2005
Location: Canada
Posts: 83


Default

Quote:
Originally Posted by aqua
Hi guys
I wonder if you could help me a little more with this mtrr problem!?
I created the file /etc/init.d/fix_mtrr like this:
Code:
#!/bin/sh
 # Fix wrong MTRR setting
 echo "disable=0" >| /proc/mtrr
 echo "base=0x00000000  size=0x20000000 type=write-back" >| /proc/mtrr
 echo "base=0x00000000  size=0x08000000 type=wtite-combining" >| /proc/mtrr
And the link: /etc/init.d/rcS.d/S02fix_mtrr.
I have 512Mb mem and 9800Pro (Which has Xt core R360) 128Mb.
Nothing changes and the mtrr file still has the same one line:
reg00: base=0x00000000 ( 0MB), size=983552MB: write-back, count=1
I've SuSE 10, don't know if that's the problem. Can you tell me if I'm doing it right or not? I've tried with menu.1st: nomtrr , mtrr, wram 128 and all other changes I've found i other threads with no luck. And I don't understand if it's bios reporting wrong, then how come memtest or win2k or win xp and even win98 gets the right amount of memory!? Another question:" Does enabling or disabling bios and video cache in bios have anything to do with this problem"? Thanks
You have to insert the script just before the X start. The way I did it is editing the my GDM initalization script. I also reload fglrx module after MTRR is reallocated.
At least this method works for me.
__________________
Debian SID
Intel 875P, P4 3.0 Prescott, Radeon 9700 Pro, 2x512GB PC3200, 160GB SATA, Debian Sid, Xorg 7.1

e88z4 is offline   Reply With Quote
Old Oct 31, 2005, 01:42 AM   #11
armandchinkwiejoe
Newbie
 
Join Date: Jan 2005
Posts: 7


Default

[quote=aqua]Hi guys
I wonder if you could help me a little more with this mtrr problem!?
I created the file /etc/init.d/fix_mtrr like this:
Code:
#!/bin/sh
# Fix wrong MTRR setting
echo "disable=0" >| /proc/mtrr
echo "base=0x00000000 size=0x20000000 type=write-back" >| /proc/mtrr
echo "base=0x00000000 size=0x08000000 type=wtite-combining" >| /proc/mtrr
And the link: /etc/init.d/rcS.d/S02fix_mtrr.
I have 512Mb mem and 9800Pro (Which has Xt core R360) 128Mb.
[End QUATE]

I use echo "disable=0" |> /proc/mtrr. | comes before >.
And also the base address of the vga card can not be the same as the memory. Check out lspci -v to find the base for the vga.

The file fix_mtrr is put in /etc/init.d and edit boot.local (in init.d) the execute that file. That is the way SuSE recommends it.

If you dare:
init 3
log is as root
cat /proc/mtrr
echo "disable=0" |>/proc/mtrr
cat /proc/mtrr (this will be extremely slow!)
echo "base=0x00000000 size=0x20000000 type=write-back" |>/proc/mtrr
cat /proc/mtrr

Then you can see if the command is correct.

Armand

Last edited by armandchinkwiejoe : Oct 31, 2005 at 01:45 AM.
armandchinkwiejoe is offline   Reply With Quote
Old Nov 1, 2005, 03:45 PM   #12
aqua
Radeon HD 5570
 
Join Date: Oct 2004
Posts: 42


Default

Thanks guys. I just installed Mandriva 2005, rpm'd ATI's rpm, reboot, changed "radeon" to "fglrx", reboot, and glxgears=12000+! Couldn't be easier. At last a working Linux!
aqua is offline   Reply With Quote
Old Nov 1, 2005, 08:56 PM   #13
GameQber
Newbie
 
Join Date: Nov 2005
Posts: 1


Default

(in response to complex's solution)
UPDATE:
After following what you said, the command "cat /proc/mtrr" now gives me:

reg01: base=0x40000000 (1024MB), size=983552MB: write-back, count=1

when it originally gave me:
reg00: base=0x00000000 ( 0MB), size=984064MB: write-back, count=1
reg01: base=0x40000000 (1024MB), size=983552MB: write-back, count=1


At startup, I saw the following:

Starting fix_mtrr: [FAILED]


Not sure what's going on here. I still have no 3D hardware acceleration (obviously).
Also, I'm fairly new to Linux, just so you know.

Last edited by GameQber : Nov 1, 2005 at 11:26 PM.
GameQber is offline   Reply With Quote
Old Nov 3, 2005, 07:43 PM   #14
alzen
Newbie
 
Join Date: Jan 2005
Location: Poland
Posts: 9


Default

Quote:
Originally Posted by complex
SOLUTION:

We must clear the wrong and conficting MTRR entry on every boot with an rcS.d init script.

Create a text file named fix_mtrr in /etc/init.d and copy this text into it:

#!/bin/sh
# Fix wrong MTRR setting
echo "disable=0" >| /proc/mtrr
echo "base=0x0 size=0x40000000 type=write-back" >| /proc/mtrr

Replace 0x40000000 with the size of your main memory (not video memory)! Help:

0x08000000 = 128Mb
0x10000000 = 256Mb
0x40000000 = 1Gb
0x60000000 = 1.5Gb
0x80000000 = 2Gb

Add execute privileges:

chmod +x /etc/init.d/fix_mtrr

Create a symlink: /etc/rcS.d/S02fix_mtrr
The symlink must point to: ../init.d/fix_mtrr

Reboot your system.

It the kernel options above are set correctly and your ATI driver is configured properly, then 2D and 3D acceleration sould work fine.
man i just want to thank u so much ; maybe it will sound a little funny but not for me, maybe u saw my posts on this my ATI card was just doing 2D and no OpenGL; that situation continued till today and i still do not know if it hangs or not(i guess it will hang sooner or later, it is ATI after all ; u know, i thought many times that drivers are working good "that time") but at least i can try this drivers.

i had it a little easier on Arch Linux, i mean i did not have to do all this linking stuff; but the most important part is that the drivers are working. thanks again man.

Last edited by alzen : Nov 3, 2005 at 08:01 PM.
alzen is offline   Reply With Quote
Old Nov 4, 2005, 07:49 PM   #15
valentine3
Newbie
 
Join Date: Nov 2005
Posts: 2


Default

Quote:
Originally Posted by alzen
i had it a little easier on Arch Linux, i mean i did not have to do all this linking stuff; but the most important part is that the drivers are working. thanks again man.
I also use Arch and i was wondering how you got the script to run on boot. Thanks
valentine3 is offline   Reply With Quote
Old Nov 4, 2005, 08:52 PM   #16
alzen
Newbie
 
Join Date: Jan 2005
Location: Poland
Posts: 9


Default

Quote:
Originally Posted by valentine3
I also use Arch and i was wondering how you got the script to run on boot. Thanks
very simple. u must create that script, place it in /etc/rc.d/, do chmod +x to make it executable and simply place it's name into daemons line in ur /etc/rc.conf, mine looks like:
Quote:
DAEMONS=(syslog-ng hotplug !pcmcia network netfs crond firestarter httpd fix_mtrr)
btw. i am just after first lockup, ATI is ATI, do not buy that s#!% , i have some trace what may be causing lockups but guess i will post it in the other topic; just my noobish trace.

Last edited by alzen : Nov 4, 2005 at 08:56 PM.
alzen is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

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


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



Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
All trademarks used are properties of their respective owners. Copyright ©1998-2010 Rage3D.com