Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[GRUB][FRAMEBUFFER] Problem with MTRR (type missmatch ...)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Xarik
n00b
n00b


Joined: 01 Jun 2007
Posts: 31

PostPosted: Tue Jul 10, 2012 6:26 pm    Post subject: [GRUB][FRAMEBUFFER] Problem with MTRR (type missmatch ...) Reply with quote

Hi,

I try to use framebuffer, to do this I followed these tutorials:

- http://en.gentoo-wiki.com/wiki/Framebuffer
- http://en.gentoo-wiki.com/wiki/MTRR

I use uvesafb, in my grub.fond i've:

Code:
kernel /boot/kernel-3.3.8-gentoo root=/dev/sda3 video=uvesafb:mtrr:3,ywrap,1024x768-24@60


But at each boot i got the error message:

Code:
mtrr: type mismatch for b0000000,10000000 old: write-back new: write-combining


My version of Gentoo is 12.1 AMD64 with the last kernel from gentoo-sources ( 3.3.8 )

cat /proc/mtrr show:

Code:
reg00: base=0x000000000 (    0MB), size= 2048MB, count=1: write-back
reg01: base=0x080000000 ( 2048MB), size= 1024MB, count=1: write-back
reg02: base=0x0af800000 ( 2808MB), size=    8MB, count=1: uncachable
reg03: base=0x0b0000000 ( 2816MB), size=  256MB, count=1: uncachable
reg04: base=0x0ffc00000 ( 4092MB), size=    4MB, count=1: write-protect
reg05: base=0x100000000 ( 4096MB), size= 1024MB, count=1: write-back
reg06: base=0x140000000 ( 5120MB), size=  256MB, count=1: write-back
reg07: base=0x14f800000 ( 5368MB), size=    8MB, count=1: uncachable



My config: (it's a notebook)

Processor: Intel Core i3-2330M (2.2GHz 3MB L3)
RAM: 4GB DDR3
GFX Chipset: AMD Radeon HD 6650M 1GB VRAM


I tried searching for a solution on the forum and on google, but I did not find a solution to solve my problem.
Back to top
View user's profile Send private message
DanneStrat
n00b
n00b


Joined: 05 Jan 2012
Posts: 73

PostPosted: Tue Jul 10, 2012 10:13 pm    Post subject: Reply with quote

Xarik,

What you're seeing is normal, I'll explain why,
Quote:
I use uvesafb, in my grub.fond i've:

Kod:
kernel /boot/kernel-3.3.8-gentoo root=/dev/sda3 video=uvesafb:mtrr:3,ywrap,1024x768-24@60


mtrr:3 means that you want uvesafb to use a write-combining memory range.
Quote:
But at each boot i got the error message:

Kod:
mtrr: type mismatch for b0000000,10000000 old: write-back new: write-combining

This message means that uvesafb wasn't able to set up a write-combining memory range, so it fell back to a write-back range (mtrr:2).
Quote:
cat /proc/mtrr show:

Kod:
reg00: base=0x000000000 ( 0MB), size= 2048MB, count=1: write-back
reg01: base=0x080000000 ( 2048MB), size= 1024MB, count=1: write-back
reg02: base=0x0af800000 ( 2808MB), size= 8MB, count=1: uncachable
reg03: base=0x0b0000000 ( 2816MB), size= 256MB, count=1: uncachable
reg04: base=0x0ffc00000 ( 4092MB), size= 4MB, count=1: write-protect
reg05: base=0x100000000 ( 4096MB), size= 1024MB, count=1: write-back
reg06: base=0x140000000 ( 5120MB), size= 256MB, count=1: write-back
reg07: base=0x14f800000 ( 5368MB), size= 8MB, count=1: uncachable

As you can see, you have no write-combining memory ranges but you do have write-back ranges. This is normal behaviour from a bios when the system has more than 3 GB of ram. When you have more than 3 GB, large regions of memory is made uncachable by the bios and as a result, software can't set up write-combining ranges.

One thing you can do to get rid of the "type mismatch" message you're seeing is to change mtrr:3 on the kernel command line (in your grub.conf) to mtrr:2 so that uvesafb will use a write-back memory range (which you've already got) instead. That is the way I've configured uvesafb myself.

Now, why would you want write-combining memory? First of all, it is faster than write-back memory. At one point, the X server was missing PAT support (more on that later) and if X couldn't set up a write-combining range, performance would suffer. Today the X server does have PAT support. PAT allows system software to set up fast memory ranges regardless the state of mtrr (it still uses mtrr however) and this in turn makes a write-combining mtrr range unneeded. Uvesafb doesn't use PAT so this is one case where you may want to have a write-combining range (for better performance when you're outside of X). To do this you can have a look at the following kernel options:

Processor type and features --->
[*] MTRR (Memory Type Range Register) support
[*] MTRR cleanup support
(1) MTRR cleanup enable value (0-1)
(1) MTRR cleanup spare reg num (0-7)


These options convert the memory from continuous to discrete to allow software to set up write-combining memory. It's been argued a couple of times if it's really a good idea to rearrange the mtrr registers this way. You can have a look at this page for more info: http://linux.derkeiler.com/Mailing-Lists/Kernel/2008-04/msg11563.html

I think this info is fairly accurate and I hope it helps you. :)
Back to top
View user's profile Send private message
Xarik
n00b
n00b


Joined: 01 Jun 2007
Posts: 31

PostPosted: Wed Jul 11, 2012 5:39 am    Post subject: Reply with quote

Hi

First thanks DanneStrat for the answer and informations.

My kernel is already ok with

Processor type and features --->
[*] MTRR (Memory Type Range Register) support
[*] MTRR cleanup support
(1) MTRR cleanup enable value (0-1)
(1) MTRR cleanup spare reg num (0-7)


I tried to set mtrr to 2 in my grub.conf but i got the same message
Back to top
View user's profile Send private message
DanneStrat
n00b
n00b


Joined: 05 Jan 2012
Posts: 73

PostPosted: Thu Jul 12, 2012 12:24 am    Post subject: Reply with quote

Is your uvesafb working properly despite the message? Have you tried removing the "mtrr:" option for uvesafb from grub.conf? Uvesafb will use mtrr regardless if the "mtrr:" option is set.
Quote:
[*] MTRR cleanup support
(1) MTRR cleanup enable value (0-1)
(1) MTRR cleanup spare reg num (0-7)

Disable these options, rebuild the kernel then put "mtrr:2" in grub.conf or omit "mtrr:" altogether and see if the message goes away. I believe the above kernel options can be problematic in some system configurations, so if you're having any problems, it's worth to try and disable them.

Cheers.
Back to top
View user's profile Send private message
Xarik
n00b
n00b


Joined: 01 Jun 2007
Posts: 31

PostPosted: Sat Jul 14, 2012 7:11 pm    Post subject: Reply with quote

no my uvesafb not work
yes i've tried to remove mtrr: but samething

i've disable MTRR support and recompile my kernel:
- with mtrr:2 in grub.conf i've got again the message and uvesafb won't work
- with no mtrr:2 in grub.conf samething bad message and uvesafb won't work
Back to top
View user's profile Send private message
DanneStrat
n00b
n00b


Joined: 05 Jan 2012
Posts: 73

PostPosted: Sun Jul 15, 2012 12:09 am    Post subject: Reply with quote

Could you pastebin your kernel .config? You can use http://dpaste.org/
Back to top
View user's profile Send private message
Xarik
n00b
n00b


Joined: 01 Jun 2007
Posts: 31

PostPosted: Sun Jul 15, 2012 8:05 am    Post subject: Reply with quote

my kernel .config with MTRR disabled: http://www.dpaste.org/7ixRs/
Back to top
View user's profile Send private message
DanneStrat
n00b
n00b


Joined: 05 Jan 2012
Posts: 73

PostPosted: Sun Jul 15, 2012 10:12 am    Post subject: Reply with quote

Could you also post the output of:
Code:
lspci -v

You'll need to install the "pciutils" package to get "lspci":
Code:
emerge pciutils
Back to top
View user's profile Send private message
Xarik
n00b
n00b


Joined: 01 Jun 2007
Posts: 31

PostPosted: Sun Jul 15, 2012 10:26 am    Post subject: Reply with quote

result of lspci: http://dpaste.org/C9XMd/
Back to top
View user's profile Send private message
DanneStrat
n00b
n00b


Joined: 05 Jan 2012
Posts: 73

PostPosted: Sun Jul 15, 2012 11:08 am    Post subject: Reply with quote

Xarik,

I've had a look at the output and I think the problem you're having is caused by the radeon kms driver conflicting with the generic uvesafb framebuffer driver. You have an "AMD Radeon HD 6600M Series" graphics card which means that you can use the radeon driver with kms. The radeon driver has support for both console and X with native resolutions so this means that you don't need uvesafb anymore.

Make the following changes in menuconfig. If you can't find an option, you can hit the "/" key and type in the name of the option and it will show you where it is located:

CONFIG_DRM_RADEON=m
CONFIG_DRM_RADEON_KMS=y
CONFIG_FB_UVESA=n (Disable this one)

Rebuild the kernel:

Code:
make && make modules_install


then install the "linux-firmware" package which contains the firmware needed by your graphics card:

Code:
emerge linux-firmware


As a final step you can remove the uvesafb line in grub.conf.

Now reboot.

Note: I think it's still possible to use uvesafb in conjunction with the radeon driver. The prerequisite for this however, would be to disable kms so that the radeon driver functions strictly as a X driver and then uvesafb could handle the framebuffer console without conflicts. In my opinion, using kms with radeon is a much better solution though.
Back to top
View user's profile Send private message
Xarik
n00b
n00b


Joined: 01 Jun 2007
Posts: 31

PostPosted: Sun Jul 15, 2012 11:47 am    Post subject: Reply with quote

I do all things but i've got the same message and it's won't work :/

I even try with do make mrproper & recompile but samething
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum