Updated: 30th of May, 2001
I switched to gentoo linux for longer battery life (19th of May, 2002)

Installing Mandrake 8 on a Sony VAIO PCG-505FX

In the following paragraphs I will be describing my experiences from installing Mandrake 8 on my laptop. Mandrake 8 was downloaded from SUNET. If anyone has got specific questions, please don't hesitate to mail me at lars@delicate.se. With my high capacity (3100mAh) battery, my current configuration lasts me about 2.5 hours for normal usage. If you see a process named "kapm-idled" taking up most of your system CPU time, do not worry, this is the idle thread and it is perfectly normal. I take no responsibility for what will happen with you or your computer if you follow these directions.

ENTER THE BIOS

This is how I set up my BIOS. Enter it by pressing ESC when you see the SONY logo, followed quickly by F2, after which you can read that you are entering the BIOS at the bottom of the screen. Beware that if you set things so that "degradation" will happen in an unnatural way, it might cause your computer to crash.

SECTIONSETTINGVALUECOMMENT
Main BIOS Version R0109R5 If anyone knows where to find BIOS updates for this computer, please let me know.
Main Total Memory 64MB
Main Video Memory 2MB
Advanced Memory Cache Enabled
Advanced Plug & Play O/S No Linux is no toy
Internal Modem Modem Configuration Enabled
Internal Modem Base I/O Address 2F8
Internal Modem Interrupt IRQ 3
IrDA IR Base I/O Address 3E8
IrDA Interrupt IRQ 10
IrDA Mode FIR
IrDA DMA Channel DMA 0
IrDA FIR Base I/O Address 140
Serial Port Serial Port Configuration Enabled
Serial Port Base I/O Address 3F8
Serial Port Interrupt IRQ 4
Parallel Port Parallel Port Configuration Enabled
Parallel Port Mode ECP
Parallel Port Base I/O Address 378
Parallel Port Interrupt IRQ 7
Parallel Port DMA Channel DMA 3
Audio Sound Enabled This is a ES1688 integrated card
Audio Base I/O Address 220 - 22F
Audio Primary DMA Channel DMA 1
Audio Secondary DMA Channel DMA 5
Audio Interrupt IRQ 5
Audio MPU I/O Address 320 - 321
Audio Speaker Volume 2 Imagine booting in a library
Power CPU Speed Auto Gives you longer uptime
Power Idle Timeout 10 Minutes Front right led will turn orange
Power Suspend Timeout Off Picking only one kind of timeout seems to be a good idea
Power Hibernation Timeout Off Never hibernate, waste of disk space and takes too long to recover from
Power Lid Close Action Suspend I never close the lid unless I am leaving with my laptop or it is off already
Power Hibernation on Low Battery Off Never hibernate
Power LCD Brightness 9 A must, unless you always lurk in the dark
Power LCD Brightness Down Timeout 30 Seconds Enough time to lean back and reflect on something
Power Video Suspend Timeout 2 Minutes Shut down LCD 2 minutes later
Power Spindle Down Timeout 5 Minutes Do less after 5 minutes
Power Sleep Timeout 10 Minutes Do almost nothing after 10 mintues

INSTALLING MANDRAKE

I took the easiest possible route through the installation. I used the "pcmcia" disk from which I selected "FTP" install, using a 3c574-TX network card. Since I knew I would be using LaTeX most of the time, I made sure to get all the correct packages by checking the "individual packages" box. If you want to run "E" as your window manager, make sure you add the "enlightenment" packages. I would not dream of running any other operating systems on the machine, so I gave Linux the whole disk. Somewhere under "Other" in the graphics card selection will you find NeoMagic. Set the screen to "Generic 800x600 LCD" and make sure you use only 16-bit (65536) colors, as more slows down X performance drastically.

The system has been running Linux for quite some time and earlier installations were made using a regular boot floppy with the CD-ROM connected, instead of a network card. There seems to be some problems auto-detecting the CD though, which is why you have to boot linux from the floppy command prompt with:

	linux ide2=0x180,0x386
	
Should this not work with your distribution, there's always the last resort of somehow getting the installation files on to a partition on your hard disk. I once installed Windows on a 2GB partition on the laptop, copied the contents of the CD to a folder, rebooted with a Linux boot disk and chose install from hard disk.

SERVICES

The first thing I did after installation was to start up X and an xterm and type "ntsysv". You must be root to have that command in your path, so if you are not, type "su" to enter super user mode. The trick to longer lasting battery life is of course to run as little as possible on your machine. The only services I start at boot time are as follows.

SERVICECOMMENT
alsa I want my mp3, so we'd better have support for the ES1688
keytable Correct keyboard support is good
kheader Seems too important to ignore
network I always connected when at home
pcmcia For the CD and my network card to work
random Completely random numbers would be neat
rawdevices Seems to be used by some programs
sound I want my mp3
syslog Used by lots of programs
usb I might connect an external mouse
xfs Fonts for X

Make sure to not run apmd, as that will mess up the power management completely. Suspend and resume works much better without it.

AUTOSTARTING X

If X starts up by default it will use a login thing which lets you pick window manager. I do not like it, I am only going to run one manager, and it uses unnecessary resources. To change back to the good old console based login, edit the file /etc/inittab and change the runlevel as follows.

	id:3:initdefault:
	

CHANGING WM

You will quickly realize that KDE might not be the best of choices for a window manager on a laptop. I need something that starts up faster, looks nicer and uses less memory and CPU. Since I love the way Enlightenment slides between the virtual desktops and I had sucessfully been running it earlier on the laptop, that was my choice. I added the following lines to my .bashrc.

	# Always start the best window manager
	alias startx='startx Enlightenment'	
	

After installing the Aqua theme my desktop looked like the picture below. Click it for a larger version of the same image.

Lars Samuelsson

For those of you who are not familiar with the applications running in the picture I can inform you that the system information tool on the upper right is gkrellm. The small transparent terminal in the bottom middle is Eterm, started with the command arguments "Eterm -x -C --menubar false --scrollbar false --font micro". Once started, you can press Alt + right mouse button to select the "BORDERLESS" border style. There you can also make sure that the program is remembered and started when you start up X. The icons on the desktop were taken from a set of Windows icons I found online called VAIO icons. These had to be converted to XPM using icotools and put on the desktop using FancyLauncher. The Aqua skin for xmms was found at their homepage.

FIXING SOUND

Sound was broken after the installation and I had to manually add sound by editing /etc/modules.conf. The following lines were added.

	# ALSA
	alias char-major-116 snd
	options snd snd_major=116 snd_card_limit=1
	alias snd-card-0 snd-card-es1688
	
	alias char-major-14 soundcore
	alias sound-slot-0 snd-card-0
	alias sound-service-0-0 snd-mixer-oss
	alias sound-service-0-1 snd-seq-oss
	alias sound-service-0-3 snd-pcm-oss
	alias sound-service-0-12 snd-pcm-oss
	

INSTALLING WINDOWS FONTS

Browsing using Mozilla looked horrible because of the font substitutions made. I decided to install my Windows fonts from Windows 2000. To do so I shared the "Fonts" folder on my Windows machine, then I connected to it from Linux using smbmount, which seems to change its syntax on a day to day basis. In Mandrake 8, the following will mount a shared Windows folder.

	smbmount //machine/folder /mnt/net -o username=Administrator
	
This of course assumes that you have a /mnt/net directory and that you know the Administrator password on your Windows machine. After this was done I used "drakfont" to install all fonts from the /mnt/net directory.

JAVA WITH JIKES

When I develop I want to save as much time and power as possible when compiling. A good way to do so is to use the "jikes" compiler instead of the one that comes with your Java distro. I made sure that jikes was installed with the other packages in Mandrake 8. I downloaded the Java distribution from IBM (IBMJava2 SDK 1.3), unpacked it and made a link from /usr/java to the installation directory. I then edited /etc/profile and added /usr/java/bin to the PATH and the following lines at the end, after which jikes worked flawlessly.

	# Jikes
	export JIKESPATH=.:/usr/java/jre/lib/rt.jar