|
.comment: Help Comes From Unexpected Places
How I Spent My Summer VacationIt all started with XScreenSaver. I love XScreenSaver, the framework of which was built by the legendary Jamie Zawinski with modules coming in, apparently, from all over the place. There are scores of them, and when XScreenSaver is running in its default mode it cycles through them in no particular order. It's possible to be surprised by the appearance of a new module months after you have installed the thing. There is money to be made producing a little set-top box that boots Linux and X and does nothing but run XScreenSaver on all those giant projection and flat-panel teevees out there, as a kind of neo-modern Lava Lamp for the few minutes each day when the television itself isn't otherwise on. Jamie is a tremendously considerate programmer. When I downloaded the source for a new version a few weeks after having installed a new Linux distribution, following the very easy compilation XScreenSaver warned me that there was an RPM of an earlier version aboard. It then explained how to remove it (which not everyone already knows) before doing "make install." This demonstrates a connection between developer and user that is remarkable--something other developers should emulate. It is also one of the surprising manifestations of help that appear all over the place in Linux, but not always where you'd look if you were inexperienced with the operating system. Last month I decided to make some changes around here. There are some excellent 3-D modules in XScreenSaver, and while they worked, they did so spasmodically, with frame rates of 1 or 2 per second. The sharks and whales, instead of swimming gracefully, looked as if they'd been dropped in boiling water and were now in their death throes. Other GL modules, that would be entrancing were they running at full speed, reminded me of the Zapruder film on the latest conspiracy show. My impression was that someone, somewhere, was running these things at a high frame rate. If they could, so could I. And so began an odyssey that rivaled the day a few years ago when first I saw a prompt that said [root]#. More than rivaled, actually--things were pretty well worked out after my first week with Linux.
Hardware HellTime had come, anyway, to upgrade a little hardware. My old FIC VA-503+ motherboard had done yeoman service, but it did not, for instance, support ATA-66, which the newer VA-503A did. The place that offered the best price also had a low price for AMD K6-2-550 chips (this stuff really is becoming inexpensive), which was a 37.5 percent increase over the K6-2 I had. And the STB Velocity 128 that had been such a big deal just a couple of years ago now didn't seem to cut it, and Matrox G400 AGP boards with 32 megs of memory and dual heads were not all that expensive. Two days later my order arrived and I learned some new things. These included the fact that while the English in motherboard manuals has gotten better, they don't really tell you any more, and there's now much more to be told; that if there is a way to make an FIC VA-503A motherboard deliver more than 64 of my 256 megs of memory to Linux I couldn't find it; and somebody is apparently relabeling AMD chips, because this one would boot at 550mHz, but that's about all--things like compiling even simple software invariably ended in the dreaded "internal compiler error," which is how egcs tells us our hardware is no good. I figured I could live without ATA-66, so I popped the old VA-503+ into the machine, moved everything back, downloaded and burned a new CMOS (to make the board accept the K6-2-550), put in the new chip, discovered that the new chip still wouldn't work at 550, jumpered it to 500 (whereupon everything now pretty much worked), ran XF86Setup, and fired up one of the GL modules. No improvement. None. In fact, there was (and occasionally still is) some serious weirdness, in which the monitor loses horizontal sync, making it look as if I'd strapped an orbital sander to one side of it. I had if anything made things worse, though my processor was 25 percent faster. Whoopee. The hardware vendor offered support to the extent that they'd take the stuff back for a mere 15 percent restocking fee, and I'd pay the shipping. I would not be upset if they were playing in the driveway one day when I back out the truck. I was effectively stuck with the stuff. Okay, the motherboard I could use somewhere else, and the vid card would probably be okay with some tuning, and the chip didn't cost much and was faster (though I was puzzled that its 3-D Now! was more like 3-D When?). Turns out, I had just completed the easiest part of my quest to make the whales and sharks swim.
Waist Deep and the Water's RisingMy new, high-powered video card had been roundly praised as one of the finest in the world, leading me to suspect that properly configured it would deliver the performance I sought. I started on the XFree86 home page where, digging a little, I learned that 3-D is lightning-fast because it is directly rendered--so long as you're running XFree86-4.01 and Linux 2.3.99 or better. Well, okay. Linux-2.4.0-test4 was current at the time, so I downloaded the
source and burned a new kernel. (By the way--2.4 is going to be tremendous, but
from what I see on the kernel mailing list, I don't think it will be with us
real soon now. A couple months at least.) I included frame buffer support, AGP
support, support for my motherboard's VIA chipset--all kinds of good stuff. It
worked, as expected, right off the bat. This because of other unexpected places
where help is available. For instance, no one should even dream of building a
new version of the Linux kernel without reading the Changes file in the
Documentation subdirectory of the kernel source. This isn't some changelog,
it's a listing of the non-kernel packages that you need to upgrade if you want
this kernel to compile and work. It also lists the places to get all the
updated packages. (It's a good idea to read the docs for them, too--it wasn't
until PPP failed that I learned that with the new PPP one must create a
An aside: Did you know that the source code in The new kernel working as it should, I downloaded the binaries for
XFree86-4.01. The install script provided works very well. The new X
configuring tool, Some more research led me to the development site for DRI, the
direct-rendering interface for XFree86--the stuff that lets X manipulate your
video hardware directly. There isn't some DRI package waiting to be downloaded;
you have to get it by anonymous CVS. I did so, read the installation document
(which is found, unexpectedly, with the XFree86 docs, which are themselves
found in the unexpected A post to a KDE list resulted in my introduction to a fellow named David G. Watson. This is one of the best aspects of the Linux help system. Everyone should have a Linux guru. Mine is Bob Bernstein. When I've well and truly broken something, I can email or, if I've really screwed things up, phone him. He has a multitude of distributions either currently running or capable of being booted at once, all the time. My first week with Linux would have taken a month but for his help. He's brilliant, knowledgeable, down-to-earth, and willing to give of his time to help others with Linux trouble. But people have their specialties, and hacking X isn't one of Bob's many. There are a lot of people who have at least some of those characteristics,
and some who have most or all of them, and David G. Watson falls into the
latter group. He spent a lot of time over the next few days helping me sort out
the GL situation. The Mr. Watson spent a lot of time trying to sort out my situation, all by email. In the course of it, he taught me a great deal about the workings of X. All this just because I posted a question to a mailing list. We were finally both defeated, though I suspect that had Mr. Watson not been in Ohio but instead here in Connecticut, he probably could have solved the problem in five minutes at my keyboard. I figured I had been communicating with a computer professional of some sort. I asked. David G. Watson graduated this year from high school--he was home schooled--and will start his computer science studies at Kent State next month. Help from unexpected places.
The Voyage HomeOut of the clear blue, I received a note from Michael Meding, who is well known in some of the upper reaches of the Linux world. It was a list of questions and instructions as to how to get the answers--determining what was loaded, whether it was loaded properly, how to determine the precise frame rates, and so on. He'd seen my post on the XFree86 list and was wading in to throw me a rope. Again, we didn't get the problem solved directly, and he did tell me that G400 performance under X is not what it will be in the months to come. But again, I learned a great deal, and from this I was able to sort out the unhappy fact that there were two versions of Mesa, the Open GL clone, on my machine, and they seemed to be in dispute with one another. Which causes me to voice a complaint that arose in an email exchange with
Lou Grinzo, the writer who graces many pages, sometimes those of LinuxPlanet.
How is it that some operating systems have multiple versions of essentially the
same thing, all peacefully coexisting, while with Linux this is often a matter
of luck? While I do not have a definitive answer, I certainly have part of it.
Take a look in You will find, say, DRI and XFree86-4.01 build their own Mesa, based on a beta of a
still-unreleased version. At least some Linux distributions put Mesa in
So time had come to return to first principles. I was running an alpha
XFree86 (the DRI CVS code) under a beta kernel, with beta KDE2 for good
measure. At least I could run a release XFree86. David Watson had pointed out
that XFree86-4.01, if you compile it yourself, will, too, make an
Again the GL applications froze the machine. I'd had about enough of this. I downloaded the latest release version of Mesa and built and installed it. Then, using good old Midnight commander, I copied the new Mesa files over their old counterparts wherever they appeared. Holding my breath, I started a GL screensaver. And the whales and sharks were swimming!
The Moral of the StoryNow you know how you, too, can through the expenditure of a few hundred dollars and several hours a day for a month bring to life some decorative software that you don't need. (Most of the XScreenSaver modules, by the way, don't use Mesa at all, and if you don't have it set up so that they can run at least somewhat the ones that need Mesa just don't compile.) There's a good chance that this is not information that you'll draw on immediately. But chances are that you'll find yourself gradually drawn into a similar situation one day: maybe you'll decide to upgrade your compiler, but RPM tells you that you need to upgrade your glibc, so you decide to do that, but glibc needs some new things--and before you know it, you're neck-deep in quicksand. Linux distributions are so nicely and reliably packaged that one really needs do nothing more than upgrade the whole system from time to time to get the (almost) newest stuff. But Linux inspires tinkering or tinkers gravitate to Linux, I don't know which. So part of the story is how easy it is to get into personally uncharted territory in pursuit of a seemingly simple goal. Nor is that a Bad Thing. But when you're elbow-deep and sinking fast, it's good to know where help can be found. People relatively new to Linux are often accustomed to having telephone numbers they can dial for technical support, albeit often for pay. Linux distributors offer pay support, too, but I don't know of any who would deal with the mess I made in the quest for working 3-D screensavers. Yet help is available, all over the place. It helps to have a Bob Bernstein, but the Linux community is richly populated with ad-hoc gurus, too, on mailing lists especially. If you haven't yet, subscribe to your distribution's mailing list or, if there are several, the one that comes closest to your level of knowledge. Yes, there are usually lots of messages, and they can be a pain to wade through. But if you do wade through them, you'll learn a great deal. Often your questions will be answered before you ask them. Remember that everybody there is volunteering his or her time, so don't think you're owed help. When you do have a question that you simply cannot answer some other way, ask it on the mailing list. When someone else has a question that you can answer, answer it. The moral of the story is that there's almost nothing that you can't find out this way--and that the authoritative, clear voice of experience and knowledge who helps you out may be someone en route to his first year of college.
|