Home Linux On Laptops Creative Commons License 25 November 2007

Linux on a Sony Vaio VGN-FZ11E laptop

When I bought this Sony Vaio FZ11E laptop on 1 July 2007, it was a fairly recent model, for which the distributions were not ready.

I first tried to run the live CD of Kubuntu 7.04 (Feisty Fawn) in order to do the installation. The system failed fairly early in the process. It landed me at a command prompt in the busybox application, while the root file system was still the initramfs system. When I exited the shell, a new shell was spawned.

Then I tried the net installation CD of Debian 4.0 (etch). This worked fine, and I was presented with the installation menu.

I had some problems with the recognition of my devices. An error message reported that there was no driver for my ethernet card, after which I was returned to the menu. However, there seemed to be a new menu entry. After running that, the device recognition ended with the same error, and returned me to the menu again. Again there seemed to be a new menu entry, which scanned the CD for modules. A large number of them were found and loaded. Now all devices were properly recognized and the installation could continue.

I installed the base system and a few tasks without further ado, including the KDE desktop task.

After rebooting, the display manager (actually the X server) failed to start. The nv kernel module was not ready for the graphics card, the NVidia GeForce 8400M GT.

At this point you should not install the NVidia kernel module in the etch distribution. You should go straight to the NVidia web site, download the latest driver for AMD64/EM64T and install it.

That is not what I did. I first tried the NVidia kernel module that is part of the etch distribution. It turned out not to be able to handle the new graphics card either. Worse, it blocked the screen and the keyboard. The only thing I could do is press Ctrl-Alt-Del, which still worked. However, after rebooting, the display manager was automatically started, and the graphics card driver made the system hang again. The only way out was booting the system in single user mode, and disable the startup script of the KDM display manager. I did that by renaming the link S99kdm to something else in runlevels 2 and 3 (/etc/rc2.d/S99kdm and /etc/rc2.d/S99kdm).

At this point you should purge the nvidia packages nvidia-glx, nvidia-kernel-2.6-amd64 and others; removing them is not enough.

That is not what I did. As usual I just removed the packages, leaving their configuration files on the system. Then I downloaded the latest driver for AMD64/EM64T from the NVidia web site and installed it. The X server and the KDM display manager started OK. I enabled the startup scripts of the KDM display manager again, and rebooted to enjoy my success. Alas, no such luck. For some mysterious reason the X server died due to some signal. After some lengthy but unsuccessful investigations I decided to try and reinstall the NVidia driver again. The installer told me that the files installed earlier had been modified by another script. Like after the previous installation the X server and the KDM display manager started OK.

It was already late, and I wanted to shut the machine down, but by accident I rebooted it. While I looked with annoyance at the messages floating over the screen, my eye was caught by the text 'Removing NVidia TLS links' or something similar. Next day I grepped the startup scripts for this message. It was due to the nvidia-glx script, which apparently is considered a configuration file and was left behind after the removal of the package. I purged the nvidia packages nvidia-glx, nvidia-kernel-2.6-amd64 and others. Then I reinstalled the NVidia drivers and rebooted. Now everything was fine: I enjoyed the graphics KDE desktop.

Concluding: If I had not installed the NVidia driver that came with etch, but the latest driver for AMD64/EM64T from the NVidia web site instead, the installation would have completed fairly painlessly.

Wireless. I had to install separately the ipw3945 kernel modules, the ipw3945 firmware and the ipw3945 daemon (packages ipw3945-modules-2.6-amd64, firmware-ipw3945 and ipw3945d) to enable the Intel PRO/Wireless 3945ABG device. I do not understand why this was not done automatically during installation. There is a switch which disables wireless connections, but I doubt whether it also switches the device completely off and thereby hides it from detection. The wireless driver calls it the ‘Radio Frequency Kill Switch’.

I made myself a member of the group netdev, which allows me to use the network manager tool and its front end knetworkmanager. The latter appears in the system tray and allows one to browse, connect and disconnect the available wireless networks. I also installed the kwireless application, which appears also in the system tray, and displays information about the available wireless networks.

Screen resolution 1280x800. At first my display used a resolution of 1024 x 768. Probably I filled in the wrong resolution in the X configuration dialog during installation. I corrected it by filling in the correct resolution of 1280x800 in the ‘Modes’ lines in the Xorg configuration file /etc/X11/xorg.conf.

Touchpad. The touchpad was almost unusable under X. It did not obey KDE's mouse settings, and motion was unusably slow. The solution to this problem is given in the file README.alps in the documentation of the package xserver-xorg-input-synaptics. Because the Alps touchpad uses the synaptics driver but has a different resolution, the driver must be configured with special parameter settings in the X configuration file /etc/X11/xorg.conf. The readme file contains a list of recommended parameter settings, which must be copied into the appropriate section of the X configuration file.

With these setting the touchpad works fine. But it is very sensitive to double tapping. Because I hate this, I tried to disable it. The readme file explains that that can be done with a kernel patch, which however has its own drawbacks. I did it by setting the parameters MaxTapTime, MaxTapMove and MaxDoubleTapTime to the small value of 10. This means that touching the touchpad counts as a tap if it does not last longer than 10 ms. Indeed, tapping no longer occurs. These parameters are explained in the synaptics man page. The parameter MaxDoubleTapTime is not listed in the Alps readme file, and may be irrelevant for this touchpad.

The Sony Programmable Interrupt kernel module sonypi. The KDE control center mentions this module for Sony Vaio machines. It turns out that at this moment the kernel module is only available for 32-bit machines. It is present in the Debian kernels for the x86 architecture. But that does not help for modern 64-bit laptops.

The sony-laptop module aims to replace sonypi. As of kernel version 2.6.21 the module is part of the standard Linux kernel source code. It is available on the amd64 architecture. In later kernel versions, more functionality of the sonypi module will be inserted into the sony-laptop module, and eventually sonypi will be deprecated. As of kernel version 2.6.22 the webcam driver meye also uses this module. See the author's web pages Sony Vaio Control device drivers and especially Sony-laptop for details.

I compiled kernel 2.6.23 with the sony-laptop and meye modules. The source for the wireless ipw3945 kernel module in etch, package ipw3945-source, no longer compiles with this kernel. You must get version 1.2.0 from its website at SourceForge. The installation guide of this software is very complete. But if you have ipw3945 installed for an older kernel, you can skip many steps. This sequence of commands remains:

  % tar xzvf ipw3945-1.2.0.tgz
  % cd ipw3945-1.2.0
  % make
  # cp ipw3945.ko /lib/modules/$(uname -r)
  # depmod -a

The module will be loaded at the next bootup. To load the module immediately, do modprobe ipw3945. At some sessions the ipw3945 module misbehaved. It got into a loop, using all of the CPU. It was impossible to kill the looping process and to unload the module. Only a reboot helped. I have the impression that it happens when wireless is switched off.

The source of the NVidia driver that I used up to kernel version 2.6.22, viz. NVidia driver version 100.14.11, no longer compiles with kernel version 2.6.23. I retrieved NVidia driver version 100.14.19 from NVidia's website, and installed it in the usual manner.

I have not yet had much use from the sony-laptop and meye modules. I should try a bit harder to find out how to use their facilities.

Hibernate. Hibernation for a computer with multiple CPUs is enabled in kernel version 2.6.23 by the kernel options CONFIG_SUSPEND_SMP_POSSIBLE, CONFIG_SUSPEND, CONFIG_HIBERNATION_SMP_POSSIBLE, CONFIG_HIBERNATION. I compiled my kernel with these options enabled.

Turning on hibernation turned out to be surprisingly easy. I opened the KDE control center, went to ‘Power Control’, ‘Laptop Battery’, and enabled suspend and hibernate as desired. In the ‘ACPI Config’ tab I enabled standby, suspend and hibernate. In the ‘Button Actions’ I marked Suspend as the action for the ‘Lid Switch Closed’ event. In the ‘Low Battery Critical’ tab I marked Suspend as the ‘System State Change’. In fact, the laptop goes into hibernation when I close the lid.

Almost always the laptop resumes fine. When hibernation lasted somewhat longer, the session is locked after resuming, and the screen is blank. One has to make the usual keystroke or mouse movement, and unlock the session. On one occasion up to now the locked session did not make a connection to the keyboard, and I could not enter my password. The only thing I could do is start another session by clicking the appropriate button in the unlock dialog, and restart the laptop.

32-bit applications, like Skype and Googleearth. Even though every new laptop has a 64-bit processor, these two popular applications do not provide 64-bit executables for Linux. The only way to use them is by installing 32-bit compatibility. Very annoying. The web page Multi Architecture Debian GNU/Linux Installation by Fabio Pugliese Ornellas is very helpful. It is also a bit outdated. In a sense that is fortunate, because in Debian etch the procedure has become easier due to the smart tool schroot. See the Debian Wiki page DebianAMD64 and especially the The Debian GNU/Linux AMD64 HOW-TO.

I installed a base 32-bit system by using debbootstrap as described in these documents. But I did not make any of the links described by Ornellas. Instead, I am using schroot. I followed the howto and edited the configuration file /etc/schroot/schroot.conf. I added an ia32 chroot section very much after the example sid chroot at the top of that file. I set the personality to linux32, the type to directory and I enabled run-setup-scripts and run-exec-scripts.

[ia32]
description=IA32 compatibility
type=directory
location=/ia32
priority=3
root-users=myself
aliases=default
run-setup-scripts=true
run-exec-scripts=true
personality=linux32

On my machine I have multiple partitions, which are mounted at boot time. To make the same mounts at the start of a 32-bit session, I created the same mount points, e.g. fsb, in the root of my 32-bit directory and I added the mounts to the script /etc/schroot/setup.d/10mount; see line 4 of the code below. Because my home directories are on one of the mounted file systems, my /home is a symlink to the real location on the mounted file system, e.g. /fsb/home. To enable the same situation in 32-bit sessions, I created the exact same symlink /home to/fsb/home in the root of my 32-bit directory (remember, this 32-bit root directory will be the root of the 32-bit session), and I uncommented the mount of /home; see line 2 of the code below. As a result, the root directory of my 32-bit system has the same mount points and the exact same symlinks as my real root directory.

It could be the case that some build scripts for 32-bit applications want to read the real kernel headers. Therefore I created a symlink modules in the /lib directory of the 32-bit directory and I added the mount of /lib/modules, in read-only mode, to the mount script, see line 5 of the code below. I am not sure if this is ever needed. Anyway, it makes only sense if you have your own compiled kernels.

# /home is a link to /fsb/home
# do_mount "-o rw,bind" "/home"    "${CHROOT_PATH}/home"
# mount /fsb and /lib/modules
do_mount "-o rw,bind" "/fsb"     "${CHROOT_PATH}/fsb"
do_mount "-o ro,bind" "/lib/modules" "${CHROOT_PATH}/lib/modules"

I could then install Skype and Googleearth without difficulties. The deb package of Skype has good dependencies. If you try to install it, dpkg will complain about missing dependencies. Install those using apt or synaptic, and then install Skype.

To install Googleearth I used the Debian way, see Debian Way or The Hard Way: Installing Google Earth. It was indeed the hard way, because I had to edit the make-googleearth-package script to make it work with the current version of Googleearth. The resulting deb package of Googleearth has no dependencies. As a result dpkg happily installs it, but when I ran googleearth, it failed due to a missing library. Installation of the package libxft2 fixed the problem.

Installing Googleearth by using its installation script GoogleEarthLinux-4.2.bin is probably easier. Even then, you have to install missing libraries, probably the package libxft2.

If you have come so far, congratulations. You can now use Skype and Googleearth like all your 32-bit Linux or Windows using friends. Let us hope that 64-bit Linux will soon become a first-class citizen for these proprietary application providers. Of course, Googleearth works like a charm on this Sony Vaio laptop with its good NVidia graphics card.

Audio. CDs and OGG and MP3 files play OK. But audio input is a disappointment. The built-in microphone is very minimal. Therefore you want to plug in a headset with speakers and microphone. The headset does not disable the built-in speakers, so that having a private telephone conversation or playing your own music in a public place is not possible. The microphone generates an awful lot of noise. If you playback recorded sound, it is awful. If you use an echo service via a SIP phone like twinkle, your ears ache of the screaching sound that the speakers produce. Surprisingly, the result is much better with Skype. It is still not good, because there is still a lot of noise. I do not get this; the audio card is a normal Intel HDA card. How could that cause a problem? To be investigated further.

Still to do:

This document is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.