FreeBSD 10 - X server crash - GPU lockup

Hi.

On FreeBSD-10.2 on AMD64 we get random X server crashes with the radeon driver.

This is a problem that dates back for quite a while. On FreeBSD-9.x running xorg-7.5.2 the server would default to the exa acceleration method, which the manual described as "the newer acceleration architecture with better performance for the Render and Composite extensions." Xwindows would periodically crash with this driver. So for a long time now, we have been forcing our machines to use xaa acceleration method, which the manual described as "the traditional acceleration architecture". It has run stable.
/etc/xorg.conf:
Code:
Section "Device"
...
        Option     "AccelMethod" "xaa"
EndSection
On FreeBSD-10.2 running xorg-7.7_2 from the binary package, the manual no longer mentions "xaa" as an option. It just says
Code:
    Option "AccelMethod" "string"
        Chooses  between  available  acceleration  architectures.  Valid values
        are EXA (for pre-TAHITI GPUs) and  glamor  (for  R300  or higher). The
        default is glamor as of TAHITI, otherwise EXA.
I recently upgraded a clients machine to FreeBSD-10.2 and now he is getting periodic X server crashes. It can run just fine for several days before it happens.

He is running the same video card as I am, RV370 5B60 [Radeon X300 (PCIE)] on an AMD64 machine.

The display will sometimes just lock up and require a reboot to correct it. Right after, the system log shows
Code:
    Aug 26 17:11:31 xxx kernel: drmn0: error: GPU lockup CP stall for more than 10000msec
    Aug 26 17:11:31 xxx kernel: drmn0: warning: GPU lockup (waiting for 0x000000000085960 1 last fence id 0x0000000000859536)
    Aug 26 17:11:31 xxx kernel: error: [drm:pid985:r100_gui_wait_for_idle] *ERROR* radeon : wait for empty RBBM fifo failed ! Bad things might happen.
    Aug 26 17:11:31 xxx kernel: error: [drm:pid985:r100_cp_disable] *ERROR* Failed to wai t GUI idle while programming pipes. Bad things might happen.
    Aug 26 17:11:31 xxx kernel: drmn0: info: Saved 6491 dwords of commands on ring 0.
    Aug 26 17:11:31 xxx kernel: drmn0: info: (r300_asic_reset:395) RBBM_STATUS=0x8401C100
    Aug 26 17:11:31 xxx kernel: drmn0: info: (r300_asic_reset:414) RBBM_STATUS=0x8401C100
The output of kldstat shows these modules loaded.
Code:
    12    1 0xffffffff81de4000 11785a   radeonkms.ko
    17    1 0xffffffff81f56000 f6c      radeonkmsfw_R300_cp.ko
    13    1 0xffffffff81efc000 522db    drm2.ko
This, of course is not the entire list of what's loaded. I can provide it if there are possibly other related modules.

Any help on resolving this would be appreciated.
 
The first thing to try is removing any setting of AccelMethod and let the driver decide. The same goes for other settings in the Device section. Most are not needed.

It is also possible that Xorg support for the older cards is not well-tested.
 
OK. I looked into it some more over the last few days.

I do not have AccelMethod set, however when I do set it, it ignores it and still uses EXA according to the log. The Device section has no settings except

Code:
    Identifier  "Card0"
    Driver      "radeon"
    BusID       "PCI:6:0:0"
As generated by X -configure.

Over the last few years, every computer we maintain has periodically crashed with the EXA acceleration method. It has not been critical since we could force them to use the XAA method, which has been stable. Now with FreeBSD 10 and xorg 7.7, apparently without stabilizing the EXA portion of the driver, the ability to use XAA has been removed, which turns it into a show stopper problem. The glamor acceleration method (The only other method mentioned in the manual) is not for anything pre-TAHITI, which eliminates everything prior to the Radeon HD 7900 series. From my initial research, that seems to be only the latest high dollar line of cards. We cannot upgrade our machines to FreeBSD 10 under these conditions and it is causing real problems for the customer we already upgraded, causing a crash every couple of days on the average.

I'm not clear as to whether it is even possible to install an older xorg on FreeBSD 10, since there are new radeon based kernel modules now being used. I'm sure it would be an application library nightmare to even try.

Is there some way to re-enable XAA or has the code been completely removed?

Any other possible solutions would be welcomed.

If there is any other information I could provide that would help fix the EXA acceleration, I will do my best to help.
 
As I understand it, the old XAA acceleration was removed by Xorg. It's not a FreeBSD-only thing. EXA seems to be in use for my Radeon HD5750, without any problems I've noticed.

For now, you might try disabling acceleration entirely with Option "Accel" "Off". In the meantime, please ask on the freebsd-x11 mailing list.
 
OK. Thanks for the information and suggestions wblock@. I am finding inexpensive fanless Radeon HD 5450 cards available that are apparently substantially newer than our old RV370 cards. I think I am going to order one of those for my customer to see if it fixes the problem. In the mean time, I did go ahead and disable acceleration as you suggested. He doesn't seem to have any noticeable significant performance drop for his usage (web, accounting, etc), so hopefully that will take care of the problem for the interim.
 
Back
Top