This document describes how to install Debian 3.1 Sarge on an Acer TravelMate 4651 LCi. Further more it will list (IMHO) some useful information on tweaking the system for laptop usage. This document should also apply to most other Linux distributions. However, some commands like apt-get/aptitude/dpkg (debian's package manager), make-kpkg, modconf or m-a may differ on your system.
| Touchpad | Works, with xfree-driver-synaptics, needs patch |
| Tingon3 10/100Mbit Nework card | Works, with kernel 2.6.11 (untested with 2.4) |
| PCMCIA | Untested |
| Bluetooth | Untested |
| Irda | Untested |
| Wavelan | Works, with ipw2200 driver |
| Battery Monitor | Works, with kernel 2.6.11 |
| Hibernate | might work with suspend2, i didn't succeed |
| Onoard 57K Modem | Works, with kernel option CONFIG_SND_INTEL8X0M=m and sl-modem-daemon. |
| cdrom | Works, conflicting as ide0 with usb, both on irq 14 by default |
| dvd | Works |
| cd writer | Works, if used as ide-scsi drive cd writing is possible. |
| USB | Works |
| Firewire | Untested |
| Sound | Works, with Alsa |
First you need an installation media. If you have already planned to install Debian, then you probably have one already else you can find more information on the Debian Installer page. There are several ways to install sarge, for this document, the full CD set was used at first, later i have switched to an FTP location.
I have not managed to install sarge with a 2.6.8 Kernel[1] so far[2]. Therefore i have been using the standard kernel (just hit return on the boot prompt).
Only Acer TravelMate 4651LCi specific steps of the installation are listed here, for the basic steps of the installation please refer to the i386 installation manual.
After you have installed the base system and you plan to run XFree86 (and have it installed), then it may be time to install the synaptics touchpad drivers. However, the ps2 driver works fairly well, the center button as well as clicks via touchpad are not supported. This is fixed with the synaptics driver.
$ apt-get install xfree86-driver-synaptics # or add it with aptitude
XFree86 works well with the integrated nVidia chip and the lcd screen. I was not able to set it up via xf86cfg, however, because of input device problems. Therefore using xf86config was the way to go. When done with sesdtting up X you may enable the synaptics touchpad with the following changes in your XF86Config-4:
Section "Module"
Load "dbe"
Load "dri"
Load "extmod"
Load "glx"
Load "record"
Load "xtrap"
Load "speedo"
Load "type1"
Load "synaptics"
EndSection
...
Section "InputDevice"
Identifier "Mouse0" # this may differ in your config
# Driver "mouse"
# Option "Protocol" "auto"
Driver "synaptics"
Option
"Device" "/dev/psaux"
Option "Protocol" "auto-dev"
Option
"LeftEdge" "1700"
Option "RightEdge" "5300"
Option
"TopEdge"
"1700"
Option "BottomEdge" "4200"
Option "FingerLow" "25"
Option "FingerHigh" "30"
Option "MaxTapTime" "180"
Option "MaxTapMove" "220"
Option "VertScrollDelta" "100"
Option "MinSpeed" "0.06"
Option "MaxSpeed" "0.25"
Option "AccelFactor" "0.0050"
EndSection
If you want to make use of the xfree86 Energy Star power saving techniques, you may enable dpms:
Section "ServerLayout"
...
Option
"BlankTime"
"5" # Blank the screen in 10 minutes
(Fake)
Option "StandbyTime"
"10" #
Turn off screen in 20 minutes (DPMS)
Option
"SuspendTime"
"20" # Full hibernation in 30 minutes
(DPMS)
Option
"OffTime"
"30" # Turn off DPMS monitor (DPMS)
EndSection
...
Section "Monitor"
...
Option "DPMS"
EndSection
After some testing and tweaking the following XF86Config-4 for Acer TravelMate 4651LCi was the result.
The laptop lacks a very important feature with the 2.4 kernel, the battery monitor and power saving options. The TravelMate 4650LCi comes with the ACPI power management hardware [3] which is not supported without patching the kernel. I have found out [1] that kernel 2.6.11 is the kernel to go on this laptop. You can get the sources from kernel.org (linux-2.6.11.tar.gz, or newer).
Unpack it (usually to /usr/src).
$ tar xzf linux-2.6.11.tar.gz
the i usually make a link pointing from /usr/src/linux to my current kernel version:
$ ln -s /usr/src/linux-2.6.11 /usr/src/linux
Then configure the kernel. This can be a pretty time consuming task. You may want to use my kernel .config file for a 2.6.11 kernel. This .config includes support for the cd/dvdrom, onboard NIC, sound power saving options, centrino 2 functionality.
Copy the .config file to your kernel source directory then you may tweak it to your own needs[4] or just compile it
/usr/src/linux $ make-kpkg clean
/usr/src/linux $ make-kpkg --revision name.0 kernel_image
then install it with dpkg
/usr/src/linux $ dpkg -i ../kernel-image-2.6.11_name.0_i386.deb
if you do not want to compile your own kernel for your laptop, you may use my version of the kernel (compiled with the above .config): /usr/src/kernel-image-2.6.11_simon.13_i386.deb.gz
The provided kernel config also has the required options for usb pen drives (usb sticks) available. Make sure that the max_scsi_luns=N kernel option has a higher N than the ammount of pen sticks (+1 cdrom device).
Notable here is if you use Gnome (or probably simmilar systems like kde) the inserted media is automagically mounted by udev.
The touchpad needs patching. Altough it works on out of the box, it is getting very sluggish on high cpu load. I have found a patch on the web. For kernel 2.6.11 you may use the following patch:
--- drivers/input/mouse/psmouse-base.c.dist 2005-03-02 08:37:50.000000000 +0100
+++ drivers/input/mouse/psmouse-base.c 2005-06-14 11:18:14.000000000 +0200
@@ -598,36 +598,53 @@
psmouse->ps2dev.flags = 0;
serio_continue_rx(psmouse->ps2dev.serio);
}
+
+
/*
- * psmouse_activate() enables the mouse so that we get motion reports from it.
+ * psmouse_deactivate() puts the mouse into poll mode so that we don't get motion
+ * reports from it unless we explicitely request it.
*/
-static void psmouse_activate(struct psmouse *psmouse)
+static void psmouse_deactivate(struct psmouse *psmouse)
{
- if (ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_ENABLE))
- printk(KERN_WARNING "psmouse.c: Failed to enable mouse on %s\n",
+ if (ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_DISABLE))
+ printk(KERN_WARNING "psmouse.c: Failed to deactivate mouse on %s\n",
psmouse->ps2dev.serio->phys);
- psmouse_set_state(psmouse, PSMOUSE_ACTIVATED);
+ psmouse_set_state(psmouse, PSMOUSE_CMD_MODE);
}
/*
- * psmouse_deactivate() puts the mouse into poll mode so that we don't get motion
- * reports from it unless we explicitely request it.
+ * psmouse_activate() enables the mouse so that we get motion reports from it.
*/
-
-static void psmouse_deactivate(struct psmouse *psmouse)
+/*
+static void psmouse_activate(struct psmouse *psmouse)
{
- if (ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_DISABLE))
- printk(KERN_WARNING "psmouse.c: Failed to deactivate mouse on %s\n",
+ if (ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_ENABLE))
+ printk(KERN_WARNING "psmouse.c: Failed to enable mouse on %s\n",
psmouse->ps2dev.serio->phys);
- psmouse_set_state(psmouse, PSMOUSE_CMD_MODE);
+ psmouse_set_state(psmouse, PSMOUSE_ACTIVATED);
+} */
+static void psmouse_activate(struct psmouse *psmouse)
+{
+ /* Deactivate all pass-through ports */
+ struct serio *serio = psmouse->ps2dev.serio;
+ if ((serio->type & SERIO_TYPE) == SERIO_PS_PSTHRU) {
+ psmouse_deactivate(psmouse);
+ return;
+ }
+ if (ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_ENABLE))
+ printk(KERN_WARNING "psmouse.c: Failed to enable mouse on %s\n",
+ psmouse->ps2dev.serio->phys);
+
+ psmouse_set_state(psmouse, PSMOUSE_ACTIVATED);
}
+
/*
* psmouse_cleanup() resets the mouse into power-on state.
*/
Or if you are running a different kernel than 2.6.11 you may apply the patch by hand with the instruction from http://www.simons.fi/touchpad.html:
To solve the problem in the linux 2.6.11 kernel, deactivate any pass-through ports in the psmouse_activate function in drivers/input/mouse/psmouse-base.c. You should also move the psmouse_deactivate function before psmouse_activate.
static void psmouse_activate(struct psmouse *psmouse)
{
/* Deactivate all pass-through ports */
struct serio *serio = psmouse->ps2dev.serio;
if ((serio->type & SERIO_TYPE) == SERIO_PS_PSTHRU) {
psmouse_deactivate(psmouse);
return;
}
if (ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_ENABLE))
printk(KERN_WARNING "psmouse.c: Failed to enable mouse on %s\n",
psmouse->ps2dev.serio->phys);
psmouse_set_state(psmouse, PSMOUSE_ACTIVATED);
}
In the older 2.6 kernels it is enough to comment out the track point initialization in drivers/input/mouse/synaptics.c: int synaptics_init(struct psmouse *psmouse). Specifically, comment out the two lines:
if (SYN_CAP_PASS_THROUGH(priv->capabilities))
synaptics_pt_create(psmouse);
I have had this problem since 2.4 something. Before I knew of the Synaptics driver for X, the mouse just went off to one side of the screen and stayed there.
To be able to use the cdwriter, you need to configure it as ide-scsi device. T hsi can be done the following way.
Enable ide-scsi in the kernel:
CONFIG_IDE=y
CONFIG_BLK_DEV_IDE=y
CONFIG_BLK_DEV_IDESCSI=m
CONFIG_SCSI=m
CONFIG_SCSI_PROC_FS=y
CONFIG_BLK_DEV_SR=m
CONFIG_BLK_DEV_SR_VENDOR=y
Recompile and install the kernel. then you need to tell the kernel that it should treat the atapi cdrom as ide-scsi device. You have to pass the following parameters to the kernel. In case you are using GRUB, then alter your /boot/grub/menu.lst like this:
title
Debian GNU/Linux, kernel 2.6.11 (scsi cdrom)
root (hd0,0)
kernel
/boot/vmlinuz-2.6.11 root=/dev/hdc1 hdb=ide-scsi max_scsi_luns=4 ro
savedefault
boot
Make sure that the hdb part points to your actual ide cd rom device name. Make sure you have a backup Boot configuration in case something goes wrong. Save it and reboot.
If you do not have compiled in the module, you may load it. On Debian this can be done like this:
$ apt-get install modconf
$ modconf
If you do not have the convenience of modconf ymou may use lsmod, modprobe and insmod to get the module loaded.
Now you need to set up the devices:
Change into the kernel/drivers/scsi submenu and enable ide-scsi. If you have a disk in your drive, this should mount the cd if everything went fine (assuming you are using automounter).
$ cd /dev
$ MAKEDEV sg scd
$ ln -s scd0 pg0
My ide cdrom used to be /dev/hdb, now it is /dev/scd0 (the scsi cd 0). Therefore the /etc/fstab must be changed:
/dev/hdb
/media/cdrom0 iso9660 ro,user,noauto
0 0
to:
/dev/scd0
/media/cdrom0 iso9660 ro,user,noauto
0 0
cdrecord is a nice commandline tool, i prefer gtoaster.
NOTE: i have found aout tthat by accessing the sc drive with /dev/sr0 it will not hang the system on heavy cdrom activity.
The ipw2200 driver is needed to get the wavelan working. this involves getting the sources, compiling and installing the kernel module. First of all, you need to download the drivers from ipw2200.sourceforge.net, i had to use version 1.0.4 with kernel 2.6.11 [1] or use apt to do it for you. If you do it the Debian way you need the module-assistant package installed:
$ apt-get update
$ apt-get install module-assistant
$ m-a -t update
$ m-a -t -f get ipw2200
$ m-a -t build ipw2200
$ m-a -t install ipw2200
Download the Firmware from here: http://ipw2200.sourceforge.net/firmware.php and see README.ipw2200 for more information.
Load the driver:
$ modprobe ipw2200
To connect to a network, you can do something like:
$ iwconfig eth1 ESSID <MyESSID> [5]
$ iwconfig eth1 key s:<MyKey> # if you use WEP authentication
$ dhclient eth1 # if you use dhcp, else use ifconfig
A note on the module-assitant. Whenever you recompile the kernel, its a good thing to recompile the modules. When your have installed the ipw2200 module with module-assistant, then recompiling the kernel may also update your installed modules, like:
/usr/src/linux $ make-kpkg clean
/usr/src/linux $ make-kpkg --revision name.0 kernel_image modules_imag
/usr/src/linux $ dpkg -i ../kernel-image-2.6.11_name.0_i386.deb
/usr/src/linux $ dpkg -i ../ipw2200-modules-version+name.1_i386.deb
This is really convenient on Debian.
In case you are using kernel 2.6.11 you can download my ipw2200 debian package ipw2200-modules-2.6.11_1.0.4-1+simon.13_i386.deb.gz.
{NOTE on wavelan button (hw must be on on startup) ,,,, add image}
The integrated NIC just worked off the start with Sarge's kernel 2.4 as well as with kernel 2.6. In case it does not work, the integrated device is a Tigon3 10/100/1000BaseT card. You have to enable Device drivers > Networking support > Network device support > Ethernet (1000Mbit) > Broadcom Tingon3 support.
$ cat pci | grep Modem
Modem: Intel Corp. 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Modem Controller (rev 4).
The internal modem does work with a 2.6.11 (and probably older 2.6.x) kernel. The following kernel module muste be compiled to get the modem working:
CONFIG_SND_INTEL8X0M=m
The kernel needs also ppp and tcpip support (of course) if you would like to use a common ISP.
Wehn done and rebooted, the sl-modem-daemon is needed, on debian this is added the following way:
$ apt-get install sl-modem-daemon
wvdial is the tool i am using to fire up a ppp connection.
As a result of the following tweaks, he battery lasts for 2.5h with high cpu/disk usage (read comiling a kernel) up to 4h with medium/low usage (normal work).
With the following kernel options enabled acpi is working. Acpi is needed to read the battery power. The kernel options below are probably not all needed (i was to lazy to clean it up):
CONFIG_ACPI=y
CONFIG_ACPI_BOOT=y
CONFIG_ACPI_INTERPRETER=y
CONFIG_ACPI_SLEEP=y
CONFIG_ACPI_SLEEP_PROC_FS=y
CONFIG_ACPI_AC=y
CONFIG_ACPI_BATTERY=y
CONFIG_ACPI_BUTTON=y
CONFIG_ACPI_VIDEO=m
CONFIG_ACPI_FAN=y
CONFIG_ACPI_PROCESSOR=y
CONFIG_ACPI_THERMAL=m
CONFIG_ACPI_ASUS=m
CONFIG_ACPI_IBM=m
CONFIG_ACPI_TOSHIBA=m
CONFIG_ACPI_BLACKLIST_YEAR=0
CONFIG_ACPI_DEBUG=y
CONFIG_ACPI_BUS=y
CONFIG_ACPI_EC=y
CONFIG_ACPI_POWER=y
CONFIG_ACPI_PCI=y
CONFIG_ACPI_SYSTEM=y
CONFIG_ACPI_CONTAINER=m
CONFIG_X86_ACPI_CPUFREQ=m
CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y
# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
CONFIG_HOTPLUG_PCI_ACPI=m
Also, the acpid has proven to be usefull to for manually issuing commands to powerdown devices.
Software Suspend HOWTO.
hdparm is a Linux shell utility that can be used to spin down and improve the performance of various ATA/IDE drives. If it's not included with your system, you can fetch the source from http://freshmeat.net/redir/hdparm/4062/url_homepage/hardware. For example, the following provides 32-bit IO support with sync (-c3), DMA support (-d1), Advanced Power Management (-B128), write-caching (-W1), disk spin down after five minutes (-S60). gains me tremendous performance with added power savings. Note that your mileage may vary, and you'll want to adjust this for your specific system to prevent data loss (especially the -B and -m flags!).
In the following example, we run some read/write benchmarks of our hard drive before and after using hdparm. Note that while our cache reads remain about the same, our actual physical reads from the drive increase tremendously! If you like living on the edge, you can play with the -m, -c, -B, and -u switches with caution (see the man page).
$ hdparm -tT /dev/hda
Timing buffer-cache reads: 588 MB in 2.01 seconds = 292.15 MB/sec
Timing buffered disk reads: 14 MB in 3.46 seconds = 4.05 MB/sec
$ hdparm -k1 -K1 -c3 -d1 -W1 /dev/hda
$ hdparm -tT /dev/hda
Timing buffer-cache reads: 596 MB in 2.01 seconds = 297.01 MB/sec
Timing buffered disk reads: 72 MB in 3.05 seconds = 23.58 MB/sec
There are some minor things which might help too;
|
shm /tmp
tmpfs defaults
0 0 |
This uses RAM for the /tmp filesystem, saving some disk writes.
This keeps the kernel from flushing the I/O buffers a lot, resulting in
disk writes, which hinder the "spin down after X minutes of no
activity".
Do note this might cause some data loss if your laptop shuts down
unexpectedly (out of battery, crash, ...)
NOTE:
according to the manual of noflushd, the daemon has not much influence
if used with a journaling file system such as ext3 or reiserfs. If you
can (and if you want to take advantage of noflushd) you may use another
file system such as ext2.
There are essentially two different types of screen blanking that can be performed under X-Windows: BlankTime and DPMS. The first is simply a fake "blanking" effect that doesn't actually save any power. The others are specific only to DPMS-compliant monitors, and must be specifically enabled to take effect. They are located in your XF86Config file, which normally resides in /etc/X11/XF86Config.
DPMS (Display Power Management Signaling) is a standard to reduce power consumption in monitors. Typically, both the monitor and the video card must support the DPMS standard in order to receive any benefit from it. DPMS specifies four modes of operation (in order of increasing power savings): "Normal", "Standby", "Suspend" and "Off". Two signal lines, "Horizontal Sync" and "Vertical Sync" provide a method for signaling these four different states to a DPMS monitor.
If you have a DPMS-compliant monitor, you might want to try enabling support for it under the Monitor section of your XF86Config file:
Section "Monitor"
[... other values here ...]
Option "DPMS"
EndSection
To manipulate the DPMS functions, you can create/modify the following items in the ServerLayout section.
Section "ServerLayout"
Option "BlankTime" "10" # Blank the screen in 10 minutes (Fake)
Option "StandbyTime" "20" # Turn off screen in 20 minutes (DPMS)
Option "SuspendTime" "30" # Full hibernation in 30 minutes (DPMS)
Option "OffTime" "40" # Turn off DPMS monitor (DPMS)
EndSection
BlankTime is not actually a power saving level at all. The screen is sent a "fake" blanking effect and defaults to activate after 10 minutes. Alternately, it can indicate the number of minutes until the screensaver should activate. It has nothing to do with DPMS.
StandbyTime is a very minor power saving level. This setting usually involves blanking the screen by turning off the electron (RGB) gun. However, the power supply is left on and the tube filaments energized. When you need to use the monitor again, the monitor will come back on very quickly. This option requires DPMS monitor/video-card support and defaults to 20 minutes under X-Windows. Also known as hsync suspend mode, since the horizontal sync signal is turned off to signal this power management state to a DPMS monitor.
SuspendTime is a very strong low power alternative. This setting usually involves the same power conservation as StandbyTime, however in addition the power supply is turned off. This option requires DPMS monitor/video-card support and defaults to 30 minutes under X-Windows. Also known as vsync suspend mode, since the vertical sync signal is turned off to signal this power management state to a DPMS monitor.
OffTime usually means just that. The computer monitor is turned off. A small auxiliary circuit stays on to monitor the signals from the computer to turn the monitor back on when data needs to be displayed to the screen. Obviously, this keeps power consumption to a bare minimum (zero). While the power saving is substantial, to reactivate the monitor may take up to 8-10 seconds. This option requires DPMS monitor/video-card support and defaults to 40 minutes under X-Windows. Both the horizontal and vertical sync signals are turned off to signal this power management state to a DPMS monitor.
After activating your changes and restarting X-Windows, you might want to examine your logfile to see if your video card has any problems with your changes:
$ egrep "^\(WW|EE\)" /var/log/XFree86.0.log
There may be additional options that you can enable for your specific video card/chip driver; see the XFree86 Documentation website for specifics.
Of course, all of this can also be activated "on-the-fly" by using xset(1). If you don't have access to your system's XF86Config file, a good place to put these commands would be in your ~/.Xsession or ~/.xinitrc file.
$ xset -dpms # Disable DPMS
$ xset +dpms # Enable DPMS
$ xset s off # Disable screen blanking
$ xset s 150 # Blank the screen after 150 seconds
$ xset dpms 300 600 900 # Set standby, suspend, & off times (in seconds)
$ xset dpms force standby # Immediately go into standby mode
$ xset dpms force suspend # Immediately go into suspend mode
$ xset dpms force off # Immediately turn off the monitor
$ xset -q # Query current settings
If instead you're using the Linux console (not X-Windows), you'll want to use setterm(1):
$ setterm -blank 10 # Blank the screen in 10 minutes
$ setterm -powersave on # Put the monitor into VESA power saving mode
$ setterm -powerdown 20 # Set the VESA powerdown to 20 minutes
If you have any corrections or additions to this document, you can reach me at <simon EAT SPAM AT wunderlin DOT net>
1] at the time of this writing I am using the 20050530 cd images
2] if you have found a way to do so on your 4651 then please let me know
3] APM won't work and there is nothing configurable from the bios.
4] use make config / make menuconfig / make xconfig or make gconfig on gnome systems
5] Your wireless adapter may also be called “wlan0” or
“eth2” instead of “eth1”.
Parts of the dpms information are from the Battery-Powered HOWTO, some information on installing ipw2200 are from Michael Weimerskirch.