Skip to main content

Linux - Still A Long, Long Way To Go

People tend to ask me if Linux is right for them. It's a fair question to ask given all the hype and press surrounding the operating system as well as the nearly daily articles about Window's security woes. I always have to stop and think about the person asking me that question because, even though they're very bright and quite good at what they do, they look at their computer as an appliance, a means to an end.

For the majority of the people who ask I either direct them towards a Mac with OS X or to an upgrade of Windows to XP, especially with service pack 2. In both cases this usually means a hardware upgrade, especially if they go with OS X. But in the end they really are happier with Apple or Microsoft, far more so than if I had sent them on their way with Linux.

How is it that a Linux guy wouldn't evangelize and point those folks towards Linux? Because Linux still isn't ready for the general masses. Read the following story of my very recent experiences when I had to change a video card on a Dell Precision 350 where I work, and wonder no more why I'm very careful what I recommend to folks.

I had two stock Precision 350s with ATI 7000 video cards. Both had Redhat 9 (RH9) installed on them. The video cards drove Planar CT1905S LCD monitors. One of the two systems video monitor started to show a shearing of the video image which rendered it nearly unviewable. Some simple testing narrowed the problem down to the video card on the errant system, so I asked my IT support group for a new video card. They gave me an ATI 9600XT as a replacement.

Now, if this were a Windows system I'd open up the box, swap the cards, button everything up again and power the system back up. I might want to hit the ATI website to get the latest drivers, but the fact is that Windows would have come right back up and continued on. Unfortunately you're not guaranteed this ease of use with Linux, especially with older distributions such as RH9.

I'd already checked via Google to see if there was any forum chatter out on the web with this combination of Linux and video card, and sure enough, there was. I already knew about having to download ATI's Linux driver and building it as a kernel module in order to turn on and use the video card's hardware acceleration. But before I did that I just wanted the new card to come up without any other hassles.

The X windowing system under Redhat 9 uses a configuration file located at /etc/X11/XF86Config. There is a section in that file labeled “Device”, which is shown below.

Section "Device"
Identifier "Videocard0"
Driver "radeon"
VendorName "Videocard vendor"
BoardName "ATI Radeon 7000"
EndSection

The device section was changed as shown in bold red text below. The key to this change is the chip id attribute. This attribute overrides the auto detection feature of the X server. Under normal circumstances the X server will determine the video chip and load the appropriate driver. Unfortunately there is no entry in the R9 X server for the R350. But there is one for the R300, which is the ATI 9500/9700 video card. The ATI 9600XT can be treated as a 9700 (that’s the PCI ID/chip id 0x4145) and it will work, allowing the X server to come up. This one-file modification is the easiest way to bring the 9600XT up in the system.

Section "Device"
Identifier "Videocard0"
Driver "radeon"
VendorName "ATI"
BoardName "ATI Radeon 9600XT"
VideoRam 131072
ChipId 0x4145
EndSection

The problem with this solution is that it does not enable hardware acceleration. The X server does enable hardware acceleration for the ATI 7000. To enable hardware acceleration for the 9600XT you need to download, build, and install a kernel module from the ATI website. What follows are the basic steps for adding hardware acceleration to a system running RH9 and using the ATI 9600XT video card.
  • Use the first step above to make sure your X desktop is operational. You want a working desktop to begin with.
  • Go to the ATI website (www.ati.com) and download an RPM module. For this example it was fglrx_4_3_0-8.12.10-1.i386.rpm.
  • Set user (su) to root and install the RPM: rpm -hiv --force fglrx_4_3_0-8.12.10-1.i386.rpm
  • Make sure you have the kernel sources installed. For our systems I installed the kernel sources for the initial installation kernel, then downloaded the latest kernel (2.4.30) from kernel.org and build it. Our systems now run with 2.4.30, not the 2.4.20 version that comes with out-of-the-box Redhat 9.
  • Change directory to /lib/modules/fglrx/build_mod. Change the execution permissions on make.sh (chmod +x make.sh). Execute make.sh and build the kernel module.
  • Move up one directory to /lib/modules/fglrx. Change the execution permission on make_unstall.sh (chmod +x make_install.sh). Execute make_install.sh and install the module.
  • Run fglrxconfig. This script will help you build a new X server config called XF86config-4 under /etc/X11. When you’ve finished building this you need to log out of your account and then log back in again. The X server will re-initialize with this new configuration and the newly built ATI kernel module.
When you’re back in the system you can run two tests to see if hardware acceleration is working. They are glxinfo and fglrxinfo. glxinfo provides a large amount of information. What you’re interested in is the ‘direct rendering’ string at the top of the output. You can grep the output looking for ‘direct rendering: Yes’. If it’s ‘No’ then you’ve got a problem and you’re going to have to go digging. The other tool fglrxinfo produces a much shorter output:

display: :0.0 screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: RADEON 9600 XT Generic
OpenGL version string: 1.3.5010 (X4.3.0-8.12.10)

Although the greatest beneficiary of this effort are applications that use OpenGL, all graphic applications will benefit from the kernel module, including the X desktop.

And that's not the end of it. I had the same problem with my home system running Fedora Core 3, an ATI 9600SE, and kernel 2.6.11.8. Turns out that changes to the kernel after 2.6.11 broke some of the ATI source. I had to hunt down two patches and apply them (with patch) and then build the module before I could load it. After that hardware accelleration was working just fine.

I can do this because I know how. It doesn't bother me to live on the bleeding edge, and what happened under FC3 with the latest kernel is something I find interesting. But changing video cards under Linux in this day and time is equivalent to calling out a Florida Power bucket truck to change a light bulb in my bathroom. There are some serious architectural and proceedural flaws in the Linux system, and until those shortcomings are fixed Linux will never be suitable for anything except servers or embedded niche markets where the platform can be tightly controlled.

And I'll keep sending people to Apple and Microsoft.

Comments

Popular posts from this blog

A Decade Long Religious Con Job

I rarely write inflammatory (what some might call trolling) titles to a post, but this building you see before you deserves it. I've been seeing this building next to I-4 just east of Altamonte/436 and Crane's Roost for nearly 12 years, and never knew who owned it. Today on a trip up to Lake Mary with my wife I saw it yet again. That's when I told her I wanted to stop by on the way back and poke around the property, and photograph any parts of it if I could.

What I discovered was this still unfinished eighteen story (I counted) white elephant, overgrown with weeds and yet still under slow-motion construction. It looks impressive with its exterior glass curtain walls, but that impression is quickly lost when you see the unfinished lower stories and look inside to the unfinished interior spaces.

A quick check via Google leads to an article written in 2010 by the Orlando Sentinel about the Majesty Tower. Based on what I read in the article it's owned by SuperChannel 55 WA…

first night for the gingersnaps

The first night has passed and the two have managed to survive, in spite of what their tiny hearts might have thought when first arriving. Greebo, the larger of the two, has been in hiding the entire time so far. Ponder has spent the time zipping in and out of hiding spots, checking things out, and learning just how comfortable pillows are for resting your head.

During the night I felt the tiny body of Ponder hitting the bed as he leaped up on the side, and then climbed to the top to run around on top of me. At least once he play-attacked my fingers. He might be small but his claws are still quite sharp.

When I got up in the morning the bowl of cat kitten food was fairly well depleted. It's been refilled and fresh water put in the big dish on the floor. I'm assuming that both Greebo and Ponder are feeding and drinking. I have seen Greebo under the furniture peeking out at me when I went looking for him. I'm leaving him alone while he continues to adjust.

So far the guys h…

cat-in-a-box channels greta garbo

So I'm sitting at my computer, when I start to notice a racket in back. I ignore it for a while until I hear a load "thump!", as if something had been dropped on the floor, followed by a lot of loud rattling. I turn around and see Lucy in the box just having a grand old time, rolling around and rattling that box a good one. I grab the GX1 and snap a few shots before she notices me and the camera, then leaps out and back into her chair (which used to be my chair before she decided it was her chair).

Just like caring for Katie my black Lab taught me about dogs, caring for Lucy is teaching me about cats. She finds me fascinating, as I do her. And she expresses great affection and love toward me without coaxing. I try to return the affection and love, but she is a cat, and she takes a bat at me on occasion, although I think that's just her being playful. She always has her claws in when she does that.

She sits next to me during the evening in her chair while I sit in mi…