Debian 3.1 on Sony Vaio B3XP

Linux On Laptops

This webpage provides basic information on how to tune a Debian installation on a Sony Vaio B3XP laptop. It does not offer a step-by-step explanation, but merely useful hints that might help you in getting the tricky bits working, especially:

  • suspend to ram, suspend to disk
  • some IDE/hard disk problems (see the 'suspend' section)
  • full 1400x1050 resolution
  • wireless network card
  • external monitor
  • sound
  • special function keys

Disclaimer: I am not an expert on Linux and/or Laptops. I have found helpful advice from other people by searching the web, and eventually I managed to get all features I need on my laptop. The following description is based on my experiences and will certainly not give you the best or most elegant way of installing Debian on this laptop.

1. Suspend

All the following, except suspend-related stuff, may be done with the standard Debian kernel To get suspend-to-ram to work, I had to upgrade to the Debian kernel 2.6.11.

Unfortunately, suspend-to-ram (S3) drains battery power too quickly. It normally survives only a few hours (I have once seen 24h, but it usually does not last this long).

Consequently, I had to install suspend-to-disk (S4), which required me to build a custom kernel. After applying the software-suspend-2 patches to the kernel and some tweaking, I got S3 and S4 working. Be warned that I found a working configuration purely by trial and error. For all I know, my settings might not work for you or even damage your (file-) system.

The procedure in more detail: First install the packages:

  • acpi
  • acpid
  • vbetool
  • laptop-mode-tools
  • hibernate
(and all the necessary packages for making a kernel, i.e. kernel-package and all the 2.6.11 stuff: headers, source, tree, doc)

(Please note that I don't restart the network on resume for neither suspend-to-ram nor suspend-to-disk. This is just my personal preference and should not be a problem.)

Suspend to Disk

For software suspend, get the patches for Software Suspend 2 from Apply the patch, and add software suspend-2 as a module in the kernel configuration. (I simply used the already set options; go to for more detailed information.)

For the hard disk to resume properly after a suspend to RAM, and also for DMA to work, all IDE options in the kernel configuration MUST be selected as modules, NOT to be build directly into the kernel.

Compile the kernel, make sure to use the --initrd option, e.g. : make-kpkg --initrd -revision 1 --apend-to-version "-sws" kernel-image

On suspend the memory will be written into the swap partition (which must be at least two times the RAM size). One has to add the kernel boot option "resume2=swap:/dev/hda3" assuming that /dev/hd3 is the swap partition. My entry in /boot/grub/menu.lst:

Now the hibernate command needs to be configured. My /etc/hibernate/hibernate.conf: I have also added

  • ipw2200
  • ehci_hcd
  • uhci_hcd
to /etc/hibernate/blacklisted-modules

I have a problem with the special touchpad driver (see below) and prefer to get a generic driver. In my case this works best if psmouse is not present in /etc/hibernate/blacklisted-module but removed and added explicitly. To hibernate, I excecute:

rmmod psmouse
modprobe psmouse proto=imps

Suspend to RAM

Suspend to RAM works easily but usually either the screen or the hard drive fail to resume afterwards. It took me many tries to find a working configuration. In my opinion it is important to use the kernel boot options
  • acpi_sleep=s3_bios
  • noapic AND nolapic

I added the kernel options noapic and nolapic because apic/lapic is said to sometimes cause problems.

The trick for getting the hard drive to resume is to put a hard disk reset as the first command on resume. This can be set in /etc/acpi/

2. Screen resolution

To get the full 1400x1050 resolution, install the Debian package 855resolution (or get it from

Create a link from /etc/rc2.d/ (it must start before gdm) to a script that executes:

855resolution 3c 1400 1050

For example, I have made the following script in /etc/init.d/: and then link it to /etc/rc2.d/S30resolution

I have also changed the respective sections in my XF86Config-4 as follows (I don't know which of this is really necessary):

3. Wireless

Get ipw2200 module (from Debian) and follow the instructions. You need the firmware from (In my case the Versions v0.19-v1.0.3).

4. Sound

Sound works out of the box with Alsa. The following section uses the Alsa mixer to set/change the volume. Note that one MUST mute the 'external amplifier' to get sound output. I do that automatically by adding the following lines to one of the start scripts in /etc/init.d/ : Something starts 'esd' automatically on my machine, which stops sound from working properly. For the moment I simply removed /usr/bin/esd to fix that.

5. External Monitor

For using an external monitor: Download i855crt, put i855crt.conf into /etc, i855crt into /usr/local/sbin.

My function-key settings (below), for example, will switch on the external monitor with a 1024x768 resolution. In this case one has to switch the screen to this resolution before switching the external output on.

Of course the X server has been started with 1400x1050, and on the external monitor one cannot see the outer parts of the screen. A nice work-around for that is to use a vncserver, e.g. for presentations in full-screen mode:

/usr/bin/vncserver -geometry 1024x768 :2
/usr/bin/xvncviewer :2
This opens a window with an empty X screen with 1024x768 resolution and one can start applications to appear in there, for example

ooffice -display :2
acroread --display=:2

6. Function keys

You need to install the following:
  • sonypi, (for generating events from the function keys) Debian or
  • sony_acpi, (program that allows to set the LCD brightness)
  • sonykeyd
Install the first two and add to etc/modules
Then install sonykey and adapt the script /usr/local/sbin/ My version below allows to:
  • fn-f2 mute/unmute (see the sound section above)
  • fn-f3 decrease volume
  • fn-f4 increase volume
  • fn-f5 decrease LCD brightness
  • fn-f6 increase LCD brightness
  • fn-1 bring up eth0
  • fn-2 bring up eth1
  • fn-3 ifdown eth0 and eth1
  • fn-d switch screen off
  • fn-f switch screen on
  • fn-e eject cdrom
  • fn-f11 suspend to S3 (RAM)
  • fn-f12 suspend to S4 (hibernate)

This page was last updated on: 23.07.2005   Please send comments and questions to Andreas Freise.