Linux on the Sony VAIO Z505HE/HS/JE/JS

Author:Alex Stewart
Last Update:Mon, October 30, 2000



CPUIntel Pentium III 450MHz/500MHz/650MHz
RAM64MB/128MB (192MB/256MB max)
Hard Disk8GB/9GB/12GB
Display12" TFT
Display ChipsetNeoMagic 256AV, 2.5MB (HE/HS/JE)
NeoMagic 256XL+ 8MB (JS)
Audio ChipsetYamaha YMF-744B
EthernetIntel EtherExpress Pro 100
Modem ChipsetConexant (Rockwell) Unknown device 2443
USB ChipsetIntel 82371AB PIIX4 (UHCI)
FireWire (IEEE 1394)Sony CXD3222
Sony CD-ROM (PCGA-CD51)Toshiba XM-1902B ATAPI PC-Card (sold separately)

Linux Compatibility Summary

DistributionRed Hat Linux 6.2
CD-ROM installYesrequires boot parameter
Network installYes
Kernel upgradeRecommended2.4.0-test5
VideoYessee install notes for Z505H-series and Z505JS-series
EthernetYessuspend bug workaround required
SoundYesALSA drivers required
ACPIUnknownRecognized, not tried fully (requires kernel upgrade)
Suspend to RAMYes
Suspend to DiskYesnote installation requirements
USBYesrequires kernel upgrade
FloppyYessee "USB". See note below
IRDAYessee configuration notes
FireWireProbably(not tried)
Jog-dialUnknown(not tried)
Memory StickUnknown(not tried)
Port ReplicatorYes
(sold separately)
Yesfull support requires kernel upgrade and pcmcia-cs upgrade
(sold separately)
Yes(compatibility mode)
ModemNoRockwell WinModem

Notes on this Document

This document, and accompanying files, represents the sum of my knowledge gained while working to get linux to function well and completely on my Sony Z505HE laptop, access to a friend's Z505JS laptop, and reports from others out there on the net. From my understanding, everything in this document should apply equally to the Z05HS/JE models, which are basically identical except for processor speed, hard disk size, and default RAM configuration.

This document is presented more or less in "HOWTO" form, and should be a reasonably complete description of everything required to install a fairly complete linux installation on a Z505H-series or Z505J-series laptop. There are some assumptions that have been made due to my own choices (and therefore what I have experience with) and personal preferences:

Suggestions for improvements or corrections are always welcome. In particular, any information on compatibility of information here with other Z505 models, or issues with hardware differences I'm not aware of within the Z505H/J line is of great interest. Please see the end of this document for links to other useful resources.

For those looking for a quick-and-easy way to get everything set up correctly on their own machine, you may wish to go directly to The Easy Way, at the end of this document.

Differences Between Models

This document was originally written for the Z505H-series laptops based on my experiences with my own. Since that time I have gotten some access to, and reports of, other models of Sony's Z505 line, and confirmed that many of the techniques described here apply equally well to them. However, there have been several generations of Z505 laptops produced by Sony, most notably the older R- and S-series, the H-series, and now the J-series, and there are some differences between these models which one should be aware of:

From what I understand, the R-series and S-series laptops were fairly compatible with linux out of the box, and thus do not require a lot of tweaking. The one major feature of these laptops (as with all the Z505 laptops) which current linux distributions do not support is the USB floppy drive, and thus you may wish to upgrade the kernel to gain this support. The kernel RPMs and other software provided in the Software section at the end of this document should work equally well on the Z505R/S laptops for this purpose, and has reportedly been successfully used on Z505S-series models (anyone with additional information on this, please let me know). While some of the changes described and software available here may not actually be necessary on the R/S laptops, as far as I know, none of them should hurt anything if applied. There are quite a few other documents available for setting up Linux on these models as well, please see the Linux on Laptops page for more info.
The main difference with the H-series laptops was the change from using the (well supported) NeoMagic 256AV chipset's sound hardware, to using a separate Yamaha YMF sound chipset. Until very recently, the YMF chips have not been supported under Linux, and thus the H-series models require the installation of newer sound drivers in addition to a kernel upgrade in order to get the sound working. There are also a few BIOS incompatibilities and driver bugs which must be worked around, as described in this document.
The J-series laptops are, in most respects, basically the same as the H-series laptops. The largest difference appears to be present only on the JS model, which includes a newer Neomagic 256XL+ chipset which requires some configuration tweaks to be recognized properly.

Basic Installation

Note: Please read through this entire section before beginning your installation. You may also wish to print out this document for easy reference.

Installing Red Hat Linux on the Sony Z505H/J is fairly easy. You have a choice of two methods: Network install from another machine, or if you have the Sony CD-ROM (or DVD) drive, installation directly off of a Red Hat CD-ROM.

Before You Install

Before you install, you should turn the "Plug & Play O/S" feature off in the BIOS. Failing to do this may cause the machine to lock up when trying to configure the ethernet device during installation. To do this, perform the following steps:

  1. Turn on the machine.
  2. During boot, once the "SONY" logo is displayed, press F2 to enter the PhoenixBIOS Setup Utility.
  3. Once in the setup utility, press the right arrow key to move to the "Advanced" screen.
  4. Press the down arrow key until "Plug & Play O/S" is selected.
  5. If "Plug & Play O/S" is listed as "[Yes]", press the space bar to change it to "[No]".
  6. Press the right arrow key until you reach the "Exit" screen.
  7. Press enter to select the "Exit (Save Changes)" option. The system will reboot.

You can then proceed with the rest of the installation as detailed below.

CD-ROM Install

If you have the Sony PC-Card CD-ROM drive (sold separately) and a copy of Red Hat Linux on CD-ROM, you can install Linux directly off the CD-ROM. Note that there is direct BIOS support for the Sony CD-ROM drive which allows this. Other PC-Card CD-ROM drives may not work, or may require other procedures to work, as they have not been tested. Note: If you are using Sony's PCG-DVD51 DVD-ROM drive, this procedure will also work, but you must make sure its external power supply is not connected (BIOS support for the DVD-ROM drive does not work if its external power is plugged in). I know it sounds strange. It is.

To install off of CD-ROM:

  1. Connect the drive and place the CD-ROM in the drive before turning on the Z505. When the machine is turned on (assuming the BIOS is configured to boot from the CD-ROM, which is the default), it will boot off of the CD-ROM and present you with an initial text screen.

  2. Contrary to the instructions, do not simply hit enter at the initial screen. Instead, type the following:
    linux ide2=0x180,0x386
  3. Proceed with the installation as described below.

Network Install

If you have another machine which can serve as a NFS, HTTP, or FTP server, and a network, you can perform a network install using the built-in ethernet adapter:

  1. Insert the CD-ROM in the server machine (or otherwise make the files on the CD-ROM available to that machine)
  2. Configure your NFS services, HTTP server, or FTP server as necessary to make the files accessible via NFS, HTTP, or Anonymous FTP.
  3. Using the server machine or another machine, use dd (under linux/unix/etc) or the provided DOS utility to copy the network boot disk image (images/bootnet.img) to a floppy
  4. Plug the Sony Z505 into the network
  5. Plug the USB floppy drive into the Sony Z505HE/HS
  6. Boot the Sony Z505 using the network boot disk and follow the prompts

More information on this installation method can be found in the Official Red Hat Reference Guide and various online documents

Important Considerations

There is one thing you may want to consider while installing linux on the Z505. In order to use the (very handy) "Suspend to disk" function of the Phoenix NoteBIOS (Fn-F12 on the Z505), the BIOS must be able to locate a special save-to-disk area on the hard drive. This area is typically located in a file stored on a FAT-formatted partition of the hard drive, and since linux doesn't use FAT-formatted partitions for its normal operations, if you want to use this feature, you will need to set aside a small bit of the disk for this purpose.

There are several very important requirements for this suspend-to-disk partition:

In addition, there are several requirements introduced by the techniques described in this document for setting up the partition, and the techniques used by the fixup kit:

While it is sufficient to have a partition large enough for just your current needs, it is reccomended that one be created which is large enough for the largest possible amount of RAM (192MB on the HE/JE, 256MB on the HS/JS), as the additional space spent will only be a small portion of the total size of the disk, and will allow you to add RAM later without needing to repartition the hard disk. For this reason, a total partition size of around 200MB or 264MB is reccomended, depending on what model you're using.

Unfortunately, due to the above constraints, and the fact that the Red Hat installer's disk partitioning tool (Disk Druid) is extremely poorly designed, paritioning the hard drive properly to support suspend-to-disk on the Z505 requires the use of the (harder to use) fdisk utility for part of the install. To do this, perform the following steps:

If you are using the text-mode installer (Z505JS users)

  1. Perform a normal installation until you come to the screen asking for "Installation Type"
  2. Choose "Install Custom System"
  3. When prompted to use Disk Druid or fdisk, choose "fdisk"
  4. Choose "edit". This will run the fdisk program.
  5. At the fdisk prompt, type "p" and press enter. This will list the current partitions on the disk.
  6. For each partition listed, type "d", press enter, and enter the number of the partition to delete it (you actually only need to delete partitions numbered 1-4).
  7. Add a new partition by entering "n".
    1. Enter "p" for a primary partition.
    2. Enter "1", to add partition 1.
    3. Enter "1" to start on cylinder 1.
    4. Enter "+264M" to make the partition 264MB in size (or "+200M" for the HE/JE).
  8. Set the type of the newly created partition by entering "t"
    1. Enter "6" for the partition type.
  9. Enter "p" to view the current partition table. You should see a single partition listed:
       Device Boot    Start       End    Blocks   Id  System
    /dev/hda1             1        34    273073+   6  FAT16
  10. Enter "w" to write your changes and exit the fdisk program.
  11. When you return to the "Disk Setup" screen, press Ctrl-Alt-Del to reboot the machine.
  12. Re-run the installer, and choose your desired installation type (GNOME/KDE/Server/Custom) as normal.
  13. When you are asked whether to Continue (automatically partition) or Manually Partition, you can safely choose either option.

If you are using the graphical installer:

  1. Perform a normal installation until you come to the screen asking for "Install Type"
  2. At the "Install Type" screen, make sure the "Use fdisk" checkbox (in the upper-right corner) is checked before pressing the Next button.
  3. When asked to "select drive to run fdisk on", press the "hda" button. This will run the fdisk program.
  4. At the fdisk prompt, type "p" and press enter. This will list the current partitions on the disk.
  5. For each partition listed, type "d", press enter, and enter the number of the partition to delete it (you actually only need to delete partitions numbered 1-4).
  6. Add a new partition by entering "n".
    1. Enter "p" for a primary partition.
    2. Enter "1", to add partition 1.
    3. Enter "1" to start on cylinder 1.
    4. Enter "+264M" to make the partition 264MB in size (or "+200M" for the HE/JE).
  7. Set the type of the newly created partition by entering "t"
    1. Enter "6" for the partition type.
  8. Enter "p" to view the current partition table. You should see a single partition listed:
       Device Boot    Start       End    Blocks   Id  System
    /dev/hda1             1        34    273073+   6  FAT16
  9. Enter "w" to write your changes and exit the fdisk program.
  10. When you return to the screen asking to "select drive to run fdsik on", press the Back button.
  11. On the "Install Type" screen, uncheck the "Use fdisk" box, select the type of install desired, and press the Next button.
  12. When you are asked whether to Remove Data or Manually Partition, you can safely choose either option.

For more information on creating and using this save area after the basic installation has been done, see the section below, "Setting up Suspend-to-disk".

Notes for Z505HE/HS/JE Users

There's really only one other issue which one needs to look out for during the actual installation of Red Hat Linux 6.2 on the Sony Z505HE/HS/JE. When you come to the portion of the configuration for monitor and display type, choose "LCD 1024x768" (ok, that wasn't that surprising). On the next screen, if you attempt to test the configuration using the "Test" button, it will not work, but don't get discouraged. Check the checkbox for "Customize Configuration" and press "Next". On the next screen you will be asked for display resolution. Select "1024x768, 32bpp". If you test this configuration it should work, and you can continue on as normal.

(The issue here, for those who are interested, is that the frequency specifications for the LCD 1024x768 entry are such that, were it a CRT monitor, XFree86 would be able to do higher resolutions. Since the installer doesn't know that there are other physical constraints limiting it to 1024x768, it defaults to using a higher resolution, which the LCD actually can't display. You must manually tell it to only use the 1024x768 video mode before it will be able to display anything using the LCD screen. This is actually true for most laptops with this size of display.)

Notes for Z505JS Users

Because the Z505JS uses a newer video chipset which is not autodetected by the installer, you will only be able to use the text-mode installer. You will also not be able to properly configure the screen for X-windows in the installer. Instead, when prompted, choose a Neomagic video card, choose whatever you want for the other options. When given the opportunity to Skip configuration, choose that option. After you install a text-mode linux system, you will need to login and apply the configuration fixes below, and will then be able to configure your graphics display properly.

Upgrading the Kernel

What is the Kernel?

The kernel is the core of the linux operating system. It contains the code which allows linux programs to execute and communicate with the hardware to do what they need to do. This includes all of the hardware device drivers, routines for accessing files on disk, memory management, network handling, etc.

Why Would I Want to Upgrade my Kernel?

As of this writing, Red Hat Linux 6.2 comes with a fairly recent "stable" (version 2.2) version of the linux kernel, so it might appear that there's no real reason to install something else. There are, however, quite a few advancements in the linux kernel which can be found in the newer "development" (version 2.3) kernels, several of which are useful on the Z505:

In general, the biggest reason to upgrade the kernel is USB support, which allows you to use the USB floppy drive which comes with the Z505. For most people, this alone is enough reason to perform the upgrade.

Why Would I Not Want to Upgrade my Kernel?

The 2.3 kernels are "development" kernels. This means that they're works-in-progress, and may contain some bugs, glitches, or horrible system-crashing flaws. Now, that may sound pretty bad, but in reality, the 2.3 line is currently in its "pre-release" phase, which means new developments have actually finished and it's undergoing final finish-ups and testing before becoming the next "stable" kernel release (version 2.4). The astute may notice at this point that this document actually describes upgrading to a kernel with a version number of 2.4.0, which sounds like a stable kernel, but it's important to note here that this is still a "test" kernel (2.4.0-test5), which is still roughly akin to "beta" software in most other software-development worlds. Does it have bugs? Maybe a few, and you might just run into a new one nobody knows about, but they're being cleaned up fast, and for the most part it runs pretty well, and you may well never notice you're using a "development" or "test" kernel.

Upgrading to a development kernel is a calculated risk, and one only you, the end user, are qualified to decide. You may want to keep the 2.2 kernel that comes with Red Hat Linux, you may want to wait around for a month or two until the "stable" 2.4 kernel becomes available and use it instead, or you may want to go ahead with the "test" kernel. The choice is up to you.

How do I Upgrade my Kernel?

If you want to compile your own kernel, you will need to make sure you install the C development and kernel development packages when installing Red Hat Linux. You will then need to download the kernel source (from or somewhere similar), unpack it, configure it, compile it, and then install it, as described in the Kernel HOWTO. If you are experienced at linux and/or developing software, this may well be the best approach to take, as it allows to much more sophisticated customization of the result.

If, however, you are of a less technical nature, this may seem a particularly daunting task. If this is the case, you are in luck. I have created an RPM package of the 2.4.0-test5 release of the kernel, compiled with appropriate configuration for the Z505 laptop running Red Hat Linux 6.2. This can be found in the Software section at the end of this document.

Upgrading PCMCIA

In order to properly use PCMCIA devices (such as the Sony CDROM) with the new kernel, it is also necessary to upgrade the pcmcia-cs package. This can be obtained from In addition, in order to compile the pcmcia-cs package for the new 2.4 kernel, a small patch is required, which can be downloaded from the Software section at the end of this document.

Once the patch is applied, building this package is fairly straightforward. make config will prompt for necessary information, and then make install will compile and install all necessary files. Once again, if you do not want to go through all of this effort, a precompiled RPM is available in the Software section at the end of this document.

Related Upgrades

Finally, it is reccomended that some other components of the system be upgraded to versions designed for the newer kernel. Luckily, most of the packages in Red Hat Linux 6.2 are new enough that they don't need much upgrading, but a few packages do:

You can download and compile these packages for yourself, or install updated RPMs. Unfortunately, as of this writing, finding new enough RPMs can be a bit of a chore. Fortunately, however, you can find all of the above packages in the Software section at the end of this document.

Obtaining and Installing Sound Drivers

The earlier Z505 models contained a NeoMagic sound chipset which was actually fairly well supported by linux. However, with the advent of the H-series, Sony decided to include a higher-end chipset from Yamaha, the YMF-744. This would ordinarily be a good thing, except that Yamaha has until recently been extremely stubborn about not releasing specifications for this family of chipsets, leaving open-source developers out in the cold.

Thankfully, this position has recently changed, and Yamaha has finally seen wisdom in releasing development information for these sound chips to the open source community. As a result, the ALSA Project has recently been able to produce a linux sound driver for the YMF-744. As this driver does not come built into the standard linux kernel, however, it is necessary to download and compile the ALSA package separately.

Compiling the ALSA Drivers

In order to use sound on the Z505H/J, you will need to download a reasonably recent version of the ALSA driver package from (version >= 0.5.9 is reccomended as of this writing). If you are only planning on using the ALSA drivers this as a replacement for the standard linux (OSS) sound system, you do not need to download the ALSA library or utils packages. These extra packages contain libraries and utilities for use with software designed specifically for the new ALSA system, which most linux software isn't.

Version 0.5.9 and up compile without incident with the 2.4.0-test5 kernel, simply follow the instructions in the INSTALL file to compile the ALSA drivers.

Installing the ALSA Drivers

The ALSA modules which need to be loaded to support full access to the YMF-744 chipset on the Z505H/J are snd-card-ymfpci, snd-pcm-oss, and snd-seq-oss. The INSTALL file suggests adding a great deal of additional text to the modules.conf/conf.modules file to achieve this, however in practice a much simpler setup also results in better coordination with the Red Hat initialization scripts, and avoids problems with intermittently losing mixer settings due to auto-unloading of the sound modules.

It is therefore suggested that one not follow the instructions in the INSTALL file when it comes to installing the drivers, but instead the following lines be added to /etc/conf.modules (or /etc/modules.conf, depending on what name yours goes by):

alias sound snd-pcm-oss
alias midi snd-seq-oss
alias sound-slot-0 snd-card-ymfpci

Note: In order to be able to play sounds properly using the YMFPCI drivers, you will need to disable the "Plug & Play O/S" setting in the BIOS configuration. If this isn't done, sounds will play strangely.

There is also a bit of a problem with the ALSA YMFPCI drivers and/or hardware and suspending. After a suspend/resume has occurred, the drivers must be unloaded and reloaded before the sound card will actually work again. Luckily, the Red Hat APM scripts already have support for this sort of workaround for sound cards, and this can be fixed (mostly) by editing /etc/sysconfig/apmd and changing the following settings:


Again, if all of the above is more than you want to take on, the binary RPMs contained in the Software section at the end of this document also have all necessary ALSA drivers.

Setting up Suspend-to-disk

In order to use the "suspend to disk" function of the Z05HE/HS, some preparation is required. First of all, please note the requirements when installing Red Hat Linux on the machine above.

Assuming you have set aside the necessary DOS partition on your hard drive, there are then a couple of ways to go about configuring the partition properly:

Method 1: Using DOSEMU

This method can be used to create a bootable DOS partition using linux and set up a suspend-to-disk area on it, but does require a bit of work. It goes as follows:

Obtain the PHDISK.EXE program

PHDISK.EXE is the utility which creates the necessary save area on the disk for the BIOS to use when suspending to disk. This utility is actually provided on the System Recovery CDs provided with the Z505H/J, but finding it is a little tricky, as Sony has seen fit to stick it inside a floppy-disk image file in a hidden portion of the CD.

To obtain this very useful utility, one must do the following:

  1. Insert the CDROM PCMCIA card into the laptop, and place the disk labelled "SONY System Recovery CD" (disc #1) in the drive.
  2. Mount the CDROM. As mentioned, the bit we're looking for is hidden by default, so one must mount it with the "nohide" option:
    mount -t iso9660 -o nohide /dev/hde /mnt/cdrom
  3. Now mount the bootimg.bin floppy disk image contained on the CD:
    mount -t vfat -o loop /mnt/cdrom/bootimg.bin /mnt/floppy
  4. The PHDISK utility can now be found in /mnt/floppy/spt/phdisk.exe. Copy it to a safe place.
  5. Unmount everything we mounted:
    umount /mnt/floppy
    umount /mnt/cdrom

And there you have it. Of course, you could simply download PHDISK.EXE from the Software section at the end of this document.

Obtain a copy of DOS

Most people have a copy of MS-DOS sitting around somewhere, but if, as in my case, you would very much like to avoid touching Microsoft software ever again (even the relatively benign MS-DOS), there is an alternative.

FreeDOS is an open-source DOS implementation which can run standalone or under the DOSEMU package within linux. Both FreeDOS and DOSEMU were bundled on the installation CD for older versions of Red Hat Linux, but unfortunately due to space considerations they are no longer present on the install CD for Red Hat Linux 6.2. They can, however, be downloaded from's download section (dosemu-0.99.13-6.i386.html and dosemu-freedos-0.99.13-6.i386.html). The following steps assume you have downloaded and installed these packages.

After installing the DOSEMU and FreeDOS packages, you will need to edit the /etc/dosemu.conf file slightly. Locate the line which says:

$_hdimage = "hdimage.first"

Change this line to read:

$_hdimage = "hdimage.freedos /dev/hda1"

Note: This assumes the DOS partition you created for this purpose is /dev/hda1. If it isn't, replace /dev/hda1 above with the correct partition.

Put PHDISK.EXE on your DOS disk

For FreeDOS, this is accomplished as follows:

  1. Mount the FreeDOS disk image using the following commands:
    mkdir /mnt/freedos
    mount -t vfat -o loop /var/lib/dosemu/hdimage.freedos /mnt/freedos
  2. Copy the file:
    cp phdisk.exe /mnt/freedos
  3. Unmount the FreeDOS image:
    umount /mnt/freedos

Prepare the DOS partition

  1. Start up FreeDOS with the following command:
  2. You should find yourself at a C:> prompt. Do the following:
    format d:
    sys d:
    copy phdisk.exe d:
  3. Type 'exitemu' to exit DOSEMU.
  4. Make sure the DOS partition is marked bootable:
    fdisk /dev/hda
    Type 'p' to print the current partition table. The DOS partition should be listed with an asterisk next to it, like so:
       Device Boot    Start       End    Blocks   Id  System
    /dev/hda1   *         1        27    216841+   6  FAT16
    If it does not have that asterisk, you can add it using the 'a' command. Then type 'q' to exit fdisk.

Reboot into DOS and run the PHDISK utility

This last bit cannot be done while running linux, because the PHDISK program needs more access to the system than linux affords. You must instead:

  1. Make sure lilo is configured to be able to boot to DOS. Check the /etc/lilo.conf file and make sure the following lines are in it:
    If they aren't, add them to the file (note that the "label=dos" line is indented) and then type '/sbin/lilo' to make the changes take effect.
  2. Shutdown and reboot the machine. At the LILO boot: prompt, type 'dos' and press enter. The machine should boot into FreeDOS.
  3. Type the following:
    phdisk /create /file
    This should create the SAVE2DSK.BIN file required by the BIOS.
  4. Press ctrl-alt-del to reboot back into linux

You should now be able to use Fn-F12 to suspend the system to disk.

Method 2: The Easy Way

If all of this is more effort than you want to go through, do the following:

  1. Download the PHDISK installation package from the Software section at the end of this document.
  2. Untar the package and cd into the created directory:
    tar xzf z505h-phdinst.tar.gz
    cd z505h-phdinst
  3. (as root) type ./z505h-phdinst. This will install the required files and finish by giving you instructions on how to reboot into DOS to complete the process.
  4. As instructed, reboot into DOS and type the following:
    phdisk /create /file

You should now be able to use Fn-F12 to suspend the system to disk.

Important NOTES:

Tuning and Fixups

Configuring X-windows on the Z505JS

As mentioned in the installation section, the Z505JS laptop uses a Neomagic 256XL+ video chipset which isn't automatically supported by the Red Hat Linux 6.1 installation. The problem here is more one of autodetection, actually, as the software can use the chipset perfectly well, but doesn't recognize its device ID automatically, so it needs some help in knowing how to talk to it.

In order to use XFree86 with the NM256XL, it is necessary to configure it as for any other Neomagic chipset (this can be done using Xconfigurator), then edit the /etc/X11/XF86Config file, find the line which says:

#    Chipset    "NM2160"

Remove the # character at the beginning of the line, and change the "NM2160" to "NM2200", to read:

    Chipset    "NM2200"

Alternately, you can apply the changes in the kudzu patch in the Software section which will update the information used by the Red Hat hardware configuration utility (kudzu) so that it can automatically configure your display. After applying this patch, you can simply type

and the system should automatically detect your video chipset and allow you to configure X for your display.

Disabling "Plug & Play O/S" in the BIOS

Due to limitations in the current YMFPCI sound drivers, sounds will play strangely (slowly, repeating chunks) unless the "Plug & Play O/S" setting is turned off in the BIOS configuration. To do this, perform the following steps:

  1. Reboot the machine.
  2. During boot, once the "SONY" logo is displayed, press F2 to enter the PhoenixBIOS Setup Utility.
  3. Once in the setup utility, press the right arrow key to move to the "Advanced" screen.
  4. Press the down arrow key until "Plug & Play O/S" is selected.
  5. If "Plug & Play O/S" is listed as "[Yes]", press the space bar to change it to "[No]".
  6. Press the right arrow key until you reach the "Exit" screen.
  7. Press enter to select the "Exit (Save Changes)" option. The system will reboot.

Please note that in a dual-boot system, Windows may not like having this setting turned off, and may refuse to boot. If you are running a dual-boot system you may need to leave the "Plug & Play O/S" setting turned on.

Fixing Hang on Boot when Floppy Connected

Because of a bug in the way the BIOS configures devices on boot, if the USB floppy drive is connected when the machine reboots, the BIOS will configure it in such a way that other devices (such as sound and ethernet) do not work properly. This can cause the system to lock up during boot when linux attempts to initialize the other devices. In order to fix this problem, it is necessary to ensure that the USB drivers get loaded (at least briefly) before other components such as sound are initialized. To do this, edit /etc/rc.d/rc.sysinit, and find the line which says:

# Load sound modules

Before this line, add the following line:

modprobe usb-uhci && modprobe -r usb-uhci

This will avoid these lockup issues even when the USB floppy is connected during boot.

Using the floppy drive and other USB devices

In order to use the USB floppy drive, or any other USB device, the drivers must be loaded. Assuming you have a kernel with the appropriate USB drivers available (such as the 2.4.0-test5 kernel mentioned above), this is relatively easy. To load the USB drivers automatically on boot, simply place the following lines in your /etc/rc.d/rc.local file:

modprobe usb-uhci
modprobe usb-storage

Alternately, as a more technically clean solution, you can download the usb init script from the Software section, place it in /etc/rc.d/init.d directory, and type:

chkconfig --add usb

If you have other USB devices besides the floppy drive which you wish to use, you will also need to edit /etc/rc.d/rc.local (or /etc/rc.d/init.d/usb) and add modprobe lines for the other appropriate drivers as well.

Once you have the usb-uhci and usb-storage drivers loaded, when you plug your floppy drive into the USB port it should be automatically recognized by the system. Please note, however, that the USB floppy drive will not show up as a traditional floppy drive (/dev/fd0) in the system, because it's not actually attached to the system's floppy controller. Instead, it appears as a removable SCSI drive, /dev/sda. You will need to edit /etc/fstab and change the reference to /dev/fd0 to be /dev/sda instead, and some other utilities may need to have their configurations changed. You can create a symbolic link from /dev/fd0 to /dev/sda, but this is not necessarily reccomended as it can confuse some software.

By default, Red Hat Linux is also designed to automatically change certain devices (including floppy drives) to be owned by whoever is currently logged-in to the console (text or X-windows), thus allowing the person physically seated at the computer to use software which accesses its floppy disk drive as well. In order to enable this behavior for the USB floppy, it is also necessary to edit /etc/security/console.perms file. Find the line which says:


..and tack /dev/sda on to the end of it, like so:

<floppy>=/dev/fd[0-1]* /dev/sda

Please note also that, because the USB floppy shows up as a SCSI device, which are usually hard disks, a few utilities (such as mkdosfs) will complain about accessing the raw device (/dev/sda) without additional flags (in the case of mkdosfs, the -I flag), as normally writing to a hard disk device (instead of a partition on the disk) is not the correct thing to do, and some software isn't bright enough to realize it's not a hard disk.

Using a USB Keyboard

In order to make use of a USB mouse, you will need to load the usb-uhci driver, as detailed in the previous section, as well as the hid and keybdev modules.

Once these modules are loaded, you should simply be able to plug in a USB keyboard and start typing away.

Using a USB Mouse

As above, in order to make use of a USB mouse, you will need to load the usb-uhci and hid drivers, as well as loading the mousedev module. You will also need to create a new device file in the /dev directory for reading USB mouse events. To do this, type the following:

mknod /dev/usbmouse c 13 63

This is all the configuration required to allow software to access a USB mouse device. Now all that's required is to configure the X window system to look for input from the USB mouse in addition to the PS/2 touchpad. This is done by modifying the /etc/X11/XF86Config file and adding the following lines to it:

Section "XInput"
    Subsection "Mouse"
        Protocol     "IMPS/2"
        Device       "/dev/usbmouse"
        ZAxisMapping 4 5

With these changes, you should be able to use any standard USB mouse automatically (including plugging and unplugging at any point as needed) with your Z505 system; or, as with everything else, you can simply download the fixup kit from the Software section.

Important Note:

It is also possible to use only the USB mouse in X windows, ignoring the touchpad. However, if you choose to do this, be aware that there may be problems with the keyboard becoming unresponsive after suspending and resuming (this appears to be a bug with the BIOS not resetting the hardware properly after a resume). If you encounter this problem, you may need to edit /etc/rc.d/init.d/gpm and add the -R switch to the invokation of the gpm program, which should fix this issue. Do not add the -R option to gpm if you wish to use the touchpad under X windows, as the two will conflict with one another.

Ethernet lock-up workaround

Unfortunately, even with the newest 2.4 kernel, there is still a slight problem with the driver for Intel EtherExpress Pro 100 cards, which can manifest itself under some conditions on the Z505HE/HS. The problem goes something like this:

If: Then:

There is, however, a workaround for this problem. The APM suspend/resume scripts must be modified to ensure that the eepro100 module is not loaded when the laptop is suspended. This is done by removing the module before the suspend actually takes place (it will be automatically loaded again when the eth0 device is used next). To do this, create an /etc/sysconfig/apm-scripts/apmcontinue file, with the following contents:

case "$1" in
            /sbin/ifdown eth0
            if lsmod | grep -q eepro100; then
              rmmod eepro100 || exit 1

(If you already have an /etc/sysconfig/apm-scripts/apmcontinue file, simply add the above lines to the end of it) A more sophisticated version of this script is also available in the Software section which you may wish to use instead.

Configuring the CD-ROM drive

If you installed from the CD-ROM, then the CD-ROM will already have been detected and configured automatically by the installation program, and nothing more should be necessary. If, however, you chose the "Network Install" method, then the installer will not have done this for you, and you will need to configure the system properly for the CD-ROM device.

Under Red Hat Linux 6.2 this is quite easy. All that is required is to ensure that the CD-ROM's PCMCIA card is inserted when the system boots up. The Red Hat "kudzu" hardware detection system will detect the presence of the CD-ROM drive and ask if you want to configure it. Alternately, you can run kudzu from the command line while the CD-ROM is connected to do the same thing.

If you want to perform this configuration manually, you will need to create a symbolic link from /dev/cdrom to /dev/hde, and add an appropriate entry to /etc/fstab

Screen Shifting on Resume

Under some conditions, after resuming from a suspend while viewing a graphical (X) console, the screen can end up shifted to the left. This is due to an apparent bug somewhere in resuming which allows text to be written to the screen while it's in graphical mode, which wouldn't normally be allowed. The process of writing this text results in the screen parameters being modified incorrectly for graphical mode, and the screen ends up shifted. Ironically enough, the reason text gets printed to the screen in the first place is partially the APM system's fault. The stock configuration for Red Hat linux sets apmd so that it will write event notifications to all logged in users (the -W option). This is normally useful, or at least not harmful, however when APM writes its "successful resume" notification to all users, it also writes it to the console, screwing up any graphical display which may be there in the process.

This problem can be fixed by editing /etc/sysconfig/apmd, locating the line which reads:


and placing a # character in front of it, like so:


You will then need to restart the apmd program with the new settings by running:

/etc/rc.d/init.d/apmd restart

Lockd Errors

After upgrading to the 2.4 kernel, depending on the system's configuration, one may notice an error message from lockd on boot which reads:

Starting NFS lockd: lockdsvc: Invalid argument

This is due to a change in the handling of the NFS lockd system with the newer kernel. Under 2.4 kernels, it is no longer necessary to run the rpc.lockd program to enable NFS file locking. The Red Hat startup scripts, however, are continuing to run this program even though it is no longer needed, and it produces a (benign) error message. In response to this, one has two options:

To do the latter of these options, edit /etc/rc.d/init.d/nfslock, and comment out the following lines by placing # characters in front of them:

(under the "start" section)

echo -n "Starting NFS lockd: "
daemon rpc.lockd
(under the "stop" section)
echo -n "Shutting down NFS lockd: "
killproc lockd
(and under the "restart" section)
echo -n "rpc.lockd "
killproc lockd
daemon rpc.lockd

Alternately, one can download an updated copy of the nfslock script from the Software section at the end of this document.

Tuning the Hard Disk

The default IDE configuration used by linux is a conservative one, designed to work properly across the widest range of hardware configurations. The IDE interface in the Z505, however, can operate substantially more efficiently if some non-default configuration parameters are used. These parameters can be adjusted using the hdparm command, like so:

/sbin/hdparm -c3 -m16 -d1 -k1 /dev/hda

To apply these configuration changes automatically whenever the system starts up, simply place the above line at the end of the /etc/rc.d/rc.local file.

Configuring IRDA

I have not personally attempted this (yet), but it has reportedly been done by others. According to Peter Whiting, the following entries are required in /etc/modules.conf in order to use IRDA successfully on the Z505:

alias tty-ldisc-11 irtty
alias char-major-161 ircomm_tty
alias irda0 nsc-ircc
options nsc-ircc dongle_id=0x09

In order to prevent the kernel's default serial drivers from mistaking the IR port for a standard serial port and preventing the IRDA drivers from being able to use it, you must also add the following line to /etc/modules.conf:

pre-install nsc-ircc setserial /dev/ttyS2 port 0 irq 0

PPP With the 2.4 Kernel

As noted above, the 2.4 kernel requires a newer version of the PPP utilities (2.4.0b1 or better) in order to have PPP function properly. In addition to the updated programs, however, there are also a couple of system changes which must be made to accomodate the newer kernel and utilities:

(Note that since the built-in winmodem is not usable with linux, you will still need some additional (USB/PCMCIA/etc) modem device to do dial-up PPP connections with the Z505)

Other Notes

Different Behavior with the 2.4 Kernel

There are a couple of changes in the new 2.4 kernel which, while benign, may catch some people who are used to older kernels off guard:

Using the Sony DVD Drive

The PCG-DVD51 DVD drive sold by Sony for use with the Z505 line will work with linux, under certain conditions. Unlike the CD-ROM drive, which uses a 16-bit PC-Card adapter, the Sony DVD drive uses a Cardbus (32-bit) PC-card which doesn't quite work (yet) with linux. Luckily, the DVD drive's card can also function as a 16-bit PC-card, which will work fine (if a little slower) with linux. The trick to doing this, interestingly enough, depends on the external power supply of the DVD drive.

When the DVD drive's external power supply is plugged in, the card behaves as a Cardbus card. When it is not, it behaves as a 16-bit card. The trick, therefore, to using the DVD drive with linux, is fairly simple: Don't plug it in. As long as you do not plug in the external power supply, the DVD drive should work fine.

The Easy Way

Ok, now that I've made you read through all of the stuff you need to do to get everything up and running properly, you can forget all of that and just do it the easy way:

  1. Install Red Hat Linux 6.2 on your system as described in the Basic Installation section.
  2. Download the Fixup Kit from the Software section
  3. Unpack the fixup kit, and cd into the created directory:
    tar xzf z505-rh6.2-fixupkit-1.3.tar.gz
    cd z505-rh6.2-fixupkit-1.3
  4. (as root) type ./install
  5. In order to play sounds properly, you will also need to disable the "Plug & Play O/S" setting in the BIOS.

You may also wish to read through the Other Notes section for a few notes on things you should know about using the fixups in this kit, and other issues.

To-Do List

The following tasks remain on my list of things to work on (roughly in order of priority):


The Z505HE/HS/JE/JS Linux Fixup Kit

This tar.gz file contains all of the software required to upgrade a Red Hat Linux 6.2 system as described in this document, as well as an install script to install it automatically into your system. Please see the section entitled "The Easy Way" above for instructions on using this Fixup Kit.
z505-rh6.2-fixupkit-1.3.tar.gzFixup Kit for Red Hat Linux 6.2

Required Packages

The following packages contain all of the software required to get full functionality out of a Sony Z505H/J under Red Hat Linux 6.2. All of these packages are also contained in the Fixup Kit.
kernel-2.4.0-test5.i686.rpmThe linux 2.4.0-test5 kernel, configured and compiled for the Z505HE/HS laptop. Contains ALSA drivers.
kernel-headers-2.4.0-test5.i386.rpmKernel-related headers required for compiling some applications
kernel-pcmcia-cs-2.4.0-test5.i386.rpmPCMCIA utilities and configuration files for use with the 2.4.0 kernel
modutils-2.3.14-1as.i386.rpmThe Red Hat modutils RPM updated to a version compatible with a 2.4 kernel
util-linux-2.10m-1.i386.rpmThe Red Hat util-linux RPM updated to a version compatible with a 2.4 kernel
z505-1.2-2.noarch.rpmAn RPM package containing all of the necessary configuration changes for running Red Hat Linux on a Z505

Optional Packages

The following accompanying packages, while not strictly required, may be useful for those who have installed the required packages (or the Fixup Kit) on their system.
kernel-source-2.4.0-test5.i386.rpmThe kernel source tree from which the 2.4.0-test5 kernel was compiled, for those kernel hackers out there
kernel-doc-2.4.0-test5.i386.rpmVarious documentation distributed with the kernel
ppp-2.4.0b4-1.i386.rpmIf you have the pppd package installed, you will need to upgrade it with this RPM to work properly with a 2.4 kernel.

Individual Components

The following are individual components from some of the above packages, split out for convenience. All of these files can also be found in one of the above packages.
installThe installation script from the fixup kit
apmd.configAn example /etc/sysconfig/apmd file
apmcontinueAn example /etc/sysconfig/apm-scripts/apmcontinue file
usb.initA Red Hat init script (/etc/rc.d/init.d/usb) for loading and unloading the proper USB modules
phdisk.exeThe DOS PHDISK utility for creating a suspend-to-disk area on the Z505HE/HS hard disk
z505-phdinst-1.1.tar.gzRequired files and installation script for installing PHDISK.EXE on an appropriate FAT partition (includes PHDISK.EXE)
pcmcia-cs-3.1.19-2.4fixup.patchA patchfile for changes needed to the pcmcia-cs (version 3.1.19) package to compile with a 2.4 kernel
z505j-kudzu.patchA patchfile for changes to the kudzu and Xconfigurator databases to allow them to properly autoconfigure the NM256XL chipset in the Z505JS laptops
nfslockA replacement for /etc/rc.d/init.d/nfslock, updated for use with a 2.4 kernel

Source RPMs

You'll probably only want these if you're anxious to hack the source code of one or more of the above packages. For those RPM hackers out there, however, here you go.
kernel-2.4.0-test5.src.rpmSource RPM for all of the above kernel-* packages
modutils-2.3.14-1as.src.rpmSource RPM for the above modutils package
util-linux-2.10m-1.src.rpmSource RPM for the above util-linux package
ppp-2.4.0b4-1.src.rpmSource RPM for the above ppp package
z505-1.2-2.src.rpmSource RPM for the above z505 package

Feedback and Acknowledgements

Thanks go out to the following people for helping to improve this document:

Steve Murray
for providing initial feedback on using this document with Z505J-series laptops, information on using a USB mouse, and finding some of the quirks thereof.
Bob Schilmoeller
for pointing out that disabling "Plug'n'Play OS" in the BIOS is also required for playing sound properly.
Jeremiah Duncan
for catching the NFS lockd issue.
Kathryn (Trina) Toyama
for giving me access to her new Z505JS to develop and test many of these modifications.
Michael Bogomolny
for pointing out the potential confusion of the new kapmd behavior in the 2.4 kernel.
Daniel Lord
for pointing out problems with having the USB floppy drive connected while booting.
Stephen Egbert
for noting that installation can hang on ethernet configuration if "Plug & Play O/S" is not turned off first.
Christopher David Malon (and several others)
for pointing out that the Z505JE has the same video chipset as the H-series models. Only the JS has the newer NM256XL+.
Don Kendrick
for confirming that the fixup kit works for older Z505S models as well.
Peter T. Whiting
for providing information on configuring IRDA on the Z505.
Po-Han Lin
for pointing out that the HS/JS have a maximum RAM size of 256MB, not the 192MB of the HE/JE.
Jason Novotny
for information on making PPP work with the 2.4 kernel.

Thanks to everyone for the feedback. Keep it coming!

Links to Other Useful Resources

Here are some links to other useful resources for those using linux on a Sony Z505H/J:

The Linux on Laptops Page
A good general resource for anyone looking to run linux on a laptop machine.
The Z505HS Project at
A community resource / discussion board / archive for those interested in linux on the Sony Z505HS and Z505HE (and to some extent the J-series also) laptops.
William A. Stein's VAIO PCG-Z505HE Page
Another fairly detailed page on getting linux running on the Z505HE. This includes more information/suggestions regarding dual-boot configurations.

Document Changelog

Mar 17, 2000
  • Started work on this document after purchasing a Z505HE.
  • Due to other obligations and several important questions which I realized I had no adequate answers for yet, this version was never actually released to the public.
Aug 13, 2000
  • Obtained new ALSA drivers.
  • Obtained a reasonably good 2.4.0 kernel.
  • Obtained more time to actually work on this stuff, and overhauled the whole document.
  • Added updated information on kernel upgrade, pcmcia, sound drivers, ethernet lockup workaround, created fixup kit, and added a software section.
  • First public release.
Aug 30, 2000
  • Added information about differences between Z505 models.
  • Added information specific to Z505J-series models. Added kudzu patch to software section.
  • Updated fixup kit to better support J-series (and R/S-series) models.
  • Changed the name of the document to reflect its broader scope.
  • Fixed some small bugs in the phdinst utility.
  • Modified install instructions to account for suspend-to-disk partition requirements.
  • Added information on using the Sony DVD drive.
  • Added acknowledgements section.
  • Added notes about "Plug'n'Play OS" setting in the BIOS.
  • Added notes on fixing "lockd" errors after upgrading the kernel. Added nfslock fixes to software section and fixup kit.
Oct 10, 2000
  • Added notes on disabling "Plug & Play O/S" before installing which can prevent some potential lockups during installation.
  • Added fix for lockup if the floppy drive is connected during boot.
  • Added information on using a USB mouse.
  • Added information on configuring IRDA.
  • Added information on configuring PPP properly with the 2.4 kernel.
  • Added section on behavior differences with the 2.4 kernel that may confuse people used to older versions.
  • Fixed an error in the video chipset information for the Z505JE (NM256AV, not NM256XL), and related installation notes.
  • Adjusted information/instructions to reflect that the Z505HS/JS can support up to 256MB of RAM, not 192MB.
  • Discovered that the src.rpm for the kernel package posted on the web site was an old, incomplete version which did not match the binary RPM. This has been corrected.
Oct 14, 2000
  • Added a bit on using a USB keyboard which was mistakenly left out on the Oct 10 update.
Oct 19, 2000
  • Fixed a bug in the z505 RPM which prevented the patches for USB mouse support under X from applying correctly.

VAIO 505 WebRing
site is owned by
Alex Stewart.

[email] [skip] [random site]
[prev] [Next 5] [next]

about this
webring, email
the creator at: