(Gentoo) Linux on a Sony Vaio VGN-S260 Laptop

-Last Update on March 10 2005 (Added xorg.conf file)
-Current running Kernel - 2.6.9

Currently Known Supported Hardware: (With some work)
-Video Card
-Onboard LAN
-Onboard WiFi
-ACPI CPU Throttling
-Memory Stick Reader
-USB 2.0
-Sound

Untested Hardware:
-Onboard Modem
-Firewire
-CD Burning Features

Introduction:
I picked up a Sony VGN-S260 laptop about a month ago and couldn't be happier with it. As far as small
laptop goes this thing is absolutly beautiful. I have had no hardware problems with it yet and would fully
reccomend it to anyone looking for a new little guy. I am currently dual booting my system with Windows XP
Pro and Gentoo Linux. Sony has support for all the Windows XP drivers on their website now (they didn't a
month ago) so that install was very easy. As this is failrly new hardware at themoment so some of it took some
witchcraft to get running under Linux, but it wasn't *that* hard. Here's some documentation on this laptop
hopefully saving some people time in the future. Most of it was complied from help I got on the amazingly helpful
Gentoo Forums and I would reccomend anyone with any problems going there for help. Eventhough I used Gentoo
almost all the info here could be helpful for any distro, so don't count it out of you use something else.


Disk Partioning:
The unit comes with XP home on it. At hda1 is a "recovery" partition and XP is at hda2 with that partition flagged
as active. Personally I just wiped all that crap away and installed XP Pro as soon as I got the unit. When I installed
XP Pro I was anticipating putting Gentoo on it in the near future and setting it up to dual boot. With this in mind I
set up partition for XP (NTFS) and a "data" partition formatted fat32 so both windows and Linux could easily share files
between each other on it. I setup the remaining space on the drive as the /boot partition, the swap partition and the
/ partition for my linux install. If you wanted to keep the original XP home install with the recovery area on the drive
as well I can't see why that would be a problem. Here is the layout fdisk gives me under Linux for a reference.

Disk /dev/hda: 60.0 GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        1912    15358108+   7  HPFS/NTFS
/dev/hda2            1913        7295    43238947+   f  W95 Ext'd (LBA)
/dev/hda5            1913        5354    27647833+   b  W95 FAT32
/dev/hda6            5355        5359       40131   83  Linux
/dev/hda7            5360        5423      514048+  82  Linux swap
/dev/hda8            5424        7295    15036808+  83  Linux


Kernal Config File:
I thought this might come in handy for some people. This is for the 2.6.9 kernel which I currently have loaded.
Kernel-2.6.9.config


X Configuration:
I thought this was going to be a nightmare with the onboard radeon and 16x9 ratio screen. It was CRAZY easy.
I chose to use X.org as my X server and it seriously auto configured everything for me. Once x.org was installed
I just ran the command:

Xorg -configure

and it kicked out a automatic config file that worked perfectly. Here is a copy of it: Xorg.conf
Heh, Currently my video resolution, mouse and keyboard work fine...aside from OpenGL. I broke it in a driver upgrade, and haven't had time to fix it.
Keep that in mind when using my xorg.conf file.


Onboard Lan
There is a suitable driver in the 2.6 kernel for this laptop. I used the eepro100 driver as a module.

<M> EtherExpressPro/100 support (eepro100, original Becker driver)
Wireless Lan
Technically unsupported by Intel but still doable.
Make sure you have the following support in the kernel:

                Generic Driver Options ->
                        <M> Hotplug firmware loading support

                Networking support ->
                        Wireless LAN (non-hamradio) ->
                               [*] Wireless LAN drivers (non-hamradio) & Wireless Extensions

Cryptographic options ->
  <M> ARC4 cipher algorithm
  <M> Michael MIC keyed digest algorithm
  <M> CRC32c CRC algorithm

Go to this website: http://ipw2200.sourceforge.net/ and download the ipw2200 driver package.
I am personally using version 0.12 at the moment without any issues. Try a newer version if you like.From there untar it,
enter the directory it makes and make then make install the package. It will build the drivers for you. Now you should be
able to modprobe ipw2200 in and have it show up as eth1. It will not show up as a wireless device, but it will work as one.
For more details see this thread - http://forums.gentoo.org/viewtopic.php?t=217688&highlight=


ACPI Support:
One of the best parts of the Centrino chipset is the CPU frequency scaling. Without it you burn your battery life
super mega fast and the CPU fan never shuts up. That is obnoxious.
Here is my relevant APCI related Kernel Config:

Power management options (ACPI, APM) --->
[*] Power Management support
[ ] Power Management Debug Support
[*] Software Suspend (EXPERIMENTAL)

Power management options (ACPI, APM) ---> ACPI (Advanced Configuration and Power Interface) Support --->
[*] ACPI Support
[*] Sleep States (EXPERIMENTAL)
<*> AC Adapter
<*> Battery
<*> Button
<*> Fan
<*> Processor
<*> Thermal Zone
(0) Disable ACPI for systems before Jan 1st this year

Power management options (ACPI, APM) ---> CPU Frequency scaling --->
[*] CPU Frequency scaling
<*> /proc/cpufreq interface (deprecated)
Default CPUFreq governor (performance)
<*> 'powersave' governor
<M> 'ondemand' cpufreq policy governor
<*> CPU frequency table helpers
<M> Intel Enhanced SpeedStep
[*] Use ACPI tables to decode valid frequency/voltage pairs (EXPERIMENTAL)

Next install acpid and add it to your stratup scripts. In Gentoo all you need to to is

emerge acpid
rc-update add acpid default

Now make sure the right modules are loaded. cpufreq_ondemand and speedstep_centrino are the two we are looking for.
You can just modprobe them in. Once you have the modules in place you will want to issue the following command.

echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

After that is run your CPU should scale back on its own. Next we need to set it all up to activate at boot.
Get the speedstep_centrino and cpufreq_ondemand modules to come up at boot. In Gentoo this is just adding them to
the /etc/modules.autoload.d/kernel-2.6 file. Next we need to get the echo command to run at boot too as the scaling_governor
file is overwritten everytime the system boots. Again, in Gentoo I added a script to /etc/init.d
I didn't write it, thanks to the guy who did. To add it to startup in Gentoo
just create it as an executable file in /etc/initd/ and "rc-update WhateverYouNameIt defualt"
Here it is:

#!/sbin/runscript
# email: insanity5902@gmail.com
# ------

depend() {
        need localmount acpid
}

checkconfig() {
        if [ ! -e /proc/cpufreq -a ! -e /sys/devices/system/cpu/cpu0/cpufreq ] ; then
       
                eerror "CPUFreq support has not been compiled into the kernel"
                return 1
        fi
}

start() {
        checkconfig || return 1
        ebegin "Switching to OnDemand"
        #if [ cat /sys/devices/system/cpu/cpu0/cpurfreq/scaling_governor == "ondemand" ] ; then
        #       eecho "OnDemand is already activated"
        #else
                echo 'ondemand' > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
        #fi
        eend $?
}

stop() {
        ebegin "Stopping OnDemand"
        echo 'userspace' > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
        eend $?
}


Still confused? Go here


Sound:
This was a bit of a pain, but had an easy fix at the end of the road. Here is my related kernel configs.

Device Drivers ---> Sound --->
<*> Sound card support
Advanced Linux Sound Architecture --->
<M> Advanced Linux Sound Architecture
PCI devices --->
<M>Intel i8x0/MX440, SiS 7012; Ali 5455; NForce Audio; AMD768/8111

Modprobe in the above drivers, install alsa-utils and heres the tricky part- in alsamixer MUTE external amp output.
Until that is done you wont get any audio output, it drove me nuts.
To get the modules to load at startup edit your /etc/modules.d/alsa to have only the following: alias snd-card-0 snd-intel8x0
options snd cards_limit=1

...and thats it for sound.


make.conf:
This may be helpful. Here is the important parts of my make.conf file. Remeber the -O2 is a capital o (letter)
, not a zero.

CFLAGS="-O2 -mcpu=i686 -fomit-frame-pointer"
CHOST="i386-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"





Page created in VI
AIM me at Cows Go Meeer
-eric