How to deal with a deadly combo (Configuring a Riva TNT Video Card with an AMD Athlon CPU) Jim Geovedi Finally, i can use XFree86 4.2.0 after using XFree86 3.3.6 for 6 months. Why 'Finally?' The answer is the Deadly Combo. This Deadly Combo refers to the combination of a Riva TNT Video Card and an AMD Athlon CPU. My friend Florian Kohl aptly described it as such. Users love this hardware combination, but most developers hate it. Fortunately, the version of XFree86 that ships with OpenBSD has the `nv' driver. This article will explain how to enjoy the beauty of XF4 (shortname for XFree86 4.x) using this Deadly Combo. At Sun, 18 Aug 2002 13:52:07 -0500, bruno posted a question[1] in misc@. He mentioned his problem configuring X on an AMD XP 1800+, having tried several Nvidia video cards (Matrox G200, Riva TNT2 and Geforce 2 GTS). The post grabbed my attention because I run OpenBSD 3.1 on an AMD Athlon and an Nvidia Riva TNT, which must use XFree86 3.3.6. Well, for about 6 months I was looking for the answer by searching on several search engines. I posted the same question on some mailing lists but still haven't gotten a satisfactory answer. I guessed it was my destiny to be stuck with XFree86 3.3.6. Back to the thread that started on that day, I was shocked to read this reply from Matthieu Herrb : To: mlists Subject: Re: startx hard locks machine From: Matthieu Herrb Date: Mon, 19 Aug 2002 12:57:28 +0200 Cc: misc@openbsd.org On Sunday, August 18, 2002, at 08:52 PM, mlists wrote: > cpu0: AMD Athlon Model 6 (Palomino) ("AuthenticAMD" 686-class) > 1.54 GHz > cpu0: > FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SYS,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX, > FXSR,SIMD > You're using an Athlon CPU. There's a known problem with the MTRR code in XFree86 which cause that kind of hangs. Try disabling mtrr in your kernel or using 'Option "mtrr" "no"' in the device section of XF86Config. It was like having a bright sun shine over me! Suddenly, I stopped all other activity that day and started hacking. Honestly, I never thought that the AMD chip would be a factor in this case since I figured it was just a video card problem. My first attempt consisted of adding `'Option "mtrr" "no"' into the device section of my XF86Config file as mentioned in Matthieu's post. I couldn't believe it worked. But I wasn't so easily satisfied, so I tried recompiling my kernel and applying this patch: -pseudo-devicemtrr1# Memory range attributes control +#pseudo-devicemtrr1# Memory range attributes control This also worked. Maybe this was not the most elegant hack ever done, but I think it's useful for clueless people like me. Credits: Credit goes to the people at misc@ and Matthieu Herrb, as well as Jose Nazario, Florian Kohl, Duncan Lowne, and the rest of the monkeys in monkey.org. References: 1. OpenBSD misc mailing list, "startx hard locks machine", 18 Aug 2002 http://monkey.org/openbsd/archive/misc/0208/msg00888.html 2. Nvidia http://nvidia.com 3. XFree86 Project, nv - NVIDIA video driver http://www.xfree86.org/current/nv.4.html 4. OpenBSD is for monkeys http://monkey.org/openbsd/