Debian GNU/Linux on Vaio SR

Motivation

After receiving my Sony Vaio SR11M, I decided to write a full-featured review about the laptop itself and how to install a GNU/Linux distribution on it, configuring every hardware resource, one by one.

This is as important to me as to the rest of the Internet community. Daily, GNU/Linux users buy laptops loaded with technology which cannot be fully used due to the lack of information about how to use a GNU/Linux on that very computer. Indeed, drivers are usually under heavy development and new computers include cutting-edge technology which is not supported at all by the software.

Luckily enough, there exist people willing to help each other and share their experiences with these issues, allowing other people to run GNU/Linux on their computers without major problems. There are a couple of websites which include a list, sortened by manufacturer, of laptops and a link to a review that someone has published before, so that people can follow those reviews and base their GNU/Linux installations and configurations on them. This websites are TuxMobile and Linux-on-Laptops.

Technical Specifications

[1]

Installing Debian GNU/Linux

Debian Installer Overview

Installing Debian GNU/Linux on a computer is no longer tedious nor boring. The guys from Debian GNU/Linux have taken care of the text-driven installation issues and now it is possible to install Debian GNU/Linux using a graphical installer. As a matter of fact, I downloaded the latest Debian GNU/Linux Lenny amd64 ISO, which included the graphical installer both in guided and expert mode.

If you have previously installed any other Debian GNU/Linux distribution, you will notice that the installation process is the typical one (according to the Debian GNU/Linux standards) and that the graphical interface is just an add-on which follows the same simple steps of the normal installation.

Choosing 64bit over 32bit

One thing I have to say is that installing the amd64 version of Debian GNU/Linux is much better than installing the classic i386. This is due to some facts that denote an important improvement in performance when using Debian GNU/Linux on a 64bit system. Here are some of the goodies:

Language and Keyboard

It is interesting to note here that configuring the language and the keyboard layout during the installation will save some time in the future. Please notice that the language has nothing to do with the keyboard layout and the locales.

I selected American English from the languages selection menu and then I configured the Spanish keyboard layout as a personal preference. About the locales, it is important to pick the ones that will give support for the character sets that we will use in the future. For instance, since I lived in Finland and I am spanish, I chose the following ones: en_US.UTF-8, es_ES.UTF-8, fi_FI.UTF-8 and sv_SE.UTF-8.

Network

Since I am a Debian GNU/Linux Sid user (a.k.a. Debian GNU/Linux unstable), I decided to add some network sources to the installation process, so that I could later upgrade to Debian GNU/Linux unstable.

One problem is that the Intel Pro/Wireless 5100AGN does not work (yet), so you will have to connect a working Internet connection through the Ethernet port, so that Debian GNU/Linux can connect to the Internet and do what it has to do. Nevertheless, you may download the full ISO (not the small netinst), which contains many packages, but it is recommendable to configure the Internet during the installation, since Debian GNU/Linux will be able to install the latest security updates and the Internet connection will be further configured for start using it when the installation is finished.

Pre-installed Software

After the installation process, which is fully guided (even in expert mode), the installer will ask you for installing software packages depending on the type of use you want to give to your computer (e.g. desktop, server, and so forth). My personal recommendation is to uncheck every option, so that the installer fetches the fewest possible data. In fact, it is more precise to install, manually, every package we may need using the good-old apt-get command present in all Debian-based distros.

Boot Loader

After the installation process is finished and the selected packages have been installed and configured properly, the Debian GNU/Linux installer will ask for configuring the boot process by installing grub2. There are three alternatives:

The best option is to install grub2 at the beginning of the disk, in the MBR. Fortunately, Debian GNU/Linux Lenny will install the latest version of grub, which is able to display high-definition graphical interfaces and supports for many new features (over the classic grub1). In fact, grub2 seems quite difficult to install manually, so I hardly recommend you to install it from the Debian installer.

First Boot

Once the boot loader has been installed and configured, you will be able to boot your system and log in with any user account you had created during the installation. However, for now, I suggest you to log in as root, since we need to configure a lot of stuff before the end of this document. Good luck!

Configuring and Tuning Hardware

Before using our Vaio SR11M, it is important to configure all the hardware. Although Debian GNU/Linux Lenny provides a kernel up to version 2.6.26, many hardware components are still not recognized by the system, and so we will have to wait for several kernel versions to come in order to have all the devices working properly. However, we can already see some basic stuff by running certain commands. I strongly recommend to write down a list of all devices and all the information provided in the following sections, so that we can easily recognize which drivers we will need for making it work properly.

List of Devices

Here is the output of the lspci command:

00:00.0 Host bridge: Intel Corporation Cantiga Memory Controller Hub (rev 07)
00:02.0 VGA compatible controller: Intel Corporation Cantiga Integrated Graphics Controller (rev 07)
00:02.1 Display controller: Intel Corporation Cantiga Integrated Graphics Controller (rev 07)
00:1a.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 03)
00:1a.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 03)
00:1a.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 03)
00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03)
00:1c.0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 (rev 03)
00:1c.1 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 2 (rev 03)
00:1c.2 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 3 (rev 03)
00:1c.3 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 4 (rev 03)
00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 03)
00:1d.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 03)
00:1d.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 03)
00:1d.3 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #6 (rev 03)
00:1d.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 03)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 93)
00:1f.0 ISA bridge: Intel Corporation ICH9M LPC Interface Controller (rev 03)
00:1f.2 SATA controller: Intel Corporation ICH9M/M-E SATA AHCI Controller (rev 03)
00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 03)
01:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8040 PCI-E Fast Ethernet Controller (rev 12)
04:00.0 Network controller: Intel Corporation Device 4232
06:03.0 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 IEEE 1394 Controller (rev 05)
06:03.1 SD Host controller: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 22)
06:03.2 System peripheral: Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter (rev 12)

Before reading the following table, it is useful to check the kernel version we are using and the kernel version present in this paper. Due to the fast development in the Linux kernel tree, drivers may be included and improved in only several days. So please make sure that you kernel version matches the kernel version presented below, or that it is even on a higher version (never lower).

This is the Linux Compatibility as of: Linux 2.6.28

Device Functionality Comments
Intel P8400 processor It works Out of the box
X-Black LCD Display It works Brightness needs configuration
Intel X4500 Graphics It works, partially Intel driver doesn't work, no 3D
High-Definition Audio It works Needs some manual tuning
SysKonnect Gigabit Ethernet It works Out of the box
Intel ProWireless 5100AGN It works, partially Only managed mode
BCM204x Bluetooth Adapter It works Out of the box
Serial-ATA Hard-Drive It works Out of the box
Sony Dual-Layer DVD It works Out of the box
Firewire (Sony iLink) It works Out of the box
ExpressCard Expansion Slot Not tested No time nor hardware to test it yet
Memory Card Reader It works, partially MMC/SD works, MemoryStick experimental
Motion Eye Webcam It works Out of the box
Suspend to RAM It works Out of the box
Suspend to Disk It works Out of the box
Sony Hotkeys Doesn't work No kernel support yet

Processor

The processor of the Sony Vaio SR11M is an Intel Centrino 2 (Core 2 Duo) P8400, with 3MB of L2 cache, running at 2.267GHz. It provides a bus speed of 1066MHz, and it is manufactured using 45nm technology. Its maximum consumption power is stated at 25W (Thermal Design Power), and it functions at 1.25V at its maximumes. [2]

To use this processor properly on Debian GNU/Linux-amd64, we'll need the following options on the kernel configuration:

  • General setup --->
    • [*] Prompt for development and/or incomplete code/drivers
  • Processor type and features --->
    • [*] Symmetric multi-processing support
    • Subarchitecture Type (PC-compatible) --->
    • Processor family (Core 2/newer Xeon) --->
    • [*] Multi-core scheduler support
  • Power management options --->
    • [*] Power Management support
    • [*] Suspend to RAM and standby
    • [*] Hibernation (aka 'suspend to disk')
    • [*] ACPI (Advanced Configuration and Power Interface) Support --->
      • [*] Future power /sys interface
      • [*] Deprecated /proc/acpi/event support
      • <*> AC Adapter
      • <*> Battery
      • <*> Button
      • <*> Video
      • <*> Fan
      • <*> Processor
      • <*> Thermal Zone
    • CPU Frequency scaling --->
      • [*] CPU Frequency scaling
      • <*> CPU frequency translation statistics
      • [*] CPU frequency translation statistics details
      • _*_ 'performance' governor
      • _*_ 'ondemand' cpufreq policy governor
      • <*> ACPI Processor P-States driver
    • [*] CPU idle PM support

With these options, the new kernel should detect the proper CPU and there should be full 64-bit support with powersave properties, thermal control, automatic CPU frequency scaling (on-demand), multi-core support and both suspend-to-RAM and suspend-to-disk support.

At a glance, the P8400 processor (included in the Vaio SR11M) stands up to 105 celsius degrees, although it normally performs hard work staying at 40 degrees. Moreover, the frequency scaling driver in the kernel provides three different scaling frequencies: 2.26GHz, 1.6GHz and 800MHz. Further, two cores are detected (Core 2 Duo, Penryn) and both work independently and Linux will switch off a core if it is not in use.

Display

The display is a superbright X-Black LCD (LVDS output) with LED technology, which trully enhances the quality of the image and it is visible from any angle of view. The screen supports up to WXGA resolution (1280x800 pixels) with a color depth of 24 bits (16 million colors).

The display works fine, no configuration is needed. However, in order to be able to adjust the brightness of the display, some manual configuration is necessary. For this kind of laptop (Sony Vaio), we will need a special driver included in the Linux kernel, which adds support for several features exclusively found in Vaio laptops. Thus:

  • Device Drivers --->
    • [*] Misc devices --->
      • <*> Sony Laptop Extras

After including these settings in the kernel, the laptop will be more usable through the /sys interface, where information can be read or set. In the case of the display, it is now possible to set the brightness from 0 to 7 (eight different brightness setps). The file is actually /sys/class/backlight/sony/brightness.

Setting the value to 0, we will get the minimum brightness possible on the display, whereas setting it to 7, we will get the maximum brightness possible. Nevertheless, this task should be automatized in a single script, which can be later called for setting the brightness automatically. For instance, I made a script bl_change able to change the brightness with a single argument. Then, from the desktop, you may configure two shortcuts that, when being pressed, call your script and change the brightness automatically. Take a look on the following script:

#!/bin/sh

opt="$1"

bl_file="/sys/class/backlight/sony/brightness"

bl_min=0
bl_mid=4
bl_max=7

case "$opt" in
    max)
        echo "$bl_max" > $bl_file
    ;;
    mid)
        echo "$bl_mid" > $bl_file
    ;;
    min)
        echo "$bl_min" > $bl_file
    ;;
    up)
        bl_cur=`cat $bl_file`
        if [ "$bl_cur" != "$bl_max" ]; then
            bl_cur=`expr $bl_cur + 1`
            echo "$bl_cur" > $bl_file
        fi
    ;;
    down)
        bl_cur=`cat $bl_file`
        if [ "$bl_cur" != "$bl_min" ]; then
            bl_cur=`expr $bl_cur - 1`
            echo "$bl_cur" > $bl_file
        fi
    ;;
esac

One problem, at least in Debian GNU/Linux, is that the permissions of the file /sys/class/backlight/sony/brightness are not set for every user to write. Hence, we will have to change this at boot time, every time, so that any user can change the brightness. This can be done, as I do, in the /etc/rc.local file, where every single line is executed every time the system boots. Therefore, simply add the following line:

chmod a+w /sys/class/backlight/sony/brightness

Finally, to set it up in GNOME (as I do), you have to execute gconf-editor and then go to apps and then metacity. Once there, first enter the commands in the keybinding_commands folder. There, I set command_11 to /usr/local/bin/bl_change down and command_12 to /usr/local/bin/bl_change up. Straight after this, you just need to set up the key bindings for executing both commands, which can be done in the section global_keybindings and then run_command_11 and run_command_12. I set these keybindings to <Alt>F5 and <Alt>F6 respectively, due to the fact that the brightness keys (Fn+F5 and Fn+F6) are not yet recognized by kernel, but they have the printings of the brightness adjustment on them.

A few words before we move onto the next section: there is a problem with the xserver-xorg-video-intel driver, which doesn't forward information to the LVDS LCD display. This means that using the intel driver, we won't see anything on the display when starting the X server. There is people who got it working using a patch against the xserver-xorg-video-intel-2.5.0, so hopefully soon we see some working driver. More information on the actual bug report at freedesktop.org.

Graphics Card

The graphics card included in this laptop is the Intel X4500HD (Intel GM45 Express chipset), which supports up to 384MBytes of video memory (mapped on the actual RAM). This chip supports vertex shader model 4.0, up to 12.8GB/s transfer speeds, OpenGL 2.0 and video decoding hardware acceleration. [3]

On the SR11M, many features are missing, since the Intel driver doesn't work yet with this laptop. Actually, when using the Intel driver, the screen goes blank and the X-window system is not shown at all (although it is running). This problem exists for this graphics card as of the xserver-xorg-video-intel-2.4.2 driver version.

The only way of getting decent graphics is using the xserver-xorg-video-vesa package, which will provide you with 2D support up to 1200x800@24. For the problem with the Intel driver, I already posted a bug report at freedesktop.org, which is being taken care of.

In order to get the framebuffer working at 1280x800@24, you will need the following kernel options:

  • Device drivers --->
    • Graphics support --->
      • <*> Support for frame buffer devices --->
        • [*] VESA VGA graphics support

Then, in your /boot/grub/grub.conf or in your /etc/lilo.conf, you will have to pass to the kernel boot line the following option: vga=866. With that option, the kernel will boot with a framebuffer of 1280x800 at 24bit of color, which will be later used by the vesa driver in the Xorg. This is the configuration for the Xorg:

### X.org configuration file


## Server settings
Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	InputDevice    "Touchpad" "AlwaysCore"
	InputDevice    "USBMouse" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
EndSection


## Font settings
Section "Files"
	FontPath     "/usr/share/fonts/X11/misc"
	FontPath     "/usr/share/fonts/X11/100dpi/:unscaled"
	FontPath     "/usr/share/fonts/X11/75dpi/:unscaled"
	FontPath     "/usr/share/fonts/X11/Type1"
	FontPath     "/usr/share/fonts/X11/100dpi"
	FontPath     "/usr/share/fonts/X11/75dpi"
	FontPath     "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection


## Module settings
Section "Module"
	Load  "xtrap"
	Load  "glx"
	Load  "dbe"
	Load  "extmod"
	Load  "dri"
    Load  "vbe"
EndSection


## Input devices
# Keyboard
Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
    Option      "Name" "Sony Vaio Keys"
    Option      "CoreKeyboard"
EndSection

# Trackpad mouse
Section "InputDevice"
	Identifier  "Touchpad"
	Driver      "synaptics"
    Option      "SendCoreEvents" "true"
	Option	    "Device" "/dev/input/mice"
	Option	    "ZAxisMapping" "4 5 6 7"
    Option      "HorizSrollDelta" "0"
    Option      "SHMConfig" "true"
EndSection

# USB mouse
Section "InputDevice"
	Identifier  "USBMouse"
	Driver      "mouse"
    Option      "CorePointer"
    Option      "Protocol" "auto"
	Option	    "Device" "/dev/input/mice"
	Option	    "ZAxisMapping" "4 5 6 7"
EndSection


## Monitor settings
# Built-in LCD display
Section "Monitor"
	Identifier  "LVDS"
	VendorName  "Sony"
	ModelName   "Vaio SR X-black LED"
   	Option      "DPMS"
	Modeline    "1280x800_76.00"  108.77  1280 1360 1496 1712  800 801 804 836  -HSync +Vsync
	HorizSync   62-63
	VertRefresh 76-77
    Option      "Monitor-LVDS" "LVDS monitor"
EndSection

# VGA output
Section "Monitor"
	Identifier  "VGA"
	VendorName  "VGA"
	ModelName   "VGA-output"
    Option      "Monitor-VGA" "VGA monitor"
EndSection


## Graphics card driver
Section "Device"
	Identifier  "Card0"
    Driver      "vesa"
    #Driver      "intel"
	VendorName  "Intel Corporation"
	BoardName   "Cantiga Integrated Graphics Controller (Q45)"
    Option      "MonitorLayout" "LVDS"
	BusID       "PCI:0:2:0"
EndSection


## Display settings
Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "LVDS"
    DefaultDepth 24
	SubSection "Display"
		Viewport   0 0
		Depth     24
	EndSubSection
EndSection

As soon as the Intel driver is working for me, I will be publishing detailed information of how to configure it to get the maximum efficiency on Debian GNU/Linux.

Audio

The audio card is an Intel High-Definition, as found in many other laptops, with a controller chip by Realtek (the model ALC262, more concretely). In order to have proper support for the audio, we have to enable the following options in our kernel configuration:

  • <*> Sound card support --->
    • <*> Advanced Linux Sound Architecture --->
      • <*> Sequencer support
      • <*> Sequencer dummy client
      • <*> OSS Mixer API
      • <*> OSS PCM (digital audio) API
      • [*] OSS PCM (digital audio) API - Include plugin system
      • [*] OSS Sequencer API
      • [*] PCI sound devices --->
        • <M> Intel HD Audio
        • [*] Build Realtek HD-audio codec support
        • [*] Enable generic HD-audio codec parser

With these options, most of the controls of the SR11M's audio will be available. However, the ALC262 chipset is not detected by the built-in driver, and thus we have to stick to the module with the Intel HDA driver. This is due to the fact that loading the module, we can tell the exact model of chipset used in the audio card by adding the following line to /etc/modprobe.d/alsa-base:

# ALC262 (Realtek + IntelHDA) card
options snd-hda-intel model=sony-assamd

Thanks to this line, the audio card will work properly. Nevertheless, the built-in microphone does not work and only generates noise. This is a bug that I have already reported to the ALSA Project.

Furthermore, please note that you have to install several applications in order to be able to configure the settings for the audio. Hence, install, at least, the following packages:

~$ sudo apt-get install alsa-base alsa-oss alsa-utils libasound2-plugins

Overall, the audio quality is quite good and the values of the mixer are highly configurable. In fact, the quality of the built-in speakers is somewhat good, and the strength of the amplifier is not bad at all.

Furthermore, in the Vaio SR11M there is support for Virtual Surround 5.1, which is enabled by creating the file ~/.asoundrc and adding the following lines: [4]

# ALSA Configuration file
pcm.!surround51 {
    type vdownmix
    slave.pcm "default"
}

pcm.!surround40 {
    type vdownmix
    slave.pcm "default"
}

Ethernet

The ethernet card included in the SR11M is a SysKonnect, which uses the PCI Express bus. The card is supposed to be limited to 100MB/s (FastEthernet), however the kernel driver is the sky2, which tells that the card is able to use up to 1Gigabit ethernet networks. These are the following options for the kernel configuration to enable the ethernet card:

  • [*] Network device support --->
    • [*] Ethernet (1000Mbit) --->
      • <*> SysKonnect Yukon2 support

Finally, I have to say that I tested it once with another Gigabit Ethernet computer, but the cable didn't give more than 100Mbps, so I guess the hardware is probably limited. When I make further tests, I will publish here the results. Otherwise, the ethernet card works properly, with no problems at all.

Wireless

The wireless card is the Intel 5100AGN (included in Intel Centrino 2 chipsets). This device is supported from 2.6.27 onwards. Here are the following options for the kernel configuration:

  • [*] Networking support --->
    • Wireless --->
      • _*_ Improved wireless configuration API
      • [*] nl80211 new netlink interface support
      • _*_ Wireless extensions
      • <*> Generic IEEE 802.11 Networking Stack (mac80211)
      • _*_ Enable LED triggers
    • _*_ RF switch subsystem support --->
      • <*> Input layer to RF swtich connector
  • [*] Network device support --->
    • Wireless LAN --->
      • [*] Wireless LAN (IEEE 802.11)
      • _*_ Intel Wireless Wifi Core
      • [*] Iwlwifi RF kill support
      • <*> Intel Wireless WiFi Next Gen AGN
      • [*] Enable Spectrum Measurement in iwlagn driver
      • [*] Enable LEDS features in iwlagn driver
      • [*] Intel Wireless WiFi 5000AGN

After selecting these options, the kernel will recognize the wireless card and it will seem to work.

Another important step is to download the proper firmware for the device. Otherwise, the kernel will recognize but will be impossible to use. For that, you need to find the file iwlwifi-5000-1.ucode, which contains the corresponding firmware. The firmware can be found fom here.

One problem in the SR11M is that the Wireless cannot be switched ON and OFF independently from the Bluetooth. There is a switch labeled "Wireless" in the front of the laptop and it turns both devices ON or OFF at the same time. The drawback is that the Bluetooth module consumes a lot of resources, and if we are not using it, we still have to let it run, if we are using the wireless card.

Bluetooth

The bluetooth chip is a BCM2046, which uses the USB bus and works with the BCM203x kernel driver. Here are the options for the kernel configuration to make the Bluetooth work under Linux:

  • [*] Networking support --->
    • <*> Bluetooth subsystem support --->
      • <*> L2CAP protocol support
      • <*> SCO links support
      • <*> RFCOMM protocol support
      • [*] RFCOMM TTY support
      • <*> BNEP protocl support
      • [*] Multicast filter support
      • [*] Protocol filter support
      • <*> HIDP protocl support
      • Bluetooth device drivers --->
        • <*> HCI USB driver
        • <*> HCI BCM203x USB driver
        • <*> HCI VHCI (Virtual HCI device) driver

Once these options are included in the kernel, the bluetooth device will appear as an USB device and it will be usable. In order to use it, you will have to install some bluetooth packages on your Debian GNU/Linux system. Here is my recommendation:

~$ sudo apt-get install bluetooth bluez-utils

If you use GNOME, then you may want to install the following packages: gnome-bluetooth and bluez-gnome. If you use KDE, then you may want to install kdebluetooth.

The Bluetooth can be switched ON and OFF using the "Wireless" switch on the front of the SR11M. However, the flaw is that switching ON and OFF switches also the status of the wireless card, which is somewhat inconvinient. If you want to use the bluetooth but not the wireless, there is a software fix you may want to try:

~$ sudo echo "1" > /sys/class/net/wlan0/device/rfkill/rfkill0/state

Hard Drive

The hard disk is a Fujitsu MHY2250BH, with 250GB of capacity, spinning at 5400rpm. The disk is uses a serial-ATA interface and provides a buffer size of 8192kB (according to hdparm). The options in the Linux kernel to use the Serial-ATA interface are the following:

  • SCSI device support --->
    • <*> SCSI disk support
    • <*> SCSI CDROM support
  • <*> Serial ATA (prod) and Parallel ATA (experimental) drivers --->
    • [*] ATA ACPI Support
    • <*> AHCI SATA support

The hard drive is really quiet and it works quite nicely. Nevertheless, the transfers are not at their best, since they don't reach the 60MB/s. Two important programs for monitoring and configuring the hard disk in GNU/Linux are hdparm and hddtemp. Here are some results from hdparm:

~$ sudo hdparm -tT /dev/sda

/dev/sda:
Timing cached reads: 3720 MB in 2.00 seconds = 1911.70 MB/sec
Timing buffered disk reads: 150 MB in 3.02 seconds = 56.68 MB/sec

One thing to notice is the fact that the hard disk doesn't get higher than 42 celsius degrees even on full loads for many hours. Finally, here you are the full information details from hdparm about the hard disk:

~$ sudo hdparm -i /dev/sda

/dev/sda: Model=FUJITSU MHY2250BH, FwRev=0000000B, SerialNo=K41LT862GS3M
Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }
RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=0
BuffType=DualPortCache, BuffSize=8192kB, MaxMultSect=16, MultSect=?16?
CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=488397168
IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio1 pio2 pio3 pio4
DMA modes: mdma0 mdma1 mdma2
UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5
AdvancedPM=yes: mode=0x80 (128) WriteCache=enabled
Drive conforms to: unknown: ATA/ATAPI-3,4,5,6,7

* signifies the current active mode

Trick: In order to maximize the capacity of the hard disk, it is possible to manually specify the amount of data read at once when the header is fetching information. This property is called readahead and it can be set in /etc/hdparm.conf, so that it is set at every boot:

/dev/sda {
    read_ahead_sect = 2048
    spindown_time = 6
}

The spindown_time is a factor of 5 that tells hdparm when to put the disk to sleep. In this case, 6 means that the disk will be put to sleep after 30 (5x6) seconds of no usage.

Dual-Layer DVD

The dual-layer DVD is a tray-kind DVD whose vendor is Sony. The model is an Optiarc DVD RW AD-79105S. It is a normal drive that supports multisession burning, UDF and other common features. The following programs are basic for recording CDs and DVDs under GNU/Linux:

~$ sudo apt-get install wodim genisoimage dvd+rw-tools

In order to watch DVDs on Debian GNU/Linux, you will need the following lines on your /etc/apt/sources.list:

# Multimedia
deb http://www.debian-multimedia.org unstable main
deb-src http://www.debian-multimedia.org unstable main

After saving that file with the new lines, do the following operation:

~$ sudo apt-get update
~$ sudo apt-get dist-upgrade
~$ sudo apt-get install libdvdread3 libdvdcss2

For watching DVDs, I strongly recommend either mplayer or totem. The latest is integrated in GNOME, but mplayer can be installed without GUI, which is quite useful for keyboard users.

For burning CDs and DVDs from a graphical environment, there are three nice programs, depending on the type of desktop you are using: k3b (for KDE users), serpentine and brasero (for GNOME users) and xfburn (for XFCE users).

FireWire

The firewire controller is a Ricoh R5C822, and the port is a Sony iLink (S400), which is typically called mini-Firewire. Due to time constraints, I haven't had time to test it properly yet, but the device is fully recognized when enabling the IEEE 1394 (FireWire) stack on the kernel.

More information to follow...

ExpressCard Slot

Due to time constraints and the lack of specific hardware, I haven't tested yet this device, but I have read on the Internet that it works for sure. I will post details about how to set it up and use it as soon as I have some time.

Memory Card Reader

The Vaio SR11M ships with two memory card readers: a MMC/SD reader and a MemoryStick reader. On GNU/Linux, only the MMC/SD reader works by now, whereas the MemoryStick reader is partially supported by an experimental driver, but my tests confirm that it doesn't work, at least with the SR11M yet. Here are the kernel options to support these devices:

  • <*> MMC/SD card support --->
    • <*> MMC block device driver
    • <*> Secure Digital Host Controller Interface support
    • <*> SDHCI support on PCI bus
    • <*> Ricoh MMC Controller Disabler
  • <*> Sony MemoryStick card support --->
    • <*> MemoryStick Pro block device driver
    • <*> TI Flash Media MemoryStick Interface support

When the memory card is inserted, hal detects it and it can be mounted automatically, typically using an integrated desktop environment, such as XFCE, GNOME or KDE.

Motion Eye Webcam

The webcam included in the SR11M is a Motion Eye with 1.3Mpixels resolution (1280x1024). It is a nice camera, quite elegant, and it works out of the box on GNU/Linux. In order to make it work, you don't need any rare driver, but you only have to enable a couple of options in the Linux kernel:

  • Multimedia devices --->
    • <*> Video for For Linux
    • [*] Enable Video For Linux API 1 compatible layer
    • [*] Video capture adapters --->
      • [*] Autoselect pertinent encoders/decoders and other helper chips
      • [*] V4L USB devices --->
        • <*> USB Video Class (UVC)
        • [*] UVC input events device support

In order to use the webcam, you will need some software able to communicate with other users or generate pictures and videos from your webcam. I just used cheese, a program included in GNOME 2.22 which allows you to record videos and take snapshots. It works perfectly with the SR11M.

NOTE: Skype doesn't work yet, since it is compiled for ia32 and the binary emulation doesn't support the video feature.

Suspend to RAM

Suspend to RAM works out of the box, both from the console and from the X-Window system. In order to put the computer to sleep, we need the following options in the kernel:

  • Power management options --->
    • [*] Power Management support
    • [*] Suspend to RAM and standby
    • [*] ACPI (Advanced Configuration and Power Interface) Support --->
      • [*] Future power /sys interface
      • [*] Deprecated /proc/acpi/event support
      • <*> Button

After setting these options and booting the new kernel, it is possible to perform the following operation to sleep the computer:

~$ sudo echo "mem" > /sys/power/state

However, you probably want to automatize your SR11M so that it goes to sleep when the LID is closed. Therefore, you have to do the following: first, install the acpid package; then, create the file /etc/acpi/events/lid and put the following contents:

event=button/lid.*
action=/etc/acpi/actions/lid.sh "%e"

Now we will create the file /etc/acpi/actions/lid.sh and we will give execution rights to it: sudo chmod +x /etc/acpi/actions/lid.sh. The, you may do whatever you want in your script, but this is my simple example:

#!/bin/sh

# Easy way to send the laptop to sleep
echo "mem" > /sys/power/state

Please notice that you may perform any operation when the LID is closed, but for this article, it is enough to send "mem" to /sys/power/state, in order to put the laptop in sleep mode.

Suspend to Disk

Suspend to disk also works out of the box. When putting the laptop into suspend to disk mode, you will need as much swap as RAM memory, since the whole memory is written as an image in the swap partition. For instance, I have 4GB of RAM, so I created a swap partition with 4GB, so that the suspend to disk can be performed properly. In the kernel, you will need the following options:

  • Power management options --->
    • [*] Power Management support
    • [*] Hibernation (aka 'suspend to disk')
    • (/dev/sda2) Default resume partition --->

/dev/sda2 should be changed by the device of your swap partition. Also, in the kernel, at boot time, an option must be passed so that the kernel resumes from the swap, instead of booting a fresh system. The option is the following: resume=/dev/sda2, where sda2 has to be changed for the name of your swap partition (the one you set up as the default one in the kernel configuration).

Finally, in order to suspend the whole system into the disk, you have to write the word "disk" into /sys/power/state. This operation will write the whole system in your swap partition and shut down the computer. The next time you boot, the system will appear as you left it the last time, including games, graphics, audio, network, etcetera.

Sony Hotkeys

The SR11M has several hotkeys in the frontal panel, such as "mode", "setting" and four more keys for personal customization. However, although there are some options in the kernel to support several Sony Vaio aspects, these keys are not yet supported nor recognized by the kernel, so we cannot use them yet on GNU/Linux. Be sure I will publish detailed information about this matter as soon as a new Vaio driver is released for the Linux kernel.

Further Configuration

Besides the typicall hardware review and its configuration, I actually would like to talk about miscellaneous configuration steps that are more or less mandatory for every laptop user in daily life. So check out the following sections for specific configurations on your Vaio SR11M.

Touchpad in Xorg

The SR11M's touchpad works out of the box, as it should be. However, you have to set several options in the kernel for ensuring the functionality is proper:

  • Input device support --->
    • [*] Provide legacy /dev/psaux device
    • (1280) Horizontal screen resolution
    • (800) Vertical screen resolution
    • [*] Mice --->
      • <*> PS/2 mouse

In order to work with the touchpad in GNU/Linux, having in mind that you may want to connect an external USB mouse, you may want to add the following options to your /etc/X11/xorg.conf:

## Server settings
Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	InputDevice    "Touchpad" "AlwaysCore"
	InputDevice    "USBMouse" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

# Trackpad mouse
Section "InputDevice"
	Identifier  "Touchpad"
	Driver      "synaptics"
    Option      "SHMConfig" "true"
    Option      "SendCoreEvents" "true"
	Option	  "Device" "/dev/input/mice"
	Option	  "ZAxisMapping" "4 5 6 7"
    Option      "TouchpadOff" "2"
    Option      "MaxTapTime" "0"
    Option      "HorizSrollDelta" "0"
EndSection

# USB mouse
Section "InputDevice"
	Identifier  "USBMouse"
	Driver      "mouse"
    Option      "CorePointer"
    Option      "Protocol" "auto"
	Option	  "Device" "/dev/input/mice"
	Option	  "ZAxisMapping" "4 5 6 7"
EndSection

First, in order to let the USB mouse and the touchpad cohexist along with the Xorg server, you have to install the following packages:

~$ sudo apt-get install xserver-xorg-input-mouse xserver-xorg-input-synaptics

Please note that the "touchpad" is always the core, whereas the USB mouse is just a CorePointer. In this configuration, I have decided that I don't want to use tapping. However, you may want to enable it by setting Option "TouchpaddOff" "0" and putting some time value to Option "MaxTapTime".

Horizontal and vertical scroll on the touchpad are supported out of the box, but you will have to add the option Option "HorizScrollDelta" "0". Nevertheless, I had some problems with this setting and I installed a graphical utility to set up the touchpad properly, in order to use the horizontal and vertical scroll:

~$ sudo apt-get install gsynaptics

gsynaptics is a GTK+ program that will allow you to configure some aspects of the touchpad with a single click, so it is quite easy to use and straightforward.

NOTE: If you want to disable the touchpad when connecting the USB mouse, then you have to compile the MOUSE_PS2 driver in the kernel as a module. Having it as a module, you can write a rule in your /etc/udev/ that unloads and loads the module according to the status of the external USB mouse (unload when attach an external mouse and load when disconnecting it). So far, I haven't tried this solution yet, since I sometimes use both of them.

Power-saving Settings

The power-saving settings are important not only because they just make your laptop to consume less power but because, due to less consume, your laptop doesn't get as hot as when using performance settings. This may extend the life of your laptop for even several extra months, which is to be appreciated nowadays.

For checking the power consumption and which power settings may be enabled, you have to install the useful tool from Intel, powertop:

~$ sudo apt-get install powertop

After you install it, you will have to run it as root or using sudo. It will collect the data every certain time interval and tell you which options you should enable in your kernel and which settings you should apply in your /etc and /sys files. For the SR11M, here is a list of things you can do:

First, modify the /etc/fstab file and append the option noatime to your system partitions. All the data partitions should have this option, which reduces the number of write cycles on the hard drive. For instance, I have:

/dev/sda1 / ext3 noatime,errors=remount-ro 0 1

Second, you should delay hard disk writes as much as possible, so all the information will be retained in the main memory for the longest time possible. This can be done by adding the following lines to your /etc/sysctl.conf:

# Power saving
vm.laptop_mode = 5
vm.dirty_expire_centisecs = 60000
vm.dirty_writeback_centisecs = 60000
vm.dirty_ratio = 60
vm.dirty_background_ratio = 1
vm.swappiness = 10

Then, it is also interesting to disable all the logging functionalities that we don't use. On Unix systems, daemons are running listening to events that happen all the time and these daemons generate detailed reports, typically on /var/log, which leads to many writes to the hard disk. These can be avoided modifying the file /etc/syslog.conf and sending every type of log to /dev/null. For instance, I have disabled the following logs (but you may disable all of them if you want):

auth,authpriv.* /dev/null
*.*;auth,authpriv.none -/dev/null

Furthermore, there exists many files that can be tunned, where kernel information is stored. The kernel usually reads the /sys directory checking for configuration values. Here are some of the commands that highly improve your SR11M's battery life:

echo "1" > /sys/module/usbcore/parameters/autosuspend

echo "800000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

hal-disable-polling --device /dev/cdrom

echo "min_power" > /sys/class/scsi_host/host0/link_power_management_policy
echo "min_power" > /sys/class/scsi_host/host1/link_power_management_policy
echo "min_power" > /sys/class/scsi_host/host2/link_power_management_policy
echo "min_power" > /sys/class/scsi_host/host3/link_power_management_policy

Another thing is the Wifi. In GNU/Linux it is possible to tell the wireless card to use different power profiles, using the iwpriv wlan0 get_power and iwpriv wlan0 set_power commands. However, since the Intel ProWireless 5100AGN is not very well supported yet on Linux, we will have to wait some time for that to come, it doesn't work yet.

Finally, I strongly encourage you to synthetize all these saving settings in two scripts, one for high performance (when the AC is connected) and another one for low consume (when the laptop is battery powered). I have a script, at boot time (/etc/rc.local) that checks whether the laptop is running on battery or on AC power, and depending on the result, it will call the high-performance settings script or the low-consumption settings power script. Take a look:


/etc/rc.local:

##!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

# Brightness
chmod a+w /sys/class/backlight/sony/brightness

# USB autosuspend
echo "1" > /sys/module/usbcore/parameters/autosuspend

# Suspend allowed to every user
chmod a+w /sys/power/state

# Battery care
AC=`acpi -a | grep "on-line"`
if [ "$AC" == "" ]; then
    /usr/local/bin/lowper
    exit 0
fi

# If running on AC, enable performance profile
/usr/local/bin/highper


/usr/local/bin/highper:

#!/bin/sh

# /usr/local/bin/highper -- Set computer to high performance parameters
# v0.1
perfile="/tmp/performance"

echo -n "Enabling high-performance settings: "

# CPU frequency limit
echo "2267000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

# CD-ROM polling disable
hal-disable-polling --device /dev/cdrom --enable-polling >/dev/null 2>/dev/null

# SATA minimum power profile select
echo "max_performance" > /sys/class/scsi_host/host0/link_power_management_policy
echo "max_performance" > /sys/class/scsi_host/host1/link_power_management_policy
echo "max_performance" > /sys/class/scsi_host/host2/link_power_management_policy
echo "max_performance" > /sys/class/scsi_host/host3/link_power_management_policy

# Report high performance to the system
echo "high" > $perfile

echo "done."


/usr/local/bin/lowper:

#!/bin/sh

# /usr/local/bin/lowper -- Set computer to low performance parameters
# v0.1
perfile="/tmp/performance"

echo -n "Enabling low-performance settings: "

# CPU frequency limit
echo "800000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

# CD-ROM polling disable
hal-disable-polling --device /dev/cdrom >/dev/null 2>/dev/null

# SATA minimum power profile select
echo "min_power" > /sys/class/scsi_host/host0/link_power_management_policy
echo "min_power" > /sys/class/scsi_host/host1/link_power_management_policy
echo "min_power" > /sys/class/scsi_host/host2/link_power_management_policy
echo "min_power" > /sys/class/scsi_host/host3/link_power_management_policy

# Report low performance to the system
echo "low" > $perfile

echo "done."

One thing I forgot to mention is that you may want to put your hard disk to sleep every now and then. This power-saving settings for sleeping the hard disk are visited in the section Hard Drive.

NOTE: Although powertop keeps saying that you should append usbcore.autosuspend=1 to your kernel line in the boot loader, it won't work. I added it and it does not work, I don't know yet why, but I will research and post here the results.

Overall Impressions

I guess it is time to assest the SR11M overall. First and foremost, it is mandatory to say that the Vaio SR11M is one of the best laptops I have ever had on my hands. It is a low-end laptop, meaning that it doesn't have HDMI or Blue-Ray, but it is built with high-quality materials and the chipsets are quite powerful (while not drawing almost any current).

As about GNU/Linux, it is the neverending story. We all know that buying a brand new laptop (with brand new hardware) and trying to run a GNU/Linux with no problems is almost impossible. I don't blame anybody. Even more, I actually thank all the people behind the Linux project and the GNU software, since they, more or less, work for free, deploying high-quality software without wanting anything in exchange (just recognition).

At first, I realized that the SR11M roughly works on GNU/Linux, but then I noticed that it is surprising that most of the stuff "just works". Three bug reports I had to send (one for ALSA, another one for the in-kernel iwlwifi and the other one for freedesktop.org). Astonishingly, in two weeks, the wireless is already working. And I suspect that many things will be fixed sooner or later, so it is really worthy to wait, because the Vaio SR11M works very well on GNU/Linux.

Concerning the engineer's question: is this laptop a Linux laptop?, I unfortunately have to answer NO. Sony doesn't seem to like GNU/Linux and so the SR11M came with the Vista preloaded, and filled with stupid applications that nobody needs nor wants. Another key issue is that the hotkeys and other aspects of the laptop are not very standard and they don't work properly in Linux because they need kernel patches and fixes (workarounds). However, and in general, it is not so bad after all.

As a final word, I want to encourage people willing to spend about 1300€ in a laptop to buy the SR11M, since it is a joy to use it with GNU/Linux and therefore with Debian GNU/Linux.

Disclaimer

This document does not guarantee that any Sony Vaio VGN-SR11M will work with GNU/Linux nor with Debian GNU/Linux, and it does not tell a definitively right information about anything. This document gives an overview of a laptop working on an operating system for a certain user (me), and that doesn't mean that it should work for the rest of the people.

Modifying the kernel configuration or installing any program listed during this paper is totally left to your own responsability and at your own risk. I am not responsible for any loss or damage you may cause to your laptop or system by following the instructions on this document.

I hope you really enjoyed the document and that it was useful to certain extent. For more information or further questions, please feel free to contact me.

References

SR Series [online]. Sony Electronics, Inc. 2008.
URL: http://www.sonystyle.com
Accessed 29th August 2008

Intel Core 2 Duo Mobile Processor P8440 [online]. Intel Corporation.
URL: http://processorfinder.intel.com/details.aspx?sSpec=SLB3R
Accessed 30th August 2008

Intel GMA [online]. Wikipedia.
URL: http://en.wikipedia.org/wiki/Intel_GMA
Accessed 4th September 2008

Make it Surround [online]. Ubuntu On Sony Vaio FW Series.
URL: http://vaioubuntu.wordpress.com/2008/09/15/make-it-surround/
Accessed 4th September 2008

www.claudiocamacho.org
Updated on Tuesday, 18 November 2008 20:29