Hello,
This is my first how-to, so bear with me Let's get started, shall we?
First off, this HOWTO addresses the issues thatmany users of ATI cards have had. The symptoms are like this:
You install the drivers (via apt-get, or from ATI's website). Everything loads, and looks good. BUT! glxgears gives very laggy output, you can't play 3-d games, and performance is low. If you open a k/console, and issue:
You'll get an answer like this:
reg00: base=0x00000000 ( 0MB), size=984064MB: write-back, count=1
Yes, that's right, it's reporting close to 1 TB!!!! of memory!
Congratulations! You qualify for solving the problem with this how-to
What does 'mtrr' have to do with drivers? Why is this an issue?
It seems that some users have issues with the BIOS reporting the wrong amount of memory to the OS, which causes the mtrr regions to be much larger than the actual memory in the machine. Thus, when the drivers try to load the mtrr rages for the video card's memory, they are unable to do so.
How is this problem fixed?
Simple. Over-write the mtrr files manually.
How do I go about doing that?
First, boot up in text-only mode (use the failsafe boot option in GRUB).
Next, make sure you are root, and issue this command twice, done by typing the following text, and hitting enter:
Code:
echo "disable=0" >| /proc/mtrr
This will clear the faulty entry.
Make sure the file is now empty:
That command should return an empty line.
If it isn't blank, then repeat:
Code:
echo "disable=0" >| /proc/mtrr
If the line is empty, issue this command:
Code:
echo "base=0x00000000 size=<SIZE HERE> type=write-back" >| /proc/mtrr
Replace the <SIZE HERE> with a hex value for your main system memory. Table below:
0x10000000 = 256 MB
0x20000000 = 512 MB
0x40000000 = 1024 MB
0x80000000 = 2048 MB
Finally, issue:
for KDE:
for Gnome:
How do I test if it works?
Open a console/Konsole, and type the following:
You should have output like:
Code:
reg00: base=0x00000000 ( 0MB), size= 512MB: write-back, count=1
reg01: base=0xd0000000 (3328MB), size= 128MB: write-combining, count=1
reg02: base=0xf0000000 (3840MB), size= 128MB: write-combining, count=1
If you do, do a video test:
If it flies, you have diagnosed the error, and you can use 3D accelleration...
But WAIT! What happens on Reboot?
The /proc/mtrr file is modified on each reboot. To keep our settings, we need to create a boot-up script, which writes the mtrr file on boot. To do this, open a console/konsole, and do the following:
1. As root, create a text file called fix_mtrr in /etc/init.d/ You can use Nano as an editor in this case, so:
Code:
sudo nano /etc/init.d/fix_mtrr
The file should have this content:
Code:
#!/bin/sh
# Fix wrong MTRR setting
echo "disable=0" >| /proc/mtrr
echo "disable=0" >| /proc/mtrr
echo "base=0x00000000 size=0x20000000 type=write-back" >| /proc/mtrr
Use CTRL + X to exit, then Y to save, then ENTER to use the filename provided in Nano.
Now, you'll need to give execute permissions to this file:
Code:
sudo chmod +x fix_mtrr
Finally, we need to link it to the rcS.d (startup-script) directory:
Code:
cd /etc/rcS.d/
sudo ln -s ../init.d/fix_mtrr S03fix_mtrr
Now, it'll be automatically fixed on restart.
Credits
I'd like to thank a lot of people - but I dont' know all their names, so I'll just thank everyone on the Rage3D boards!
Most of this information is gathered from numerous threads at Rage3D, not the least of which: http://www.rage3d.com/board/showthread.php?t=33831753
Sincerely,
Christian
Bookmarks