Linux on a Compaq Presario 1711T
Quick summary
Everything works, except power management, which works only partly.
Hardware specifications
My Compaq 1711T came with a 1GHz PIII processor, a 1400x1050 display, 2x64MB
main memory (133MHz) and a 20 GB (18.5, really) hard disk. I've since upgraded
the RAM to 2x256MB bought from a third party (Compaq's RAM is outrageously
expensive).
Component |
Particulars |
PCI id
|
works?
|
Mouse area |
Synaptics touchpad + "4 way scroll button" v5.8 |
-
|
yes (99%)
|
Keyboard |
105 keys + 6 "internet keys" |
-
|
yes (95%)
|
Hard disk |
20 GB, IDE |
8086:248a
|
yes
|
Display/Video |
1400x1050x24bit /ATI Radeon M6 LY 8MB |
1002:4c59
|
yes
|
Video output |
15 pin VGA and S-Video |
-
|
yes/untested
|
DVD/Floppy |
Sharing a single "Future bay" socket |
|
yes (90%)
|
Power saving |
ACPI |
-
|
no (25%)
|
Ethernet |
Intel |
8086:1031
|
yes
|
Modem |
Conexant HSF winmodem |
14f1:2f00
|
yes
|
Sound |
Intel i810 |
8086:2485
|
yes
|
USB |
Intel |
8086:2482
8086:2484
|
yes
|
Firewire/1394 |
Texas Instruments |
104c:8023
|
untested
|
PCMCIA |
Texas Instruments PCI1410 |
|
yes
|
SMBus |
Intel ICH3 |
8086:2483
|
unknown
|
Software
Kernel: Linux 2.4.17-rc2
X server: XFree86 4.1.0
Distro: RedHat 7.2
Procedure
First blundering steps
My machine came with a three disk "System recovery" set, so I fearlessly
plunged ahead and wiped of the Windows XP partition and installed Linux.
That was a very bad idea, because it turned out that that the recovery
tool (1) completely wiped off the entire hard disk, linux partitions and
all, and (2) did not overwrite the MBR, so the computer became unusable.
I used an old version of Windows 98 to get an MBR that Micros*ft would
understand, and reinstalled Windows XP. Then, I resized the partition to
4 GB using Partition Magic, and proceeded with Linux installation. Afterwards,
I used dd to copy the entire Windows XP partition to a file which I wrote
to DVD. That way, I'll never have to use the Compaq recovery tool again,
should Windows XP decide to crash irrecoverably in the future.
First steps to success
Since I've used RedHat installations in the lab for some time, I decided
to try my luck with RH 7.2. It works quite well. My only gripe with this
distribution is that it does not ship with my favorite X11 window manager,
fvwm2, so I had to grab that from its webpage.
I used fdisk to setup the following partition table:
Device |
Boot |
Start |
End |
ID |
Use |
/dev/hda1 |
* |
1 |
510 |
7 |
Win XP (ntfs) |
/dev/hda2 |
|
511 |
2432 |
5 |
extended |
/dev/hda5 |
* |
511 |
1020 |
82 |
Linux `/' |
/dev/hda6 |
|
1021 |
1086 |
82 |
Linux swap |
/dev/hda7 |
|
1087 |
1341 |
b |
Windows FAT32 |
/dev/hda8 |
|
1342 |
2432 |
83 |
Linux `/data' |
The FAT32 partition will serve to communicate between the Linux world
and the Windows XP world, because Linux cannot (reliably) write ntfs, and
Windows still flatly refuses to acknowledge the existance of any other
operating systems.
RedHat 7.2 ships with linux kernel 2.4.7, but I installed 2.4.17-rc2
instead, to experiment with power management (see below). I use GRUB to
boot both operating systems. It works with RedHat's
autodetected settings .
Mouse area
Basic usage works by choosing "generic PS/2" mouse in X, including tap
to click and tap to drag. The edge scroll and corner click do not. Or rather,
I have no idea how to program them.
I rather dislike the clunky mouse buttons, so I set up the right "Ins"
and "Alt" keys to mimic middle and right mouse buttons. This was achieved
by the following lines in ".Xmodmap":
clear mod1
add mod1 = Alt_L
keycode 106 = Pointer_Button2
keycode 113 = Pointer_Button3
keycode 78 = Insert Pointer_EnableKeys
This also reconfigures the "Scr Lk" (but not the "Num
Lk") key to act as "Insert". By pressing Shift + ScrLk, the "mouse
button" keys are activated. The effect lasts until the end of the X session,
or until Shift + ScrLk is pressed again. Insert these lines into your .xinitrc
or equivalent to get the desired auto-repeat behavior:
xset -r 106
xset -r 117
Update: Gpm supports the Synaptics
touchpad rather well! It supports corner clicks and even the 4-way scroll
button. It has great velocity control based on pressure (i.e. contact area).
To make it understand the 4-way scroll button, I had to hack
it to enter "wmode" on startup . [See the Synaptics
website for excellent detailed documentation about their devices.]
With this, the above trick to convert "Ins" and "Alt" to mouse buttons
is no longer really needed. Thank you Henry Davies and other gpm programmers.
To use gpm as a mouse source in X, put the following in the InputDevice
section of XF86Config-4:
Option "Device" "/dev/gpmdata"
Option "Protocol" "MouseSystems"
I start gpm like this:
/usr/local/sbin/gpm -R msc -t synps2
Now there's one more annoyance: whenever you touch the mouse, the timestamp
of /dev/gpmdata is changed, causing the hard disk to spin up. That should
really not be necessary, and it can indeed be avoided if you do the following:
Compile "RAM Disk" support into the kernel (or build a module)
Construct a tiny RAM Disk:
dd if=/dev/zero of=dev/ram bs=1k count=64
mke2fs -m0 /dev/ram 64
Mount it (first mkdir /mnt/dev):
Create a FIFO on it:
Make gpm use it:
ln -sf /dev/gpmdata /dev/gpmdata
Then start gpm as before.
Overkill? Sure, but hey! It works. I constructed an alternative /etc/rc.d/init.d/gpm
to automate all of the above steps.
Keyboard
Again, basic functionality works, out of the box. Even the blue numpad
keys work after pressing Fn + NumLk. All "internet zone" keys worked the
first time I booted into Linux, but four of them don't anymore. I fear
ACPI may have confused them. The volume controls "-" and "+" register as
key codes 174 and 176, but the others do not register at all. Not that
they are really needed, of course. Wasn't this sort of stuff why terminals
got F1..F12 keys, way back when? Whoever decided that those are no good
any more and had to be supplanted by extra buttons?
The "F1" through "F12" keys are supposed to have various functions associated
with them when pressed together with the "[Fn]" modifier. "[Fn]+F7]" and
"[Fn]+F8" work (display brightness down and up). "[Fn]+F3" causes
a brief screen flash, but nothing more, and "[Fn]+F4" produces an ACPI
"Sleep button pressed" event. "[Fn]+F1", "[Fn]+F2" and "[Fn]+F9"
through "[Fn]+F12" don't do anything.
In addition to the mouse hacks above, I turned the right "Menu" key
into "Ctrl", and the two "Windows" keys into "Hyper". Also, I changed
"Caps Lock" into "Super", because I never use Caps Lock, and like to have
many modifier keys to have a separate "namespace" for XEmacs and window
manager shortcuts. Here's my .Xmodmap . I like fast
auto-repeat, so I inserted this into my .xinitrc:
xset r rate 200 50
Did I say how wonderfully responsive this keyboard is? The only thing I
don't like about it, is the layout of its bottom row:
[Fn] Ctrl Win Alt \| [Space]
Ins Alt [Win] [Menu]
By reprogramming it as above, most of the trouble goes away, but I can't
seem to reprogram the "\|" key (it generates the same keycode, and raw
scan code as its twin just below the backspace key), and I find it very
hard to use a left "Ctrl" key which is not at the extreme end of the row.
Of course, [Fn] doesn't even register as a keycode, so there's no chance
of moving it about.
Hard disk
To make the harddisk work a bit faster and spin down after a minute, I
use
hdparm -c1 -d1 -X68 -S12 /dev/hda
With these settings, hdparm -tT reports 200 MB/s cache read and 16-20 MB/s
disk read.
Warning: hdparm may cause system
crashes. Read the man page before use.
Display/Video
The ATI Radeon card works almost out of the box using XFree86 4.1.0's "radeon"
driver. Just add the line
VideoRam 8192
to the "Device" section. Please be careful
when copying my XF86Config-4 file: They say
it is easy to permanently damage monitors with incorrect settings.
Video output
It works, but is not configurable. Without acpi installed pressing Fn+F3
freezes the computer. With acpi installed, Fn+F3 makes the display flash
briefly, but otherwise doesn't do much. My standard 1400x1050 display works
reasonably well on my 19" monitor, except that the 60 Hz refresh rate is
not exactly pretty, and that the top 10 pixels or so are distinctly ugly.
I could probably fix that by fooling around with the XF86Config file, but
it isn't worth my time right now. Interestingly, in MS Windows, choosing
an 800x600 display and connecting an LCD projector gave some esthetic problems
as well: the leftmost 50 pixels or so were cut off. I'm sure this can be tweaked by changing the modelines in XF86Config, but I haven't spent the time yet.
Ethernet card
Worked straight out of the box without any tweaking using the eepro100
module with manual host configuration. I experienced problems with
DHCP, which I initially ascribed to conflicts with ACPI. Several other
people have experienced the same problems, though, and they are not, in
fact, ACPI related. See www.rsmasters.com/linux/laptop
for the solution, which I haven't myself used, because with a manually
configured connection, everything works fine even without that fix.
Modem
My particular computer came with an HSF winmodem. I've read that some models
come with HCF modems instead, which is unfortunate, because no Linux driver
exists for those at the moment. The HSF works fine though, using Conexant
's "hsflinmodem" driver. I'm using version 4.06.06.01mbsibeta01120400.
I got their RPM, which compiles the driver for your kernel upon "rpm -i".
It works flawlessly for me.
Sound
The Intel 810 sound card works immediately with modules "soundcore", "ac97_codec"
and "i810_audio".
USB
Works flawlessly with all devices tested (a pen drive, a printer, a digital camera and a hard drive). It's slow though: 1.1 standard.
Firewire/1394
Untested. The hardware is recognized by /proc/pci. It uses the same IRQ
(9) as the network card. I do not have any Firewire devices, so I won't
be testing this any time soon.
PCMCIA card system
Works. (Tested with a wireless modem.)
Future bay
Both the DVD drive and the floppy disk work as advertised, but hot swapping
them does not work, even if I rmmod the DVD-associated kernel modules before
swapping and insmod the floppy.o module after I've inserted the floppy
drive. Fortunately, I rarely use floppies these days...
SMBus system
I have very little idea what this is supposed to do. According to the kernel
documentation, SMBus is a subset of the I2C protocol. I suspect it may
be used in this computer to communicate with some of the fancy laptoppy
features such as the four way scroll button, but I don't have a clue how
to program it. It grabs IRQ 5 though, and seems to be happy with it. I'd
be interested if you know more than I do.
Power management
This computer uses ACPI rather than APM. That's nice and modern and all
that, but not very well supported under Linux. The version of ACPI in kernel 2.4.17 doesn't work with this laptop. However, the latest patch (12/18/'01) from sourceforge
compiles and runs fine, and recognizes the battery and AC adapter states,
provided the "ospm_ec" module is insmod-ed before the "ospm_battery" module.
It tells me whether my battery is charging, full, discharging or critically
low, and how many mWh I have left.
Entering sleep mode by echoing "1" to /proc/acpi/sleep freezes the computer.
I haven't managed to make the computer power off from software yet, and
suspend-to-disk is out of the question. Fortunately, the display shuts
off when the case is closed, so a mimimal power saving system does work.
With lid closed (that is, backlight switched off), the laptop stays alive
for about 3 hours on a full battery. See also my hard
disk spin down settings .
I'd be most grateful if anybody could help me get ACPI work a little
bit better. Sleep mode would be a welcome feature! Here is the acpidmp
output from my ACPI tables, and here are some of the files in /proc/acpi:
ac_adapter/0/status
battery/1/info
battery/1/status
gpe
info
processor/0/info
processor/0/status
sleep
It seems the laptop supports a suspend-to-ram sleep mode (S1) and a suspend-to-disk
hibernate mode (S4), but they don't work for me. For experts only, here's
/proc/acpi/dsdt.
Update: I was
experiencing random crashes in matlab and also in lame. At first I blamed my new
memory, but I was able to prove it innocent. So I upgraded to kernel 2.4.18 and acpi-20020225. This seems to have fixed the problem. Sleep mode still doesn't work though.
I wrote a tiny little qt-based program to display battery status. It's currently not very installer friendly, but feel free to give it a try: qacpi-020316.tgz.
Further info
You are no
doubt aware of www.linux-laptop.net
? Several other people have installed linux on Compaq Presario 1700
series computers, with various degrees of success depending on their particular
hardware configuration. Compaq, in their infinite wisdom, have decided
that buyers do not need to know exactly what hardware they are going to
get prior to their actual purchase. Still, this is a great laptop,
which works quite well under linux, despite Compaq's lack of support.
Last modified by Daniel Wagenaar
on Jul 25, 2004.