Search:  
Gentoo Wiki

Sony_Vaio_VGN-S260

This article is part of the Hardware series.
Laptops TV Tuner Cards Wireless Servers Storage Other Hardware Motherboards Related

A guide to getting Gentoo Linux running on a Sony Vaio VGN-S260 Laptop
(adapted from Eric's page)

http://www.adventure-today.com/vaio/VGNS260.jpg

Contents

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 the moment 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.

Currently Known Supported Hardware

Unsupported or Untested Hardware

Disk Partitioning

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.

Code: fdisk
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

Kernel .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.

Ethernet

See this guide.

WLAN

See this guide.

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:

Linux Kernel Configuration: menuconfig
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 startup scripts. In Gentoo all you need to to is
emerge acpid
rc-update add acpid default

Note: there is a package sys-power/cpufrequtils which already has init.d scripts (among other things) to set this info on boot for you.

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 caling_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:

File: cputhrottle
#!/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/cpufreq/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.

Linux Kernel Configuration: menuconfig
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/modprobe.d/alsa to have only the following:

File: /etc/modprobe.d/alsa
alias snd-card-0 snd-intel8x0
options snd cards_limit=1

Afterwards run update-modules ... 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.

File: make.conf (partial)
CFLAGS="-O2 -mcpu=i686 -fomit-frame-pointer"
CHOST="i386-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
Retrieved from "http://www.gentoo-wiki.info/Sony_Vaio_VGN-S260"

Last modified: Thu, 21 Aug 2008 23:41:00 +0000 Hits: 16,684