Debian GNU/Linux on Sony VAIO VGN-FS215S
by Ricardo Cruz
http://gaips.inesc-id.pt/~rcruz/en.html
Last reviewed: August 26th 2005
ABSTRACT
This paper, describes a possible procedure to install Debian GNU/Linux, on a Sony VAIO FS215S laptop. This instructions should work in other FS series models, however some aspects might change with your configuration. Also the model number might not be the same in your world region. So I recommend that you check out section one, where I describe briefly my configuration. Even if you can't use all this information there might be some useful sections.
When I bought my computer, one of the first things that I did was to format my hard drive, and split my system, between Windows and Linux. However I had some troubles with the Linux stuff. What I thought it should be relatively easy, revealed to be a hard task, mainly because the hardware was very recent, and I didn't find any documentation for my specific configuration. Also that's the main reason why I'm writing this lines right now. After a month of tries, I can now say that everything is working.
Use this instructions at your own risk. If there is something that you don't understand or didn't work for you, send me an email to ricardo_cruz@portugalmail.com, and I'll try to solve your problem.
INDEX
|
Section I |
|
|
Section II |
OS & kernel version (IMPORTANT!!!) |
|
Section III |
|
|
Section IV |
|
|
Section V |
|
|
Section VI |
|
|
Section VII |
|
|
Section VIII |
|
|
Section IX |
|
|
Anex A |
|
|
Anex B |
|
|
Anex C |
|
|
Anex D |
Revision history of this document |
Section I - Base configuration
Sony VAIO VGN-FS215S main specs
- Intel Pentium M 750, FSB 533Mhz, 2MB L2 Cache (Centrino) processor
- LCD X-Black15,4 screen with 1280x800 resolution
- 512 MB RAM
- 100 GB Hard drive
- DVD-/+RW optical drive
- NVIDIA GeForce Go 6200 with TurboCache technology (128 MB)
- Realtek High Definition Audio Soudcard
- Intel PRO/100 VE (wired network interface)
- Intel PRO/Wireless 2200BG (802.11b/g standards)
Section II - OS & kernel version (IMPORTANT!!!)
I'm using the Debian GNU/Linux distribution. This instructions should work for any Linux system, however every example shown here, reflects my choice of Debian. Some details can vary in different distributions, so be aware to detect that situations.
One thing that I think it's important is the kernel version I'm using. I use the 2.6.12 version (latest stable by the time I wrote this). There are two main reasons to use this version or a subsequent one. The first one is hardware support, I had some serious problems with the 2.6.11 and 2.6.10 versions, specially with my touchpad. The other reason is because in my opinion the 2.6.12 version is a very good one. I strongly reccomend the 2.6.12 version of the kernel.
Some procedures here assume that you use the 2.6.12 kernel version or a later one, specially when talking about kernel options.
I optimized the kernel for my hardware (only what I need is compiled into kernel), so everyone that has the exact same model can use my config file without problems as it is or as a base configuration. In Anex A you can find my kernel config file.
The kernel sources that I use are the official ones, downloaded from www.kernel.org, without any patches applied.
Section III - Video settings, 3D acceleration and 1280x800 resolution
In this chapter I didn't have too much problems. I use the linux driver written by NVIDIA. You can find it at http://www.nvidia.com/object/unix.html. I recomend that you read the driver documentation and follow the installation instructions. But allI did to install was this command:
$ sh NVIDIA-Linux-x86-1.0-7664-pkg1.run --kernel-source-path /usr/src/linux-x.x.xx
Be aware that the driver version can change and so the name of the .run file.
The --kernel-source-path option is used to indicate my kernel sources directory. The NVIDIA driver module must be built for your kernel configuration and so needs that you indicate your sources.
Once the script runs, you'll be asked to accept the driver license, and the installer will try to connect to an ftp in order to find a pre-compiled module for your kernel version (I always cancel this operation, because it doesn't finds anything), then he will compile the module for the sources that you specified with the --kernel-source-path option, and will install it for you.
After the installation you must configure your X Window System. Debian currently uses the Xfree X system implementation, and you can find the configuration file under /etc/X11/XF86Config-4. Locate your X config file and change the used driver. In most cases you need to find the relevant Device section, and replace the line Driver "xxxxxxx" with Driver "nvidia" (figure 1). To finish, in the Module section make sure you have this line Load "glx", and remove this ones if present Load "dri" and Load "GLcore" (figure 2). There are many other options that you can define in your X config file, but for that I recommend that you read the driver documentation.
|
/etc/X11/XF86Config-4 |
... Section "Device" ... |
|
Figure 1 |
|
/etc/X11/XF86Config-4 |
... Section "Module" Load "bitmap" Load "dbe" Load "ddc" Load "extmod" Load "freetype" Load "glx" Load "int10" Load "record" Load "speedo" Load "type1" Load "vbe" EndSection ... |
|
Figure 2 |
After this you should have 3D acceleration. To test it run the following command:
$ glxgears
Let it run sometime and see the FPS's obtained. My mark is 2000 FPS, and if I maximize the window I get 200 FPS. I think this performance can be improved. I'm working on it right now, and I'll update this how-to if I get interesting results.
To get the 1280x800 resolution working, I needed to change my X config file, by adding a modeline as follows;
Modeline "1280x800" 80.58 1280 1344 1480 1680 800 801 804 827
to the Monitor section, it's also required that you specify some values for the HorizSync and VertRefresh parameters. You can view what you have to change in figure 3.
All this must be done because 1280x800 is not a standard X resolution, so you have to specify your own modeline.
Once this is done you should have 1280x800@58Hz screen resolution.
|
/etc/X11/XF86Config-4 |
... Section "Monitor" Identifier "Generic Monitor" HorizSync 28.0 - 110.0 VertRefresh 43.0 - 90.0 Modeline "1280x800" 80.58 1280 1344 1480 1680 800 801 804 827 Option "DPMS" EndSection Section "Screen" Identifier "Default Screen" Device "nvidia geforce go 6200" Monitor "Generic Monitor" DefaultDepth 24 SubSection "Display" Depth 24 Modes "1280x800" ViewPort 0 0 EndSubSection EndSection ... |
|
Figure 3 |
Section IV - Console resolution
When you install for the fisrt time your system, probably you will have an 640x400, console. This isn't exactly good.
The best resolution I could get was 1024x768, wich is much more acceptale and looks nice. The main reason is once again the non-standard 1280x800 resolution. There might be some way to get that resolution, but I didn't found it yet. Tell me something if you know how to do it.
So to get that working all you have to do is compile some options in your kernel, that options are:
(here I give the locations in the configuration tree of the kernel, click on the images to see the options that you should activate)
Device Drivers -> Graphics Support -> Support for frame buffer devices
Device Drivers -> Graphics Support -> Console display driver support
(OPTIONAL) If you want to see a nice and happy Tux at the up left corner of your screen while booting do this =)
Device Drivers -> Graphics Support -> Logo configuration
Finally, to make all this work you must pass an argument to the kernel at boot time. Generally this is done in the boot loader. My boot loader is GRUB (I recomend it). In Debian you must edit the file /boot/grub/menu.lst to configure GRUB. Locate the line of your kernel, and add the option vga=791 (figure 4), save that file and reboot. Select the correct option in the grub menu. Enjoy your new fancy console. You can find my menu.lst file in Anex C.
|
/boot/grub/menu.lst |
... ## ## End Default Options ## title Debian GNU/Linux, kernel 2.6.12 root (hd0,4) kernel /vmlinuz-2.6.12 root=/dev/hda6 ro vga=791 initrd /initrd.img-2.6.12 savedefault boot title Debian GNU/Linux, kernel 2.6.12 (recovery mode) root (hd0,4) kernel /vmlinuz-2.6.12 root=/dev/hda6 ro single initrd /initrd.img-2.6.12 savedefault boot ### END DEBIAN AUTOMAGIC KERNELS LIST ... |
|
Figure 4 |
Section V - Sound Card
Well, I had a big headache here. Ironically in the end it was the easiest part to config.
Only the 1.0.9b version of ALSA recognizes the High Definition Audio soundcard. I spent a day googling before I found that I was using the wrong ALSA version (I was using the one that came with Debian Sarge, 1.8 something). There was a complete lack of documentation in this chapter. Anyway, I downloaded the ALSA driver and utilities from the ALSA project homepage, I compiled the sources, and after that runned the alsaconf command in order to configure my soundcard, the configuration utility found my card and that was it. I got the sound working.
But the best part is now. Later when the 2.6.12 kernel version came out, I found that my card was there, wich means that I don't need to compile ALSA to get sound working. So if you'r using a 2.6.12 kernel or later (wich I reccomend) all you have to do is compile that driver and that's it, you can hear your favourite songs. Next I put the options that you should activate in the kernel sources:
(here I give the locations in the configuration tree of the kernel, click on the images to see the options that you should activate)
Device Drivers -> Sound
Device Drivers -> Sound -> Advanced Linux Sound Architecture
Device Drivers -> Sound -> Advanced Linux Sound Architecture -> PCI Devices
And that's it, compile, install and restart. Test the sound with XMMS for instance.
Section VI - Configuring Wireless
The Sony Vaio VGN-FS215S, has as most of the centrino laptops, one Intel PRO/Wireless 2200BG network adapter, wich uses the ipw2200 driver. By the time this is being written the current version of the driver is 1.0.6. It's very easy to get it working.
Follow the next instructions to install the ipw2200 wireless driver.
- Download the drivers from http://ipw2200.sourceforge.net/ (1.0.6 or later)
- Download the ieee80211 subsystem (1.0.2 or later) from http://ieee80211.sf.net
- Download the firmware that corresponds to the driver version from http://ipw2200.sourceforge.net/
- Untar and Install the firmware files into /usr/lib/hotplug/firmware (Debian users only, in other dists this might change)
- Untar the ieee80211 subsystem and "cd" to the created directory
- Do the following commands
$ make
$ make install
- Untar the driver sources downloaded in the first step and "cd" to the created directory
- Do the following comands...
$ make
$ make install
- Boot up and the new interface should be detected. In my system it is eth2.
NOTE: I had a little problem with this. When I installed this driver my wired card wasn't recognized anymore. To solve this problem I compiled the driver of my wired card (e100) into the kernel and not as a module. Other way of avoiding this problem is to ommit the command $ make install in step 8, and use two scripts that you can find under the driver directory (load and unload, I think are their names), to load and unload the driver. If you have done the above, and had the same problem and you want to use the second option, don't forget to execute the command $ make uninstall, under the driver directory. This will remove the driver modules, from your system modules, so the system doesn't load them automatically.
WARNING: Don't forget to install the iwconfig command (wireless-tools package under Debian), and verify if the kernel as the wireless support activated. In order to use WEP encryption you must compile some options in the kernel:
(here I give the locations in the configuration tree of the kernel, click on the images to see the options that you should activate)
Device Drivers -> Networking support -> Wireless LAN (non-hamradio)
Then do the following if you want to use WEP encryption:
Cryptographic Options
Section VII - Intel SpeedStep technology support
In this chapter it was very easy to get things working. Just select the following entries in the kernel configuration and compile it. Reboot, and you have the SpeedStep technology working.
(here I give the locations in the configuration tree of the kernel, click on the images to see the options that you should activate)
Power Management Options (ACPI,APM)
Power Management Options (ACPI,APM) -> CPU Frequency Scalling
If you use Gnome 2.10 and have the daemon powernowd (powernowd Debian package) running, there is an applet that can be used in the gnome panel that shows you the current processor speed, and you can see it going up and down according to the system workload. In fact if you are root user the applet allows you to change the speed manually. Just click on it.
Section VIII - The sonypi question (screen brightness, Fn keys, etc.)
Sonypi is a piece of code designed for VAIO laptops that controls a special device found in this computers. It allows you to control for example the brightness of your screen, and get the Fn key functions work. That means that even the sound can be controled with the Fn key, just like in Windows.
The bad news are, the models of the Vaio FS series, don't have such a device, wich means that sonypi doesn't work in FS models.
However the same creator of sonypi, wrote a small driver wich uses ACPI facilities to allow you change your screen brightness. This small driver called sony_acpi, works perfectly, and solves an important question when talking about laptops and battery life management.
You can find this driver here.
Follow the next steps to install it:
1 - untar the driver
2 - cd to the created directory
IMPORTANT NOTE!
Before we get in step 3, let me explain it. After compiling this driver you'll get a kernel module that you must load. When you load it, two files will be created under the proc filesystem, that files will be used to change the brightness of the screen. If you compile this driver as it is, this files are going to be created with read and write permissions only for the owner (root), no other user as priveleges over them. This means that, only root can change the screen brightness. Well this is not very pratical. I mean changing to root user only for setting the screen brightness. To solve this issue you have two distinct options: you can change the driver source in order to create this files with permissions for the other users or you can create a group of users, and modify the driver source to create this files belonging to that group, and add every user to the new group. I have done the first one, and that's the one I'll explain here. If you want to do the second you can try to understand the driver, your email me and I'll try to explain what you have to do.
3 - open the sony_acpi.c file
4 - locate the function: static int __init sony_acpi_add(struct acpi_device *device)
5 - in this function locate the value 0600 passed as argument to the function create_proc_entry (this is in line number 308 in the current version)
6 - change that value to 0666 (this will give permissions to read and write for the owner, group and others)
7 - save that file and execute the command make
8 - a file called sony_acpi.ko should have been created
9 - copy this file to /lib/modules/`uname -r`/kernel/drivers/acpi (create the acpi directory if necessary) (the bold section should be replaced by the result of the comand uname -r)
10 - to load the module do, modprobe sony_acpi
11 - to verify that all is ok do, ls /proc/acpi/sony, you should see some files, one of them has as name brightness.
Now to change the screen brightness you can do this:
echo "1" > /proc/acpi/sony/brightness (lowest brightness)
and
echo "8" > /proc/acpi/sony/brightness (highest brightness)
You can use values beetween 1 and 8 to set different brightness levels. To make this module loads at boot time, add the line sony_acpi at the end of the file /etc/modules (Debian) and execute the command update-modules.
It's quite boring have to write this commands everytime you want to change the screen brightness, so I have made a shell script that receives one argument (brightness level) and do the commands for you. You can download it here. Once you download the script, copy it to /usr/local/bin. Now you can do the following in your shell:
set-brightness 1 (lowest brightness)
and
set-brightness 8 (highest brightness)
You can use values beetween 1 and 8 to set different brightness levels.
This is much more comfortable. In fact I don't even use this script directly in the shell. I created some buttons in the gnome panel that invoke this command automatically. I grouped this buttons in a drawer or cabinet (a gnome applet that allows you to group icons).
Now, to get the Fn keys working you can follow this instructions http://forums.gentoo.org/viewtopic-p-2674579.html#2674579.
This solution works very good. In that page you'll find two versions of the code, the second one is more efficient than the previous one. But I reccomend that you read all the thread and follow the instructions given. Basically this solution works as follows. The sony_acpi driver is modified, to create another proc entry under /proc/acpi/sony. This entry as the name "fnkey" and will be used to catch the Fn key events. Then after modifying the driver and install the new version, you'r asked to compile a small program, wich will be the process responsible to catch the Fn key events and take the correct action associated with that event. This program uses that new proc entry to read that events. You can put it running when the system boots.
The code is very simple and so it has a big advantage, if you understand the C programming language, then you can read the code and you'll understand how it works wich lets you easily tweak it according to your preferences. For example you can use this code to put the keys do whatever you want, like launch programs or execute commands. You can even put the S1 and S2 keys, working.
I would like to thank, Pierre Poissinger wich had written this program. It's a very useful program, and the only way (that I know) to get Fn keys working in the Vaio FS series. Specially the second version works great. Credits for the code and idea goes for him. Thank you Pierre.
Section IX - Some final remarks
Well I hope that this how-to will help someone out there. At least when I installed my system, I felt the need for this document but I didn't found it. I hope that you don't have to look much further to solve your installation questions.
As I said you can send your questions or even corrections to my email, ricardo_cruz@portugalmail.com, I will try to help you.
Anex A - My kernel config file
Anex B - My X config file
Anex C - My grub config file
Anex D - Revision history of this document
June 21st 2005
- This document is published.
June 28th 2005 (old version here)
- Updated section of the sonypi. Added information about how to use sony_acpi instead of sonypi that doesn't work with the Vaio FS series.
July 6th 2005 (old version here)
- Anex D Revision history of this document, was added to keep track of the modifications.
- Updated the Configuring Wireless section.
August 26th 2005 (old version here)
- Updated the Configuring wireless section.
- Updated section VIII - The sonypi question (screen brightness, Fn keys, etc.).
Ricardo Cruz (C) 2005