Instalar Debian GNU/Linux en el Sony VAIO VGN-SZ4XN
Cómo afinar la instalación de nuestra querida Debian en este portátil.
Introducción
Yo he instalado una debian-netinstall-lenny que deja el sistema bastante usable. Lo siguiente funciona perfectamente recién instalado:
- Tarjeta de vídeo Intel i945
- Tarjeta de vídeo nVidia GeForce 7400 (nv)
- Tarjeta de red (sky2)
- Grabadora de DVD
- Tarjeta de sonido / micrófono
- BlueTooth
- Lector de tarjetas SD (con el adaptador para MagicGate)
- Firewire
Hay algunas otras cosillas que hay que pulir y por eso escribo esta receta, claro.
Características
Esta máquina tiene dos modos: stamina y speed. El modo “stamina” es para ahorrar batería y el modo speed es para sacar toda la potencia posible. Para cambiar de modo se utiliza un pequeño conmutador que hay al lado del botón de encendido y se reinicia el equipo. En cada modo se utiliza una tarjeta de vídeo distinta: una nVidia cuando quieres potencia y una Intel cuando quieres autonomía.
Modo “stamina”
:~$ lspci
00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS/940GML and 945GT Express Memory Controller Hub (rev 03)
<b>00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS/940GML Express Integrated Graphics Controller (rev 03)
00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/940GML Express Integrated Graphics Controller (rev 03)</b>
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02)
00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02)
00:1c.2 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 (rev 02)
00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #3 (rev 02)
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #4 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)
00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 02)
00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) Serial ATA Storage Controller IDE (rev 02)
00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 02)
06:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)
07:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8036 PCI-E Fast Ethernet Controller (rev 16)
09:04.0 CardBus bridge: Texas Instruments PCIxx12 Cardbus Controller
09:04.1 FireWire (IEEE 1394): Texas Instruments PCIxx12 OHCI Compliant IEEE 1394 Host Controller
09:04.2 Mass storage controller: Texas Instruments 5-in-1 Multimedia Card Reader (SD/MMC/MS/MS PRO/xD)
Modo “speed”
:~$ lspci
00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS/940GML and 945GT Express Memory Controller Hub (rev 03)
<b>00:01.0 PCI bridge: Intel Corporation Mobile 945GM/PM/GMS/940GML and 945GT Express PCI Express Root Port (rev 03)</b>
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02)
00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02)
00:1c.2 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 (rev 02)
00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #3 (rev 02)
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #4 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)
00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 02)
00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) Serial ATA Storage Controller IDE (rev 02)
00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 02)
<b>01:00.0 VGA compatible controller: nVidia Corporation GeForce Go 7400 (rev a1)</b>
06:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)
07:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8036 PCI-E Fast Ethernet Controller (rev 16)
09:04.0 CardBus bridge: Texas Instruments PCIxx12 Cardbus Controller
09:04.1 FireWire (IEEE 1394): Texas Instruments PCIxx12 OHCI Compliant IEEE 1394 Host Controller
09:04.2 Mass storage controller: Texas Instruments 5-in-1 Multimedia Card Reader (SD/MMC/MS/MS PRO/xD)
Ahorro de batería
Para el escalado automático de frecuencia instala:
- cpudyn – CPU dynamic frequency control for processors with scaling
- cpufrequtils – utilities to deal with the cpufreq Linux kernel feature
Tienes que cargar el módulo speedstep-centrino
# modprobe speedstep-centrino
# echo "speedstep-centrino" >> /etc/modules
# /etc/init.d/cpudyn restart
laptop-mode
Instala:
- laptop-mode-tools
Y asegúrate de que tienes activado el “laptop mode”, en /etc/default/acpi-support
debe haber una línea como esta:
ENABLE_LAPTOP_MODE=true
Esto puede provocar cuelgues aleatorios en algunos portátiles. Si es tu caso, desactiva esta opción.
WiFi (con Linux < 2.6.24)
Instala los siguientes paquetes:
- ipw3945d – Binary userspace regulatory daemon for Intel PRO/W
- firmware-ipw3945 – Binary firmware for IPW3945
- ipw3945-modules-$(uname -r) – Intel PRO/Wireless 3945ABG (ipw3945) driver module
En una línea para cortar y pegar:
# apt-get install ipw3945d firmware-ipw3945 ipw3945-modules-$(uname -r)
WiFi (Con Linux >= 2.6.24)
Instala el paquete firmware-iwlwifi
. Más info en Debian wiki:iwlwifi
Aceleración 3D
Para el caso de la nvidia ya sabes como tener aceleración con los drivers propietarios. Yo sólo utilizo el modo stamina porque consume menos batería y la aceleración 3D que permite el driver libre no es desdeñable: 1250 fps con glxgears
. Más que suficiente para lo que yo necesito, que incluye cosas como blender, beryl o nexuiz.
Los parámetros de configuración de xorg.conf
relacionados son:
Section "Module"
Load "i2c"
Load "bitmap"
Load "ddc"
Load "dri"
Load "extmod"
Load "freetype"
Load "glx"
Load "int10"
Load "vbe"
EndSection
Section "Device"
Identifier "Intel"
Driver "i810"
Option "VBERestore" "True"
Screen 0
BusID "PCI:0:2:0"
Option "DRI" "True"
EndSection
Section "DRI"
Mode 0666
EndSection
Touchpad
Funciona bien con el driver “synaptic” pero requiere afinar los parámetros. Pon esto en el /etc/X11/xorg.conf
:
Section "InputDevice"
Identifier "Synaptics Touchpad"
Driver "synaptics"
Option "SendCoreEvents"
Option "Device" "/dev/input/mouse0"
Option "Protocol" "auto-dev"
Option "SHMConfig" "true"
Option "LeftEdge" "120"
Option "RightEdge" "830"
Option "TopEdge" "140"
Option "BottomEdge" "680"
Option "FingerLow" "8"
Option "FingerHigh" "9"
Option "MaxTapTime" "200"
Option "MaxTapMove" "150"
Option "MaxDoubleTapTime" "200"
Option "ClickTime" "100"
Option "FastTaps" "false"
Option "EmulateMidButtonTime" "75"
Option "VertScrollDelta" "25"
Option "HorizScrollDelta" "100"
Option "MinSpeed" "0.1"
Option "MaxSpeed" "0.7"
Option "AccelFactor" "0.05"
Option "EdgeMotionMinZ" "30"
Option "EdgeMotionMaxZ" "160"
Option "EdgeMotionMinSpeed" "200"
Option "EdgeMotionMaxSpeed" "200"
Option "EdgeMotionUseAlways" "1"
Option "UpDownScrolling" "1"
Option "TouchpadOff" "false"
Option "GuestMouseOff" "false"
Option "LockedDrags" "false"
Option "RTCornerButton" "0"
Option "RBCornerButton" "0"
Option "LTCornerButton" "0"
Option "LBCornerButton" "0"
Option "TapButton1" "1"
Option "TapButton2" "2"
Option "TapButton3" "3"
Option "CircularScrolling" "1"
Option "CircScrollDelta" "0.1"
Option "CircScrollTrigger" "2"
Option "CircularPad" "0"
Option "PalmDetect" "0"
Option "PalmMinWidth" "10"
Option "PalmMinZ" "200"
Option "CoastingSpeed" "0"
EndSection
Soporte ACPI
Instala lo siguiente:
- spicctrl – Sony Vaio controller program to set LCD backlight
ACPI: Suspender e hibernar
GNOME
Para utilizar las catacterísticas de gnome-power-manager tienes que ser del grupo powerdev
:
# addgroup usuario powerdev
Consola
# echo disk > /sys/power/state
ACPI: Control del brillo de la pantalla con Intel
Con sony-laptop puedes manipular el brillo del LCD usando las teclas Fn-F5 y Fn-F6 (al menos en GNOME). Estas teclas modifican un valor entero (entre 0 y 7 ) almacenado en el fichero /sys/class/backlight/sony/brightness
. Ese valor también lo puedes modificar “a mano” con algo como:
# echo "5" > /sys/class/backlight/sony/brightness
En ese mismo directorio hay otro fichero llamado brightness_default
que indica el nivel de brillo por defecto y que puedes modificar del mismo modo.
También funciona perfectamente el Brightness Applet
de GNOME.
ACPI: Control del brillo de la pantalla con Nvidia
Instala el paquete nvclock.
# nvclock -S -10
Crea el fichero /etc/acpi/events/sony-brightness-down
y escribe dentro:
event=sony/hotkey SPIC 00000001 00000010 action=/usr/bin/nvclock -S -10
Crea el fichero /etc/acpi/events/sony-brightness-up
y escribe dentro:
event=sony/hotkey SPIC 00000001 00000011 action=/usr/bin/nvclock -S +10
Reincia acpid
:
# /etc/init.d/acpid restart
Si no es el mismo modelo de portátil, el código de la tecla puede cambiar. Utiliza acpi_listen
para averiguar los que correspondan a tu teclado.
Webcam
Este modelo lleva integrada una webcam USB Ricoh que se identifica como:
05ca:1835 Sony Visual Communication Camera VGP-VCC5
Webcam con Linux <= 2.6.24
Para hacerla funcionar necesitas el driver R5U870. Sigue estos pasos:
$ wget <a href="http://lsb.blogdns.net/files/r5u870-0.10.0.tgz">http://lsb.blogdns.net/files/r5u870-0.10.0.tgz</a>
$ unp r5u870-0.10.0.tgz
$ cd r5u870-0.10.0/
$ make
# mkdir /lib/modules/$(uname -r)/extra/
# cp r5u870.ko /lib/modules/$(uname -r)/extra/
# depmod -a
# cp r5u870_1835.fw /lib/firmware/
Esto último es una guarrada, cuando tenga tiempo veré si puedo empaquetar esto para Debian. En arakhne.org hay un intento de empaquetado pero sólo funciona con el Linux 2.6.17-11-generic. Habría que hacer que compile con module-assistant.
Una vez instalado carga los siguientes módulos:
# modprobe videodev video-buf
# modprobe v4l1-compat v4l2-common
# modprobe compat_ioctl32
# modprobe r5u870
La puedes probar con xawtc
, cheese
o ekiga
.
Webcam con Linux >= 2.6.26
$ hg clone http://bitbucket.org/ahixon/r5u87x/
$ cd r5u87x
$ make
$ sudo ./loader
$ sudo modprobe -r uvcvideo
Salida VGA externa
Con el driver intel
y gracias al nuevo xrandr
se pueden hacer todo tipo de cosas: clone, escritorio extendido, etc y sin reiniciar el servidor X. Mira xrandr y dual-head
Por probar
- Modem
- Lector de huella dactilar
Referencias
- Vaio VGN-SZ72B
- Installing Ubuntu Dapper On a Vaio VGN-SZ 1HP/B
- Sony Vaio VGN-B3VP
- Sony Vaio – VGN-SZ3HP Ubuntu 6.06
- Sony Vaio SZ110 (SZ Series) and Ubuntu Linux
- SpeedStep
- Sony Programmable I/O Control Device Driver
- Ricoh R5U870 Webcam Driver for Linux
- HOWTO: Adjust brightness on Sony Vaio
- Debian GNU/Linux on Sony VAIO VGN-FS215S
- http://lists.mediati.org/archives/r5u870-list/2008-September/000053.html
- https://bugs.launchpad.net/ubuntu/source/linux/bug/219252
- http://www.frank17.it/linux/fz18m.htm
- http://www.mail-archive.com/sony-vaio-z-series@lists.launchpad.net/msg00292.html