# X: "conflicting memory types"

## acarstoiu

Hi all.

I keep finding messages like below in my (kernel) log file, together with various unexpected UI glitches on KDE, like missing images in the main menu, wrongly positioned icons in the panel tray or font corruption on highlighting in GTK+ applications.

```
X:15817 conflicting memory types d1c0f000-d1c12000 write-combining<->uncached-minus                

reserve_memtype failed 0xd1c0f000-0xd1c12000, track write-combining, req write-combining
```

My kernel options are:

```
Processor type and features  --->

        -*- MTRR (Memory Type Range Register) support

                  [ ]   MTRR cleanup support
```

My system is:

```
emerge --info

Portage 2.1.8.3 (default/linux/x86/10.0/desktop/kde, gcc-4.4.3, glibc-2.11.2-r0, 2.6.34-gentoo-r1 i686)

=================================================================

System uname: Linux-2.6.34-gentoo-r1-i686-AMD_Athlon-tm-_Dual_Core_Processor_4450e-with-gentoo-2.0.1

Timestamp of tree: Tue, 06 Jul 2010 07:15:02 +0000

distcc 3.1 i686-pc-linux-gnu [disabled]

app-shells/bash:     4.1_p7

dev-java/java-config: 2.1.11

dev-lang/python:     2.6.5-r2, 3.1.2-r3

dev-util/cmake:      2.8.1-r2

sys-apps/baselayout: 2.0.1

sys-apps/openrc:     0.6.1-r1

sys-apps/sandbox:    2.2

sys-devel/autoconf:  2.13, 2.65-r1

sys-devel/automake:  1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1

sys-devel/binutils:  2.20.1-r1

sys-devel/gcc:       4.4.3-r2

sys-devel/gcc-config: 1.4.1

sys-devel/libtool:   2.2.10

virtual/os-headers:  2.6.34

ACCEPT_KEYWORDS="x86 ~x86"

ACCEPT_LICENSE="* -@EULA"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-march=athlon64 -Os -pipe"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config /var/lib/hsqldb /var/qmail/alias /var/qmail/control"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"

CXXFLAGS="-march=athlon64 -Os -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"

GENTOO_MIRRORS="ftp://mirrors.evolva.ro/gentoo/     ftp://ftp.roedu.net/pub/mirrors/gentoo.org/     ftp://gentoo.imj.fr/pub/gentoo/     http://ftp.cs.pu.edu.tw/Linux/Gentoo/     http://gentoo-euetib.upc.es/mirror/gentoo/"

LANG="ro_RO"

LDFLAGS="-Wl,-O1"

LINGUAS="ro en"

MAKEOPTS="-j3"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY="/usr/local/portage"

SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"

USE="3dnow 3dnowext X X509 a52 aac acpi alsa apache2 audiofile berkdb bluetooth branding bzip2 cairo cdda cdparanoia cdr cli consolekit cracklib crypt cups curl cxx dbus dga directfb dts dvd dvdr encode exif fam fbcon ffmpeg firefox flac foomaticdb ftp gdbm gencertdaily gif gs hal hpcups iconv idea imagemagick imap ipv6 jabber java6 javascript jbig jce jingle jpeg jpeg2k kde lcms libnotify live lm_sensors lzma lzo mad mikmod mime mmx mmxext mng modules mozdevelop mp3 mp4 mpeg mplayer msn mudflap ncurses network nls nptl nptlonly nsplugin nvidia ogg openexr opengl openssl pam pango pcre pdf perl pg-intdatetime php png posix ppds python qt3support qt4 quicktime rdesktop readline reflection rtc scanner sdl server session sharedmem slang slp sockets speex spell spl sql srt sse sse2 ssl startup-notification subversion svg sysfs tcpd theora threads tidy tiff truetype udev unicode usb vcd video vorbis wmf x264 x86 xcb xml xorg xpm xulrunner xv xvid xvmc yahoo zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ro en" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
```

The X server is xorg-server-1.8.1.902. All installed packages were recompiled after the last gcc version bump and I'm only using stable versions of the compiler. Reading this thread did not help.

What should I do? Thanks.

----------

## idella4

Is there any other content to draw from, window manager logs,

/var/log/kdm.log, /var/log/dmesg, /var/log/messages

----------

## acarstoiu

No, nothing relevant. I'll paste here a fragment for the sake of it.

I still think there's something wrong with the kernel configuration; nobody wanted to enlight me on where is the controlling menu option for CONFIG_X86_PAT, so far...

/var/log/kdm.log says:

```
QFont::fromString: Invalid description 'Serif,20,5,0,50,0'                                                           

QFont::fromString: Invalid description 'Sans Serif,10,5,0,50,0'                                                      

QFont::fromString: Invalid description 'Sans Serif,10,5,0,75,0'                                                      

The XKEYBOARD keymap compiler (xkbcomp) reports:                                                                     

> Warning:          Type "ONE_LEVEL" has 1 levels, but <RALT> has 2 symbols                                          

>                   Ignoring extra symbols                                                                           

Errors from xkbcomp are not fatal to the X server
```

----------

## idella4

acarstoiu,

```

idella@gentoo64 ~ $ sudo grep CONFIG_X86_PAT /boot/config-2.6.34-gentoo-r1-amd64

Password:

CONFIG_X86_PAT=y

```

Um,  who cares hwere it is in menuconfig, just nano the .config and adjust it to CONFIG_X86_PAT=y.

Well, try sudo gedit or kwrite ///.config

use find CONFIG_X86_PAT

adjust it to =yes,

recompile.  If the .config is not quite there, the make will intervene and bring up any extra required entries.

recompile.

That said, I doubt your theory that it's kernel config.  I would suspect the compile state of the packages, namely the use flags.

```

sudo emerge -pv [troublesome suspected package]

```

Observe the use flags, insert any missing into your make.conf  Re-emerge packages with emerge --newuse

Try and re-post.

----------

## acarstoiu

Well, the CONFIG_X86_PAT is already set in the running kernel. It turns out that this option shows in the menu only when CONFIG_EMBEDDED is set   :Wink:  I just didn't know where to look for kernel configuration rules, i.e. the Kconfig files under /usr/src/linux/arch. Thanks, I've learnt something today.

I'll try the CONFIG_MTRR_SANITIZER option and get back. I'm concerned that others have indicated that it degrades performance to a noticeable extent.

Manually editing the kernel configuration file is not only disallowed, but actually dangerous, as some people have already found out, the hard way.

----------

## idella4

Manually editing the kernel configuration file is not only disallowed, but actually dangerous,

Hmmm.  oh well, it didn't  break anything when I did it, once or twice.  The tip was meant to help you out.

bringing up the .config in gedit or kwrite will lead you to the entry, which is under a sub-heading.  That basically leads you to the entry, a piece of cake to track it in make menuconfig,  Anyway, my leaning is towards your emerging of the windows manager packages.

----------

## acarstoiu

Well, CONFIG_MTRR_SANITIZER didn't solve the problem, as the message

```
X:4975 conflicting memory types d10ef000-d10f1000 write-combining<->uncached-minus                   

kernel: reserve_memtype failed 0xd10ef000-0xd10f1000, track write-combining, req write-combining
```

still shows in my log file, although with a much lower frequency.

If it interests anyone, the kernel configuration changes are as follows:

```

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)

```

----------

## aCOSwt

can you give the ouput of :

```
# cat /proc/mtrr
```

additionally, do you have something like :

video=vesafb:mtrr:3,ywrap

set as boot options in your boot configuration file ?

----------

## acarstoiu

```
cat /proc/mtrr 

reg00: base=0x000000000 (    0MB), size= 2048MB, count=1: write-back
```

My only boot options are

```
root=/dev/sda1 vga=0x318
```

I'm using nvidia-drivers-195.36.24.

----------

## aCOSwt

Well, your /proc/mtrr does not look correct imho.

I strongly advise you to follow the instructions given to set the framebuffer here :

http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=1&chap=10

in order to add a 

```
video=vesafb:mtrr:3,ywrap
```

like statement in your lilo or grub configuration file.

(check first which fb you selected in your kernel, likely vesafb or uvesafb)

----------

## acarstoiu

I did what you advised me, namely to add appropriate parameters in the GRUB file. I also rebuilt the whole system with the latest packages (including kernel) for ~x86.

Result?...

```
kernel: reserve_memtype failed 0xd2bd8000-0xd2bde000, track write-combining, req write-combining     

kernel: X:4992 conflicting memory types d2bd8000-d2bde000 write-combining<->uncached-minus
```

----------

## aCOSwt

What happens if you add nopat to your boot options ?

----------

## Anon-E-moose

I have noticed that I have been getting those messages in both the 2.6.34* and 2.6.35* kernel series.

I have added the nopat option to my boot parms and I'll see if any of the messages show up over the next few days.

----------

