================================ INSTALLING DEBIAN ON A SONY VAIO TX3[-HP] ================================ (c) by Erik Sonnleitner [esonn $at$ gmx dot net] Last Update: Mai 2007 Contents: (0) What is it about? (1) Installation (Debian) (2) Kernel (configuring your own Kernel, done with 2.6.18) (3) Configuring xorg with 3d-acceleration (3.1) Getting the right resolution (3.2) 3d-acc (3.3) Touchpad in X (4) Hibernate (suspend2disk and suspend2ram) (5) Sound (using Alsa) (6) Wlan/WiFi-module (7) Display brightness (8) CPU speedstepping (9) Battery life hacks (9.1) laptop-mode (9.2) CPU frequency (9.3) Power management (10) Fn-keys (11) Non-Fn, Non-Standard keys (12) Bluetooth (13) Remove the Windows adhesive label (0) What is it about? The TX3 is an extremely lightweight subnotebook by Sony. It weights 1.25kg (including battery) and has an 11" xblack display (1366x768), 80GB hdd, 1.06/1.2GHz Intel ultra-low voltage centrino CPU and some kindy things like 4in1 card reader, pcmcia slots, dvd+-rw, vga out, etc. (1) Installation For installing Debian on the TX3, I forced to use the Testing Net-Install ISO, which can be obtained from www.debian.org. Sarge didn't work for me, because there arn't the drivers for the Intel Network Adapter. Everything else seem to run fine during installation. (2) Kernel I just downloaded the newest stable Kernel sources (2.6.21). The main things to activate are: Processor type and features > Processor family > Pentium M Power management > ACPI (~everything) CPU frequency scaling (~everything) Networking > Bluetooth subsystem support Device drivers > networking device support > 10 or 100MBit > Intel Pro/100+ support Device drivers > graphics support > Intel 810/815 support Device drivers > graphics support > Intel 830M/845M/852GM/855GM/865GM support Device drivers > character devices > /dev/agpgart Device drivers > character devices > Intel 440LX/BX/GX, i8xx chipset support Device drivers > character devices > Direct rendering manager Device drivers > character devices > i915 driver Be sure to deactivate Networking > Networking options > Network packet filtering > Core netfilter configuration > "physdev" match or the Kernel wont compile. Then simply do make && make install_modules && cp arch/i386/boot/bzImage /boot/ and be sure to set the kernel in your Grub menu.lst. (3) X-Server (3.1) Resolution By default, xorg runs at 1024x768, with no changes (done with xorg 7.1). For getting the right resolution (1366x768, which is a quite non-standard 16/9 format), go to section Monitor. Here, the HorizSync and VertRefresh are defined. Comment them out (# at beginning of line), and add the following line after those two comments: ModeLine "1366x768" 88.03 1366 1424 1704 1816 768 770 782 808 This line will basically tell xorg that your display can really handle this resolution. Finally go to section Screen, and subsection Display (the one which fits to your colour-dephts desires). In the Modes-line delete all resolutions and put "1366x768" instead once. NOTE: After updating from Debian 3.1 to 4.0 (testing, dist-upgrade), I had to notice that the system wouldn't change to the native resolution with the shipped xorg i810-driver - to solve the problem, just download this one: http://www.fairlite.demon.co.uk/i810_drv.so and put it to /usr/lib/xorg/modules/drivers. (3.2) 3d-accel The 3d-Acceleration runs perfectly, because of the really really good OSS Intel GMA drivers. Just edit your xorg.conf and go to the Device section. There's a Driver-Option which should be set to "i810". Save and make sure you have loaded the i915 Kernel-Module (modprobe i915). The reason for telling xorg it's i810 is because i915 just replaces i810 and works quite the same way. Now even Quake III Arena works wonderfully. (3.3) Touchpad The touchpad works out-of-the-box, but in a very annoying way, there's no move-acceleration. So you have to move your finger 20-30 times for getting the mouse cursor from one display end to the other. To avoid this, just comment out the whole InputDevice Section in xorg.conf, which is dedicated to Synaptics Touchpad, as well as the InputDevice Line of the touchpad in section ServerLayout. Christof Arn (christof.arn ethikprojekte ch) suggested an alternative configuration for the touchpad used inside the TX3. With thanks to him, you might try the following xorg config: Section "InputDevice" Identifier "Synaptics Touchpad" Driver "synaptics" Option "SendCoreEvents" "true" Option "Device" "/dev/psaux" Option "Protocol" "auto-dev" Option "MinSpeed" "0.3" Option "MaxSpeed" "0.8" Option "AccelFactor" "0.1" Option "LeftEdge" "10" Option "RightEdge" "900" Option "TopEdge" "150" Option "BottomEdge" "650" Option "HorizScrollDelta" "20" Option "VertScrollDelta" "15" Option "FingerLow" "10" Option "MaxTapTime" "0" #sets tapping off; use 180 for reactivation # Option "SHMConfig" "On" #no synclient EndSection (4) Sound There's a Intel High definition audio controller inside, for which the kernel already offers a good driver. But make sure to compile this (intel_snd_hda) a Kernel module, or ALSA won't find it and uses the dummy driver. (5) Hibernate & Suspend Suspending is now much easier than before. Instead of using software-suspend2 (suspend2.net), you should use uswsusp (suspend.sf.net, Debian package usesusp). You don't even have to patch your kernel, which is useful for users who don't like to build their own kernel image. If it doesn't work, you should pass some kernel options when booting. This can easily be done via the Grub menu.lst file; just deactivate apic and lapic, and set acpi_sleep: kernel /boot/ root=/dev/hdaX ro vga=771 noapic nolapic resume2=swap:/dev/hdY acpi_sleep=3 UPDATE: uswsusp doesn't rely on the hibernate package and provides the powerful tool s2ram. It is absolutely not based on the suspend2 patch, so you don't even need to apply the patch (esp. if you want to use a custom kernel). Suspending to ram should work out of the box, by just typing "s2ram -f -a3". Suspend2disk is done via the s2disk tool and also works fine. (6) Wireless LAN Theres an Intel 3945ABG card. What you need, is the actual version of ieee80211 subsystem; make sure NOT to use the 80211 subsystem stack of the current kernel-tree, but build the module yourself. The sources can be obtained from http://ieee80211.sf.net (building is just make && make install). Then, download the sources of ipw3945 and ipw3945d, via http://ipw3945d.sf.net and http://ipw3945.sf.net, and install them the same way. Going to ipw3945 sources and typing "./load" will start ipw3945d (which should be copied to /sbin/) and load the modules. A new network interface will appear (eth2 or wlan0, something like that). (7) Display brightness control Google for sony_acpi.tgz download and make. It will compile a kernel module, you should simply load when your system is booting and you'll get a /proc/acpi/sony/brightness pseudo-file. You can manage setting the display-brightness by echoing [1..8] to this file. UPDATE: With the new sony drivers in kernel 2.6.21+, a new class is being defined in /sys/class/backlight/sony/ where the pseudofile "brightness" may contain values between 0 and 7. (8) CPU Speedstep Out of all CPU frequency utils, cpufreqd did the best job. It's easy to install and does everything automatically since you have activated the centrino-option in the kernel. (9) Battery life Battery life is a quite important thing, especially when using a subnotebook. With no powersaving options, the battery lasts about 3.5 hours. With those simply hacks below, it increases to incredible 7.5 hours, so it's really worth a try. (9.1) laptop-mode I strongly recommend to install the laptop-mode-utils package, and start by default. You may want to give /etc/laptop-mode/laptop-mode.conf a shot, since it's very very well documented, and you can tune the file until it fits best for you (harddisk turnoff in minutes, etcetc). Furthermore, theres a directory /etc/laptop-mode/batt-start/ where you can locate scripts, which are automatically started when your laptop runs on Battery, and automatically stopped when on AC power. Those scripts need to be started by " start" and stopped by " stop". E.g., I want the display brightness to be set to level 4 when on battery, and 8 when on AC: cat /etc/init.d/laptop-mode/batt-start/brightness.sh #!/bin/bash case "$1" in start) echo "4" > /proc/acpi/sony/brightness; ;; stop) echo "8" > /proc/acpi/sony/brightness; ;; *) echo "Usage: $0 (start|stop)"; ;; esac (9.2) CPU Frequency I tried a few different CPU frequency switching tools, but the one which worked best for me is cpufreqd. Just install and it'll do the rest itself (control CPU by load, power supply, battery state, etc). (9.3) Power management In addition, you should have installed the powermgmt-base package. This basically reacts on ACPI events, like AC2battery switch, battery2AC switch or lid-close. You can define your own actions in /etc/acpi/actions/. This scripts e.g call the laptop-mode scripts. If you want your tx3 to hibernate when the lid is closing, just do a echo "hibernate" >> /etc/acpi/actions/lm-lid.sh (10) The Fn-Keys If sonypid is activated in the kernel (which can be found in Device Drivers > Character Devices > Sony Vaio Programmable I/O Control Device support), the system successfully recognizes the events, sent by the fn keys. I found that actually all combinations with fn+(F1-12|cursorkeys) work. This includes setting brightness correctly, Pause+Break buttons as well as Page up/down, etc. (11) Non-standard and Non-Fn-keys There are a lot of additional keys on the notebook, besides what's on the keyboard. This means AV-Mode, Play, Stop, Forward, Backward, Eject, Volume+, Volume-. These won't work on default. I recognized that xev gets some events on these buttons however, even if the output is a little bit confusing: For example, the Volume+ and Volume- buttons send the same keycode, so you can't bind one for colume up and one for volume down. But that's better than nothing. Because these two keys arn't very good accessable when working on the notebook, i just binded them to the forward+backward buttons, which I don't use at all. The hack is this one: Get the lineakd package. Then, edit the /etc/lineakkb.def file and append: [SONY] brandname = "Sony" modelname = "tx3kb" [KEYS] VolUp = 159 Play = 162 Stop = 164 Forward = 144 Backward = 153 [END KEYS] [END SONY] This basically defines which button gives which keycode. The next step is to tell lineakd, which command should do what. Edit the ~/.lineak/lineakd.conf file. Change KeyboardType to SONY and append at the end: VolUp = Play = Stop = eject Forward = amixer set PCM 5%+ Backward = amixer set PCM 5%- As you see, Forward results in +5% volume, Backwards in -5% volume to alsa. The eject button, for any reason, doesn't send a keycode. So I just binded the Stop button to eject the dvd drive. Of course you can bind those however you want, just put the desired command at the end of the lines. Be sure to start lineakd at system start, it isn't a system service in /etc/init.d by default. The sound-mute button works without any hack. (12) Bluetooth I just tried using Bluetooth with a mouse, which worked perfectly. I did this via bluez (Debian package called bluetooth). Using the "hcitool" command, you can scan for external Bluetooth devices, and you'll get the MACs of devices in range. (13) Remove the Windows adhasive label There's a Windows XP/Windows Vista compliant label at the left bottom of the keyboard. I'd stronly recommend to get a scraper or razor blade and remove it carfully. It's disgusting. (--) Things that don't work for me/I havn't tried - I havn't tried the SD/MMC/etc card reader since I don't own such a mem card. But I activated it in the kernel, and lspci says there's the Texas Instruments cardbus controller, so it *should* work. For futher questions/comments/configs etc just mail me at esonn $at$ gmx dot net, ICQ at 17023015 or visit www.delta-xi.net. Cheers, Erik