Vaio Linux Setup
From KdjWiki
Note: This guide is specific to the hardware found on the Sony Vaio VGN-S48GP. Much of the hardware (such as audio and wifi) may work for you on a different machine if the components are the same, but check first!.
Note: I use nano as the editor of files. If you are using Ubuntu, you can just as easily use gedit (or any another alternative), but for the sake of cross-distribution availability, I will be using nano.
Contents |
General
Building drivers and utilities from source generally requires:
- Compiler & tools
- Linux source
This will already be available in Gentoo, but for Ubuntu you need to install as is described below.
Developer tools
$ sudo apt-get install build-essential bin86
Linux sources
$ sudo apt-get install linux-tree $ cd /usr/src
assuming kernel 2.6.10[xxx] - make required modifications if using a different version
$ sudo tar --bzip2 -xvf linux-source-2.6.10.tar.bz2 $ sudo ln -s /usr/src/linux-source-2.6.10 /usr/src/linux $ sudo apt-get install libncurses5-dev
Initialise source tree
$ cd /usr/src/linux $ sudo cp /boot/config* .config $ sudo make menuconfig
change nothing - just save and exit
Build kernel
$ cd /usr/src/linux
to append sub-version
$ sudo nano -w Makefile
update the line near the top to include your sub-version. For example to create "2.6.10-5-386" from the "2.6.10" sources, use the line:
EXTRAVERSION=-5-386
Audio
Note: The audio card is an Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) High Definition Audio Controller (rev 03) (as identified by # lspci | grep -i audio). The required ALSA module for this card is the intel-hda module.
Download ALSA
Note: The versions noted should work. If later versions are available they should work too, but try at your own risk!
$ cd /usr/src
driver (alsa-driver-1.0.9b)
$ sudo wget ftp://ftp.alsa-project.org/pub/driver/alsa-driver-1.0.9b.tar.bz2 Local (secure) version: http://secure.kdjonline.com/files/setup/audio/alsa-driver-1.0.9b.tar.bz2 or get alsa-driver-1.0.9b.tar.bz2 from http://www.alsa-project.org $ sudo tar --bzip2 -xvf alsa-driver-1.0.9b.tar.bz2
library
$ sudo wget ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.0.9.tar.bz2 Local (secure) version: http://secure.kdjonline.com/files/setup/audio/alsa-lib-1.0.9.tar.bz2 or get alsa-lib-1.0.9.tar.bz2 from http://www.alsa-project.org $ sudo tar --bzip2 -xvf alsa-lib-1.0.9.tar.bz2
utilities
$ sudo wget ftp://ftp.alsa-project.org/pub/utils/alsa-utils-1.0.9a.tar.bz2 Local (secure) version: http://secure.kdjonline.com/files/setup/audio/alsa-utils-1.0.9a.tar.bz2 or get alsa-utils-1.0.9a.tar.bz2 from http://www.alsa-project.org $ sudo tar --bzip2 -xvf alsa-utils-1.0.9a.tar.bz2
Build ALSA
$ cd /usr/src/alsa-driver-1.0.9b $ sudo ./configure --with-cards=hda-intel,usb-audio --with-oss=yes $ sudo make $ sudo make install $ cd /usr/src/alsa-lib-1.0.9 $ sudo ./configure $ sudo make $ sudo make install $ cd /usr/src/alsa-utils-1.0.9a $ sudo ./configure $ sudo make $ sudo make install $ cd /usr/src/alsa-driver-1.0.9b $ sudo ./snddevices
Load the module
$ sudo modprobe snd-hda-intel
Unmute and set volumes
$ alsamixer
Use m to un-mute and set to about 75%-80% - Press Esc when done
Set volumes on boot
Ubuntu
$ sudo alsactl -f /var/lib/alsa/asound.state store
$ sudo nano -w /etc/init.d/sound_restore
alsactl -f /var/lib/alsa/asound.state restore
$ sudo chmod +x /etc/init.d/sound_restore
$ sudo update-rc.d sound_restore defaults
Gentoo
$ sudo alsactl -f /var/lib/alsa/asound.state store ...TO COMPLETE...
WiFi
Note: The wireless network card is an Intel Corporation PRO/Wireless 2200BG (rev 05) (as identified by # lspci | grep -i wireless). The required firmware/driver for this card is the ipw2200.
Download WiFi
Note: The versions noted should work. I've had problems with later versions, so try at your own risk!
$ cd /usr/src
firmware
$ wget http://ipw2200.sourceforge.net/firmware.php?i_agree_to_the_license=yes&f=ipw2200-fw-2.3.tgz Local (secure) version: http://secure.kdjonline.com/files/setup/wireless/ipw2200-fw-2.3.tgz or http://secure.kdjonline.com/files/setup/wireless/1.0.7/ipw2200-fw-2.4.tgz for latest (untried) version or get ipw2200-fw-2.3.tgz from http://ipw2200.sourceforge.net $ tar -xvzf ipw2200-fw-2.3.tgz $ sudo cp ipw-2.3-*.fw /usr/lib/hotplug/firmware/
driver
$ wget http://optusnet.dl.sourceforge.net/sourceforge/ipw2200/ipw2200-1.0.6.tgz Local (secure) version: http://secure.kdjonline.com/files/setup/wireless/ipw2200-1.0.6.tgz or http://secure.kdjonline.com/files/setup/wireless/1.0.7/ipw2200-1.0.7.tgz for latest (untried) version or get ipw2200-1.0.6.tgz from http://ipw2200.sourceforge.net $ tar -xvzf ipw2200-1.0.6.tgz $ cd ipw2200-1.0.6 $ sudo sh remove-old
headers
$ wget http://optusnet.dl.sourceforge.net/sourceforge/ieee80211/ieee80211-1.0.3.tgz Local (secure) version: http://secure.kdjonline.com/files/setup/wireless/ieee80211-1.0.3.tgz or http://secure.kdjonline.com/files/setup/wireless/1.0.7/ieee80211-1.1.5.tgz for latest (untried) version or get ieee80211-1.0.3.tgz from http://ieee80211.sourceforge.net $ tar -xvzf ieee80211-1.0.3.tgz
Build
$ cd /usr/src/ipw2200-1.064 $ sudo nano -w Makefile
Comment out the ifndef CONFIG_IPW2200 condition near the top of the file, e.g.:
#ifndef CONFIG_IPW2200 ... #endif
Change
KSRC := /lib/modules/$(KVER)/build
to
KSRC := /usr/src/linux
Change
KMISC := /lib/modules/$(KVER)/drivers/net/wireless/
to
KMISC := /lib/modules/$(KVER)/kernel/drivers/net/wireless/
$ sudo make IEEE80211_INC=/usr/src/ieee80211-1.0.3 $ sudo make install IEEE80211_INC=/usr/src/ieee80211-1.0.3
WPA Supplicant
Ubuntu
$ sudo apt-get install wpasupplicant
Gentoo
$ sudo emerge wpa_supplicant (confirm)
Then (for both):
$ sudo nano -w /etc/wpa_supplicant.conf
network={
ssid="your_network_name"
proto=WPA
scan_ssid=0
key_mgmt=WPA-PSK
psk="your_secret_key"
}
NOW REBOOT (to activate the driver)
Confirm
$ dmesg | grep ipw $ sudo wpa_supplicant -B -i eth1 -c /etc/wpa_supplicant.conf -D ipw -w -dd
Auto-start
Ubuntu
$ sudo nano -w /etc/init.d/wifi_wpa.sh
#!/bin/sh
# wifi: wpa_supplicant init
echo " * [Wifi]: Enabling WPA supplicant..."
if [ -x /usr/sbin/wpa_supplicant ]; then
/usr/sbin/wpa_supplicant -B -i eth1 -c /etc/wpa_supplicant.conf -D ipw -w
fi
exit 0
$ sudo chmod +x /etc/init.d/wifi_wpa.sh
$ sudo ln -s /etc/init.d/wifi_wpa.sh /etc/rcS.d/S40netwifiwpa
Touchpad
Note: The touchpad device is an AlpsPS/2 ALPS GlidePoint (as identified by # dmesg | grep -i alps). This means the kernel needs to have the ALPS patch applied to it.
Patch kernel with ALPS
Ubuntu Maybe try:
$ sudo apt-get install xorg-driver-synaptics
Otherwise:
$ cd /usr/src/linux $ sudo gunzip -c /usr/share/doc/xorg-driver-synaptics/alps.patch.gz | sudo patch -p1 $ sudo cp /boot/config* .config $ sudo make-kpkg --us --uc --initrd --append_to_version "-5-386-alps" kernel_image kernel_headers kernel_source $ cd .. $ sudo dpkg -i kernel*alps*deb
Gentoo (ALPS patch is already applied)
$ sudo emerge synaptics $ sudo genkernel all
Or find a synaptics_drv.o file that has been patched for ALPS
Local (secure) version: http://secure.kdjonline.com/files/setup/touchpad/synaptics_drv.o
Add InputDevice to xorg.conf
Section "InputDevice" Driver "synaptics" Identifier "Touchpad" Option "Device" "/dev/input/mice" # or try "/dev/psaux" Option "Name" "ALPS;Touchpad" Option "Vendor" "Sony" Option "Protocol" "auto-dev" Option "SHMConfig" "on" Option "InputFashion" "Mouse" Option "Emulate3Buttons" "on" Option "EmulateMidButtonTime" "75" Option "ZAxisMapping" "4 5" Option "UpDownScrolling" "1" Option "CircScrollDelta" "0.1" Option "CircScrollTrigger" "2" Option "CircularScrolling" "1" Option "FingerHigh" "15" Option "FingerLow" "14" Option "HorizScrollDelta" "20" Option "VertScrollDelta" "20" Option "BottomEdge" "650" Option "TopEdge" "120" Option "LeftEdge" "120" Option "RightEdge" "830" Option "EdgeMotionMaxSpeed" "15" Option "EdgeMotionMinSpeed" "15" Option "AccelFactor" "0.1" Option "MinSpeed" "0.2" Option "MaxSpeed" "1" Option "MaxTapMove" "110" Option "MaxTapTime" "180" EndSection
Add InputDevice to ServerLayout in xorg.conf
Section "ServerLayout" ... InputDevice "Touchpad" "SendCoreEvents" ... EndSection
Power Management (ACPI)
- Enable ACPI in the kernel
- Ensure you have acpid
ACPI support:
- S0 (Fully awake)
- S3 (Suspended to RAM)
- S4 (Suspended to disk)
- S5 ("Soft Off" - powered off but AC connected)
See: http://www.columbia.edu/~ariel/acpi/acpi_howto.txt
Hibernate (Suspend to Disk)
- Enable Software Suspend in the kernel
- Get hibernate script: $ sudo emerge hibernate-script
- test $ hibernate
See:
http://www.suspend2.net/HOWTO.html
http://ubuntuforums.org/showthread.php?t=75443
Backlight
Special Keys (S1, S2, Volume, etc)
Misc
CD Drive
$ hdparm /dev/hda
Ensure dma = on