The Pentium M processor implements the so-called "speedstep" technology, which means, it can run at different clock speeds. For example, the 1700 MHz Pentium M can run at six different speeds: 1700, 1400, 1200, 1000, 800, or 600 MHz. The purpose of this is battery conservation: for example, at 600 MHz, the processor uses only 6000 mW of energy, whereas at 1700 MHz, it uses 24500 mW. Thus, it is worth running your processor at a lower speed if you do not need maximum computational power, but would rather conserve battery life. A sensible policy is to run the processor at 600 MHz when on battery, and at 1700 MHz when on AC power.
Unfortunately, the BIOS of the X31 does not automatically regulate the processor speed; it leaves it up to the operating system to do so. In fact, what happens is that the BIOS will set the processor speed once and for all at boot time: if you boot while on battery, the speed will be preset to 600 MHz (and remain so, even if you plug in the AC adapter later), and if you boot while on AC power, the speed will be preset to 1700 MHz (and remain so, even if you unplug the AC adapter later). Here is a simple program which allows you to test your current processor speed (for x86 processors only):
To control the processor speed, you need to have a kernel which has ACPI support. Unfortunately, the stock Redhat kernel lacks this feature. Thus, you need to compile a new kernel. If you have never compiled a kernel before, you should first read a tutorial on how to do so. A good place to start is probably here. I am giving step-by-step instructions below for what I did for this particular kernel I compiled.
I decided to compile a 2.4 kernel, although the newest kernel version is in fact 2.6. The reason is that Redhat 9 still uses the 2.4 kernel, and there are many incompatible changes when switching to 2.6, requiring many changes to system files. On the other hand, a 2.4 kernel can be booted without any changes to the existing setup.
Redhat 9 came with kernel version 2.4.20, but I am compiling version 2.4.26, which is the latest 2.4 kernel available at the time of this writing.
NOTE: What doesn't work. Read this before deciding whether to upgrade your kernel. There are two possible interfaces between the operating system and the BIOS; they are called APM (the older interface) and ACPI (the newer interface). ACPI has nice features such as being able to control the processor speed. On the other hand, APM is what is able to put your laptop to sleep. Sleeping is not yet supported under ACPI, at least not in the 2.4 kernel. Thus, if you run an ACPI kernel, the laptop can't sleep, and if you run an APM kernel, it can't change the frequency. This is a bit of a nuisance.
Having said this, I decided to make an ACPI capable kernel anyway; if sleep mode is absolutely necessary, I can always boot into the old kernel.
Here are the exact steps that I took to recompile the kernel with ACPI
support. Commands that I typed are shown in
gpg --keyserver wwwkeys.pgp.net --recv-keys 0x517D0F0E gpg --verify acpi-20040326-2.4.26.diff.bz2.sign acpi-20040326-2.4.26.diff.bz2 gpg: WARNING: using insecure memory! gpg: please see http://www.gnupg.org/faq.html for more information gpg: Signature made Fri Jun 18 02:30:03 2004 EDT using DSA key ID 517D0F0E gpg: Good signature from "Linux Kernel Archives Verification Key(the important bit is "Good signature", ignore the various warnings).
" gpg: /home/selinger/.gnupg/trustdb.gpg: trustdb created gpg: WARNING: This key is not certified with a trusted signature! gpg: There is no indication that the signature belongs to the owner. Primary key fingerprint: C75D C40A 11D7 AF88 9981 ED5B C86B A06A 517D 0F0E gpg --verify linux-2.4.26.tar.bz2.sign linux-2.4.26.tar.bz2 gpg: WARNING: using insecure memory! gpg: please see http://www.gnupg.org/faq.html for more information gpg: Signature made Wed Apr 14 09:23:32 2004 EDT using DSA key ID 517D0F0E gpg: Good signature from "Linux Kernel Archives Verification Key " gpg: WARNING: This key is not certified with a trusted signature! gpg: There is no indication that the signature belongs to the owner. Primary key fingerprint: C75D C40A 11D7 AF88 9981 ED5B C86B A06A 517D 0F0E
cd /usr/src tar jxf /usr/local/src/linux-2.4.26.tar.bz2 cd linux-2.4.26 bzcat /usr/local/src/acpi-20040326-2.4.26.diff.bz2 | patch -p1
cp ../linux-2.4.20-8/configs/kernel-2.4.20-i686.config .config
make oldconfigThis will ask a lot of questions; I just hit "return" all the time to select the default answers.
make menuconfigHere, I enabled "General Setup -> ACPI Support -> ACPI Support", and everything underneath it except extras for specific laptops and debug statements. It looks like this:
[*] ACPI Support <*> AC Adapter <*> Battery <*> Button <*> Fan <*> Processor <*> Thermal Zone < > ASUS Laptop Extras < > Toshiba Laptop Extras [ ] Debug StatementsWhile I was at it, I also enabled as a module "File Systems -> NTFS file system support (read only)". Make sure to save the new kernel configuration when quitting the configuration menu.
make dep make bzImage ... Root device is (3, 5) Boot sector 512 bytes. Setup is 4869 bytes. System is 1006 kB make modules make modules_install
cp arch/i386/boot/bzImage /boot/vmlinuz-2.4.26 cp System.map /boot/System.map-2.4.26 mkinitrd /boot/initrd-2.4.26.img 2.4.26
title Red Hat Linux (2.4.26) root (hd0,1) kernel /vmlinuz-2.4.26 ro root=LABEL=/ initrd /initrd-2.4.26.img
uname -a Linux momo 2.4.26 #2 Tue Jun 22 23:28:42 EDT 2004 i686 i686 i386 GNU/Linux
cat /proc/acpi/processor/CPU/performance state count: 6 active state: P0 states: *P0: 1700 MHz, 24500 mW, 500 uS P1: 1400 MHz, 19500 mW, 500 uS P2: 1200 MHz, 16000 mW, 500 uS P3: 1000 MHz, 13000 mW, 500 uS P4: 800 MHz, 9500 mW, 500 uS P5: 600 MHz, 6000 mW, 500 uSThe star "*" indicates the current processor speed. The six speeds available are known as P0 through P5.
echo -n 5 > /proc/acpi/processor/CPU/performance cat /proc/acpi/processor/CPU/performance state count: 6 active state: P5 states: P0: 1700 MHz, 24500 mW, 500 uS P1: 1400 MHz, 19500 mW, 500 uS P2: 1200 MHz, 16000 mW, 500 uS P3: 1000 MHz, 13000 mW, 500 uS P4: 800 MHz, 9500 mW, 500 uS *P5: 600 MHz, 6000 mW, 500 uS
Integrated Wireless (Std) Wi-Fi wireless upgradable Wireless Connectivity  Cisco Aironet Wireless 802.11b Mini PCI adapter [+$219.00 ]  Intel PRO/Wireless 2100 3B Mini PCI adapter [+$149.00 ]This choice is confusing, and in my opinion, IBM deliberately designed their web page to fool people into thinking that they have to get either the Cisco or the Intel adapter if they want wireless connectivity. Judging from other X31 websites, most people indeed buy one or the other.
From talking to an IBM sales representative, we learned that the Cisco and the Intel are offered in addition to the "Wi-Fi wireless", which is built into the X31 regardless. Thus, the additional $149 or $219 are a pure waste of money, as you will end up with two wireless adapters in your laptop.
The only remaining question was whether the integrated "Wi-Fi wireless" card would work under Linux. According to other people's websites, both the Cisco and the Intel adapter work under Linux, see e.g. here and here. On the other hand, I did not find any information on the web about the builtin "Wi-Fi wireless" card, including such information as who made it, what chipset it uses, etc. Some people seem to assume that it is an IntelCentrino wireless card, but this is not the case. I suspect most people don't even realize it is there at all. We decided to take a chance and bought neither the Cisco nor the Intel optional card.
lspci -v" lists this device as:
/sbin/lspci -v 02:02.0 Ethernet controller: Unknown device 168c:0013 (rev 01) Subsystem: AMBIT Microsystem Corp.: Unknown device 0408 Flags: bus master, fast Back2Back, medium devsel, latency 128, IRQ 11 Memory at c0210000 (32-bit, non-prefetchable) [size=64K] Capabilities:  Power Management version 2I therefore learned that the manufacturer is AMBIT (definitely not Intel then), the device ID is 168c:0013 (incidentally, that is the same as my D-Link DWL-G650 PCMCIA card, which uses the MadWiFi driver - I have not yet tried if that driver also works for the AMBIT card). Poking around Windows revealed that the Windows driver is located at C:\WINDOWS\System32\DRIVERS\am5211.sys, and the Windows "driver information file" is at C:\WINDOWS\System32\Amat5211.inf.
From here, it was relatively easy to get the device to work under Linux. I simply installed the ndiswrapper software, which is an amazing program that wraps itself around a Windows driver and converts it to a Linux driver. Here are the steps that I took to make it work:
tar zxf ndiswrapper-0.8.tar.gz cd ndiswrapper-0.8/ make make install
mkdir /win mount /dev/hda1 /win cd /win/WINDOWS/system32 cp Amat5211.inf drivers/am5211.sys /tmp cd /tmp ndiswrapper -i Amat5211.inf
ll /etc/ndiswrapper/amat5211 -rw-r--r-- 1 root root 912 Jun 23 02:22 168C:0013:1468:0408.conf lrwxrwxrwx 1 root root 50 Jun 23 02:22 168C:0013.conf -> /etc/ndiswrapper/amat5211/168C:0013:1468:0408.conf -rw-r--r-- 1 root root 330368 Jun 23 02:22 am5211.sys -r-------- 1 root root 12967 Jun 23 02:22 amat5211.inf ndiswrapper -l Installed ndis drivers: amat5211 present
modprobe ndiswrapper dmesg ... wlan0: ndiswrapper ethernet device 00:02:8a:ef:64:86 using driver am5211.sys
iwconfig wlan0 Warning: Driver for device wlan0 has been compiled with version 16 of Wireless Extension, while this program is using version 15. Some things may be broken... wlan0 IEEE 802.11b ESSID:"default" Mode:Managed Frequency:2.462GHz Access Point: 00:40:05:ab:cd:ef Bit Rate:11Mb/s Link Quality:0/0 Signal level:-84 dBm Noise level:-256 dBm Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0The warning can be ignored as far as I can tell. But this looks very good. There is a wireless device here, and it seems to be working. Now we just need to configure the device, which uses the usual "iwconfig" and "ifconfig" commands.
iwconfig wlan0 mode Managed iwconfig wlan0 key open XXXXXXXXXXXXXXXXXXXXXXXXXX iwconfig wlan0 essid networkname
ifconfig wlan0 192.168.0.120 ifconfig wlan0 up ifconfig wlan0 wlan0 Link encap:Ethernet HWaddr 00:02:8A:AB:CD:EF inet addr:192.168.0.120 Bcast:192.168.0.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:274 errors:0 dropped:0 overruns:0 frame:0 TX packets:46 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:80487 (78.6 Kb) TX bytes:5662 (5.5 Kb) Interrupt:11 Memory:c0210000-c021ffff
route add default gw 192.168.0.1 dev wlan0 route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo 0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 wlan0
ping 184.108.40.206 PING 220.127.116.11 (18.104.22.168) 56(84) bytes of data. 64 bytes from 22.214.171.124: icmp_seq=2 ttl=242 time=38.8 ms 64 bytes from 126.96.36.199: icmp_seq=3 ttl=242 time=38.9 ms ...
DEVICE=wlan0 BOOTPROTO=dhcp ONBOOT=no USERCTL=yes TYPE=Wireless MODE=Managed ESSID=networkname KEY="open XXXXXXXXXXXXXXXXXXXXXXXXXX"The link can now be brought up with
/sbin/ifup wlan0and down with
/sbin/ifdown wlan0. The "USERCTL=yes" option enables normal (non-root) users to control this device. The "BOOTPROTO=dhcp" tells the device to get a dynamic IP address from the router via DHCP.
To Do: Wireless Power Management. There is one remaining problem with the wireless setup as described above: when the laptop is idle for a certain time (e.g. when the screen saver comes on), the wireless link goes down. Unfortunately, this happens even if there is network activity. I need to go to the laptop and press a key, and then, after a few seconds, the link will come back up. This can be really annoying when I am logged into the laptop remotely via the wireless link; I need to physically go to the laptop to re-activate the link every few minutes. Theoretically, one should be able to change these settings via the "power" setting of iwconfig, e.g.
iwconfig wlan0 power offUnfortunately, this feature does not seem to be implemented in the driver.