Page 1 of 3 123 LastLast
Results 1 to 10 of 30

Thread: HOWTO: ATI fglrx MTRR error fix

  1. #1
    Join Date
    Dec 2005
    Location
    Manitoba, Canada
    Beans
    47
    Distro
    Kubuntu Breezy 5.10

    Lightbulb HOWTO: Hardware Acceleration on ATI Cards Using fglrx Drivers

    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:
    Code:
     cat /proc/mtrr
    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:

    Code:
    cat /proc/mtrr
    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:
    Code:
    kdm
    for Gnome:
    Code:
    gdm
    How do I test if it works?

    Open a console/Konsole, and type the following:
    Code:
    cat /proc/mtrr
    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:

    Code:
     fgl_glxgears
    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
    Last edited by flight_master; April 16th, 2006 at 04:47 PM. Reason: UPDATE: Cleaned up some text, spelling errors, etc.

  2. #2
    Join Date
    Jan 2006
    Beans
    51

    Re: HOWTO: Hardware Acceleration on ATI Cards Using fglrx Drivers

    Hi, i have done the above instruction and am still having problems with 3d accel. Firstly,this is my output

    reg00: base=0x00000000 ( 0MB), size= 512MB: write-back, count=1
    reg01: base=0x20000000 ( 512MB), size=983296MB: write-back, count=1
    The reg00 seems normal enough (however, it should be noted that i actually have 768mb of RAM but i used 512 as i couldnt find the corresponding hex value[?]). However reg01 is still reporting close to a terrabyte of memory. Also, when i start up, i get a "unable to start HAL" error (or something to that effect).

    Any help is greatly appreciated.

  3. #3
    Join Date
    Dec 2005
    Location
    Manitoba, Canada
    Beans
    47
    Distro
    Kubuntu Breezy 5.10

    Re: HOWTO: Hardware Acceleration on ATI Cards Using fglrx Drivers

    Hi,

    Is that output after launching KDE? Can you please boot into text-only mode, follow the first-half of the HOWTO, and then post the output of
    Code:
    cat /proc/mtrr
    It seems that you added a new entry, instead of overwriting the old one.
    Did you run
    Code:
     echo "disable=0" >| /proc/mtrr
    twice?

    Also, use
    Code:
    size=0x30000000
    for that amount of RAM.

    -Christian
    MonteCarloHosting.Net :: Linux Webhosting for Business
    CDXSolutions.Com :: Windows-Based Hosting Solutions
    -------------------
    **We run 100% K/Ubuntu desktops since Oct 2005**

  4. #4
    Join Date
    Mar 2006
    Location
    malmoe, sweden
    Beans
    5
    Distro
    Ubuntu Breezy 5.10

    Re: HOWTO: ATI fglrx MTRR error fix

    Hi, after reading this how-to I decided that This must be the problem! This is why I can't get my ATI drivers to work propely. Well, after doing the tutorial, i got this:

    dmesg:

    Code:
    [4294712.752000] mtrr: type mismatch for d7c00000,100000 old: write-back new: write-combining
    [4294712.752000] mtrr: type mismatch for d7800000,400000 old: write-back new: write-combining
    [4294712.752000] mtrr: type mismatch for d7000000,800000 old: write-back new: write-combining
    [4294712.752000] mtrr: type mismatch for d6000000,1000000 old: write-back new: write-combining
    [4294712.752000] mtrr: type mismatch for d4000000,2000000 old: write-back new: write-combining
    [4294712.752000] mtrr: type mismatch for d0000000,4000000 old: write-back new: write-combining
    and with cat /proc/mtrr:

    Code:
    reg00: base=0x00000000 (   0MB), size=984064MB: write-back, count=2
    ...i'm a bit confused now. I really can't see what I did wrong. I've done all the ATI tutorials (at least twice) but nothig seems to work, right now I'm using the radeon driver, so now watching a full screen video doesn't lag, but dragging around a window in gnome takes almost 100% CPU (as all other 2d operations).

    Well, if someone can figure out what I might have done wrong I would be very thankful. I kinda need my graphics to work (flawless), at leat for 2d, and this has taken some 3, 4 months now...

    Thanks in advance.

  5. #5
    Join Date
    Dec 2005
    Location
    Manitoba, Canada
    Beans
    47
    Distro
    Kubuntu Breezy 5.10

    Re: HOWTO: ATI fglrx MTRR error fix

    Hello,


    Actually, It seems you some-how typed the input wrong. Did you follow the first part of my tutorial, using just the command-line, and then starting gdm/kdm?

    -Christian
    MonteCarloHosting.Net :: Linux Webhosting for Business
    CDXSolutions.Com :: Windows-Based Hosting Solutions
    -------------------
    **We run 100% K/Ubuntu desktops since Oct 2005**

  6. #6
    Join Date
    Mar 2006
    Location
    malmoe, sweden
    Beans
    5
    Distro
    Ubuntu Breezy 5.10

    Re: HOWTO: ATI fglrx MTRR error fix

    Well, at first i did it in gnome, in the terminal. Then I did the exact same thing as you wrote it. Do you think I have to "undo" something?

    I'm really grateful for any help, I'm going to buy a nvidia card in a week or so if this ATI card of mine doesn't just magically start working

  7. #7
    Join Date
    Mar 2006
    Location
    malmoe, sweden
    Beans
    5
    Distro
    Ubuntu Breezy 5.10

    Re: HOWTO: ATI fglrx MTRR error fix

    it looks like this now:

    Code:
    reg00: base=0x00000000 (   0MB), size=1024MB: write-back, count=1
    reg01: base=0xd0000000 (3328MB), size= 128MB: write-combining, count=1
    ....fglrx still not working though...

  8. #8
    Join Date
    Mar 2006
    Location
    malmoe, sweden
    Beans
    5
    Distro
    Ubuntu Breezy 5.10

    Re: HOWTO: ATI fglrx MTRR error fix

    actually, when i rebooted once more i got:

    Code:
    reg00: base=0x00000000 (   0MB), size=1024MB: write-back, count=1
    reg01: base=0xd0000000 (3328MB), size= 128MB: write-combining, count=7
    reg02: base=0xf0000000 (3840MB), size= 128MB: write-combining, count=1
    maybe this isn't that good after all?

    EDIT: thanks for the help! it seems to work! thank you!
    Last edited by simulant; March 10th, 2006 at 05:28 PM.

  9. #9
    Join Date
    Dec 2005
    Location
    Manitoba, Canada
    Beans
    47
    Distro
    Kubuntu Breezy 5.10

    Re: HOWTO: ATI fglrx MTRR error fix

    Hi,


    That looks about right... Glad you got it working, if you need any help, please post the output of
    Code:
     cat /var/log/syslog
    Don't post the entire output, just what relates to fglrx


    Regards,
    Christian
    MonteCarloHosting.Net :: Linux Webhosting for Business
    CDXSolutions.Com :: Windows-Based Hosting Solutions
    -------------------
    **We run 100% K/Ubuntu desktops since Oct 2005**

  10. #10
    Join Date
    Apr 2006
    Beans
    3
    Distro
    Kubuntu Breezy 5.10

    Re: HOWTO: ATI fglrx MTRR error fix

    Hi !
    I am using Kubuntu Breezy 5.10. I encountered a lot of problems with fglrx (I have a ATI radeon 9200 -128MB card).
    Thanks to Christian.. I was able to follow the How-To that you had compiled to fix my MTRR settings. I was able to get decent numbers for fgl_glxgears. I also followed your instructions about including the fix_mtrr script in /etc/init.d.. But, I don't see the MTRR settings after rebooting! Somehow, the script is not functioning as it should. Could you please help me out!

    Thanks a lot!

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •