ThinkpadX614G memory Mtrr table Error

Source: Internet
Author: User
ThinkpadX614G memory Mtrr table error-Linux Enterprise Application-Linux server application information. The following is a detailed description. Author: forever steel

After X61 is added to 4G memory, the Linux system finds that the video card speed is slow and the performance is significantly reduced. The most obvious difference is that when running Starcraft or Warcraft with wine, the mouse response is very slow.

The dmesg command shows

Mtrr: type mismatch for e0000000, 10000000
Old: write-back new: write-combining

The same words are also displayed in/var/log/Xorg.0.log.

Check/proc/mtrr

Reg00: base = 0xc0000000 (3072 MB), size = 1024 MB: uncachable, count = 1
Reg01: base = 0x13c000000 (5056 MB), size = 64 MB: uncachable, count = 1
Reg02: base = 0x00000000 (0 MB), size = 4096 MB: write-back, count = 1
Reg03: base = 0x100000000 (4096 MB), size = 1024 MB: write-back, count = 1
Reg04: base = 0xbf700000 (3063 MB), size = 1 MB: uncachable, count = 1
Reg05: base = 0xbf800000 (3064 MB), size = 8 MB: uncachable, count = 1

When running X, the video card needs to register the e0000000 and 10000000 (2.5 m) in the mtrr table as the write-combining address. This mode will increase the speed of the video card by times. however, this address has been registered as the write-back mode, which causes this problem.

For this bug, see: https://bugs.launchpad.net/linux/+bug/210780

This page provides a script (http://launchpadlibrarian.net/13330029/fix-mtrrs.sh) to solve this problem.

I changed the script to conform to the settings of my machine. However, the Mtrr table supports a maximum of 8 records, I have to delete an overlap item (I don't know if there is a better way, but there are no other problems) to support the write-combining mode. mtrr after the fix script is run:

Reg00: base = 0xc0000000 (3072 MB), size = 512 MB: uncachable, count = 1
Reg01: base = 0x13c000000 (5056 MB), size = 64 MB: uncachable, count = 1
Reg02: base = 0x00000000 (0 MB), size = 2048 MB: write-back, count = 1
Reg03: base = 0x100000000 (4096 MB), size = 1024 MB: write-back, count = 1
Reg04: base = 0xf0000000 (3840 MB), size = 256 MB: uncachable, count = 1
Reg05: base = 0xbf800000 (3064 MB), size = 8 MB: uncachable, count = 1
Reg06: base = 0x80000000 (2048 MB), size = 1024 MB: write-back, count = 1
Reg07: base = 0xe0000000 (3584 MB), size = 256 MB: write-combining, count = 1

The modified script rc. mtrr (put it in the/etc/rc. d directory and execute it in rc. local) is as follows:

#! /Bin/bash

MTRR =/proc/mtrr

Echo "disable = 2"> $ MTRR
Echo "base = 0x00000000 size = 0x80000000 type = write-back"> $ MTRR
Echo "base = 0x80000000 size = 0x40000000 type = write-back"> $ MTRR

Echo "disable = 0"> $ MTRR
Echo "disable = 4"> $ MTRR
Echo "base = 0xc0000000 size = 0x20000000 type = uncachable"> $ MTRR
# Echo "base = 0xe0000000 size = 0x10000000 type = write-combining"> $ MTRR
Echo "base = 0xf0000000 size = 0x10000000 type = uncachable"> $ MTRR

The last line commented out is the address required by the video card. Because X is automatically registered at startup, you only need to leave this line. This line of code can be commented out.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.