# Unstable dri w/ T60, ATI X1400, radeon open source[SOLVED]

## skwang

With the upgrade to KDE3.5 to KDE4.3 comes numerous fancy Desktop Effects, compositing, etc. .  However, on my system these seem to cause serious video driver instability.  

First my hardware:

Lenovo Thinkpad T60 laptop

ATI X1400 Radeon Mobility

Kernel and Drivers:

gentoo-sources-2.6.30-r5

x11-drivers/xf86-video-ati-2.12.4

N.B. I am using the "radeon" open source X11 drivers

x11-libs/libdrm-2.4.13

Software:

x11-base/xorg-server-1.6.3.901-r2

media-libs/mesa-7.5.1

KDE 4.3.1 (e.g. kde-base/kdelibs-4.3.1-r2)

Symptons:

When Desktop Effects in KDE 4.3 is enabled, the screen will freeze.  The keyboard does not respond.  At this point can still move the mouse cursor but there is no response to button clicks.  I can still login to the machine via ssh.  When I do so I see no messages in dmesg or errors in /var/log/messages or /var/log/Xorg.0.log .  While logged into the machine, I cannot seem to kill X (killall X).  Interestingly, when I reboot the machine remotely, the screen does not change but instead only blacks out when the power is reset.

When I disable Desktop Effects in KDE 4.3 the video driver/laptop is stable.  (I go to System Setting->Desktop->Desktop Effects->Suspend Compositing.)

I don't have a clue as what the problem could be.  Below I have posted configuration and log files from my laptop.  I have posted all these at pastebin for brevity.  Please let me know if there is something in my configuration file(s) that could be the source of the instability.

Output of 'emerge --info'

http://pastebin.com/m313a98ce

/etc/X11/xorg.conf

http://pastebin.com/m6cac90af

There are some older lines dealing with the old binary ati-drivers.  I have removed the old drivers from my system, both the package and any kernel modules.

/var/log/Xorg.0.log

http://pastebin.com/m2d0c6218

Kernel config

http://pastebin.com/m26b88716

Output of 'glxinfo'

http://pastebin.com/m20e9c27c

If there is anything else that may be relevant please let me know and I'll pastebin it as well. Thanks in advance.Last edited by skwang on Sat Nov 14, 2009 7:14 pm; edited 1 time in total

----------

## Sadako

Try EXA rather than XAA 2D acceleration, add 'Option  "AccelMethod"   "EXA"' to the video card device section of your xorg.conf.

----------

## skwang

Thanks, I'll give EXA a shot and see if my X/KDE/dri/etc. is more stable.  I'll report back once I've run with it for a while.

----------

## davidgurvich

Disable kernel mode setting and use the radeonhd-1.3.0 driver instead for the X1400 card.  On a thinkpad R60 with X1300 graphics that driver resumes from suspend, works without crashing, and has better performance.  That may change in the future as the radeon driver improves.

----------

## skwang

Two responses:

1.  Following up question for davidgurvich:

 *Quote:*   

> Disable kernel mode setting...

 

I don't know what this means.  Can you please clarify or explain this?  If there is a link or HOTO/wiki entry on this perhaps?

 *Quote:*   

> ... and use the radeonhd-1.3.0 driver

 

Unless I'm incredibly dense (a real possibility), this means install the radeonhd package, and reconfigure my /etc/X11/xorg.conf to use the radeonhd driver.  Could you post your /etc/X11/xorg.conf (for the X1300 card) to http://pastebin.com/ (or the forums) so I can use it as a reference?  Thanks.

2.  Following up on Hopeless: I tried EXA instead of XAA.  Interestingly, the compositing seemed "stable" for a while.  But I left my laptop idle for a while and when I came back it (the screen, keyboard, and mouse) had frozen.  Fortunately I had could still ssh into the laptop and here was the message in "dmesg", also repeated in "/var/log/messages"

```
Uhhuh. NMI received for unknown reason a1 on CPU 0.

You have some hardware problem, likely on the PCI bus.

Dazed and confused, but trying to continue
```

A quick google search seems to indicate that this "NMI" message is a generic kernel/driver failure.  My guess is that the radeon driver is still the suspect.  No errors were reported in /var/logXorg.0.log

----------

## davidgurvich

Kernel mode setting is a recent feature of kernels since ~2.6.29 which has vt switching (Ctrl+Alt+F1) handled in the kernel along with some other features.  That should mean that future graphics driver will be smaller and have fewer bugs.  To disable kms, either disable modesetting on the lilo/grub entry or don't include the feature in the kernel.

The following is the actual xorg.conf generated by Xorg -configure with minor editing.  You should use 'Xorg -configure' on your system instead of copying and just check that.   I've modified only two items that should have been the default but weren't on my system.

Option     "AccelMethod"    "exa"

Option     "DRI"	"true"                	# [<bool>]

xorg.conf for radeonhd:  

```
Section "ServerLayout"

   Identifier     "X.org Configured"

   Screen      0  "Screen0" 0 0

   InputDevice    "Mouse0" "CorePointer"

   InputDevice    "Keyboard0" "CoreKeyboard"

EndSection

Section "Files"

   ModulePath   "/usr/lib/xorg/modules"

   FontPath     "catalogue:/etc/X11/fontpath.d"

   FontPath     "built-ins"

EndSection

Section "Module"

   Load  "dri"

   Load  "dbe"

   Load  "dri2"

   Load  "record"

   Load  "glx"

   Load  "extmod"

EndSection

Section "InputDevice"

   Identifier  "Keyboard0"

   Driver      "kbd"

EndSection

Section "InputDevice"

   Identifier  "Mouse0"

   Driver      "mouse"

   Option       "Protocol" "auto"

   Option       "Device" "/dev/input/mice"

   Option       "ZAxisMapping" "4 5 6 7"

EndSection

Section "Monitor"

   Identifier   "Monitor0"

   VendorName   "Monitor Vendor"

   ModelName    "Monitor Model"

EndSection

Section "Device"

        ### Available Driver options are:-

        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",

        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"

        ### [arg]: arg optional

        #Option     "NoAccel"               # [<bool>]

        Option     "AccelMethod"    "exa"       # [<str>]

        #Option     "offscreensize"         # [<str>]

        #Option     "SWcursor"              # [<bool>]

        #Option     "ignoreconnector"       # [<str>]

        #Option     "forcereduced"          # [<bool>]

        #Option     "forcedpi"              # <i>

        #Option     "useconfiguredmonitor"    # [<bool>]

        #Option     "HPD"                   # <str>

        #Option     "NoRandr"               # [<bool>]

        #Option     "RROutputOrder"         # [<str>]

        #Option     "TVMode"                # [<str>]

        #Option     "ScaleType"             # [<str>]

        #Option     "UseAtomBIOS"           # [<bool>]

        #Option     "AtomBIOS"              # [<str>]

        #Option     "UnverifiedFeatures"    # [<bool>]

        #Option     "Audio"                 # [<bool>]

        #Option     "HDMI"                  # [<str>]

        #Option     "COHERENT"              # [<str>]

        #Option     "ForceLowPowerMode"     # [<bool>]

        #Option     "LowPowerModeEngineClock"    # <i>

        Option     "DRI"   "true"                   # [<bool>]

   Identifier  "Card0"

   Driver      "radeonhd"

   VendorName  "ATI Technologies Inc"

   BoardName   "M52 [Mobility Radeon X1300]"

   BusID       "PCI:1:0:0"

EndSection

Section "Screen"

   Identifier "Screen0"

   Device     "Card0"

   Monitor    "Monitor0"

   SubSection "Display"

      Viewport   0 0

      Depth     1

   EndSubSection

   SubSection "Display"

      Viewport   0 0

      Depth     4

   EndSubSection

   SubSection "Display"

      Viewport   0 0

      Depth     8

   EndSubSection

   SubSection "Display"

      Viewport   0 0

      Depth     15

   EndSubSection

   SubSection "Display"

      Viewport   0 0

      Depth     16

   EndSubSection

   SubSection "Display"

      Viewport   0 0

      Depth     24

      Virtual   1600 1600

   EndSubSection

EndSection

```

----------

## skwang

I went ahead and changed to the radeonhd video driver.  Although I chose AccelMethod "default".  According to my log file, the driver chose XAA (and not EXA).  Reagradless, KDE with desktop effects and compositing seems more stable.  That being said, I'll have to run it for a couple of days to confirm this, before putting the [SOLVED] tag on my original post.

Thanks again for all the help.

----------

