================================ SOME STEPS HOW TO INSTALL DEBIAN ON A SONY VAIO TX3[-HP] ================================ Installation of Debian 5.0 Lenny on SONY VAIO TX3[-HP] works out of the box for me. Suspend to ram and suspend to disk works fine for me! No additional things to to! Great! I also wrote "linux" on the couver of my laptop. If you are interested, have a look at www.ethikprojekte.ch/VaioLinux1_.JPG www.ethikprojekte.ch/VaioLinux2_.JPG www.ethikprojekte.ch/VaioLinux3_.JPG www.ethikprojekte.ch/VaioLinux4_.JPG It's quite simple to write "linux" like this on a laptop. Follow these steps: 1. I made a photo from the lettering "vaio" on my laptop. Then I toke those letters as basis to build my lettering "linux". For this, I used gimp. You can find the result on www.ethikprojekte.ch/VaiolLinuxSkizze4fertig_ok_.jpg 2. Then, I had to build an eps. I did this for free on http://vectormagic.com/ You can find my eps on www.ethikprojekte.ch/VaiolLinuxSkizze4fertig_ok_.eps (Feel free to use it.) 3. I sent this eps of this to sunprint.ch . They mad a adhesive label ("sticker") in silver chrome for me. (To know more have a look at http://www.sunprint.ch/index.php?cat=c274_Folienschrift-Aufkleber.html) 4. Sunprint sent an instruction with the sticker, how to mount the ticker. I mounted the sticker/adhesive label on my laptop. That's all! Have fun, Christof This text is old ---------------- Previous versions of Debian did work out of the box too, but with some problems, that I solved like the following, old text shows: by Christof Arn [christof.arn $at$ ethikprojekte dot ch starting from Erik Sonnleitner's [esonn $at$ gmx dot net] instructions: http://joomla.delta-xi.net/tx3.txt Introduction I was looking for a realy small and lightweight subnotbook - and I of course wanted to use Linux on it. Finaly I bought a SONY VAIO TX3. The most important argument was: I found an information how to install debian-Linux on this subnotbook on http://www.delta-xi.net/tx3.txt . Without his his instructions, I would have done nothing. Finaly, I reached and I'd like to thank Erik Sonnleitner very much. But first I realised, that I had to learn a lot to fellow the instructions from Erik Sonnleitner. Especially I had to lern how to patch and compile a kernel. Because I'm swiss-german, I took the inormations about kernel patching and compiling from http://debiananwenderhandbuch.de/kernelbauen.html and from the magazine "linux user" (www.linux-user.de), that at the right moment had an article about kernel patching and compiling. And I learnt from many forums to, and from the wikipedia (exactly http://de.wikipedia.org/wiki/Initramfs) Now I'd like to write what I learnt to help others, that need basic information. (So I produced this text: It's a mix from Erik Sonnleitners text and me. Please read the original to reconstruct, what's my part.) I'd be happy to get some feedback. I like all opportunities to learn more about whatever. Please accept, that I did this text so good as i can, but whenever something might not work for you, I cannot give any warranty. Please make always backups of your data, as I do myself. Assumed skills You should be able to work with the terminal/console/bash, but you need not hardly advanced knowledge. (I'm realy not an advanced linux user me to.) You should be able to look for aditional information, if this small tutorial has a blind spot. I recommend wikipedia.org. You should basicaly know, what "compiling" means: Translating a Programm, written in readable words by a programmer, into a file, that contains no longer letters, but a long sequenz of the numbers zero and one. (This file is more or less anreadable for humans, but readable for processors.) 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 (3.4) Activate external screen or beamer (NEW) (4) Hibernate (suspend2disk and suspend2ram) (5) Sound (using Alsa) (6) Wlan/WiFi-module (7) Display brightness (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) 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, took the actual Net-Install ISO, which can be obtained from www.debian.org. Sarge wouldn't work, as Erik Sonnleitner says, because there arn't the drivers for the Intel Network Adapter. (2) Kernel There are two things to do to adapt the kernel to the TX3: You need one patch and you have to enable some drivers, that normaly aren't enabled. The steps to do are: (2.1) Preparation B Patch C Enable drivers D Compile E Install None of those steps I ever had done - and for each of those steps are different possibilities (and impossibilities!). A Preparation I installed with synaptic the "kernel-package" to help me. Then you can either install the sources as a package (like "linux-source-2.6.18", I also got the corresponding "linux-headers") or you can download the newest kernel from www.kernel.org. Just on the first page you see click on the latest stable kernels line on the "F", and you get the whole kernel files in a compressed file. Uncompress this file, so that you have finaly a subfolder in /usr/src, containing a large number of isubfolders in a special structure you will understand a little bit better later. Now, get the hibernate patch from www.suspend2.net, must be the right one for your kernel-number. Unpack this patch wherever you want. (2.2) Patch A Patch is a correcting/changing information for the kernel, that is written in a special syntax. There is a programm named "patch", that applies those changes to the kernel sources. But the usage "patch -p1 suspend2-2.2.9-for-2.6.18.3.patch" (you may have to change the numbers" didn't work for me. I had a nothing doing bash in front of me. What worked was the following: cd /usr/src/linux-2.6.18 [you must start the patch from within the directory, wher the sources are] cat /home/christof/PatchHibernate/suspend2--for-2.6.18.patch | patch -p1 What does the last line do? "Cat" takes a file and writes it on the standard output. With the | you send the output to the next program, which is on this line "patch". The option -p1 I still don't understand, but it worked. You see now on your bash many information and you can follow all the work, patch is doing. (2.3) Enable Drivers Now, you can copy and rename the Config-File you have for your running kernel next to your sources. This means (from within the directory you are - were your sources are: cp /boot/config-[Kernelversion] .config Now, you have a hidden Config-File in your sources-directory. Now, type make menuconfig You now can enabel and disenable drivers and so on. The drivers normally can either be disabled, or be compiled into the kernel or be compiled as a modul, that is loaded on demand. A few drivers can either only be compiled into the kernel or disabled respectively either only be compiled as modul or disabled. In the menueconfig * means compiling into the kernel, m means compiling as modul, nothing means disabled. I did, what Erik Sonnleitner recomends: The main things to activate are: Processor type and features > Processor family > Pentium M Power management > ACPI (~everything) Power management > 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 Device Drivers > Character Devices > Sony Vaio Programmable I/O Control Device support Be sure to deactivate Networking > Networking options > Network packet filtering > Core netfilter configuration > "physdev" match or the Kernel wont compile. Only if you reached to patch the kernel with the hibernate patch, you have aditionaly options you have to activate: Power management options > Suspend2 (everything) Cryptographic options > LZF compression algorithm If you don't find all recommendations, don't be desperate. The most important thing is first to go to Code maturity level --> and to select "Prompt for development ..." And the second thing is, that menuconfig helps you to search: In any moment you can type a slash ( / ) and then search for an option. So, just do your best. I never hat exactly the same options that Erik Sonnleitner had (I tried with for different kernels), but I found most of them and finaly reached. (2.4) Compile There are two different ways to compile: Either you type (within the directory you are - where are your sources) make-kpkg, so that you get a Debian package in your next higher directory, you now can install with dpkg -i yourFile.deb. Or you do, like Erik Sonnleitner says: Then simply do make && make install_modules && cp arch/i386/boot/bzImage /boot/ and be sure to set the kernel in your Grub menu.1st. The problem for me was in both cases, that the system couldn't start because of a special reason: Linux needs a kind of "pre-kernel", that ist loaded first and gives the capacity to access the harddisk and so on. This "ramdisk"-File has to be generated, copied to /boot and listed in the file /boot/grub/menu.1st . There is a programm to do this named "mkinitrd", but this didn't work due to lack of drivers in the so produced ramdisk-file. Finaly, I learnt, that there is a successor for mkinird called "update-initramfs". So install the package "initramfs-tools" and then type (from within the sources-directory) update-initramfs -c -k 2.6.18 Now you will see a new file in /boot/ (like "initrd.img-2.6.18"). Now, you have to create a new entry in the file /boot/grub/menu.1st. My new entry in /boot/grub/menu.1st is: title Debian GNU/Linux, kernel 2.6.18 root (hd0,4) kernel /boot/vmlinuz-2.6.18 root=/dev/hda5 ro initrd /boot/initrd.img-2.6.18 savedefault But I'm quite shure, that /dev/hda5 is not the right partition for you. Just have a look at the other enries, make the new entry in exaclty the same way, replacing only the filenames vmlinuz XY and initrd.img ZY by the new ones you created. (3) X-Server (3.1) Resolution Erik Sonnleitner gave a precise advice, how to setup the right - and special - resolution (1366x768). For me, that wasn't nessesary. When I installed debian testing, the installer recognised this resolution correctly. (3.2) 3d-accel Erik Sonnleitner tells, how to install the 3d-Acceleration: 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. - I didn't do this until now, becouse I don't need 3d-Acceleration at the moment. (3.3) Touchpad The two advices for the touchpad is: The touchpad works out-of-the-box, but maybe in a very annoying way: If there's no move-acceleration, you have to move your finger 20-30 times for getting the mouse cursor from one display end to the other. To avoid this, you can just comment out the whole InputDevice Section in the file /etc/X11/xorg.conf, which is dedicated to Synaptics Touchpad, as well as the InputDevice Line of the touchpad in section ServerLayout. It works! Caution: Please, befor you to this, be shure you have an access to your TX3, that is independent from the X-Server. I was lucky I had installed the package "openssh-server" befor. I forget to comment out the InputDevice Line of the touchpad in section ServerLayout (the second advice above) and the X-Server did no more start. Because the ssh-server was allready started, I could figure out the IP-Adress of the TX3 and, took access to them from my desktop and corrected this. If you don't know how to deal with ssh, you could, if you make a similar mistake, take a knopix live CD. Then you can start from the CD-Rom and change the file /etc/X11/xorg.conf. It would be a good idea to have a copy from the original xorg.conf in the same folder, like xorg.conf.old. But if you comment out the synaptics touchpad, you cannot use the many special effects that provides just the synaptics driver. So, the better way is to correct the Section in the file /etc/X11/xorg.conf like this: 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 "SHMConfig" "On" EndSection Now, you have scrolling by gliding along the right border of the touchpad. Enjoy it! The Option "SHMConfig" "On" in the last line of this section allows to change the settings on the fly. So you can install gsynaptics and then you have the ability to configure the touchpad in a very sophisticated way while working with your sony vaio. You can also change the settings in a bash. You may want to switch of taping, to avoid taping the touchpad by mistake while typing. So type "synclient MaxTapTime=0". That makes, that mouse cklick is only if press the button next to the touchpad. If you want to reactivate taping, type "synclient MaxTapTime=180" in your bash. [How did I found this solution? I found in the internet, that I can see what mousepad I have by typing cat /proc/bus/input/devices in my bash. So i saw, it's an "AlpsPS/2 ALPS GlidePoint". Searching this and linux in the internet, I found a working configuration on http://www.debianforum.de/forum/viewtopic.php?t=91970&start=0&postdays=0&postorder=asc&highlight=&sid=ae0e3cbc8b435e68039ff5071db454e9] (3.4) Activate external screen or beamer (NEW) In /etc/X11/xorg.conf one has to add two lines to get an output for external screens or beamers. Look for the Section "Device", that contains something like Driver "i810" . Then add to this section the two lines: Option "MonitorLayout" "CRT,LFP" Option "Clone" "true" My Section "Device" looks now like: Section "Device" Identifier "Intel Corporation Mobile 945GM/GMS/940GML Express Integrated Graphics Controller" Driver "i810" BusID "PCI:0:2:0" Option "MonitorLayout" "CRT,LFP" Option "Clone" "true" EndSection This makes the output for the external screeen or beamer look exactly like the built in screen. Of course, you won't have a beamer with the same resolution that the built in screen has. So in case of using a beamer, change the resolution to your beamer's resolution by using the tool of your display manager. If you use gnome, you can start gnome-display-properties to do this. There are more sophisticated solutions to use external monitors. You'll find more out about this by looking for words like "dual head xorg" and so on. (4) Sound Erik Sonnleitner says: 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. I didn't find a module like this, but ther is something like snd_intel_hda . I mean, there was nothing to change. I think, sound worked out of the box. (5) Hibernate I installed, the package hibernate, opend a shell, did su to become root and typed "hibernate". I then got the information, that I had to supplement the entry in the /boot/grub/menu.1st to tell hibernate, where to put the informations for the new start after hiberating. My new entry is: title Debian GNU/Linux, kernel 2.6.18 root (hd0,4) kernel /boot/vmlinuz-2.6.18 root=/dev/hda[5] ro noapic nolapic resume2=swap:/dev/hda3 acpi_sleep=3 initrd /boot/initrd.img-2.6.18 savedefault But, be avare, that "/dev/hda3" is wrong for you, I think. Instead of this, you have to fill in there your partitions name form the swap-partition. I found preinstalled "GParted" and started this program by typing "gparted". Immediatly you can see the path to your "linux-swap". Then, typing "hibernate" as root set the TX3 to sleep. When you wake them up by pressing the start-button, be shure to chose the right kernel, when grub asks you at starting time. Erik Sonnleitner says, how to use suspend to ram instead of suspend to disk. I didn't setup this option, because suspend to disk is fast enough for me and so it's no risk I'd forget a sleeping at ram TX3 for weeks and it would run out of battery. (6) Wireless LAN E.S. says: "Theres an Intel 3945ABG card. You have to get the ipw3945 kernel module sources as well as ipw3945d, a daemon. Download (ipw3945.sf.net), untgz and make them. Install the ipw3945d to /sbin/, go to the ipw3945 directory and call ./load. Iwconfig should now tell you there's a WLan card available." - This didn't work for me until now. The informations included with the drivers sad, one should first installe the ieee80211-driver. I'll do this when I've time. (7) Display brightness control Google for sony_acpi.tgz and download this. Uncompress it wherever you want, as root go into the new directory and type "make". New, type "modprobe aony_acpi". This should load this module. So you get a /proc/acpi/sony/brightness pseudo-file. Now, you can type: echo "4" > /proc/acpi/sony/brightness and you will have a semi-brightness. With echo "8" > /proc/acpi/sony/brightness you have the full brightness. If you compiled sonypid as a module (that was "Device Drivers > Character Devices > Sony Vaio Programmable I/O Control Device support", we had in 2.3), you can load it now to: modprobe sonypid If you compiled it in the kernel, you don't need to load it. Now, you can change the brightness using the key "FN" together with "F5" or "F6", like marked on the keys. If you want to load those modules at each start of the system, you can write them into the file /etc/modules. My /etc/modules looks like this: # /etc/modules: kernel modules to load at boot time. # # This file contains the names of kernel modules that should be loaded # at boot time, one per line. Lines beginning with "#" are ignored. loop sbp2 sony_acpi I havn't the sonypi listed, because I compiled it into 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 Erik Sonnleitner strongly recommends 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). E.S. informs in addition, that 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 - I didn't use this alternative, because there is a even simpler way I found working on CPU Frequency, as you immediatly will se in Point 9.2. (9.2) CPU Frequency Erik Sonnleitner tried a few different CPU frequency switching tools: Out of all CPU frequency utils, cpufreqd did the best job. It's easy to install (synaptic: cpufreqd, cpufrequtils and libcpufreq0) and does everything automatically since you have activated the centrino-option in the kernel. (control CPU by load, power supply, battery state, etc). If you want, you can optimise a little bit with a simple thing: Edit etc/cpufreq.conf. You finde in 4 or 5 lines somthing like "echo "8" > /proc/acpi/sony/brightness". Those lines are "outcommeted" by a "#" at the beginning of those lines. You can remove the "#". Then cpufreqd will controll not only the cpu, but also the brightness depending from battery status. Of course, you allways can recorrect brightness by pressing the keys Fn together with F5 or F6, as described above. If you want to check, of cpufred is running, just start the gnome-system-monitor (type "gnome-system-monitor" in a shell). Then, in "view", make all processes visible, not only yours, because root ist the owner of the process. At this point of my work, brightness changed when I unpluged and repluged AC-Power. (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 (we had it above in 2.3: evice 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) 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. - Bluetooth. I have no other Bluetooth device, but since it's activated in the kernel, and the module is successfully loaded, so it *should* work. Erik Sonnleitner finishes his basically important and helpfull instructions in the following way: "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" And you can reach me on christof.arn $at$ ethikprojekte dot ch, or visit at www.ethikprojekte.ch (until now german only).