You are not logged in.

#1 2010-03-25 12:25:53

aqd
Member
Registered: 2010-03-04
Posts: 8

Slow resizing with fglrx/catalyst [solved]

Here is the solution I found and tested:

http://blog.jasondonenfeld.com/169#comment-404

.......
I am running catalyst 9.8 using a Radeon 3850 and have had this re-size/maximize problem as long as long as I have used KDE4. To solve the problem I needed to modify a file in xorg-server. in the code directory it is called ./composite/compalloc.c. Here I commented out most of a function called compNewPixmap. Everything below these lines:

pPixmap->screen_x = x;
pPixmap->screen_y = y;

all the way down to (but not including) the last line:

return pPixmap;

After this I am running KDE4 with all desktop effects that I want and without any lag in resizing/maximizing.
I am running Gentoo, so I just updated the xorg-server source package file and put it back into the source repository, rebuilt the manifest and emerged it again. Voila!

.patch is:

--- composite/compalloc.c.orig    2010-01-14 14:50:25.000000000 +0800
+++ composite/compalloc.c    2010-03-25 19:45:36.507388810 +0800
@@ -487,64 +487,6 @@
     pPixmap->screen_x = x;
     pPixmap->screen_y = y;
     
-    if (pParent->drawable.depth == pWin->drawable.depth)
-    {
-    GCPtr    pGC = GetScratchGC (pWin->drawable.depth, pScreen);
-    
-    /*
-     * Copy bits from the parent into the new pixmap so that it will
-     * have "reasonable" contents in case for background None areas.
-     */
-    if (pGC)
-    {
-        XID val = IncludeInferiors;
-        
-        ValidateGC(&pPixmap->drawable, pGC);
-        dixChangeGC (serverClient, pGC, GCSubwindowMode, &val, NULL);
-        (*pGC->ops->CopyArea) (&pParent->drawable,
-                   &pPixmap->drawable,
-                   pGC,
-                   x - pParent->drawable.x,
-                   y - pParent->drawable.y,
-                   w, h, 0, 0);
-        FreeScratchGC (pGC);
-    }
-    }
-    else
-    {
-    PictFormatPtr    pSrcFormat = compWindowFormat (pParent);
-    PictFormatPtr    pDstFormat = compWindowFormat (pWin);
-    XID        inferiors = IncludeInferiors;
-    int        error;
-
-    PicturePtr    pSrcPicture = CreatePicture (None,
-                             &pParent->drawable,
-                             pSrcFormat,
-                             CPSubwindowMode,
-                             &inferiors,
-                             serverClient, &error);
-                            
-    PicturePtr    pDstPicture = CreatePicture (None,
-                             &pPixmap->drawable,
-                             pDstFormat,
-                             0, 0,
-                             serverClient, &error);
-
-    if (pSrcPicture && pDstPicture)
-    {
-        CompositePicture (PictOpSrc,
-                  pSrcPicture,
-                  NULL,
-                  pDstPicture,
-                  x - pParent->drawable.x,
-                  y - pParent->drawable.y,
-                  0, 0, 0, 0, w, h);
-    }
-    if (pSrcPicture)
-        FreePicture (pSrcPicture, 0);
-    if (pDstPicture)
-        FreePicture (pDstPicture, 0);
-    }
     return pPixmap;
 }

apply the patch, rebuild xorg-server, done smile


my pkgbuild:

# $Id: PKGBUILD 72199 2010-03-13 19:40:06Z jgc $
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=xorg-server-fixed
_pkgname=xorg-server
pkgver=1.7.5.902
pkgrel=1
pkgdesc="X.Org X servers"
arch=('i686' 'x86_64')
license=('custom')
url="http://xorg.freedesktop.org"
depends=('hal>=0.5.14' 'libgl' 'libxfont>=1.4.1' 'openssl>=0.9.8k' 'libpciaccess>=0.10.9' 'libxv>=1.0.5' 'pixman>=0.16.6' 'xcursor-themes>=1.0.2' 'xkeyboard-config>=1.8' 'xorg-server-utils' 'xorg-fonts-misc' 'xbitmaps' 'diffutils' 'xf86-input-evdev>=2.2.5' 'inputproto>=2.0')
makedepends=('libx11>=1.3' 'mesa>=7.7' 'xf86driproto>=2.1.0' 'xtrans>=1.2.4' 'libxkbfile>=1.0.6' 'randrproto>=1.3.1' 'renderproto>=0.11' 'xcmiscproto>=1.2.0' 'bigreqsproto>=1.1.0' 'resourceproto>=1.1.0' 'videoproto>=2.3.0' 'compositeproto>=0.4.1' 'scrnsaverproto>=1.2.0' 'xf86dgaproto>=2.1' 'libgl' 'glproto>=1.4.10' 'xorg-util-macros>=1.3.0' 'xineramaproto>=1.2' 'recordproto')
conflicts=('catalyst-utils<=9.2' 'xf86-input-calcomp' 'xf86-input-citron' 'xf86-input-digitaledge' 'xf86-input-dmc' 'xf86-input-dynapro' 'xf86-input-elo2300' 'xorg-server'
    'xf86-input-jamstudio' 'xf86-input-magellan' 'xf86-input-magictouch' 'xf86-input-microtouch' 'xf86-input-palmax' 'xf86-input-spaceorb' 'xf86-input-summa' 'xf86-input-tek4957' 'xf86-input-ur98' 'xf86-video-vga' 'xf86-video-intel-legacy' 'nvidia-96xx-utils<96.43.14' 'nvidia-173xx-utils<173.14.21')
options=('!libtool')
provides=('x-server' 'xorg-server')
groups=('xorg')
install=xorg-server.install
source=(${url}/releases/individual/xserver/${_pkgname}-${pkgver}.tar.bz2
    atifix.patch
        xorg-redhat-die-ugly-pattern-die-die-die.patch
        xserver-1.7.1-libcrypto.patch
        xserver-1.7.1-gamma-kdm-fix.patch
        xvfb-run
        xvfb-run.1)
md5sums=('47adb90279d3383cca2740cb31cb6510'
         '75e881ead14b0f41313eccf9d97c9d1a'
         '1a336eb22e27cbf443ec5a2ecddfa93c'
         'd03e03250bde69129d8b72382714b434'
         '8eae23916552e609c36ecae1827c2e9d'
         '52fd3effd80d7bc6c1660d4ecf23d31c'
         '376c70308715cd2643f7bff936d9934b')

build() {
  cd "${srcdir}/${_pkgname}-${pkgver}"

  # Get rid of the ugly pattern
  patch -Np3 -i "${srcdir}/xorg-redhat-die-ugly-pattern-die-die-die.patch" || return  1

  # http://cvs.fedora.redhat.com/viewvc/rpms/xorg-x11-server/F-12/xserver-1.7.1-libcrypto.patch?view=log
  patch -Np1 -i "${srcdir}/xserver-1.7.1-libcrypto.patch" || return 1

  # http://cvs.fedora.redhat.com/viewvc/rpms/xorg-x11-server/F-12/xserver-1.7.1-gamma-kdm-fix.patch?view=log
  patch -Np1 -i "${srcdir}/xserver-1.7.1-gamma-kdm-fix.patch" || return 1

  # ATI compositing fix
  patch -Np0 -i "${srcdir}/atifix.patch" || return 1

  # Fix dbus config path
  sed -i -e 's/\$(sysconfdir)/\/etc/' config/Makefile.*  || return 1

  autoconf || return 1

  ./configure --prefix=/usr \
      --enable-ipv6 \
      --enable-dri \
      --disable-dmx \
      --enable-xvfb \
      --enable-xnest \
      --enable-composite \
      --enable-xcsecurity \
      --enable-xorg \
      --enable-xephyr \
      --enable-glx-tls \
      --enable-kdrive \
      --enable-install-setuid \
      --enable-config-hal \
      --disable-config-dbus \
      --enable-record \
      --disable-xfbdev \
      --disable-xfake \
      --disable-xsdl \
      --disable-static \
      --sysconfdir=/etc/X11 \
      --localstatedir=/var \
      --with-default-font-path=/usr/share/fonts/misc,/usr/share/fonts/100dpi:unscaled,/usr/share/fonts/75dpi:unscaled,/usr/share/fonts/TTF,/usr/share/fonts/Type1 \
      --with-xkb-path=/usr/share/X11/xkb \
      --with-xkb-output=/var/lib/xkb \
      --with-dri-driver-path=/usr/lib/xorg/modules/dri || return 1

  make || return 1
  make DESTDIR="${pkgdir}" install || return 1

  install -m755 "${srcdir}/xvfb-run" "${pkgdir}/usr/bin/" || return 1
  install -m644 "${srcdir}/xvfb-run.1" "${pkgdir}/usr/share/man/man1/" || return 1

  rm -rf "${pkgdir}/var/log" || return 1

  install -m755 -d "${pkgdir}/etc/X11" || return 1
  install -m755 -d "${pkgdir}/var/lib/xkb" || return 1

  # Needed for non-mesa drivers, libgl will restore it
  mv "${pkgdir}/usr/lib/xorg/modules/extensions/libglx.so" \
     "${pkgdir}/usr/lib/xorg/modules/extensions/libglx.xorg" || return 1

  install -m755 -d "${pkgdir}/usr/share/licenses/${_pkgname}"
  install -m644 COPYING "${pkgdir}/usr/share/licenses/${_pkgname}/" || return 1
}

the pre-built binary for x86_64 is here => http://rapidshare.com/files/367963537/x … pkg.tar.gz

Last edited by aqd (2010-03-25 13:58:55)

Offline

#2 2010-03-25 13:13:00

dcc24
Member
Registered: 2009-10-31
Posts: 737

Re: Slow resizing with fglrx/catalyst [solved]

Or, you can install one of the already-patched servers on AUR:

http://aur.archlinux.org/packages.php?ID=35686
http://aur.archlinux.org/packages.php?ID=26687


It is better to keep your mouth shut and be thought a fool than to open it and remove all doubt. (Mark Twain)

My AUR packages

Offline

#3 2010-03-25 13:16:29

aqd
Member
Registered: 2010-03-04
Posts: 8

Re: Slow resizing with fglrx/catalyst [solved]

oh it's the same fix big_smile

Offline

Board footer

Powered by FluxBB