Installing Slackware Linux on a Sony Vaio TZ21MN
Posted August 21st, 2008 by Maarten
Since I needed to have my Vaio prepped for use fast, I first installed Kubuntu on it, with which it functioned reasonably well. Now that I have had some more time to figure things out I equipped it with my favourite Linux distribution, Slackware (version 12.1). Because of the choices I make for the installation, the software selections and versions are quite specific. Therefore I will write this guide step by step. In case you want to use other versions of the software (kernel version for instance), you can still use this guide as a reference.
![]() |
Basic installation
I kept one 100 megabyte NTFS partition at the start of the hard disk for use of the Instant On software. Read more about this in the Kubuntu guide. The second partition is a Linux swap partition, not specifically because I need swap memory, but for use during the machine's hibernation. I used cfdisk to create a partition of approximately 1050 megabytes for it to be very slightly larger than the total of present memory. Double it if you have 2048 megabytes of RAM. Next I created a system partition of about eight gigabytes of space, and the rest, more than 90 gigabytes, I used to create the /home partition. I installed almost all software including KDE and its translations, since this is my favourite graphical desktop.
Back to contents
Audio
To be able to configure audio and mount storage devices as a regular user, add your user account to the groups audio, plugdev and cdrom. The latter two have nothing to do with audio, but will enable you to use removable media properly. You need to log out and in again to apply the changes. A very convenient way to do this is by using kuser. Start kmix or alsamixer to lower your notebook's volume settings, because the KDE startup sound can be quite loud. Execute alsactl store as root to store the mixer settings.
Edit /etc/modprobe.d/sound as root and append options snd-hda-intel model=hippo. An easy way of editing configuration files in Slackware in a terminal is by using jed, but beware of the backup files it creates. By adding this line to this file which loads your sound module, the correct or at least properly working sound card model will be selected. It will prevent you from having to plug in and out headphones to enable sound from the speakers, as is the case with the default configuration. After having made this change you could reset your mixer settings and you will have to execute alsactl store again to save them. Remove the /etc/asound.state file if you get any errors about non existing mixer settings during startup.
Back to contents
ACPI
To enable support for hibernation and CPU frequency scaling (lowering the processor clock rate to save power) you will have to compile a new kernel. I have included a kernel configuration file for the default Slackware 12.1 kernel in case you want to see which options need to be enabled. In it I have selected the correct processor and CPU frequency settings, but have not yet enabled support for hibernation, because you should enter your default resume partition. On all accounts be sure to enable the "ACPI Processor P-States driver" option to enable frequency scaling.
Hibernate
Once your modified kernel is running you will be able to activate hibernation by executing echo disk > /sys/power/state as root. Chmod this file 646 (possibly automatically at boot time) to do the same as a regular user. I added an entry to the KDE menu and bound it to a key combination to enable hibernation by pressing certain keys. The shell script below which is then executed works well for me. The sleep intervals are needed to prevent the notebook from entering sleep mode right after having woken up. The dcop command starts the KDE screensaver right before the notebook starts saving its memory to disk, so after starting up again it will be password protected. After having stored the memory on the swap partition and having shut down in about 30 seconds, the machine can revert to a fully operational state again in about 45 seconds.
#!/bin/sh
if [ ! -e ~/.sleepenabled ]; then
touch ~/.sleepenabled
dcop kdesktop KScreensaverIface lock
sleep 2
echo disk > /sys/power/state
sleep 2
rm ~/.sleepenabled
fi
Back to contents
Wireless network
Because I have a negative experience using the iwlwifi drivers (non-working WPA support at school), I installed the ipw3945 drivers, which in turn require a kernel version earlier than the 2.6.24 kernel (I am currently using 2.6.23.17). Installing this driver requires following these steps:
- Compile and install the ieee80211 subsystem. I used the default options (aka pressing the enter key a couple of times).
- Compile and install the IPW driver. I had to use the IEEE80211_IGNORE_DUPLICATE=y option to make it compile, probably because I installed ieee80211 manually.
- Copy the regulatory daemon to /sbin.
- Make /etc/rc.d/rc.M execute /sbin/ipw3945d by adding a line near the network initialisation (the starting of rc.inet1). This way the daemon will be started at boot.
- Copy the microcode to /lib/firmware.
Video and Compiz
Edit the /etc/X11/xorg.conf file and add the video mode 1366x768 to set the proper resolution. Change the Driver setting in the videocard aka Device section from vesa to intel for proper acceleration.
The core Compiz package is already installed by default. I recommend installing additions and Compiz Fusion from SlackBuilds.org. To start Compiz when starting KDE, create a shell script containing the following, make it executable and place it in ~/.kde/env (create that directory if necessary):
#!/bin/sh
KDEWM=$HOME/.kde/startcompiz.sh
export KDEWM
The startcompiz.sh file contains the following:
#!/bin/sh
LIBGL_ALWAYS_INDIRECT=true compiz --replace --indirect-rendering ccp
You may not need the parts about indirect rendering, but Compiz wouldn't run without that on my notebook. Be sure to start kde-window-decorator somehow to have window decorations. It's convenient to start the programs you need to have started and save your KDE session (see KDE session management in kcontrol, KDE components, session manager).
Back to contents
Touchpad
To get the touchpad to scroll by using the right side of the pad, installation of the synaptics touchpad driver is needed. There also needs to be some special configuration in xorg.conf to make the pad work properly. Below are mine, I set my touchpad sensitivity reasonably high so I won't have to move my fingers a lot.
Section "InputDevice"
Identifier "Touchpad"
Driver "synaptics"
Option "Protocol" "auto-dev"
Option "Device" "/dev/psaux"
Option "SHMConfig" "true"
Option "MaxSpeed" "1"
Option "MinSpeed" "0.6"
Option "AccelFactor" "0.05"
Option "LeftEdge" "100"
Option "RightEdge" "900"
Option "TopEdge" "76"
Option "BottomEdge" "680"
Option "MaxTapTime" "180"
EndSection
Back to contents
Webcam
The R5u870 webcam driver seems to work quite well at this point. Simply compiling and installing it as root will do the trick.
Back to contents
| Attachment | Size |
|---|---|
| vaio_config_2.6.24.5_no_hibernate | 80.5 KB |
| vaio_config_2.6.23.17 | 74.54 KB |
| vaio.xorg | 3.54 KB |
| vaio.sound | 98 bytes |
