Slow Resize (And Minimize/Restore) with Compiz and Catalyst (fglrx)

125

Introduction

I recently came acrossed a fairly annoying issue while using the ATI Catalyst driver with Compiz-Fusion desktop effects enabled. Whenever I performed an action on a window that required the window to be redrawn, there was quite a noticeable delay while the action was being performed. Sometimes I even had to wait up to 8 seconds for the action (resize/minimize/restore) to be performed! So what exactly was going on?

Digging Deeper

After a night of mostly unsuccesful Googling for an answer, I soon realized that a lot of people were having the same issue, yet no solutions could be found. The people having the issue were using a variety of different ATI graphics cards (mine is a Mobility Radeon HD 3650).

But alas, a few beers later I came acrossed an interesting thread on the Phoronix Forums that eventually led to this post on the Ubuntu Bugzilla:

[ubuntu 9.04] slow unminimizing with ati card and desktop effects enabled

Hum, a single very small patch to xorg-server. Could this be the answer I was looking for?

Applying The Patch

This is the part that is going to vary by distribution. I use Gentoo Linux, so the process of patching xorg-server was simply a matter of copying the latest xorg-server ebuild to my local overlay . . .

$ mkdir -p /usr/local/portage/abby/x11-base/xorg-server
$ cp -R /usr/portage/x11-base/xorg-server/*
/usr/local/portage/abby/x11-base/xorg-server

 . . . then copying the patch over . . .

$ cp  ~/107_fedora_dont_backfill_bg_none.patch
/usr/local/portage/abby/x11-base/xorg-server/files

. . . and finally modifying the ebuild and creating a new Manifest:

$ vim xorg-server-1.6.1.901-r3.ebuild 
...
PATCHES=(
        "${GENTOO_PATCHES[@]}"
        "${UPSTREAMED_PATCHES[@]}"
"${FILESDIR}/107_fedora_dont_backfill_bg_none.patch"
)
...
$ ebuild xorg-server-1.6.1.901-r3.ebuild digest

So Does It Work?

A quick remerge of x11-base/xorg-server produced a quite pleasing result. The patch worked! Compiz-Fusion was smooth again, and could do everything a window manager is supposed to do without the annoyance of long delays.

Conclusion

I’m still not sure what the problem quite was, though I’m relieved that it’s now fixed. It seems details are still scarce on this issue, though a look at the Phoronix thread mentioned above is probably your best bet at understanding the technical details of this issue.

Until next time!