Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 372299 - x11-drivers/xf86-video-ati-6.14.1 very slow 2D graphics performance
Summary: x11-drivers/xf86-video-ati-6.14.1 very slow 2D graphics performance
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal minor (vote)
Assignee: Gentoo X packagers
URL: https://bugs.freedesktop.org/show_bug...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-19 20:18 UTC by Homer
Modified: 2012-04-05 19:17 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
dmesg with kernel modesetting enabled (dmesg-modeset.log,26.17 KB, text/plain)
2011-08-01 13:14 UTC, Homer
Details
dmesg with kernel modesetting disabled (dmesg-nomodeset.log,24.33 KB, text/plain)
2011-08-01 13:14 UTC, Homer
Details
Xorg log with kernel modesetting enabled (Xorg.0-modeset.log,43.89 KB, text/plain)
2011-08-01 13:15 UTC, Homer
Details
Xorg log with kernel modesetting disabled (Xorg.0-nomodeset.log,72.40 KB, text/plain)
2011-08-01 13:16 UTC, Homer
Details
glxinfo with kernel modesetting enabled (glxinfo-modeset.log,23.48 KB, text/plain)
2011-08-01 13:17 UTC, Homer
Details
glxinfo with kernel modesetting disabled (glxinfo-nomodeset.log,27.88 KB, text/plain)
2011-08-01 13:18 UTC, Homer
Details
6.13.2 dmesg with kernel modesetting enabled (dmesg-modeset-6.13.2.log,26.28 KB, text/plain)
2011-08-01 15:07 UTC, Homer
Details
6.13.2 Xorg log with kernel modesetting enabled (Xorg.0-modeset-6.13.2.log,42.96 KB, text/plain)
2011-08-01 15:08 UTC, Homer
Details
6.13.2 glxinfo with kernel modesetting enabled (glxinfo-modeset-6.13.2.log,23.48 KB, text/plain)
2011-08-01 15:09 UTC, Homer
Details
x11perf_xf86-video-ati-6.13.2.log (x11perf_xf86-video-ati-6.13.2.log,293.94 KB, text/plain)
2012-04-03 12:11 UTC, Homer
Details
x11perf_xf86-video-ati-6.14.3.log (x11perf_xf86-video-ati-6.14.3.log,293.97 KB, text/plain)
2012-04-03 12:11 UTC, Homer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Homer 2011-06-19 20:18:30 UTC
Related to Bug 354101. Refiled here for new version and 2D specific issue.

2D performance is very slow with all builds >6.13.2, most noticeable with text rendering in terminal windows. 3D performance seems unaffected. Dropping back to 6.13.2 fixes the issue.

Reproducible: Always

Steps to Reproduce:
1. update xf86-video-ati to 6.14.1
2. (re)start X
3. observe 2D rendering performance
Actual Results:  
2D rendering is excruciatingly slow

Expected Results:  
2D rendering should be as fast as with 6.13.2

Many fundamental changes to the 6.14.x branch seem to have broken 2D performance, perhaps only on certain hardware. This is clearly an UPSTREAM issue, but I'm just filing it here for reference. If I find a relevant X.org bug I'll add the URL.
Comment 1 Chí-Thanh Christopher Nguyễn gentoo-dev 2011-06-22 08:55:14 UTC
Are you using compositing or not? If yes, it could also be some kind of interaction with mesa.
Comment 2 Pacho Ramos gentoo-dev 2011-06-28 09:18:54 UTC
(In reply to comment #1)
> Are you using compositing or not? If yes, it could also be some kind of
> interaction with mesa.

Please reopen when replying
Comment 3 Homer 2011-06-30 10:30:27 UTC
No, it's just plain Openbox with no compositor.
Comment 4 Homer 2011-08-01 00:02:02 UTC
Still happening with 6.14.2, and unfortunately I can no longer use 6.13.2 due to it being incompatible with the xorg-server-1.10.2 update (won't even build).

However, I have found another workaround. The problem completely disappears when I set the nomodeset kernel parameter.

I have no idea what that implies. Presumably it's a problem with the kernel driver (2.6.38-r1).
Comment 5 Matt Turner gentoo-dev 2011-08-01 00:07:09 UTC
How about some logs? /var/log/Xorg.0.log and dmesg are good places to start...
Comment 6 Homer 2011-08-01 13:14:12 UTC
Created attachment 281725 [details]
dmesg with kernel modesetting enabled
Comment 7 Homer 2011-08-01 13:14:59 UTC
Created attachment 281727 [details]
dmesg with kernel modesetting disabled
Comment 8 Homer 2011-08-01 13:15:55 UTC
Created attachment 281729 [details]
Xorg log with kernel modesetting enabled
Comment 9 Homer 2011-08-01 13:16:40 UTC
Created attachment 281731 [details]
Xorg log with kernel modesetting disabled
Comment 10 Homer 2011-08-01 13:17:28 UTC
Created attachment 281733 [details]
glxinfo with kernel modesetting enabled
Comment 11 Homer 2011-08-01 13:18:06 UTC
Created attachment 281735 [details]
glxinfo with kernel modesetting disabled
Comment 12 Homer 2011-08-01 13:24:07 UTC
If I enable kernel modesetting, I get fast 3D but slow 2D.
If I disable kernel modesetting, I get slow 3D but fast 2D.

With 6.13.2 (and below) I had fast 3D and 2D.
Comment 13 Homer 2011-08-01 15:06:22 UTC
I found a patch to enable building xf86-video-ati-6.13.2 against xorg-server-1.10.2 here: https://bugs.freedesktop.org/show_bug.cgi?id=30451#c20

Going back to 6.13.2 solves the problem, and now both 2D and 3D graphics work fine, even with KMS. Of course this is only a workaround.

I'll attach logs.
Comment 14 Homer 2011-08-01 15:07:36 UTC
Created attachment 281745 [details]
6.13.2 dmesg with kernel modesetting enabled
Comment 15 Homer 2011-08-01 15:08:26 UTC
Created attachment 281747 [details]
6.13.2 Xorg log with kernel modesetting enabled
Comment 16 Homer 2011-08-01 15:09:20 UTC
Created attachment 281749 [details]
6.13.2 glxinfo with kernel modesetting enabled
Comment 17 Chí-Thanh Christopher Nguyễn gentoo-dev 2011-08-01 16:42:46 UTC
Try booting with different radeon.agpmode=... kernel parameters (-1 to disable AGP) and see if that makes a difference.
Comment 18 Homer 2011-08-02 17:01:09 UTC
Disabling AGP mode did not solve the problem, and any value lower than 4 (the maximum supported by Brookdale 845) only makes the graphics even slower.
Comment 19 Peter 2011-08-20 00:18:54 UTC
I don't want to complain because 3d and 2d have been broken for me for so long (april 2010), and they're finally working!  But I have noticed this a little bit.  I posted a bug about blender menus showing up as black and that's finally fixed and I just closed the bug about that, but they are a little slow to draw.  But its working so that's great.
Comment 20 Constantine Kardaris 2011-10-12 12:08:10 UTC
i can confirm this but it seems to work for me up to version 6.14.0
and it is always reproducible, upgrading to 6.14.1 or .2 2d suffers
Comment 21 Chí-Thanh Christopher Nguyễn gentoo-dev 2011-10-12 18:02:52 UTC
Is the slowdown quantifiable, e.g. with x11-apps/x11perf? Can you bisect to find the offending commit?
Also it would be good if you check whether the problem has been reported on bugs.freedesktop.org already, and create a report if none exists.
Comment 22 Homer 2012-04-03 12:09:50 UTC
This is still a problem in xf86-video-ati-6.14.3.

I performed an x11perf test on both 6.13.2 and 6.14.3 (logs attached) showing marked slowdown in the latter, although nothing conclusive. Visually, text rendering in terminals is still very slow (I can actually see the text "scrolling" down as it renders, rather than "instantly" appearing).

I may try cairo-perf-trace instead, to get something more conclusive.

http://cworth.org/tag/performance

I'll also try Option "MigrationHeuristic" "greedy" and see if that has any effect.

https://wiki.archlinux.org/index.php/ATI#2D_performance_.28e.g._scrolling.29_is_slow
Comment 23 Homer 2012-04-03 12:11:14 UTC
Created attachment 307609 [details]
x11perf_xf86-video-ati-6.13.2.log
Comment 24 Homer 2012-04-03 12:11:57 UTC
Created attachment 307611 [details]
x11perf_xf86-video-ati-6.14.3.log
Comment 25 Chí-Thanh Christopher Nguyễn gentoo-dev 2012-04-03 13:44:43 UTC
It would be good to also report this upstream at bugs.freedesktop.org (if no report already exists), and provide the link here.

Even better if you can git bisect to pinpoint the commit which caused the slowdown.
Comment 26 Homer 2012-04-03 23:36:26 UTC
The "MigrationHeuristic" option had no effect.

I'll learn how to do git bisection, then see if I have something concrete to report upstream, but IIRC the changes between 6.13.x and 6.14.x were pretty extensive, so I may be out of my depth. It might help if I knew what i was supposed to be looking for (DRI2, XvMC, EXA?). I note 6.14.x now has "RADEON(0): [DRI2] VDPAU driver: r300", which 6.13.x didn't. I don't know if that's relevant.

One upstream URL (added) suggests this might be a font problem.

I have two other machines with ATi/AMD GPUs (X700 and HD 6500D), both running Gentoo x86_64 with exactly the same kernel, latest radeon driver and USE flags, and neither of those exhibit the problem, so I have to assume this is something specifically to do with r300.
Comment 27 Homer 2012-04-04 16:51:03 UTC
Got it.

commit ef9bfb262db7004bef3704e5d914687e50d3fca4
Author: Alex Deucher <alexdeucher[AT]gmail.com>
Date:   Tue Feb 1 19:24:44 2011 -0500

    kms/pre-6xx: fix pageflipping with tiling

    Use UTS/DFS to tile/untile as appropriate for sw access on
    pre-6xx.

    Fixes:
    https://bugs.freedesktop.org/show_bug.cgi?id=33738

    Signed-off-by: Alex Deucher <alexdeucher[AT]gmail.com>

Patches apply to drmmode_display.c, radeon_exa.c and radeon_exa_funcs.c.

From upstream, this was introduced to fix "PageFlip urxvt/xterm screen corruptions", however it seems to have the nasty side effect of seriously impacting 2D performance on my hardware.

The second last upstream comment reveals "KMS ColorTiling cannot work with an X server that doesn't support EXA_MIXED_PIXMAPS," and has a commit (2011-09-20) to automatically disable ColorTiling when it isn't supported.

http://cgit.freedesktop.org/xorg/driver/xf86-video-ati/commit/?id=fcf0cca9c0ab0f692b222f619aee8f1cdad3b519

According to the git log, this commit is supposed to be part of the 6.14.3 release, and yet it doesn't seem to be working, for some reason, since I still experience the problem unless I manually set Option "ColorTiling" "off", which completely resolves the problem.

The tentatively looks FIXED, but I need to check with upstream that the above commit is actually in the release and working as intended.
Comment 28 Homer 2012-04-05 01:12:56 UTC
Looks like upstream WONTFIX because "the applications you are using are choosing software rendering paths rather than hardware rendering paths", or IOW "don't use bitmap fonts".

https://bugs.freedesktop.org/show_bug.cgi?id=48310#c1
https://bugs.freedesktop.org/show_bug.cgi?id=34486#c4

Since I have no intentions of giving up bitmap fonts any time soon, or frankly ever, I guess that means I'll have to permanently keep Option "ColorTiling" "off".

Might as well close this bug WONTFIX or RESOLVED with workaround.
Comment 29 Chí-Thanh Christopher Nguyễn gentoo-dev 2012-04-05 19:17:38 UTC
Marking UPSTREAM per comment 28.