| INDEX... |
|
|
|
|
|
|
|
|
Compared to other notebooks, the Compaq is very well supported under Linux, all hardware is fairly standard and is easy to setup. This includes
There's a small drawback regarding the batteries: You have to calibrate them in the beginning, and that can only be done under Windows. Without calibration, the batteries don't last very long compared to the calibrated state (about 120min). BTW: The battery has a 5-LED indicator, which allows checking the voltage at every time.
APM works, ie. reading battery filling and the standby (ie. suspend to RAM) works perfectly, in this standby state the battery lasts about 4-5 days. Standby to disk with Linux also worked for me in the beginning, but then I fiddled on the APM-settings in Windows, and now I can't get it to work again :-(
Under Windows, it is possible to set the display's brightness with hotkeys, under Linux this was not possible. And that's why I have written a small tool, which does exactly the same. Since there was no documentation how to accomplish this WITHOUT Windows, I started a little reverse-engineering project (yep, I do that all the time...) and disassembled the poor M300.
and from the bottom
(A click on the images shows the high-res version (2000*3000pixels, about 800kbyte).
As it turned out, the display's brightness is controlled with a pulse-width-modulated signal fed in by pin 5 of the 6-pin-plug to the display right beside the southbridge. After a while, I found the source of that signal, it is comming from pin 199 of the SuperIO-chip (FDC37N971 or FDC37N972 from Standard Microsystems Corporation (SMSC)).
That chip includes a lot of nice and useless stuff (e.g. IrDA, UARTs, PS2-ports, and a 8051 microprocessor) and seems to control the power management, including the fan speed and the display brightness. The fan speed can't be controlled from the host, since the 8051 seems to overwrite it every few seconds. But the PWM-control of the display works and is only reset by PM-events like changing the power source or a standby.
So I wrote a small tool to control the brightness...
gcc -O2 -o m300bl m300bl.c
/usr/local/bin and give it the
SUID-bit (chmod +s /usr/local/bin/m300bl).
Usage: m300bl can be used with the parameters +, -, or a number between 0 and 8. - reduces the brightness by a step, + increases and the number sets the brightness (0: darkest, 8: brightest).
Most window managers (KDE, fwvm) allow the binding of a key to a executable program, so you can use hotkeys to adjust the brightness. I use SHIFT-F9/SHIFT-F10 to execute "m300bl -" resp. "m300bl +" under KDE.
Executing the program as non-root will not work due too missing I/O-privileges!
The 37N791/37N792 usually has the IO base address 0x3f0 or 0x370. This is changed by the Compaq-BIOS to 0xe0, I found it out the hard way by disassembling the BIOS-ROM... The chip contains multiple logical devices, which again have setable base addresses. The PWM-registers are accessed via the 8051-mailbox, which is logical device 9, it has its base address on 0xe2, at least for my M300. However, the program determines the actual base address of the mailbox each time it is run.
There's no guarantee that the program works for you and does only what it should. Use it on your own risk!
BTW: I have received a few emails, that the program also works on the Armada E500, I had no time to test that...
| Georg Acher |
Last Update: 2001-20-05
|