Thursday, 28 June 2007

D630 Update

I'm getting no where quickly trying to get the DVD and sound to work on the D630.

There are a lot of posts on different Linux forums describing the DVD problem on similar - but not identical - chipsets. The best I found is here. The advice is to add the parameter all-generic-ide to the "kernel" line in the GRUB bootloader config file /etc/grub.conf:

kernel /vmlinuz-2.6.18-1.2798.fc6 ro root=/dev/VolGroup00/LogVol00 all-generic-ide rhgb quiet

Unfortunately, it doesn't work on the D630.

I have also tried different BIOS options. In the BIOS, under "Onboard Devices","SATA Operation" is set to ACHI (Advanced Host Controller Interface .) The BIOS says the factory default is ATA. Obviously that's not the Dell factory default. If you try to change it you are warned that "SATA Operation must be AHCI when the Flash Cache Module is enabled." Presumably, Dell have enabled the Flash Cache Module to allow the machine to support Vista ReadyDrive. I disabled the Flash Cache and set "SATA Operation" to ATA: Fedora would no longer boot. I did try booting from the Fedora 7 setup DVD (thinking that a reinstall might not be too high a price to pay to get the DVD working) but it was still not recognized - not even with all-generic-ide.

I've had no better luck with the sound card. I have rebuilt the ALSA (Advanced Linux Sound Architecture) driver, library and utilites but it has made no difference.

It is not just a case then, of getting the latest drivers or changing some settings. The brutal fact seems to be that the current builds of the Linux kernel and drivers simply do not fully support the GM965 chipset. I can probably live without the DVD and without any sound for a while until updates are released, which of course they will be. However, this does highlight one of the difficulties of choosing Linux as your OS - especially in a business environment. Businesses tend to have regular hardware refresh cycles; they need to be comfortable that their loadset images are going to work with the hardware they purchase. The dominance of Windows means that hardware vendors support for Linux will at best be an after-thought, or more likely just be left to the Linux community.

Monday, 25 June 2007

Dell D630 Wireless

The Dell D630 wireless card is supported by Fedora out of the box. For once, I don't need to build any software. All that is required is that you configure it for your network as below.

The two outstanding items are the DVD drive and the sound card. The DVD drive is probably the most important, so I'm going to look at that first.

Dell D630 Graphics Fixed!

I built the Intel 3D driver following the excellent instructions on the Intel website here. I've had no trouble at all building the drivers on Fedora 7 - so if you are thinking about it, don't be put off. Having built and installed the drivers however, I still had no 3D functionality. beryl no longer whitescreened: it didn't do anything. The Intel instructions tell you to run glxinfo to check that direct rendering has been enabled. You should see something like this:

$ glxinfo grep direct
direct rendering: Yes

(grep is one of the wonders of the unix world. I can't believe Microsoft didn't clone it in the early days.) What I saw was "direct rendering: no"

One of my problems is that I'm having to learn Linux as I go along, and it takes me a while to find out about the basic stuff that I really should know about. Every time the X Window System starts up, it creates a a log file at /var/log/Xorg.0.log. This log file is packed with information, and tells you just about everything you need to know about what's happening with your graphics setup. For example:

(II) Loading /usr/lib/xorg/modules/drivers//intel_drv.so
(II) Module intel: vendor="X.Org Foundation"
compiled for 1.3.0, module version = 2.0.0

I wish I'd checked this before upgrading the 2D driver. I would love to know if version 2.0.0 is installed when you install Fedora 7. If you know, please leave a comment.

Looking through Xorg.0.log I saw the following entry:

drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is -1, (No such device)

There are lots of questions on the Linux forums along the lines The directory /dev/dri exists, but there is no card0 device. How can I create it? The answer is that you don't: the X server creates it as needed. What allows the X server to create the card0 device is drm. My mistake was that I hadn't rebuilt drm along with the graphics drivers. I rebuilt drm (again following the Intel instructions) and then rebuilt the 3D graphics drivers just in case. After a reboot /dev/dri/card0 was present and glxinfo reported "direct rendering: Yes"

I started beryl. Still nothing. By starting beryl in a terminal window with the -d switch, I could see errors like this:

$ beryl-manager -d

[...]

Xlib: extension "XVideo" missing on display ":0.0".
xvinfo: No X-Video Extension on :0.0

[...]

Checking for XSync extension : failed

No sync extension
beryl: No sync extension
Xlib: extension "SHAPE" missing on display ":0.0".

The X library "extensions" are loaded via libextmod.so, which was present on the system, so what was going on? The solution was simple (once I knew what it was.) All I had to do was to explicitly tell the X Windows System to load the module by adding Load "extmod" to the "Module" section of the /etc/X11/xorg.conf file:

Section "Module"
Load "glx"
Load "dri"
Load "extmod"
EndSection

That was it - job done! After a restart everything worked and beryl was back. I'm still struggling with the D630 screen. It is not as clear as when the same machine was running Vista, but that is only part of the problem. This a 1440x900 resolution screen that is physically only 30cm x 19cm in size; 14.1" wide aspect. My 19" desktop monitor runs at 1280x1024. Even on Vista most people would want to use larger scale 120dpi fonts. It requires a lot of fine tuning.

Friday, 22 June 2007

Building the Dell D630 Graphics Driver (Cont.)

Thanks to this post I realised that I was missing the xorg-server.pc file. This is installed by the SDK for developing X server driver modules. Doh! Well you live and learn. You can install the SDK from the Fedora xorg-x11-server-sdk package. That done, the driver built beautifully.

./autogen.sh --prefix=/usr
make
su
make install

If you don's specify the prefix, the drivers get installed to /usr/local/lib/xorg/modules/drivers/ rather than /usr/lib/xorg/modules/drivers/ which is the drivers directory used by Fedora.

And the driver has made absolutely no difference at all :-(

The system says it is still using the "Intel - Experimental modesetting driver for Intel integrated graphics chipsets" video card. More importantly, the display looks just like it did before. Was Fedora already using this driver? I haven't been able to find out. However, the job is only half done. I've built the 2D driver; I now have to build the 3D driver.

Building the Dell D630 Graphics Driver

Fedora 7 on the D630 is not a practical option as things stand, because of the lack of support in the OS for key components of the hardware. I could of course wait until that support arrives, but if I want to run Linux now I really only have one option: that is to enable support for the hardware myself. On the plus side, Intel have released open source drivers for the graphics card and (I believe) the sound card. I don't know about the DVD drive. On the downside, I need to build the drivers myself.

So, ignoring Intel's ominous warning that "Compiling and/or upgrading graphics drivers in Linux is a complex and error-prone task", I've downloaded the source code from Intel here. To download the driver software you need git, which is not installed on Fedora by default. However, you can easily install the git package using yum or pirut (Add/Remove Software.)

git-clone git://anongit.freedesktop.org/git/xorg/driver/xf86-video-intel

Once you have downloaded the driver software, cd to the xf86-video-intel directory that git creates, and see what happens when you start to compile the drivers:

./autogen.sh

This first thing that happened when I ran autogen.sh was that I got an error checking for intel-gen4asm. This was easily fixed by downloading and making the software:

git-clone git://anongit.freedesktop.org/git/xorg/app/intel-gen4asm
cd intel-gen4asm
./autogen.sh
make
su
make install

However, I'm now getting this error:

./configure: line 20243: syntax error near unexpected token `XINERAMA,'
./configure: line 20243: `XORG_DRIVER_CHECK_EXT(XINERAMA, xineramaproto)'

For once, there are plenty of hits on Google for this error, which is said to be related to the xineramaproto.pc file. However, I have the xineramaproto.pc in my /usr/lib/pkgconfig/ directory, which is on my PKG_CONFIG_PATH. I'm guessing it is an environment variable problem, but at the moment this is holding me up.

Tuesday, 19 June 2007

Installing Fedora 7 on a Dell D630 Laptop (Cont.)

The machine did boot. However, all is not well. The DVD drive, which caused the installation problems, does not show up. I've no sound. The sound card detected is the "Intel Corporation 82801H (ICH8 Family) HD Audio Controller." Which - presumably - is wrong.

The system is using an "Intel - Experimental modesetting driver for Intel integrated graphics chipsets" driver for the D630's Intel GMA (Graphics Media Accelerator) X3100 graphics card. This works up to a point. It is successfully driving the display at 1440x900 resolution, but the screen has an oddly milky appearance. Support for the GM965 Chipset as a whole is obviously an issue. I have a vision of looking in Windows Device Manager and seeing all those yellow exclamation marks in the device tree.

And tragically trying to run Beryl is a disaster. All I get is a screen whiteout. It's probably the experimental graphics card driver. All that graphics capability is going to waste... I need to get better hardware support from somewhere, or things are looking bad.

Installing Fedora 7 on a Dell D630 Laptop

I start by booting the Laptop from the Fedora 7 install DVD. On the "Installation Method" screen you are asked "Which type of media contains the packages to be installed?" I choose "Local CDROM" Immediately there is a problem. I get an error message saying "No driver found":

Unable to find any devices of the type needed for this installation type. Would you like to manually select your driver or use a driver disk

Selecting any of the listed drivers just brings me back to the same screen.

I try booting from a Fedora Core 6 CD instead of the Fedora 7 DVD. This time everything is fine. Obviously, the Fedora 7 installer doesn't contain any drivers for my DVD drive, or more likely the ICH8M Intel Ultra ATA controller it is hanging off of. Not good. Still, I should be able to get Fedora 7 loaded from CD instead of DVD. Accept... There aren't any CD images. The Fedora Project website states "Beginning with Fedora 7, it is recommended to use Live images to install on a system with a CD-ROM only." So I try that. The problem is the Fedora 7 Live CD doesn't work either! All I get is an error:

---------------------------------------------------
WARNING: Cannot find root file system!
---------------------------------------------------
Create symlink /dev/root and then exit this shell to continue the boot sequence.

For a few minutes it looks like I'm hosed and that I'm going have to go back to Vista. But then I have a better idea. I boot from the DVD again. This time when I'm asked what type of media contains the pacakges to be installed I choose "HTTP." I'm prompted to configure TCP/IP (and just accept the defaults) and the machine gets an IP address. I'm then prompted for a Web site name and the Fedora directory. It works! The installer is now pulling down the packages from a mirror site.

Trying to install Linux on the latest hardware is clearly a problem. I just hope the system boots when the installation is complete.

Decision Time

My new Dell 630 laptop has been delivered. It is time to put my money where my mouth is. Will Fedora be my main OS on my new laptop?

If you have read any of the posts here, you will know what the answer is already. Despite the problems and compromises, it's a no-brainer: I'm going with Linux.

Of course, because of VMWare I do have a get-out-of-jail-free card: I can run multiple OSs on the same system - and being a Windows developer I will definitely need to do that. But because I really want to explore Linux, Linux has to be the main OS. If I was configuring this machine for a colleague, I probably wouldn't make the same choice. Probably... But I'm going to keep that discussion for another time.

Interestingly, despite Dell saying "The fully configurable Latitude D630 can come pre-loaded with new Windows Vista, Windows XP or FreeDOS to suit your business needs..." Dell wouldn't sell me a D630 without Windows pre-installed. However, after some negotiation with our account manager a mutually acceptable deal was struck :-)


My first impression of the D630 was how much smaller it seemed than the older latitudes I've used in the past. This is the result, I think, of the wide aspect screen which makes the machine narrower - and lighter. It is not a wholly positive impression - the screen does seem small. Still, I guess I'll get used to it.

Monday, 18 June 2007

I love Beryl (True)

What is it about Linux? Perhaps because of the collaborative nature of the Linux community, because of the strict rules on how things are done necessitated by its collaborative nature, nobody wants to shout about anything, even when they have something to shout about. Fedora 7 is taken to be a "bleeding edge" distro. So why isn't beryl installed by default, or at least why isn't there an option to install it?

What's beryl? Beryl is an OpenGL accelerated desktop that gives you all the features you've heard about from Windows Vista: "glass" toolbars; 3-D Windows transformations; Windows "thumbnails." What's more, because it's based on OpenGL, you do not need 256Mb of dedicated Video RAM to get it to work. Beryl works beautifully on my old Toshiba laptop.

Now I have read articles where is beryl is discussed in dismissive tones as "eye-candy." Anyone who takes that position is betraying a profound ignorance of the computer market. As I have discussed elsewhere, the "wow" in Microsoft's multi-million dollar marketing campaign for Windows Vista is precisely this "eye-candy." Beryl blows it away.

So install it! On Fedora 7 it's right there. Just go to "Add/Remove Software" and install beryl-gnome - the "meta-package" to install all beryl components. Once you are happy that everything is running, you will want to get beryl to start automatically. Just type gnome-session-properties in a terminal window and add the Beryl Manager to Startup Programs. The default install location is /usr/bin/beryl-manager.

This being Linux, you can now spend many happy hours running the Beryl Setting Manager to configure all the different options with all their different parameters. Absolutely brilliant!

Friday, 15 June 2007

RealPlayer

One area where it might be thought that Linux lags behind Windows and OS X is in delivering multimedia content, and in particular video. Possibly this is because the idea of a free Operating System does not sit comfortably with the restrictions imposed by Digital Rights Management (DRM) and enforced - not to say embraced - by Windows Media Player, QuickTime and iTunes.

So what if I want to watch some free content, say from the BBC news website? Well, things aren't good. If you try to watch a news story you just get a error saying "Not yet supported."


The software that does not yet support the video format is the Totem Movie Player for the GNOME desktop. At this point you only have one option, and that is to install RealPlayer.

Now sometimes small things trip you up. How difficult could it be to get RealPlayer working with Firefox? I've been trying (on and off) for a week.

There are two ways to download RealPlayer: as a binary file - RealPlayer10GOLD.bin - and as a .rpm. If you go for the binary you have to make it executable first:

su
chmod +x RealPlayer10GOLD.bin
./RealPlayer10GOLD.bin

You then get prompted for the install directory:

Directory: [/home/David/RealPlayer]: /usr/share/RealPlayer

Note that the default install location is completely unhelpful...

Unfortunately, there is a good chance that the install won't run at all. Instead you will get an error along the lines of "error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory." RealPlayer, it turns out, tries to link to an old C++ library. We fix this by calling yum which installs compat-libstdc++-33:

yum install libstdc++.so.5

At least if you run the binary you see this problem early. If you use the .rpm everything appears to be OK until you try to run RealPlayer. As is so often the case with the Linux GUI nothing happens. You have to run RealPlayer from a terminal to see that the library is missing.

Run RealPlayer from the "Applications/Sound & Video" menu first. RealPlayer will then configure the (Mozilla) Firefox plugin for you. So we're good to go, right? Er... no. If I go back and try and watch the news story again all I see is this:


Now what I can do is launch the video in a standalone RealPlayer, although that is hardly ideal. Sadly, that is as far as I've got. I've spent a long time trying different configurations and on searching for a solution, but without success. The BBC website itself notes:
You may find that you are only able to listen to live radio using the Listen using stand-alone Real Player link.
Disappointing.

Thursday, 14 June 2007

Liberation Fonts

The font issue that I described here is a serious one. Red Hat have made a new set of fonts available, called Liberation, which are free to use and free to distribute. You can read more here: http://www.press.redhat.com/2007/05/09/liberation-fonts/

Firefox still looks crap, but Red Hat should be given a great deal of credit for beginning to address the issue.

Fedora 7

I've been running Fedora 7 for almost two weeks. To be honest, in terms of the user experience the changes over Fedora 6 are pretty minimal. The most notable features are the new Fedora default theme with its blue folders, and the advent of Fast User Switching à la Windows XP, Vista and OS X.


Like OS X, a "User Switcher" option appears in the Notification Area on the desktop next to the clock. Or, at least it should. I upgraded my previous installation of FC6 to Fedora 7 so that I could keep my home folder and settings (and all the work I'd done with Evolution.) The "User Switcher" does not appear in my upgraded desktop the Notification Area, although it does appear on the desktops of any new users I create. This isn't really a problem for me, and I haven't spent any time investigating.

Upgrading was easy. The biggest problem I had was that GRUB (the Linux boot loader) insisted on trying to boot FC6 - which no longer existed. I could hit a key to choose Fedora 7 from the menu, but I usually forgot. The answer was to edit the /boot/grub/menu.lst file and set the "default" value to zero so that GRUB would boot the first option listed (Fedora 7) rather than FC6. I suppose I could just have deleted the FC6 option altogether, but I was worried about screwing things up and not being able to boot at all...

Other than that, I had to rebuild my MadWifi wireless driver so that it would work with the new kernel, and - strangely - I had to reinstall the Java runtime. But that was it.

I continue to be very impressed with the Linux OS. My feeling about Linux "office" applications is less unequivocal. Fedora 7 comes with OpenOffice 2.2. Although OpenOffice applications are perfectly practical, because they are imitations of Microsoft Office applications you cannot help but compare them to the original: and if you do that, they are always going to fall short; they are always going to look and feel less slick and more clunky. I did download StarOffice, the paid-for version of OpenOffice from Sun. My advice would be don't bother. These is no difference in terms of functionality as far I could tell. StarOffice is supported, of course, but other than that there seems no reason to purchase.

Despite my misgivings about OpenOffice, and despite my frustrations with Evolution, I'm using Fedora as my laptop OS. Since installing Linux on an old Toshiba laptop about three weeks ago, I've only gone back to my Vista laptop once.

Monday, 4 June 2007

A final word on building Evolution 2.10

Happily I have now resolved the two errors that were causing me problems. The first error -"Could not connect to Evolution Exchange backend process" - was caused by the wrong version of evolution-data-server running in the background. The problem seems to have been related to the evolution-data-server entry in the bonobo-activation-config.xml file - which I swear I had already updated. The second error - "Could not create composer window" - was also fixed by adding an entry to the bonobo-activation-config.xml file: this time, for gtkhtml. The key here was to rebuild gtkhtml with --prefix so the new version got installed into a different directory. I then put the new path in the bonobo-activation-config.xml file so that it was the new version that got called by Evolution not the version originally installed. This is an important lesson learnt. There is so much integration between gnome applications, like Evolution, and the gnome desktop that you really need to keep any updated builds separate.

So what is Bonobo? Bonono "is the GNOME architecture for creating reusable software components and compound documents." (See here.) It is a set of CORBA interfaces

which will ultimately provide the ability to [do] a lot of things that users of GUI-systems such as MacOS and Windows have gotten used to, such as embedding spreadsheets in word-processing documents, reusable user interface controls, scriptable components etc. (Here.)

It's COM for Linux. I won't go any deeper into this now. Suffice to say, I think, that unlike COM, CORBA has never really been wholly embraced by developers. Rightly or wrongly, it has a reputation for being overly complex - as if COM is not complex enough. However, it is clear that by editing the bonobo-activation-config.xml file we have some control over which version of a component gets called.

So Evolution 2.10.2 is working! What's more, Fedora 7 ships with version 2.10.1, so maybe my efforts have been of some practical value: I will still be running software I build myself on Fedora 7. I did finally find some instructions for building Evolution - although much too late for me. The website is http://www.go-evolution.org/ Thanks to Novell for providing a link on the main Evolution site... not. I have to say I have to disagree with the author of the instructions. They start off saying "building it ain't really hard at all" which is true; but then in the very next sentence go on to say:

Normal users (who aren't planning to start developing Evolution) shouldn't be reading this. Really. I'm serious about this! You will probably not understand a single thing about this documentation if you don't have a strong Linux-development background!

This is developer bull. You do not need to know anything at all about development to make and install software on Linux.

But that is enough about Evolution. Fedora 7 is out and its time for something new.

Friday, 1 June 2007

Running Evolution 2.10

I wish I could say I was running Evolution 2.10. The truth however, is that despite having successfully built the software it isn't working.

The first error I get is "Could not connect to Evolution Exchange backend process" when trying to connect to Exchange:


My feeling is that this is related to having two versions of Evolution and evolution-data-server installed on the machine. If I force a shutdown with evolution-2.10 --force-shutdown I get the message "Shutting down evolution-data-server-1.8" which is the wrong version.

That's bad enough, but I can't reply to any mails at all without a "Could not create composer window" error - and a crash.


So why not just remove the old version of Evolution? The problem with that is the way that the Fedora Package Manager works - either though yum or pirut ("Add/Remove software".) The Package Manger is excellent at installing any dependencies a software package might need to run when it is installed, but when it comes to uninstalling the software things go a bit wrong. Evolution is dependent on Gnome libraries in order to run. So what do you think happens if you uninstall Evoluton? Gnome gets uninstalled as well. That's right, you lose your desktop. Genius!

Fortunately, I was running VMWare when I discovered this little quirk, so I could just rollback. However, this is a serious failing. You should surely be able to remove your email client without removing your desktop.

So perhaps I just need to find a way of getting Evolution-2.10 to run with the right build of evolution-data-server... But then, Fedora 7 has been released.