Gentoo Wiki


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

The coresponding thread to this tutorial can be found in the Gentoo-Forums

Please feel free to contribute here, and please also post your update in the thread so we all know you have ;-) --knefas 18:09, 25 August 2005 (GMT)



Well, this is an howto about linux on Sony Vaio S, it should apply to all S4, S480, S460, S4HP, S4M/S etc.


here's the output of lspci:

0000:00:00.0 Host bridge: Intel Corporation Mobile 915GM/PM/GMS/910GML Express Processor to DRAM Controller (rev 03)
0000:00:01.0 PCI bridge: Intel Corporation Mobile 915GM/PM Express PCI Express Root Port (rev 03)
0000:00:1b.0 Class 0403: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) High Definition Audio Controller (rev 03)
0000:00:1d.0 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #1 (rev 03)
0000:00:1d.1 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #2 (rev 03)
0000:00:1d.2 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #3 (rev 03)
0000:00:1d.3 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #4 (rev 03)
0000:00:1d.7 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB2 EHCI Controller (rev 03)
0000:00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev d3)
0000:00:1f.0 ISA bridge: Intel Corporation 82801FBM (ICH6M) LPC Interface Bridge (rev 03)
0000:00:1f.1 IDE interface: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) IDE Controller (rev 03)
0000:00:1f.2 IDE interface: Intel Corporation 82801FBM (ICH6M) SATA Controller (rev 03)
0000:00:1f.3 SMBus: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) SMBus Controller (rev 03)
0000:01:00.0 VGA compatible controller: nVidia Corporation GeForce Go 6200 TurboCache (rev a1)
0000:06:05.0 CardBus bridge: Texas Instruments PCI7420 CardBus Controller
0000:06:05.2 FireWire (IEEE 1394): Texas Instruments PCI7x20 1394a-2000 OHCI Two-Port PHY/Link-Layer Controller
0000:06:05.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
0000:06:08.0 Ethernet controller: Intel Corporation 82562ET/EZ/GT/GZ - PRO/100 VE (LOM) Ethernet Controller Mobile (rev 03)
0000:06:0b.0 Network controller: Intel Corporation PRO/Wireless 2200BG (rev 05)

Some information from emperorlinux


See this guide.


On Windows I can run smoothly with 0.700 V @ 800 Mhz (6x) and 0.908 @ 1600 Mhz (12x). On linux I have 0.748 @ 800 or I get a freeze.

I actually tested it... my laptop works with 700mv @ 800 Mhz without any problems...but the fan still runs quite often....


description: SCSI Disk
product: FUJITSU MHT2060B
vendor: ATA
physical id: 0.0.0
bus info: scsi@0:0.0.0
logical name: /dev/sda
version: 4000
size: 55GB
configuration: ansiversion=5

N.B. At the moment the stable hdparm (5.9) does not support SATA disks. The ~x86 masked hdparm (6.3) does support SATA disks and with the suspend2-2.6.15 sources it works out of the box. See the gentoo power management guide for more info on how to get the disks to spin down when on battery.

There is a big (10GB) recover partition at the beginning of the disk. Make recover DVDs from Vaio Recover Utility in Win and wipe it, if you want. I did. Just remembered, the bootable restore DVD is actually the *second* you burn.

Frame buffer

At the moment I'm using gentoo-sources-2.6.12-r9 and splashutils- I could not manage to get the 1280x800 framebuffer, so I stay with 1024x768 (vga=791). vesafb-tng is doing strange things with my display, so I stayed with vesafb. To set up the whole thing just follow Fbsplash. Do not enable FB_NVIDIA, it conflicts with X nvidia drivers.

Nvidia 3D Acceleration

Nvidia 6200 Turbocache and a 13.3 TFT widescreen.

Note: Should any problems arise, please visit The Nvidia Guide and follow it through. Your kernel needs to be configured for AGP support.

As of October 2006, Gentoo changed the location in portage of the nvidia drivers from nvidia-glx / nvidia-kernel to x11-drivers/nvidia-drivers. To install the 3D accelerated nvidia drivers, you will need the following packages.


I recommend the latest versions of them. To unmask, add them to /etc/portage/package.keywords and emerge them as follows,

echo "x11-drivers/nvidia-drivers ~x86" >> /etc/portage/package.keywords
echo "app-admin/eselect-opengl ~x86" >> /etc/portage/package.keywords
echo "app-admin/eselect ~x86" >> /etc/portage/package.keywords
emerge -avt eselect eselect-opengl nvidia-drivers

Note: I (xushi) successfully use the 1.0.8776 drivers with very good results (~2000fps on full resolution). the 8774, has also been tested, and the masked beta 1.0.9626 work well too.

Note: I (moment) could only use the 1.0.9639 and prior drivers. More recent drivers break X when I switch to other terminals (CTRL+ALT+F1) or when the system reboots or shuts down.

When installed, you'll need to switch from the xorg-x11 libraries to the nvidia ones. To display what drivers you have, run the command

eselect opengl list

and you should get an output similar to this

xushitop # eselect opengl list
Available OpenGL implementations:
  [1]   nvidia 
  [2]   xorg-x11 *

The star ( * ) indicates which driver you are currently using. To switch, simply type the command,

eselect opengl set nvidia

Please read the X Configuration section below in order to use the drivers in your desktop environment. You will not be able to use them unless you edit your xorg.conf file.


It's now possible to underclock the GPU/Memory using nvclock cvs. Download/compile and then

cd src
./nvclock -s
Card:           nVidia Geforce Go 6200
Card number:    1
Memory clock:   598.500 MHz
GPU clock:      300.857 MHz

./nvclock -m 200 -n 100 -f
Requested memory clock:         200.000 MHz
Requested core clock:           100.000 MHz

Adjusted low-level clocks on a nVidia Geforce Go 6200
Memory clock:   200.812 MHz
GPU clock:      99.000 MHz

Lower values give screen problem (lines/blur etc) for me.
N.B. I've not noticed any significant increase of battery life or some less heat.

X configuration

File: /etc/X11/xorg.conf
# In xorg.conf we need something like
Section "Device"
       Identifier  "Card0"
       VendorName  "nVidia Corporation"
       BoardName   "GeForce Go 6200"
       BusID       "PCI:1:0:0"
       Driver      "nvidia"
       Option      "RenderAccel" "true"
       #Option      "NoLogo" "true"
       Option      "NvAGP" "1"
       Option      "Coolbits" "1"
# and disable kernel dri
Section "Module"
#       Load  "dri"
# We also need to set the display properly, and something like this will do it:
Section "Monitor"
       Identifier   "Monitor0"
       VendorName   "Sony"
       ModelName    "X-Black"
       Option       "dpms"
       HorizSync    29-60
       VertRefresh  0-60
       DisplaySize  285 179 #important to set dpi properly
       Modeline "1280x800"  68.56  1280 1336 1472 1664  800 801 804 824  -HSync +Vsync
Section "Screen"
       Identifier "Screen0"
       Device     "Card0"
       Monitor    "Monitor0"
       DefaultDepth 24
       SubSection "Display"
               Viewport   0 0
               Depth  24
               Modes "1280x800"
# Touchpad
Section "InputDevice"
       Identifier  "Touchpad"
       Driver      "synaptics"
       Option   "Protocol"      "event"
       Option      "Device" "/dev/input/event2"
       Option      "ZAxisMapping" "Y"
       Option      "Emulate3Buttons" "true"
       Option      "Emulate3Timeout"  "100"
  # Next line required only if you want to disable the mousepad while typing:
       Option "SHMConfig" "on"
  # Tweak this option as you like, it works anyway, have a look in
  # /usr/share/doc/synaptics*/README.gz for more options
      Option   "LeftEdge"      "60"
      Option   "RightEdge"      "830"
      Option   "TopEdge"      "70"
      Option   "BottomEdge"      "650"
      Option   "FingerLow"      "25"
      Option   "FingerHigh"      "30"
      Option   "MaxTapTime"      "180"
      Option   "MaxTapMove"      "50"
      Option   "EmulateMidButtonTime"   "75"
      Option   "VertScrollDelta"   "50"
      Option   "HorizScrollDelta"   "50"
      Option   "MinSpeed"      "0.50"
      Option   "MaxSpeed"      "0.9"
      Option   "AccelFactor"      "0.02"
      Option   "EdgeMotionSpeed"   "40"
      Option   "UpDownScrolling"   "1"
      Option   "TouchpadOff"      "0"

Comment added by Massimiliano Adamo (5 August 2006): You may think that the monitor is too small and stretched, in this case you'll like Twinview, to have a dual monitor. The second monitor in this case must stay at the left of your notebook, and the total resolution is the addition of the single resolutions (in this case they differ). The second monitor is called here "CRT-0" (it's a huge old monitor, around 21 inches, made by Sun. You may need to tune only these parameters to fit your monitor)

These are the relevant sections from my xorg.conf:

File: /etc/X11/xorg.conf

Section "Device"

       Identifier  "Videocard0"
       Driver      "nvidia"
       VendorName  "Nvidia"
       BoardName   "GeForce 6200 TurboCache(TM)"
       BusID       "PCI:1:0:0"
       Option      "NvAGP" "1"
       Option      "NoLogo" "false"
       Option      "RenderAccel" "true"
       Option      "AllowGLXWithComposite" "true"
       Option      "CursorShadowAlpha" "true"
       Option      "ConnectedMonitor" "CRT-0, DFP-0"


Section "Screen"

       Identifier "Screen0"
       Device     "Videocard0"
       Monitor    "Monitor0"
       DefaultDepth     24
       Option      "TwinView " "on"
       Option      "TwinViewOrientation" "RightOf"
       Option "MetaModes"   "CRT-0: 1400x1050,  DFP-0: 1280x800"
       Option "HorizSync"   "CRT-0: 50-110;     DFP-0: 40-70"
       Option "VertRefresh" "CRT-0: 60-120;     DFP-0: 60"
       SubSection "Display"
               Depth     24
               Modes    "1280x800"


To make the touchpad work we need synaptics drivers,

emerge x11-drivers/synaptics

You also need to have the following enabled in the kernel. "evdev" (CONFIG_INPUT_EVDEV=y)

 Device Drivers -> Input Device Support -> Event Interface (Y)

and "psmouse" (MOUSE_PS2=y)

Device Drivers -> Input Device Support -> Mouse -> PS/2 Mouse (Y)

Have a look also at gksyn and syndaemon to disable the touchpad when typing. See also the Synaptics Touchpad howto

Note: media-video/nvidia-glx-1.0.7676-r1 installs X's modules in /usr/lib/xorg/modules instead of /usr/lib/modules as expected. If X isn't able to find the nvidia driver, add the following line in the "Files" Section.

      ModulePath "/usr/lib/xorg/modules"



See this guide.


See this guide.


Yes, the sound is really poor. But anyway we want it working. So enable

Linux Kernel Configuration: snd_hda_intel
Symbol: SND_HDA_INTEL [=m]
   Prompt: Intel HD Audio
   Defined at sound/pci/Kconfig:517
   Depends on: !M68K && SOUND!=n && PCI && SND
     -> Device Drivers
       -> Sound
         -> Advanced Linux Sound Architecture
           -> Advanced Linux Sound Architecture (SND [=m])
             -> PCI devices
   Selects: SND_PCM

and edit

File: /etc/modprobe.d/alsa
alias snd-card-0 snd-hda-intel

Afterwards run update-modules and rc-update add alsasound default If you prefer using alsa-driver then edit

File: /etc/make.conf

It seems (tested!) that by adding

File: /etc/modprobe.d/alsa
options snd-hda-intel position_fix=1

(remember to run update-modules after any changes) you get better results (no crackling and more volume). Try also with position_fix=2. But to do this you need ~x86 alsa-drivers, since hda-intel is quite new and still under development.

With oss emulation, you can get a cleaner sound but volume is a bit low.

DVDRW drive

To get some more control on it download and install sony_acpi. Check your /proc/acpi for the new entries it creates. You'll have a cd_power read/write one. (CDPW/GCDP acpi method). The drive is region locked (MATSHITA UJ-832D). There is no region free firmware yet, check [1]. The latest firmware is 1.03 and is available as a download from Sony's support website.

To activate DMA (useful to read dvd, otherwise it may be slow) you need build in (not as module) PIIX Support.


Enjoy a dvd in mplayer using all our screen by adding

File: /etc/mplayer.conf


general ACPI

Sony will not release the BIOS flash image as updates, I asked. So, the only way to update the BIOS as of now is via Windows, a DOS bootdisk won't help here. Also, pnxdeco cannot extract the flash image from the .exe There are no visible improvements gained through updating with the current .exe

Enable ACPI in your kernel configuration

Linux Kernel Configuration: acpi
Power management options (ACPI, APM)  --->
  [*] Power Management support
  [*]   Software Suspend (EXPERIMENTAL)
  [*]   Suspend-to-Disk Support
  (/dev/sda7) Default resume partition
  ACPI (Advanced Configuration and Power Interface) Support  --->
     [*] ACPI Support
     [*]   Sleep States (EXPERIMENTAL)
     <*>   AC Adapter
     <*>   Battery
     <*>   Button
     <*>   Fan
     <*>   Processor
     <*>     Thermal Zone

and read your temperature from /proc/acpi/thermal_zone/ATF0/temperature If you want to be sure to get all acpi functionality add to your kernel line

acpi_os_name="Windows 2001 SP1"

this info is taken directly from the DSDT. (By the way, the dsdt compiles cleanly) (J.Jordens: I have not seen that the acpi_os_name enables special windows-only functionality, from the DSDT is seems to simply be a rewriting of sorts)

Suspend to disk/ram

Suspend to disk (S4) with suspend2-sources

 echo 0 > /proc/suspend2/extra_pages_allowance

Further, I very much doubt this has anything to do with the DSDT - it compiles cleanly and there is no Windows-only functionality in it

with the default hibernate-ram script and settings for me on an sz340 (which seems to have very similar hardware). This is using the 2.6.19-r3 suspend2-sources in portage. However, the console gets garbled upon resume. Not a problem if you only use X though.

LCD Brightness

The brightness isn't acpi governed, but it uses something in nvidia interface. The latest version (0.8 beta) nvclock supports it (thanks to Erik Waling!).

nvclock -S 40%

Fn keys

The method below is not needed any more since Sonypi now sends normal ACPI events so you can use acpid. But sonykeyd somehow seams much more responsive...

The kernel patch is included in the kernel since 2.6.14. If you want to use an older version you need to patch manually, see the history of this page. To make them work you need to configure sonypi, read the doc ( /usr/src/linux/Documentation/sonypi.txt), but mainly you need to add the following to /etc/modprobe.conf:

File: /etc/modprobe.conf
alias char-major-10-250 sonypi
options sonypi minor=250 fnkeyinit=1

and execute the following commands:

mknod /dev/sonypi c 10 250

Then set SONYPI (-> Device Drivers -> Character devices) in kernel as module and

make modules modules_install

Then you need some kind of daemon to grab the keys and do something. I've "upgraded" for our Vaio a quite old project, sonykeyd, you can get the ebuild here (copy&paste). Put it in $PORTDIR_OVERLAY/app-laptop/sonykeyd:

mkdir $PORTDIR_OVERLAY/app-laptop/sonykeyd
mv sonykeyd-$version.ebuild $PORTDIR_OVERLAY/app-laptop/sonykeyd

and remember to regenerate the digest:

cd $PORTDIR_OVERLAY/app-laptop/sonykeyd
ebuild sonykeyd-$version.ebuild digest
ebuild sonykeyd-$version.ebuild manifest

and emerge it:

emerge app-laptop/sonykeyd

to add it to the default run-level do

rc-update add sonypi default
/etc/init.d/sonypi start

The script run when an event occurs is /usr/local/sbin/, in this version it enables audio (with alsa) and brightness control (you need smartdimmer, read section 8. This is far from perfect, and will be probably updated with your help. :)

If you want to use the events that occurs by pressing the fn key (i.e. fn+F1) in X you need to translate the event to the X event interface. That can be done in several ways, one of them is using evrouter. But I found easier to edit sonykeyd and add an XTestFakeKeyEvent routine.

If you want some kind of on-screen-display you can emerge xosd (use the ~x86 version, the stable one is too old) and edit your I use this commands (put them in the relevant section of

CATCOM="osd_cat -f -*-aquafont-*-*-*-*-17-*-*-*-*-*-*-uni -c red -s 1 -d 1 -o 30 -i 150 -p bottom"

volume +/- 5:

${CATCOM} -b percentage -P $(amixer sset 'Front' 5- | awk '{if(match($5,/[0-9]+%/)){ print substr($5,RSTART,RLENGTH-1)}}') -T Volume 
${CATCOM} -b percentage -P $(amixer sset 'Front' 5+ | awk '{if(match($5,/[0-9]+%/)){ print substr($5,RSTART,RLENGTH-1)}}') -T Volume 

LCD brightness status:

${CATCOM} -b slider -P $(smartdimmer -g | awk '{print $3*100/21}') -T Brightness

displays what you echo:

echo mute | ${CATCOM}

Another way of employing the Fn-keys is kvaio-hack HARDWARE_Sony_VGN_S580/kvaio.cpp_hack. It makes use of kmilo and works on my kde-3.5.2.


Firewire works. On your kernel, add the following (M = module. Y = built in)

Device Drivers --> IEEE 1394 (FireWire) support (Y)
 Device Drivers --> IEEE 1394 (FireWire) support --> OHCI-1394 support (M)
 Device Drivers --> IEEE 1394 (FireWire) support --> SBP-2 support (Y)

This will allow for firewire to work, especially with external DVDs and Hard disks. Just recompile your kernel and reboot.




Concerns or Compliments? Please use the Discussion section.




See also

Retrieved from ""

Last modified: Mon, 25 Aug 2008 04:50:00 +0000 Hits: 48,902