Linux on the Sony Vaio R505EL Laptop

Cam Lesiuk
Sep-Oct 2002

This document describes how I installed Linux onto my Sony VAIO R505EL.

Warning: The Sony Vaio R505EL is not exactly Linux-friendly. This document assumes a high level of proficiency in driver debugging, kernel recompiling, and system administration.

Notice: The Sony Vaio R505EL uses an Intel 82801 to provide PCI Bus, LAN Controller (10/100 Ethernet), IDE Controller, USB, Interrupt Controller, Timers, ACPI, DMA Controller, AC'97 Sound codec, AC'97 Modem, Real-Time Clock, and SMBus. Except for the CPU and memory, this chip is the computer.
82801CAM Technical Specs (Mobile Intel 830 Chipset Family)

Table of Contents              
Which Linux Distribution?
Firewire & DVD/CD-RW
Floppy Drive
Mouse / Jog Dial
Jog Dial / Screen Brightness
USB / Memory Stick

Recompiling the Kernel - Hints
Miscellaneous Hints
VAIO R505EL Specs

Which Linux Distribution?

I tried Slackware 8.1; it hung before I was done with the boot disks.

I tried Gentoo 1.4rc1; I booted into a stage 3 CD-ROM and it hung.

I tried Gentoo 1.4rc1 again. I did a minimal debian install in a temporary partition, loaded the Gentoo stage 3 tarball onto the computer via the network, and then followed the regular Gentoo stage 3 setup instructions. It seemed to work. I was in a hurry, however, and Gentoo is slow to install, so I didn't finish the install.

I finally settled on Debian (Woody). I booted from floppy, and installed via the network.

I did not try Red Hat, Mandrake, nor SuSE.

After installing Debian Woody, I installed a custom kernel (2.4.20-pre7) with ACPI patches. I also converted over to devfs.



Chipset: Intel 82801CAM (ICH3)
Driver: 2.2.x kernel: eepro100-scyld driver
2.4.x kernel: eepro100 driver
References: Linux on the Sony VAIO R505JL


Problem: Important!!

On the Sony Vaio R505EL, IRQ routing is performed by ACPI.

If you do not have adequate ACPI support in your kernel, many hardware devices such as Firewire and the Modem will not get an IRQ assigned to them. Without an IRQ, they won't work. The symptom is errors like this in /var/log/message:

"PCI: No IRQ known for interrupt pin C of device 00:1d.2. Please try using pci=biosirq."

Setting "pci=biosirq" will not help.

Changing the BIOS "Advanced -> Plug & Play OS" setting will not help.

The Linux kernel "Plug and Play configuration" setting will not help.

Solution: As of Linux 2.4.20-pre7, you need the most recent ACPI patch from the ACPI4Linux project (Sourceforge page). The required code has not made it into the stock kernel yet.

Download and install the ACPI patch for your kernel. Then set the following options:

Enable "General Setup -> Power Management support"
Disable "General Setup -> Advanced Power Management BIOS support" (APM)
Enable "General Setup -> ACPI Support"
Enable all the ACPI options (leave "CPU Enumeration Only" off, if it's present)

You can also install and run acpid; this can respond to power button presses, lid close events, etc.

More Info: Use the command "lspci -vv" to query the status of the devices in your computer. If a device you're trying to use has "Interrupt: pin C routed to IRQ 0", IE: its IRQ is ZERO, it ain't gunna work.

You can also use the command "cat /proc/pci".

References: Linux on a Medion 9626 laptop

Firewire & DVD/CD-RW

Chipset: Texas Instruments TSB43AB22/A IEEE-1394a-2000 Controller
Model: Matshita UJDA730 DVD/CDRW (rev 1.0)
24x CD-ROM read, 16x CD-R write, 10x CD-RW write, 8x DVD read
Problem: The DVD/CD-RW is a SCSI device connected via the IEEE1394 Firewire interface (Sony calls it the i.LINK® port). Obviously the DVD/CD-RW will not work unless Firewire is working first. The stock kernel has adequate support for both SCSI and Firewire.
Solution: On the SCSI side, you need to enable the following options in the kernel:

"SCSI support -> SCSI support"
"SCSI support -> SCSI CD-ROM support"

On the Firewire side, you need:

"IEEE 1394 support -> IEEE 1394" - required by OHCI1394
"IEEE 1394 support -> OHCI 1394" - required by SBP-2
"IEEE 1394 support -> SBP-2 support" - driver for hard drives, CD-ROMs, DVDs, and so on.
"ATA/IDE/MFM/RLL support -> IDE, ATA and ATAPI Block devices -> SCSI emulation support" - required to burn CD-R, CD-RW

If the Firewire SBP-2 option is greyed-out, it's because you haven't enabled SCSI support yet!

If everything is built via modules, you will need to load the modules in this order:
cdrom  ->  sr_mod
ieee1394  ->  ohci1394  ->  sbp2  ->  ide-scsi

Once you do that, it should automatically detect your DVD/CD-RW. If you use devfs, it should appear as something like /dev/scsi/host0/bus0/target0/lun0/cd.

References: Using Linux on the Sony Vaio Z505GA

Floppy Drive

Problem: None. Standard floppy works out of the box.
Caveot: The floppy drive is not managed by the hot-swap infrastructure. If you remove the Vaio from the docking station while Linux is running, and then re-dock the laptop, the floppy drive will not work. You need to reboot.

You probably shouldn't be docking and undocking with the computer when powered anyways; hard drives do not enjoy physical movement while spining.



Chipset: Intel 82801CA/CAM AC'97 ICH Modem (rev 2)
PCI: 00:1f.6
System: 8086:2486 (8086 = Intel)
Subsystem: 104D:8100 (104D = Sony)

Problem: The built-in modem is a winmodem.

Solution: The Conexant drivers kinda work. They implement a Hayes AT-compatible command set.

I use the 5.03.03 version of the drivers (local cache).

The drivers do not load properly using the hsfconfig tool. Use hsfconfig to install the tools and modules, but then use rmmod to remove all of the hsf modules.

The linmodem in the Vaio R505EL is an Intel ICH modem; you need the hsfich module.

Load the modules manually in this order:
hsfosspec   hsfengine   hsfich   hsfserial

Watch your /var/log/messages and /var/log/syslog. Nothing much will happen until you load hsfserial. When you load hsfserial, devices in /dev will be created, messages will get logged, magic will happen.

When you load hsfserial, you should not get an error. You should get a couple lines telling you the module initialized properly. If you get an error, you have done something wrong; unload all hsf modules and try again.

/dev/ttySHSF0 will automatically be created. /dev/ttySHSF0 acts like a regular modem. You do not need to use setserial.

If you want/need to create /dev/ttySHSF0 manually, use the following comand:

    mknod /dev/ttySHSF0 c 240 64
More Info: It looks like there is no effort to make a generic AC'97 driver; this effort seems to have been abandoned.

References: Linux drivers for Conexant modem chipsets
PCTEL modem on linux
AC'97 Modem Driver Project
Modem Details for the Samsung SensQ 10 Notebook Internal Modem

Locally cached copy: hsflinmodem 5.03.03



Chipset: Ricoh RL5c475 (rev 128)
Problem: Warning!  If you have not successfully setup IRQ routing via ACPI, attempting to use PCMCIA devices will hang your machine.
Driver: Ensure IRQ routing via ACPI is working.

In your kernel configuration,
Enable "General setup -> PCMCIA/CardBus support"
Enable "General setup -> CardBus support"

Once IRQ routing is working, PCMCIA works flawlessly.

References: Todd Troxell claims he uses the i82365 driver on his R505JL. However, on my R505EL, I have disabled both the i82365 and i82092 drivers, and it works fine. I've only tried it with ATA-Flashdisks, but I'm thinking the generic driver is sufficient.

Ryan claims on his R505TL he has to stop PCMCIA services before inserting or removing a card. I did not find this to be true for my R505EL and my version of the kernel.



Chipset: Intel 82830 CGC [Chipset Graphics Controller] (rev 0)
Problem: XFree86 (X11) 4.1 and earlier do not support the i830 chipset. Debian Woody comes with version 4.1.
Solution: Download XFree86 4.2.99+ source code via CVS directly from and compile it. Use the i810 driver. My video device section looks like this:

Section "Device"
   Identifier "Card0"
   Driver "i810"
   VendorName "Intel Corp."
   BoardName "82830 CGC [Chipset Graphics Controller]"
   BusID "PCI:0:2:0"

If you want to use DRI, you must use a color depth of 16-bits. Otherwise you can use 8, 24, whatever.

Caveot: 32-bit color is not supported.
Caveot: Using 24-bit color screws up the graphics hardware; upon returning to a text console, the top of the screen is sometimes polluted by strange flickering. Rebooting resolves the issue. Graphics modes are unaffected.


Problem: The keyboard is not a standard PC 104-key keyboard.

For example, under X11, using the left "Ctrl" key puts you in a strange caps-lock mode which can only be un-done by the key combination (left-Ctrl)-(Windows Key).

Solution: None so far.


Model: GlidePoint PS/2
Driver: GPM: autops2
XFree86: GlidePointPS/2 or PS/2

Problem: The mouse is a "single open" device. This means X11 and gpm fight over the mouse, resulting in X11 sucking dirt.
Solution: With GPM and X11

Use the "-Rraw" option with gpm. Example:
gpm -m /dev/misc/psaux -t autops2 -Rraw

In this configuration, gpm will mirror the mouse data on /dev/gpmdata. In XF86Config, the mouse device should point to /dev/gpmdata, and the mouse Protocol is "PS/2" or "GlidePointPS/2".

Note: If you set the mouse Protocol to "Auto", the mouse will be detected as a MouseManPlusPS/2. This works, but the mouse doesn't get initialized properly. I suggest you use the "PS/2" protocol.

Solution: With only X11

In XF86Config, the mouse device should point to /dev/misc/psaux (devfs), and the mouse Protocol is "PS/2" or "GlidePointPS/2"

References: Man page for "gpm".


Jog Dial / Screen Brightness

Problem: The Vaio has a proprietary programmable I/O controller which handles jog dial events, screen brightness, function keys, lid open/close events, and more.
Solution: In your kernel configuration,
Enable "Character devices -> Sony Vaio Programmable I/O Control Device "

Put the following lines in "/etc/modules.conf":
alias char-major-10-250 sonypi
options sonypi minor=250

If you use devfs, you might want to modify /etc/devfs/perms:
REGISTER     ^misc/sonypi       PERMISSIONS   root.root     0666

If you do not use devfs, you need:
mknod /dev/sonypi c 10 250

You need user-land tools to go along with this.

To use jog-dial as a middle mouse button: sonypid
To use jog-dial as a jog-dial (like in windows): get the debian "sjog" package.

Control over screen brightness, etc.: spicctrl, also under the debian package "spicctrl".

I put links to "sjog" or "sonypid" into ~/.kde/Autorun so they get started with KDE.

Caveot: I have been unable to get the jog dial to operate as a middle button for gpm.
References: "Documentation/sonypi.txt" in the Linux kernel source tree.

Sony Programmable I/O User-Land Utilities

Locally cached files: sonypid spicctrl



Chipset: Intel 82801CA/CAM ICH AC'97 Audio (rev 2)
Driver: In your kernel configuration,
Enable "Sound -> Sound card support"
Enable "Sound -> Intel ICH (i8xx), ..."

Problem: The sound device only runs at 48KHz.
Solution: mpg123: use "-r 48000".
Solution: KDE: In the Sound Server setup (go K -> Preferences -> Sound -> Sound Server), select "Sound I/O" tab, select "Use custom sampling rate", and set it to 48000.

To use programs like mpg123 through the KDE sound server, use "artsdsp". Example:

artsdsp mpg123 mysong.mpg

Solution: Gnome: Configure the "esound" sound server to use only 48KHz sampling.

To use programs like mpg123 through the KDE sound server, use "esddsp". Example:

esddsp mpg123 mysong.mpg

Caveot: I've found the KDE "artsdsp" rocks, whereas "esddsp" sucks with this chipset. However, mpg123 can be compiled with esound support which I did not try.

USB / Memory Stick

Chipset: Intel 82801CA/CAM USB (rev 2) (uhci)
Driver: In your kernel configuration,

Enable "Input core support -> Input core support"
Enable "Input core support -> *whatever you like*"

Enable "USB support -> Preliminary USB device filesystem"
Enable "USB support -> UHCI Alternate Driver (JE) support"
Enable "USB support -> *whatever class drivers you want* ..."

Problem: The Sony Memory Stick is connected via USB. The USB subsystem wants to load the "usb-storage" module to handle this. On my system, the module hangs with the following message in /var/log/messages:

kernel: Initializing USB Mass Storage driver...
kernel: usb.c: registered new driver usb-storage
kernel: scsi0 : SCSI emulation for USB Mass Storage devices
kernel: usb_control/bulk_msg: timeout

I don't have a memory stick, so I'm abandoning this device. I don't build the "usb-storage" module.



Recompiling the Kernel - Hints


The following table was copied from the Sony web page at the time of this writing.

VAIO® Computer Specifications


Hardware Specifications

The following table details the hardware specifications of your computer.

Model PCG-R505EL
Processor Mobile Intel® Pentium® III processor1 1.13 GHz-M2
Supports Enhanced Intel SpeedStep™ Technology
L2 Cache Memory 512 KB (CPU Integrated)
Hard Disk Drive 30 GB3
C/D Drive Partition (Approximate) C: 16 GB3 (NTFS); D: 14 GB3(NTFS)
Standard Memory (RAM) 256 MB SDRAM4 (Maximum 384 MB)
(PC133 unbuffered µDIMM memory modules)
LCD Screen 12.1" XGA TFT
Graphics Intel® 830MG chipset integrated graphics accelerator
32 MB video RAM (max.) shared with main memory
(Expandable to 48MB max. if main memory is upgraded)
Sound Capabilities Microsoft® sound system compatible
Memory Stick® Media One slot (supports MagicGate™ Memory Stick® media and Memory Stick® media)
Modem V.90 compatible modem5
Built-in Capabilities Stereo speakers
Touch pad
Jog Dial™ Control
MagicGate™ Memory Stick® media slot
Expansion Capabilities One type I or II PC Card, with CardBus support
Connection Capabilities 2 USB ports
Phone line (RJ-11) jack
Ethernet port (10BASE-T/100BASE-TX)
i.LINK® (IEEE 1394) port6
Microphone jack
Headphone jack
Monitor (VGA) port
Docking Station connector
Supplied Accessories Rechargeable battery pack
AC adapter and power cord
Docking Station
Power Source 19.5V DC/AC 100-240V
Power Management Energy Star® Compliant
Advanced Configuration and Power Interface (ACPI)
Battery Lithium-ion
Dimensions 11.0" (w) x 1.16" (h) x 9.4" (d)7
(279.5 mm x 29.4 mm x 239 mm)
Weight 4.30 lbs. (1.95 kg) with battery
6.68 lbs. (3.03 kg) with battery and Docking Station
Operating Temperature 40°F to 95°F (5°C to 35°C)
Operating Humidity 20% to 80% (not condensed), provided that humidity is less than 65% at 95°F (35°C), hygrometer reading of less than 84°F (29°C)
Storage Temperature -4°F to 140°F (-20°C to 60°C) (temperature gradient less than 18°F (10°C)/hour)
Storage Humidity 10% to 90% (not condensed) provided that humidity is less than 20% at 140°F (60°C), hygrometer reading of less than 95°F (35°C)
Docking Station - Model Name CD-RW/DVD Docking Station (PCGA-DSM51)
Docking Station - Optical Drive CD-RW/DVD Combo Drive
Reads data up to 24x (CD-ROM)
Writes data up to 16x (CD-R)
Writes data up to 10x (CD-RW)
Reads data up to 8x (DVD)
Docking Station - Laser Diode Properties Wave Length: 784 nm (CD) and 662 nm (DVD)
Laser Output: 64 µW (CD) and 1.28 µW (DVD)
Docking Station - Floppy Disk Drive 3.5", 1.44 MB/720 KB, internal
Docking Station - Connection Capabilities i.LINK® (IEEE 1394) S400 port6
2 USB ports
Ethernet port (10BASE-T/100BASE-TX)
VGA (monitor) port
Parallel (printer) port
Serial port
Docking Station - Dimensions 11.0" (w) x 0.73" (h) x 9.25" (d)8
(279.5 mm x 18.5 mm x 235 mm)
Docking Station - Weight 2.18 lbs. (0.99) kg)


1Processor speed will be reduced under certain operating conditions.
2GHz denotes microprocessor internal clock speed; other factors may affect application performance.
3GB means one billion bytes when referring to hard drive capacity. Accessible capacity may vary.
4Your system may contain additional memory installed at the time of purchase.
5Maximum speed for faxing is 14.4 Kbps. Your modem is capable of downloading at 53 Kbps using V.90/K56flex. Your online service or Internet Service Provider may not support this technology or operate at this speed.
6i.LINK is a trademark of Sony used only to designate that a product contains an IEEE 1394 connection. The i.LINK connection may vary, depending on the software applications, operating system, and compatible i.LINK devices. All products with an i.LINK connection may not communicate with each other. Refer to the documentation that came with your compatible i.LINK device for information on operating conditions and proper connection. Before connecting compatible i.LINK devices to your system, such as CD-RW or hard disk drive, confirm their operating system compatibility and required operating conditions.
7Height measured at the thinnest point. Height at the thickest point is 1.33" (33.8 mm).
8Height measured at the thinnest point. Height at the thickest point is 0.9" (21.5 mm).