Introduction
As some of you may know, I bought a refurbished IBM ThinkPad T41 (2373-5U2, iirc) during fall 2005, and have been dual booting it with Windows XP Professional and Ubuntu Linux. The hard drive is only
40 GB, which I partitioned as:
- 26.5 GB Windows (NTFS)
- 5 GB Ubuntu / (ext3)
- 1 GB swap
- 4 GB /home (ext3)
- 3.5 GB unusable/recovery partition
Windows and Visual Studio 2005 Professional managed to eat up about 8 GB, plus another 1.2 GB for the installers I left on the hard drive, and miscellaneous other crap put the Windows partition near its capacity, and I had nearly 1 GB free on the Ubuntu / partition, but when it came time to upgrade to Feisty, I was informed that I needed over 1.1 GiB free. Even after some housecleaning, I still came up short, so I decided to wipe / and perform a fresh Feisty (Ubuntu 7.04) install. I figured I was probably about due anyway, since I’d been dist-upgrading since at least Breezy. The installation went fine (I did it during a meeting here at work), but when I went to enable “Desktop Effects” (compiz), I got some odd results. Actually, immediately after enabling it, the right section of the screen was displaying odd banded/corrupt artifacts (leftovers, I presume, from switching video modes, etc). I disabled the effects for the time being, and went about my life.
Fixing Compiz Display
As I noted above, I had problems getting Compiz working from Ubuntu 7.04 Feisty
on my ThinkPad T41 with an ATI Mobility Radeon 7500 (01:00.0 VGA compatible controller: ATI Technologies Inc Radeon Mobility M7 LW [Radeon Mobility 7500]). One or two Ubuntu version ago, I had some OpenGL performance issues with xmoto (a game), which I kind of resolved by changing my xorg.conf file to explicitly use the ‘radeon’ driver instead of ‘ati’ and forcing AGPMode 2 (and maybe something else, I don’t remember for sure). I hoped that would solve my current problem, but alas, it did not. Perhaps resulting from my inability to accurately describe the results I was seeing, I was unable to immediately find any quick fixes to my problem. I guess that’s why it’s still beta, huh?
Update! I reinstalled Feisty (fresh) on my new laptop hard drive, and spent some time isolating the line that fixed the display rendering. It wasn’t the original line I thought, but rather:
Option "AGPSize" "32"
Fixing Compiz Performance
After getting compiz working, I was still getting weird performance hits, where I could hear my hard drive click, whirr, and see CPU spikes during really any display updates (even scrolling a man page in a gnome terminal window would spike the CPU). I thought this was somehow related to the new IDE device handling by the SCSI subsystem, and possibly not having the drive using DMA. I followed that hunch for a while, since it seemed that other people were indeed reporting issues of that nature in Feisty. The information I could glean from dmesg suggested that the drive was in fact in DMA mode, but during the course of the investigation, I noticed some questionable SMART values, so I decided that maybe my hard drive was just dying, and bought a replacement. However, I wasn’t entirely convinced that was the problem, so I kept poking around. I tried many combinations of options, but eventually found a winner. Again, I’m not 100% sure which line was the actual solution, but I think it may have been the following line in my Device section of xorg.conf:
Option "RenderAccel" "true"
Along the way I also modified my dric (/etc/dric or ~/.dric) to enable hyperz as follows (alternatively accomplished with the package driconf
):
dric file »
<driconf>
<device screen="0" driver="radeon">
<application name="Default">
<option name="force_s3tc_enable" value="false" />
<option name="no_rast" value="false" />
<option name="fthrottle_mode" value="2" />
<option name="tcl_mode" value="1" />
<option name="texture_depth" value="0" />
<option name="def_max_anisotropy" value="1.0" />
<option name="no_neg_lod_bias" value="false" />
<option name="texture_units" value="3" />
<option name="dither_mode" value="0" />
<option name="hyperz" value="true" />
<option name="round_mode" value="0" />
<option name="color_reduction" value="1" />
<option name="vblank_mode" value="1" />
<option name="allow_large_textures" value="2" />
</application>
</device>
</driconf>
Full xorg.conf Device
section:
Full xorg.conf Device section »
Section "Device"
Identifier "ATI Technologies Inc Radeon Mobility M7 LW [Radeon Mobility 7500]"
Driver "radeon"
BusID "PCI:1:0:0"
# Option "DisableGLXRootClipping" "True"
Option "DRI" "true"
# Option "ColorTiling" "on" #already the default
Option "EnablePageFlip" "true"
# Option "AccelMethod" "EXA" #prevents mine from loading
Option "XAANoOffscreenPixmaps"
Option "AGPMode" "4"
Option "AGPFastWrite" "on"
Option "RenderAccel" "true"
# Option "UseInternalAGPGART" "no"
# Option "EnableDepthMoves" "true"
# Option "GARTSize" "64"
Option "AGPSize" "32"
#or "64"
# Option "backingstore" "on"
#driconf -> Enable HyperZ for big improvement
#power saving:
Option "DynamicClocks" "on"
EndSection