X fails to mark the spot

I'm tired. I'll type a few words; then I'm going to bed. %$#@! X.

First day of class was last Monday, and I wanted to use my laptop to display video on their projector...

I knew this would work, since I have an X setup I'm pretty proud of. My IBM Thinkpad T41 uses a Radeon M300. With a lot of grief and agonizing over server source and this and that, Keithp and I got figured out the XFree86-4 config file of doom for getting generic video out the SVGA connector. There are, of course, some downsides, notably that you have to switch files and restart the server to turn this thing on. But do it, and you get beautifully boring 1024×768 video out at 60Hz with the proper sync polarity. Every projector in the world will take this video as input.

Of course, you see where this is going. My laptop couldn't get the projector to go at all. I screwed with things for a while, and finally decided the projector was busted, called in the PSU AV people, who verified it worked fine with Windows, and gave up.

Tonight, I decided to quickly solve the problem. I want to use the laptop in class tomorrow (today, whatever we are calling Wednesday at this point). Besides I have a bunch of talks to give soon, and I'll need my laptop to work. So I hauled it home, and plugged it into a monitor to see what, if anything, it was putting out. Turned out to be 1400×1024 at 50Hz.

Okay... that's pretty Martian. Fortunately, I had an idea where the problem lay. I had recently dist-upgraded my Debian laptop, and it had replaced the X server. Shouldn't have been able to touch my magic config file, but undoubtedly the new server was a bit "different" somehow, and the config needed to be adjusted accordingly.

So, I did some messing around, checked the logs, read the radeon(4x) manpage, and found that indeed the Xorg folks had gratuitously renamed some fields in the config file. "CloneHSync" and "CloneVSync" have become "CRT2HSync" and "CRT2VSync" (note that neither of these match the primary display's "HorizSync" and "VerticalRefresh", but hey) and the "CloneMode" (FT fans say "clone me, Dr. Memory!") thing has been replaced by a cooler "MetaModes" setup. So I edited my XF86Config-4, and it didn't solve my problem. I spent probably a half-hour trying various combinations of DDC settings and mode line settings and whatever. Rebooted the machine. Messed with plugging and unplugging the video. No dice.

At this point, I became rightfully suspicious, because I had violated Rule Number One of changing config files.

Rule Number One of Changing Config Files: Make sure the file you're changing is actually the one being used by the system being configured.

This is a really important rule, and I should have remembered it sooner. When I finally did, it turned out to be quite helpful.


You see, the Xorg server quit looking at /etc/X11/XF86Config-4 and started looking at /etc/X11/xorg.conf instead. Now, this was not gratuitous. X.org had to get rid of everything that violated the XFree86 trademark or risk being sued. The Debian folks, of course, wanted to spare us all grief. So when the server upgrade happened, they did a copy of the XF86Config-4 into xorg.conf . This is surely what most people want. It worked fine for me—until I used my little shell script to switch config files; the switch was then ignored.

I develop for X. I've been using X since it came out in the 80s. Sometimes I really hate X.



Oregon got big play tonight on Colbert's Tip of the Hat, Wag of the Finger segment. Took a bunch of shots at our "Death With Dignity Act" which was just upheld. My favorite comment, though, was his "Oregon is California's Canada" with a little map to prove it. I like the Colbert Report a lot.