# "stuttering" with radeon 9250?

## ksp7498

I recently picked up a 128mb PCI (no agp cause my motherboard is PCI-E) radeon 9250 because I wanted to get away from using the binary drivers (with my radeon x850xt-pe).  Anyway, I popped it in and for the most part everything works fine with the radeon driver.  DRI is working and the cpu usage while watching movies or playing zsnes is lower with the new card than it was with fglrx on the x850 (ironic, huh?) and overall the performance seems decent.  I'm especially impressed with how much lower my cpu load is when doing multimedia stuff, which is funny considering the 9250 should be much slower than the x850.  hooray for ati's binary drivers   :Rolling Eyes: 

However, it has a strange habit of getting "bogged down" when I switch through virtual desktops quickly, or scroll quickly through web pages.  It seems to happen more often if I have lots of applications open, and it also seems to get worse the longer X has been running.  If I flick through my virtual desktops really quick it will sometimes take several seconds for the contents of windows to show up, or there will be a big lag when switching between tabs in firefox.It's almost like the entire system "hangs" for a couple seconds and the cpu load goes to 100% (not of normal user load though, it's one of the other ones.  Nice or IOWait, perhaps?) I end up with big orange spikes on my gkrellm cpu load graph every time it does it.  If I swap the x850 back in and use the fglrx driver then the problem goes away.

Is this happening because the card is PCI?  That's the only thing I can think of.  Anyone have any ideas what is causing this?  I'm running 2.6.22-gentoo-r5 and using the in-kernel DRM and framebuffer drivers.  

```
keith@potter ~ $ emerge --info

Portage 2.1.2.12 (default-linux/x86/2007.0/desktop, gcc-4.1.2, glibc-2.5-r4, 2.6.22-gentoo-r5 i686)

=================================================================

System uname: 2.6.22-gentoo-r5 i686 Intel(R) Pentium(R) 4 CPU 3.60GHz

Gentoo Base System release 1.12.9

Timestamp of tree: Fri, 24 Aug 2007 05:00:01 +0000

dev-java/java-config: 1.3.7, 2.0.33-r1

dev-lang/python:     2.4.4-r4

dev-python/pycrypto: 2.0.1-r6

sys-apps/sandbox:    1.2.17

sys-devel/autoconf:  2.13, 2.61-r1

sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10

sys-devel/binutils:  2.17

sys-devel/gcc-config: 1.3.16

sys-devel/libtool:   1.5.24

virtual/os-headers:  2.6.21

ACCEPT_KEYWORDS="x86"

AUTOCLEAN="yes"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O2 -march=prescott -pipe -fomit-frame-pointer"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/share/X11/xkb"

CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo"

CXXFLAGS="-O2 -march=prescott -pipe -fomit-frame-pointer"

DISTDIR="/usr/portage/distfiles"

FEATURES="distlocks metadata-transfer sandbox sfperms strict"

GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"

MAKEOPTS="-j2"

PKGDIR="/usr/portage/packages"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="X a52 aac acl acpi aim alsa avi berkdb bitmap-fonts cairo cdr cli cracklib crypt cups dbus divx4linux dri dv dvd dvdr dvdread eds emacs emboss encode esd evo fam fame ffmpeg flac fortran ftp gdbm gif gnome gpm gstreamer gtk hal iconv ipod ipv6 isdnlog java jpeg kerberos ldap lm_sensors mad midi mikmod mmx motif mozilla mp3 mpeg mplayer mudflap ncurses nls nptl nptlonly ogg openal opengl openmp oss pam pcre pdf perl png pppd python qt3 qt3support qt4 quicktime readline reflection samba sdl seamonkey session spell spl sse sse2 ssl subtitles svg tcpd tiff truetype truetype-fonts type1-fonts unicode usb videos vorbis win32codecs wmp wxwindows x264 x86 xcomposite xine xml xorg xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="vesa ati radeon"

Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
```

If you guys wanna see my kernel config or anything just let me know, I just didn't want to make this a huge post if it wasn't necessary.

EDIT:  added more information about the new card

EDIT AGAIN:  oh, system specs.  the rest of the system is a 3.6ghz pentium 4, 2 gigs of ram, Abit IL8, sound blaster Audigy, 74gb raptor.

----------

## cylamanae

By any chance have you tried re-installing your video card drivers or checked for an update from ATI?

----------

## Sadako

 *cylamanae wrote:*   

> By any chance have you tried re-installing your video card drivers or checked for an update from ATI?

 He said he wasn't using the binary drivers.

I experience similar problems with the same card, for some reason I don't think gtk and/or cairo plays well with it.

You can try adding the following options to xorg.conf, see if they make any difference;

```
        Option  "RenderAccel"   "on"

        Option  "AccelMethod"   "EXA"

        Option  "AccelDFS"      "on"

        Option  "FBTexPercent"  "20"

        Option  "ColorTiling"   "on"

        Option  "EnablePageFlip"        "on"

        Option  "DMAForXv"      "on"

```

You should at least try exa, as that works very well with this card.

I've never experienced any problems when switching desktops, what window manager are you using?

Have you tried others?

----------

## eccerr0r

When it does start to happen, how much memory is the X server using?

I have never seen this happen on my multiple AGP ATI-opensource video card systems.  However an X memory leak, which very well could be in the driver, is not impossible...  but I quit X11 fairly frequently so all that leaked memory tends to get reclaimed.

----------

## ksp7498

thank you for your replies.  I had already been using most of those driver options (from the gentoo radeon guide), but I was not using FBTexPercent so I added that for good measure.  The window manager I am using is blackbox.  Strangely, I can see no perceivable difference between the cards performance with no driver options and with the full set of options that you listed.  I am not using aiglx at the moment (I've heard that's where EXA makes the biggest difference?) but the glxgears scores do not change at all.

Also I have a strange issue that has popped up:  I was switching around between the kernel drm and the x11-drm package's drm modules, and the ones from x11-drm ended up being a huge headache and I couldn't get them to work and I switched back to the kernel ones.  But now in my dmesg I get this:

```

drm: Unknown symbol unmap_page_from_agp

drm: Unknown symbol flush_agp_cache

drm: Unknown symbol flush_agp_mappings

drm: Unknown symbol map_page_into_agp
```

everything still works just like it did before (dri is still working, performance is the same), but I can't figure out why that's showing up.   That was the error I would get when I tried to use the x11-drm modules, but it's not there anymore.

EDIT:  I watched top during the lag spikes to see what was eating up the cpu, and it was X.  Does that help in any way?

----------

## ksp7498

Oh hey there eccerr0r, didn't see your post!  I guess I was typing mine at the time.  Anyway, it happens pretty randomly, but a sure-fire way to make it happen is to open up firefox or seamonkey and either open lots of tabs and try to switch between them, or scroll quickly around the page.  Openoffice and acroread like to have it happen as well.  It never seems to show up if I'm just watching a movie or something, but who knows I might just have gotten lucky.

as reported from top for X:  VIRT is 325M, RES is 36M, TIME is 2:40.03.  X has been running for about 11 hours now.

----------

## ksp7498

well the more I mess with it the more it looks like Hopeless is onto something with the gtk/cairo comment.  I started using Opera instead of firefox/seamonkey and sure enough the problem more or less went away.  It's certainly a strange issue but I suppose that it's not that big of a deal.

----------

## Sadako

 *ksp7498 wrote:*   

> well the more I mess with it the more it looks like Hopeless is onto something with the gtk/cairo comment.  I started using Opera instead of firefox/seamonkey and sure enough the problem more or less went away.  It's certainly a strange issue but I suppose that it's not that big of a deal.

 

I use mostly gtk apps, so it's a fairly big deal to me.   :Crying or Very sad: 

Anyway, since my last post I stumbled across this, which has given me something else to try.

From the exa manpage, MigrationHeuristic can be set to either "always",  "greedy" or "smart", so I'm going to test each out.

I've also come across the following options;

```
#       Option  "EnableDepthMoves"      "true"

#       Option  "ExaScratchSize"        "8192"

#       Option  "EnableAGPDMA"          "true"
```

I haven't used them yet, and I suspect some of them are only valid with other drivers, but it's something to try.

I was going to post these after restarting X and testing them, but I can't really do so atm.

----------

