Screen blanking problem with Windows Vista on the Thinkpad X60

I think I’m hitting the same problem that is reported in this thread on the Lenovo support forums. If I unplug my X60 running Vista SP1, then about 10-15 minutes later, the screen goes blank. Usually black, but sometimes white. The machine is still be running in the background, but there’s no way to kick the machine to redraw the display aside from doing a S3 suspend/resume.
Probably a driver problem. (Is it just me, or do Intel driver updates seem to be really flaky?) I managed to update the driver to the newest one available off the Intel site. Just go to and under the laptop chipsets choose 945 Express. Choose your OS, and download the zip file. If you use the standard “Have Disk..” path through the Device Manager than you can update the driver, even if running the Setup.exe claims that the driver is “not validated” by the OEM for the particular model.
In any case, now I’m running the version, and have been running on battery for the last 3 hrs or so, and no blank screen yet. I’m sure I’m going to get it as soon as I post this, but here’s to hoping. In any case, it was still useful for me to find out that you can update the driver to the “upstream” intel version directly, so I figured I should write that down, for those people out there still hitting this problem or other driver issues.
In mostly unrelated news, I’ve been playing with the T400 at work, and the Vista install on it is god awful. i feel like the software side of the Lenovo experience is starting to go down the tubes. Not that it was that great before, but this machine launches so much crap when you start up that it adds a good 90 seconds to get to the desktop “steady state”. It’s really disappointing since Lenovo for the most part still makes the best PC laptpo hardware (at least compared to the same-generation Dell’s and Lenovo’s I’ve seen). Oh, except for the touchpad. This is my first Lenovo with a touchpad, and while I prefer them to track points, this particular one seems really flaky. Ok that was my mini review of the T400. Nice keyboard, shitty trackpad, uninstall most of the ThinkVantage crap and you’re fine.

Wheel emulation on a Thinkpad X60 on Ubuntu Intrepid

In the newer Ubuntu’s they’ve moved to evdev, which is a much more dynamic system for configuring input devices. Unfortunately, it doesn’t quite seem to understand that I want wheel emulation on my Thinkpad’s trackpoint. Fortunately, there seems to be a way to set it explicity. I use the following script:

xinput set-int-prop $DEVICEID "Wheel Emulation" 8 1
xinput set-int-prop $DEVICEID "Wheel Emulation Button" 8 2
xinput list-props $DEVICEID

The value for DEVICEID can be figured out by running the command xinput list and looking for entry. On mine there’s a line that says:

"TPPS/2 IBM TrackPoint"	id=3	[XExtensionPointer]

Looks like the settings get reset when you come back from resume, so you have to run the script again. I’m sure there’s some way to do it automatically, but I frankly haven’t run Linux enough on this laptop to be bothered to figure that part out.

Restoring nice hinted fonts on Ubuntu 8.10

The Ubuntu folks seem to change around their default font settings every release. Whatever that’s fine. But it is worth nothing that the default “subpixel” setting in the gnome appearance dialog now means “subpixel + slight hinting” whereas previously it meant “subpixel + full hinting”
Since 8.04, though, they’ve committed a crime, IMHO. There’s some new fontconfig magic which automatically aliases “Times” to the “Nimbus Roman” family (or Liberation, if you have it installed), both which render like crap. Those fonts used to resolve to the DejaVu family, which while look different from Times and Helvetica and the like for which they serve as substitutes, still render acceptably under the “subpixel + full hinting” mode.
As far as I’m concerned, there are only five fonts that render well on Linux under this mode. Dejavu Sans, Serif, and Mono, and Droid Sans and Mono. Any settings that cause any fonts other than these to get picked should be avoided.
Thankfully, on 8.10, it’s pretty easy to restore the old behavior. Go into your /etc/fonts/conf.d directory and delete 30-metric-aliases.conf and 30-urw-aliases.conf.
You can verify the settings are now correct by typing fc-match "Times" in a terminal, and making sure “DejaVu Serif” is returned.
Speaking of which, I thought Liberation fonts were supposed to look good under Linux. Why do they still look like crap?

A quick review of notepad replacements

I started a thing at work where I keep a kind of TODO list in a text file. It’s a little different from a standard TODO list in that it also has a history of updates for each todo item. It lets me quickly see the list of things that are going on, and what the latest state of each thing was.
I’ve been using notepad to edit this file, but I get a little annoyed with it.I think the biggest reason is that “ctrl+backspace” doesn’t work, which seems bizarre. I mean, isn’t it a standard thing in editor widgets?
Anyhow, so I’ve been mini-obsessed with notepad replacements. The three that I’ve found that are worth mentioning so far are metapad, notepad2, and notepad++.
Metapad is the most minimal of the bunch. Not really geared toward programmers, but still extremely handy. Aside from supporting Ctrl+backspace, it’s other handiest feature is that it auto-linkify’s URL’s. When half of your state is on a wiki somewhere, this is extremely useful.
Notepad2 is more programmer oriented. It’s based on Scintilla, but doesn’t go as far as many other programmer-oriented editors go (i.e. no MDI). It’s got most of the rest of the standard programming features like line numbers, syntax highlighting, regex search and replace, external file modification monitoring, etc.
Notepad++ takes another step beyond Notepad2 and adds multi-document support as well as some basic file analysis (parsing out function definitions in a side bar, for example). My main beef with it so far is that the default syntax highlighting setup really sucks. Not only does it use different fonts for comments, but the font is proportional. EW!
Anyhow, for my task list file, Metapad is most certainly the right answer. For programming, I think it’s a toss up between the Scintilla based alternatives. It depends on your working style.

Synchronizing search folders in cached Exchange mode in Outlook 2007

I never really grokked the behavior until now. It seemed like only a subset of my search folders that I created while I was in cached mode were communicated to the server. This meant that whenever I set up a new Outlook client install, not all of my search folders (that I had set up on another machine) would show up automatically.
Furthermore, once you have more than one Outlook install pointed at the same account, their search folders list gets out of sync. Not useful when you’re trying to maintain a big list of folders for reading mailing lists.
Well the trick seems to be to do something to cause your client to upload its search folder list to the server. One thing that seems to work for me is to edit the server side Rules list. Even just changing the name of a rule seems to work. Once I do that, it seems like any locally created search folder gets communicated to the server, and after a little delay, my other Outlook clients will pick it up.
I wish they could just sync it when I create a new folder. Oh well.

Mapped Network Drives, an old enemy

Had a stupid problem with logging into Windows on my laptop for a while now. As soon as I finish entering my password and hit enter, the machine gets stuck at “Loading Personal Settings” for over a minute, with very little disk activity. I finally decided to try to fix it.
The most helpful bit of info I came across was a registry setting. Adding a DWORD at

A little closer, but still not quite there: Hardy Heron on my Thinkpad X60

I’ve reported my experiences on running previous versions of Ubuntu on the Thinkpad X60. Here are the notable updates with Hardy Heron:

  • Wireless: Ubuntu dropped the closed source ipw3945 driver from their restricted packages repository, instead, opting to use the iwl3945 driver that’s included in upstream kernel sources. Unfortunately, the version that gets shipped with the kernel is way out-of-date and doesn’t work well. Or in my case, not at all. The solution is to grab newer drivers from the compat-wireless project. They have a build system that can overlay newer drivers on top of an existing kernel module directory. I tried a snapshot from April, and it worked fine for me. After a reboot, the card came up and worked fine through the NetworkManager.
    One remaining gripe with the wireless is that the hardware kill switch only works half way. It will kill the wireless if you turn the switch off. However, turning it back on doesn’t re-enable the wireless until you re-insert the iwl3945 driver. I can script it, but still a major pain in the ass.
  • Graphics: Compiz seems to work fine (though I don’t care to use it). Metacity’s compositing mode seems to work too, though it’s disappointingly slow.
  • Battery: Battery life seems better than with Gutsy, provided that you’re willing to do some work. First step is to install the powertop package, run the utility, and follow it’s recommendations. Next, take a look at this guide on Thinkwiki, detailing a few more settings that can be tweaked. It still sucks that you have to do this all manually. Most of the settings are easily scriptable, and I’m sure there’s a way to automatically trigger them when you go into battery-powered mode, but I haven’t quite gotten there yet. Feels like I shouldn’t have to do this much work.
  • Suspend/Resume: Seems to work. Only tried it about 5 times.
  • Temperature: This is still my biggest gripe. Even with all the tweaks described above, the laptop as a whole gets considerably hotter than when running windows. Particularly the bottom side and the right side of the palm rest. While it’s better than before, it still annoys me enough that I’ll run Windows most of the time. It’s particularly bad when it’s plugged in (and some of the power saving features get turned off)
  • Software: Overall, Gnome hasn’t changed much (which is a good thing IMHO). Firefox 3 seems like a huge improvement, except for the fact that FoxMarks doesn’t work yet (but I expect that to work before the temperature control does).

Progress I suppose. But less than I had hoped for. I know Lenovo sells these things with SuSE, but I don’t think the experience is much better on those models. I made a feeble attempt at running the Emperor Linux Kernel, but couldn’t get it to boot. I’m getting a little pessimistic that Linux will ever run completely fine on this machine (read: all the hardware works) during it’s useful lifetime. Oh well.

Bring back the good old Alt+Tab in Vista

A Vista tip? Blasphemy!
Well, I’m just trying it out at work, and it seems to be ok so far. But I got annoyed with the new Alt+Tab. I don’t know what people’s obsession with window thumbnails are, but to me they make all the choices look similar, where as icons clearly differentiate things.
Anyways, turns out you can just bring back the old alt+tab switcher with a registry hack. Just add a DWORD to HKCUSoftwareMicrosoftWindowsCurrentVersionExplorer called AltTabSettings and set it’s value to 1.

Awesome: Windows batch file ugliness

So I got around to writing some startup batch scripts that try to mount some network drives. The net use command is easy enough to use, but I ran into a separate problem. If the machine starts up too fast, then the network isn’t up yet, so net use fails.
So I started looking for a way to delay execution until I knew the network was up. Well pinging in a loop seemed like a good idea.
I’ll start with the end result first:

echo pinging host
ping -n 1 host | find "TTL=" > NUL
if errorlevel 1 goto loop

So I’ll forgive the fact that the batch command language doesn’t really have a while construct. But apparently, not all versions of ping.exe return a exit code of 0 when a ping succeeds. So the recommended way to check for a successful ping is to look for TTL= in the output, which you can do with find. Which leads to the abomination above.