Linux on Compaq Presario 2142EU

I recently bought the above mentioned laptop, and as soon as I opened the box I immediately set to install the Linux distribution on it. And when I say "the distribution" I say Slackware GNU/Linux, of course ;).

Hardware information

Processor:

processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 6
model           : 10
model name      : mobile AMD Athlon(tm) XP2500+
stepping        : 0
cpu MHz         : 530.176
cache size      : 512 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat
                  pse36 mmx fxsr sse syscall mp mmxext 3dnowext 3dnow

bogomips        : 1053.25

The processor supports the PowerNow! technlogy, so you can dynamically scale the CPU clock and voltage, thus saving battery power. Although you have to install some userspace demon which takes care of the scaling. I used powernowd for the matter and I think it works well, although the BIOS has some problems with ACPI (will be back on this later):

powernow: PowerNOW! Technology present. Can scale: frequency and voltage.
powernow: FSB: 132.492 MHz
powernow: Found PSB header at c00f15c0
powernow: Table version: 0x12
powernow: Flags: 0x0 (Mobile voltage regulator)
powernow: Settling Time: 100 microseconds.
powernow: Has 14 PST tables. (Only dumping ones relevant to this CPU).
powernow: No PST tables match this cpuid (0x7a0)
powernow: This is indicative of a broken BIOS.
powernow: Trying ACPI perflib
powernow: acpi:  P0: 1867 MHz 45000 mW 125 uS control 009c4176 SGTC 10000
powernow:    FID: 0x16 (14.0x [1854MHz])        VID: 0xb (1.450V)
powernow: acpi:  P1: 1463 MHz 30648 mW 125 uS control 009c41a0 SGTC 10000
powernow:    FID: 0x0 (11.0x [1457MHz]) VID: 0xd (1.350V)
powernow: acpi:  P2: 1067 MHz 17612 mW 125 uS control 009c426a SGTC 10000
powernow:    FID: 0xa (8.0x [1059MHz])  VID: 0x13 (1.200V)
powernow: acpi:  P3: 800 MHz 13209 mW 125 uS control 009c4266 SGTC 10000
powernow:    FID: 0x6 (6.0x [794MHz])   VID: 0x13 (1.200V)
powernow: acpi:  P4: 665 MHz 11007 mW 125 uS control 009c4264 SGTC 10000
powernow:    FID: 0x4 (5.0x [662MHz])   VID: 0x13 (1.200V)
powernow: acpi:  P5: 533 MHz 8806 mW 125 uS control 009c4272 SGTC 10000
powernow:    FID: 0x12 (4.0x [529MHz])  VID: 0x13 (1.200V)
powernow: Minimum speed 529 MHz. Maximum speed 1854 MHz.

Update 31/05/2005: Since kernel version 2.6.9 you don't need any userspace daemon. All you have to do is to compile the ondemand governor into the kernel, and then put:

echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

into /etc/rc.d/rc.local. I also like to monitor in real time the clock speed, and so I installed kcpufreq.


Hard disk:

/dev/hda:

ATA device, with non-removable media
        Model Number:       FUJITSU MHT2040AT PL
        Serial Number:      NN4DT4618JUJ
        Firmware Revision:  0022
Standards:
        Used: ATA/ATAPI-6 T13 1410D revision 3a
        Supported: 6 5 4 3
Configuration:
        Logical         max     current
        cylinders       16383   16383
        heads           16      16
        sectors/track   63      63
        --
        CHS current addressable sectors:   16514064
        LBA    user addressable sectors:   78140160
        device size with M = 1024*1024:       38154 MBytes
        device size with M = 1000*1000:       40007 MBytes (40 GB)
Capabilities:
        LBA, IORDY(cannot be disabled)
        bytes avail on r/w long: 4      Queue depth: 1
        Standby timer values: spec'd by Standard, no device specific minimum
        R/W multiple sector transfer: Max = 16  Current = ?
        Advanced power management level: 128 (0x80)
        Recommended acoustic management value: 254, current value: 254
        DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 *udma5
             Cycle time: min=120ns recommended=120ns
        PIO: pio0 pio1 pio2 pio3 pio4
             Cycle time: no flow control=240ns  IORDY flow control=120ns
Commands/features:
        Enabled Supported:
           *    READ BUFFER cmd
           *    WRITE BUFFER cmd
           *    Host Protected Area feature set
           *    Look-ahead
           *    Write cache
           *    Power Management feature set
                Security Mode feature set
           *    SMART feature set
           *    Mandatory FLUSH CACHE command
           *    Device Configuration Overlay feature set
           *    Automatic Acoustic Management feature set
                SET MAX security extension
                Power-Up In Standby feature set
           *    Advanced Power Management feature set
           *    DOWNLOAD MICROCODE cmd
           *    SMART self-test
           *    SMART error logging
Security:
        Master password revision code = 65534
                supported
        not     enabled
        not     locked
                frozen
        not     expired: security count
        not     supported: enhanced erase
        40min for SECURITY ERASE UNIT.
HW reset results:
        CBLID- above Vih
        Device num = 0 determined by CSEL
Checksum: correct

It supports S. M. A. R. T.:

=== START OF INFORMATION SECTION ===
Device Model:     FUJITSU MHT2040AT PL
Serial Number:    NN4DT4618JUJ
Firmware Version: 0022
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   6
ATA Standard is:  ATA/ATAPI-6 T13 1410D revision 3a
Local Time is:    Thu Oct  7 22:27:33 2004 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

The controller is integrated in the ALi chipset:

00:10.0 IDE interface: ALi Corporation M5229 IDE (rev c4)

ALI15X3: IDE controller at PCI slot 0000:00:10.0
ACPI: No IRQ known for interrupt pin A of device 0000:00:10.0
ALI15X3: chipset revision 196
ALI15X3: not 100% native mode: will probe irqs later
    ide0: BM-DMA at 0x8080-0x8087, BIOS settings: hda:DMA, hdb:pio
    ide1: BM-DMA at 0x8088-0x808f, BIOS settings: hdc:pio, hdd:pio

DVD drive:

hdc: ATAPI 24X DVD-ROM CD-R/RW drive, 2048kB Cache, DMA

/dev/hdc:

ATAPI CD-ROM, with removable media
        Model Number:       _NEC DVD+RW ND-5100A
        Firmware Revision:  1.22
Standards:
        Likely used CD-ROM ATAPI-1
Configuration:
        DRQ response: 3ms.
        Packet size: 12 bytes
Capabilities:
        LBA, IORDY(cannot be disabled)
        DMA: mdma0 mdma1 *mdma2
             Cycle time: min=120ns recommended=120ns
        PIO: pio0 pio1 pio2 pio3 pio4
             Cycle time: no flow control=120ns  IORDY flow control=120ns

I have burnt some CD-R and CD-RW media with success, using k3b under kernel 2.6.7 (and 2.6.11). I still haven't tried burning DVD discs, but I can't see why they should not work.
I have also found out that you can try and flash the firmware for the 5500 model into this drive, turning it into a dual-format drive. You can get the firmware from here, but, of course, it's a dangerous operation, so proceed at your own risk. Notice that you have to boot under plain DOS for the flasher program to work, and without a floppy drive it can be a bit tricky. I think I'll try it, sooner or later...

Video:

01:05.0 VGA compatible controller: ATI Technologies Inc Radeon Mobility U1

This ATI Mobility Radeon chipset (IGP 320M), unfortunately, is NOT supported by the official ATI drivers, so you'll have to use the kernel built-in DRM support with the X11 driver (I'm using Slackware-current, so I have X.org 6.8.1 installed). Once I managed to turn direct rendering on, but I don't know how I did, and now it seems turned off. I think I'll have to do a little more research on this matter, as soon as I have time. Meanwhile you can have a look at my xorg.conf.

Update 11/11/2004: I fixed the direct rendering problem reinstalling the X.org packages. If you are experiencing problems with it and you are Italian, you can have a look at this nice HOWTO and at my updated xorg.conf.

I also ran into a little problem with the framebuffer: using the Radeon module I guess the display gets into the wrong mode, as the bootsplash patch doesn't work and says "depth mismatch". Anyway this can easily be solved switching to the VESA framebuffer module, which works great.

The AGP bridge is driven by the agpgart module:

agpgart: Detected Ati IGP320/M chipset
agpgart: Maximum main memory to use for agp memory: 175M
agpgart: AGP aperture is 64M @ 0xe4000000

The graphic card does NOT have its own memory, so you can select from the BIOS how much system memory to devolve to the graphics. I chose 32 MBs, other options are 16 and 64 MBs. Therefore I suggest you to install at least 256 more MBs of RAM, using the free slot you can reach from the bottom of the notebook after removing a panel.

Update 31/05/05: The laptop also features a TV-out S-Video connector, which I managed to use through atitvout. Although it's pretty hard to get it working, here's what I do:
I also find it useful to have two aliases to easily switch between the LCD and TV screens, so I put the following in /etc/profile.d/myaliases.sh:
alias ati.tv='sudo atitvout -f t'
alias ati.lcd='sudo atitvout -f l'

Of course you need to have sudo configured correctly.

Audio:

00:06.0 Multimedia audio controller: ALi Corporation M5451 PCI AC-Link Controller Audio Device (rev 02)

The audio section is included in the ALi chipset, and works perfectly with ALSA. I haven't done much with it yet, so I cannot really say anything more.

USB:

00:02.0 USB Controller: ALi Corporation USB 1.1 Controller (rev 03)

USB is again provided by the ALi chipset, and is controlled by the ohci_hcd module. This means that it's only V 1.1 compliant, not 2.0, even though I'm not really sure of this (actually the ehci_hcd module, which should take care of USB 2.0 loads seamlessly, but I can't find any trace of it in dmesg):

ohci_hcd: 2004 Feb 02 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)
ohci_hcd: block sizes: ed 64 td 64
ohci_hcd 0000:00:02.0: ALi Corporation USB 1.1 Controller
ohci_hcd 0000:00:02.0: irq 10, pci mem cebcc000
ohci_hcd 0000:00:02.0: new USB bus registered, assigned bus number 1
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 4 ports detected

Also notice that there are only two ports, located in the back of the notebook.
I still haven't tried any USB peripheral, so I can't say it works for sure, but it should.

Update 11/11/2004: I have tried a USB mouse, and it works, but it's causing me a problem if I start X while it's connected: X will just hang with a black screen (prolly while probing for devices), and I have to do a "blind reset" of the machine. So I have to disconnect the mouse before starting X and reconnect it just after. I think this is due to the fact that the USB mouse is seen as a PS/2 mouse together with the touchpad, although this is still not clear to me.

Update 31/05/2005: I solved the X hanging problem deactivating "USB legacy support" in the BIOS. I'm also using an external self-powered USB hard-disk, my Belkin USB Bluetooth dongle and my Creative Zen Xtra jukebox with no problems at all.

PCMCIA:

00:0a.0 CardBus bridge: Texas Instruments PCI1410 PC card Cardbus Controller (rev 02)

This is a standard CardBus slot, and it works with the Yenta driver:

Yenta: CardBus bridge found at 0000:00:0a.0 [103c:0024]
Yenta: Using CSCINT to route CSC interrupts to PCI
Yenta: Routing CardBus interrupts to PCI
Yenta TI: socket 0000:00:0a.0, mfunc 0x01111112, devctl 0x64
Yenta: ISA IRQ mask 0x04f8, PCI irq 11
Socket status: 30000006
cs: IO port probe 0x0c00-0x0cff: clean.
cs: IO port probe 0x0820-0x08ff: clean.
cs: IO port probe 0x0800-0x080f: clean.
cs: IO port probe 0x03e0-0x04ff: excluding 0x408-0x40f 0x480-0x48f 0x4d0-0x4d7
cs: IO port probe 0x0100-0x03af: excluding 0x378-0x37f
cs: IO port probe 0x0a00-0x0aff: clean.

I have a PCMCIA wireless LAN card (OvisLink PCM-5400) and it seems to work well (actually I have some problems but I had the same with my former notebook, so don't worry). I didn't exclude any IRQ's in config.opts but used the default configuration.

Modem:

00:08.0 Modem: ALi Corporation Intel 537 [M5457 AC-Link Modem]

The modem is again integrated in the ALi chipset, and I think it is a softmodem, even though I still haven't tried it.

Update 31/05/2005: I can't get the modem to work. I thought it was supported by the Linuxant drivers but it seems it isn't. Any hints?

LAN:

00:12.0 Ethernet controller: National Semiconductor Corporation DP83815 (MacPhyter) Ethernet Controller

It supports both 10 and 100 MB/s, half- and full-duplex with hardware flow control (I think), working perfectly under Linux.


Other information


I had a problem right at the beginning of the installation: when the Slackware setup CD asked me to press '1' if I wanted to select a non-US keyboard map, the keyboard just didn't respond. So I rebooted using the bareacpi.i kernel and giving the nousb boot parameter, and this time it was working, so I was able to begin my installation. Others have suggested to turn off "USB legacy device support" in the BIOS to achieve the same result, but I left it on.
I didn't want to deal with Windows XP at all, so I just ran cfdisk and deleted all the partitions. Then I ran setup and began the installation, which I completed with no problems at all.
Then I decided to compile my own kernel, here's the configuration I used. It's been pretty hard to find the right one, as the BIOS is broken, and activating ACPI would hang the machine at boot. Looking for information on similar models I finally discovered that if you turn off APIC support (which anyway is pretty useless on a single-cpu machine) makes ACPI work reasonably well with no hangs at all. Actually poweroff by pressing the power button works (if you run acpid, of course), and so do battery satus and CPU temperature monitoring. I haven't yet tried sleep states nor standby mode.

I installed xbindkeys to use the extra keys, but not all of them work. Actually only the e-mail and browser buttons work, together with the volume up and down buttons (but NOT the mute button) on the left side of the notebook. I'm writing a script to make them work with kmix using DCOP, I'll post it here as soon as it's done.

The touchpad is a Synaptics touchpad and works with the driver available here. See my xorg.conf for configuration.

Update 31/05/2005: Here's the config file I used to build the 2.6.11.10 kernel. Slackware packages for most of the software mentioned in this document and many more are available at SukkoNet.


That's all I could write about this notebook, of which I'm quite happy, by the way. I hope this information will be useful. If you need any hints or want to contribute to the page, just write to me at enjoy.the.silence AT iol DOT it.


SukkoPera
Last update: 25/05/2005

TuxMobil - Linux on Laptops, Notebooks, PDAs and Mobile Phones