Linux on Sony VAIO VGN-B100B
Changelog
2005-03-07: Suspend to RAM configuration added.
2005-03-06: Added info about using an external display.
2005-02-22: Initial release.
Introduction
Linux runs great on this laptop even though a few details (like DRI and the wireless network) are not perfect. You should not have any major problems installing and configuring your favorite Linux distribution on the laptop and this howto will highlight the potential problems that you might encounter.
I have installed a source-based Linux distribution Sorcerer on this laptop in case you are wondering.
Compatibility Matrix
Subsystem | Compatibility | Driver(s) | Comments |
Graphics | Yes | i830 (i915) |
Use the 855resolution tool for 1400x1050 resolution. |
Sound | Yes | ALSA snd_intel8x0 |
|
Ethernet | Yes | e100 or eepro100 |
|
Wireless | Yes | Proprietary firmware necessary. | |
CDRW/DVD | Yes | ide |
|
USB | Yes | uhci_hcd, ehci-hcd |
|
IEEE1394 | Yes | ohci1394, ieee1394 |
|
Memory Stick | Untested | ||
Modem | Untested | Linuxant HSF modem drivers might work |
Specifications
- Intel Pentium 4 M (Centrino) 1.8 GHz CPU.
cat /proc/cpuinfo
providesprocessor
: 0
vendor_id
: GenuineIntel
cpu family
: 6
model
: 13
model name
: Intel(R) Pentium(R) M processor 1.80GHz
stepping
: 6
cpu MHz
: 1786.571
cache size
: 2048 KB
fdiv_bug
: no
hlt_bug
: no
f00f_bug
: no
coma_bug
: no
fpu
: yes
fpu_exception
: yes
cpuid level
: 2
wp
: yes
flags
: fpu vme de pse tsc msr mce cx8 sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss tm pbe est tm2
bogomips
: 3547.13
- 14.1" SXGA+ LCD TFT display (1400x1050)
- Intel 855GM integrated graphics
- RAM 1536 MB DDR 333 (512 MB built-in + 1 GB modul in a slot)
- 60 GB hard disk
- Internal CD/DVD RW Combo drive
- Memory Stick slot
- Integrated V.90 modem
- Integrated Ethernet card 10/100 Mbps
- IntelĀ® PRO/Wireless 2200BG (802.11b/g)
- One PCMCIA I/II slot
- Integrated Intel 81x sound chip
- PS/2 touch pad
- USB 2.0 and IEEE1394 (i-link) controllers
Output from the lspci (version 2.1.11) command:
00:00.0 Host bridge: Intel Corp. 82852/82855
GM/GME/PM/GMV Processor to I/O Controller (rev 02)
00:00.1 System peripheral: Intel Corp. 82852/82855
GM/GME/PM/GMV Processor to I/O Controller (rev 02)
00:00.3 System peripheral: Intel Corp. 82852/82855
GM/GME/PM/GMV Processor to I/O Controller (rev 02)
00:02.0 VGA compatible controller: Intel Corp. 82852/855GM
Integrated Graphics Device (rev 02)
00:02.1 Display controller: Intel Corp. 82852/855GM
Integrated Graphics Device (rev 02)
00:1d.0 USB Controller: Intel Corp. 82801DB/DBL/DBM
(ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 03)
00:1d.1 USB Controller: Intel Corp. 82801DB/DBL/DBM
(ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 03)
00:1d.7 USB Controller: Intel Corp. 82801DB/DBM (ICH4/ICH4-M)
USB2 EHCI Controller (rev 03)
00:1e.0 PCI bridge: Intel Corp. 82801 Mobile PCI Bridge (rev
83)
00:1f.0 ISA bridge: Intel Corp. 82801DBM (ICH4-M) LPC
Interface Bridge (rev 03)
00:1f.1 IDE interface: Intel Corp. 82801DBM (ICH4-M) IDE
Controller (rev 03)
00:1f.3 SMBus: Intel Corp. 82801DB/DBL/DBM
(ICH4/ICH4-L/ICH4-M) SMBus Controller (rev 03)
00:1f.5 Multimedia audio controller: Intel Corp.
82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller
(rev 03)
00:1f.6 Modem: Intel Corp. 82801DB/DBL/DBM
(ICH4/ICH4-L/ICH4-M) AC'97 Modem Controller (rev 03)
02:04.0 CardBus bridge: Texas Instruments PCI7420 CardBus
Controller
02:04.2 FireWire (IEEE 1394): Texas Instruments PCI7x20
1394a-2000 OHCI Two-Port PHY/Link-Layer Controller
02:04.3 Unknown mass storage controller: Texas Instruments
PCI7420/PCI7620 Dual Socket CardBus and Smart Card Cont. w/
1394a-2000 OHCI Two-Port PHY/Link-Layer Cont. an
02:08.0 Ethernet controller: Intel Corp. 82801DB PRO/100 VE
(MOB) Ethernet Controller (rev 83)
02:0b.0 Network controller: Intel Corp. PRO/Wireless 2200BG
(rev 05)
Installation
This computer came with Windows XP preinstalled without any restore CD or DVD. You have to rely on the hidden partition that should be able to restore the system. Sony also provides utilities for creating a set of recovery CD but after my previous bad experience with Sony's recovery tools I have decided to save myself time and troubles and bought a recovery DVD.
Knowing that the recovery DVD was in mail, I went ahead and begun installing Linux (Windows were not even booted :). If you need to keep Windows on your laptop, consider dual-boot setup.
Linux installation is straightforward: Simply put in your installation CD and proceed. Sorcerer is a source distribution so I compiled everything from sources. For the curious, the compiler flags were set to
CFLAGS="-O2 -pipe -march=pentium4m"
CXXFLAGS="-O2 -pipe -march=pentium4m"
LDFLAGS="-Wl,-s"
Kernel
At the time of writing this howto, I used the 2.6.10 kernel and you can download the kernel configuration. The kernel was patched with version 2.1.5.15 of the software suspend in order to enable suspending to disk.
Notes:
- The CPU throttling allows to drop frequency down to 600 MHz. For the control of CPU frequency, I use the cpufreqd daemon.
- Enable ACPI and almost every option under it. This
is very important as ACPI is needed to regulate the CPU
temperature. Without ACPI, your CPU will eventually get
toasted. If you plan to use the Suspend-to-RAM sleep mode (ACPI S3), enable
CONFIG_ACPI_SLEEP
. - SCSI emulation of cdrom drive is deprecated since
approximately kernel 2.4.21. In fact, the
ide-scsi
driver does not work anymore. However, theide
driver works perfectly, even burning CDs although you may need to pass optiondev=/dev/hdc
to cdrecord. - Enable IEEE1394. You will need ohci1394, ieee1394 and sbp2 modules at least.
- Enable wireless network option in the kernel configuration. Drivers for the Intel Pro 2200BG wireless card are under development in the ipw2200 project. Apart from the ipw2200 driver, you will also need proprietary firmware which can be found on the project's web pages. On my previous laptop, I have replaced the built-in wireless adapter with another one for which open source drivers were available. I am guessing that it would be possible on this model too.
- ALSA
snd_intel8x0
driver works fine with the laptop's sound card. Note that the sound is muted after you install the driver. Furthermore, that the external sound channel must be muted or no sound will be audible. - Sonypi can be used to to catch Fn-key events.
- Use e100 or eepro100 drivers for the integrated ethernet card. I do not observe any difference between the two.
X11 Configuration
XFree86 4.4.0 including DRI works with the i830 driver and the configuration is quite straightforward except obtaining the 1400x1050 screen resolution. The VBIOS of Intel 855GM graphics adapter does not know this mode, the closest available mode is 1280x1024 but text and lines look fuzzy and are uncomfortable to watch. A solution is to add the 1400x1050 mode to the VBIOS shortly after boot by employing the 855resolution utility.
During the boot process, one of the start-up scripts calls
855resolution 3c 1400 1050
which means that the resolution mode 3c is rewritten. You can
list the available modes by 855resolution -l
:
855resolution version 0.3, by Alain Poirier
Chipset: 855GM
VBIOS type: 2
VBIOS Version: 3360
Mode 30 : 640x480, 8 bits/pixel
Mode 32 : 800x600, 8 bits/pixel
Mode 34 : 1024x768, 8 bits/pixel
Mode 38 : 1280x1024, 8 bits/pixel
Mode 3a : 1600x1200, 8 bits/pixel
Mode 3c : 1400x1050, 8 bits/pixel
Mode 41 : 640x480, 16 bits/pixel
Mode 43 : 800x600, 16 bits/pixel
Mode 45 : 1024x768, 16 bits/pixel
Mode 49 : 1280x1024, 16 bits/pixel
Mode 4b : 1600x1200, 16 bits/pixel
Mode 4d : 1400x1050, 16 bits/pixel
Mode 50 : 640x480, 32 bits/pixel
Mode 52 : 800x600, 32 bits/pixel
Mode 54 : 1024x768, 32 bits/pixel
Mode 58 : 1280x1024, 32 bits/pixel
Mode 5a : 1600x1200, 32 bits/pixel
Mode 5c : 1400x1050, 32 bits/pixel
Normally, the 3c (4d and 5c) mode is a useless 1900 by something resolution.
You can download my XF86Config-4.
The only remaining problem with the X11 configuration is that the 3D graphics (DRI/DRM) stops working after resume from the software suspend. Any OpenGL application launched after resume freezes. I have been advised to test X.org because of newer drivers but haven't done that yet.
Screen Brightness and Fn Keys
If you want to use the Fn keys, make sure to compile the
sonypi driver and put the following lines in
/etc/modprobe.conf
:
alias char-major-10-250 sonypi
options sonypi minor=250
This supposes that the sonypi device has minor node 250, which could be created by command
mknod /dev/sonypi c 10 250
In order to control the screen brightness, install the sony_acpi driver. If I set the screen brightness to the lowest level, the battery lasts one hour more.
For convenient control of the brightness and Fn keys, compile
and install sonypid and
sonypidd. The sonypidd perl
script was originally written by Craig DeForest and is available
here. I
have adapted Craig's script for sony_acpi, software suspend and
adjusted association with Fn keys. The sonypidd script allows
controlling volume, screen brightness and software suspend
(hibernation) using the Fn keys. The sonypidd script is started
at system boot via sonypid.sh
script and provides almost the same functionality of the Fn keys
as the Sony utility in Windows XP. On my system,
sonypid.sh
is placed in /etc/init.d
and
symbolically linked from the /etc/rc[0-6].d
directories.
External Display
In order to utilize an external display, the i855crt utility is needed. The i855crt version 0.4 worked fine with my data projector. To turn on the external display, you need to run as root
i855crt [swcursor] on
1400x1050@60
The last item on the command line selects a video mode for the
external screen. Note that the resolutions on the LCD and
external display have to match or the external screen will be
garbled or flashing. The mode is one of the listed modes in
/etc/i855crt.conf
. However, the 1400x1050 mode is
not available but default so I added the following lines into
/etc/i855crt.conf
:
# 1400x1050 @ 60Hz (VESA GTF) hsync:
65.5kHz
ModeLine "1400x1050@60" 122.0 1400 1488 1640 1880 1050 1052 1064
1082 +hsync +vsync
# 1400x1050 @ 75Hz (VESA GTF) hsync: 82.2kHz
ModeLine "1400x1050@75" 155.8 1400 1464 1784 1912 1050 1052 1064
1090 +hsync +vsync
If X11 was configured to use HW cursor, then i855crt on
1400x1050@60
provided a static cursor in the upper left
corner of the projected image. If X11 was configured to use SW
cursor, then i855crt swcursor on 1400x1050@60
did
not display any cursor at all in the projected image which is not
necessarily a bad thing. Although some patches for XFree86 are
provided by the i855crt
project attempting to solve the cursor issue, I have not
tested them yet because the cursor seems to be only a minor
nuisance.
Note that additional configuration/testing may be necessary for displaying overlays (video) on a external screen. I have not needed this feature yet so it has not been tested by me.
Wireless
The integrated wireless card Intel Pro 2200BG works with the ipw2200 driver and a proprietary firmware. Follow instructions on the project's web site to install the driver and obtain the firmware.
Interestingly, the wireless adapter is not controlled via PCMCIA but rather like a PCI network adapter. Thus, you may need to modify your network initialization scripts.
If the wireless adapter cannot associate with an access point
(AP) while using WEP, then you need to set the security mode to
open, for example iwconfig eth1 enc
"s:1234567890123" open
. Once you load the
ipw2200
module, you can try establishing a
connection to an AP from a command line:
iwconfig $DEVICE mode "$MODE"
iwconfig $DEVICE enc "$KEY" open
iwconfig $DEVICE essid "$ESSID"
Set the DEVICE, MODE, KEY, and ESSID variables to match your
environment. Command iwconfig $DEVICE
will show
whether the association with an AP was successful or not.
Suspend to RAM
Suspend to RAM sleep mode saves the system state to the computer memory and, thus, it is much faster then suspend to disk. On the other hand, beware that suspend to RAM is still very experimental on Linux.
A simple experiment have shown that my laptop can stay suspended in RAM for about 17 hours before the standard battery is depleted. This number was obtained by comparing the remaining battery capacity just before and after a suspend. The laptop was suspended for 108 minutes while battery capacity dropped from 48840 mWh (fully charged) down to 43750 mWh which gives the maximum suspend time as little more than 17 hours.
Edd Dumbill wrote a detailed description about Ubuntu Linux on Sony VAIO TR Series laptops which provided me with enough information to configure the suspend to RAM feature.
First, make sure that CONFIG_ACPI_SLEEP
kernel
option is on, then add the following line to the
Device
section of
/etc/X11/XF86Config-4
:
Option "VBERestore"
"On"
Restart X11 for the change to be effective.
You can suspend to RAM using my script
/usr/local/sbin/susp2ram
, which should be
self-explanatory:
#!/bin/bash
# Suspend-to-RAM script for SONY VAIO VGN-B100B
# Written by Jan Merka (jm at highsphere.net)
#
# ------ Suspend --------
# Stop networking
/etc/init.d/networking.sh stop
# Unload network drivers
modprobe -r ipw2200
modprobe -r eepro100
# Suspend to RAM
echo mem > /sys/power/state
# ------ Resume ---------
# Reset the hard disk, otherwise it is not accessible
hdparm -w /dev/hda
# Configure the drive (32-bit IO, UDMA, unmaskirq)
hdparm -c3 -d1 -u1 /dev/hda
# Switch virtual terminals for the graphics adapter to wake
up
chvt 1
chvt 7
# Start networking
/etc/init.d/networking.sh start
exit 0
The suspend script can be, for example, called by the
acpid
daemon when laptop's lid is closed. You could
create ACPI event file /etc/acpi/events/lid
:
event=button[ /]lid
action=/usr/local/sbin/susp2ram
The suspend to RAM is practically immediate while the resume takes about 40 seconds on my laptop. After resume, I need to re-plug the USB mouse in order to be recognized.
Caveat: Whenever Bluefish (a html editor) is started and the
VBERestore
option is set, X11 restarts and the
following error messages appear:
[drm:i830_wait_ring] *ERROR* space: 131048 wanted
131064
[drm:i830_wait_ring] *ERROR* lockup
It is possible that this problem will occur for more applications.
Disclaimer
Although the provided information is accurate to my knowledge, there are no guarantees whatsoever. Keep in mind that it is your laptop and your responsibility only.