notebook

Using the HP Pavilion dv7-3127eg laptop with Debian GNU/Linux

HP Pavilion dv7-3127eg

Yep, so I bought a new laptop recently, my IBM/Lenovo Thinkpad T40p was slowly getting really unbearably sloooow (Celeron 1.5 GHz, 2 GB RAM max). After comparing some models I set out to buy a certain laptop in a local store, which they didn't have in stock, so I spontaneously got another model, the HP Pavilion dv7-3127eg (HP product number VY554EA).

Why this one? Well, the killer feature for me was that it has two SATA disks, hence allows me to run a RAID-1 in my laptop. This allows me to sleep better at night, knowing that the next dying disk will not necessarily lead to data loss (yes, I do still perform regular backups, of course).

Other pros: Much faster than the old notebook, this one is an AMD Turion II Dual-Core Mobile M520 at 2.3 GHz per core, it has 4 GB RAM (8 GB max), and uses an AMD RS780 / SB700 chipset which is supported by the Free-Software / Open-Source BIOS / firmware project coreboot, so this might make the laptop a good coreboot-target on the long run. I'll probably start working on that when I'm willing to open / dissect it or when the warranty expires, whichever happens first.

Anyway, I set up a page at randomprojects.org which contains lots more details about using Linux on this laptop:

http://randomprojects.org/wiki/HP_Pavilion_dv7-3127eg

Most of the hardware is supported out of the box, though I haven't yet tested everything. There may be issues with suspend-to-disk / suspend-to-RAM, sometimes it seems to hang (may be just a simple config change is needed in /etc/hibernate/disk.cfg).

Cons: Pretty big and heavy (but that's OK, I use it mostly as "semi-mobile desktop replacement"), glossy screen, loud fans (probably due to the two disks).

For reference, here's an lspci of the box:

  $ lspci -tvnn
  -[0000:00]-+-00.0  Advanced Micro Devices [AMD] RS780 Host Bridge Alternate [1022:9601]
           +-02.0-[01]--+-00.0  ATI Technologies Inc M96 [Mobility Radeon HD 4650] [1002:9480]
           |            \-00.1  ATI Technologies Inc RV710/730 [1002:aa38]
           +-04.0-[02-07]--
           +-05.0-[08]----00.0  Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express) [168c:002b]
           +-06.0-[09]----00.0  Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller [10ec:8168]
           +-0a.0-[0a]--
           +-11.0  ATI Technologies Inc SB700/SB800 SATA Controller [AHCI mode] [1002:4391]
           +-12.0  ATI Technologies Inc SB700/SB800 USB OHCI0 Controller [1002:4397]
           +-12.1  ATI Technologies Inc SB700 USB OHCI1 Controller [1002:4398]
           +-12.2  ATI Technologies Inc SB700/SB800 USB EHCI Controller [1002:4396]
           +-13.0  ATI Technologies Inc SB700/SB800 USB OHCI0 Controller [1002:4397]
           +-13.1  ATI Technologies Inc SB700 USB OHCI1 Controller [1002:4398]
           +-13.2  ATI Technologies Inc SB700/SB800 USB EHCI Controller [1002:4396]
           +-14.0  ATI Technologies Inc SBx00 SMBus Controller [1002:4385]
           +-14.2  ATI Technologies Inc SBx00 Azalia (Intel HDA) [1002:4383]
           +-14.3  ATI Technologies Inc SB700/SB800 LPC host controller [1002:439d]
           +-14.4-[0b]--
           +-18.0  Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] HyperTransport Configuration [1022:1200]
           +-18.1  Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] Address Map [1022:1201]
           +-18.2  Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] DRAM Controller [1022:1202]
           +-18.3  Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] Miscellaneous Control [1022:1203]
           \-18.4  Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] Link Control [1022:1204]

Full lspci -vvvxxxxnnn, lsusb -vvv, and a much more detailed list of tested hardware components is available in the wiki.

Using Debian GNU/Linux on the IBM/Lenovo Thinkpad T40p

TuxMobil - Linux on Laptops, Notebooks, PDAs and Mobile Phones Linux On Laptops linlap.com

IBM/Lenovo Thinkpad T40p

I recently got a new (well, refurbished) laptop as a replacement for my old Toshiba A80-117 laptop which has more or less died. It's an IBM/Lenovo T40p laptop (model 2373-CG6), with an Intel Pentim M at 1.5 GHz. I chose this laptop for multiple reasons:

  • Robustness (which is supposedly one of the main advantages of Thinkpads).
  • Relatively cheap, as it's an older refurbished model (I paid less than 280 Euros).
  • Resolution of 1400x1050 (the usual 1024x768 of similar models is definately not enough for my purposes).
  • It can use up to 2 GB of DDR RAM (many similar models have a chipset-limitation of 1 GB). I swiftly replaced the shipped 512 MB of RAM with the 2 GB from my old laptop. The hardware maintainance manual has very useful instructions on opening the laptop, btw.
  • Gigabit Ethernet.
  • Non-glossy screen (very important!).
  • Pretty long battery life (even though it's refurbished), I get more that 2 hours or so.

Downsides and missing hardware features (nothing too important, though):

  • No HDAPS unfortunately, which would have been fancy.
  • No support for burning DVDs, only CDs (but that's possible through an upgrade, I think).
  • Only two USB ports, more of them would have been nice.
  • No Firewire, but that's not really critical for me.

Pretty much all of the hardware works flawlessly out of the box with a recent distro/kernel, see below for details.

Installation

Not needed, I simply popped out the 40 GB drive from the T40p and inserted my 160 GB (PATA) drive from my old laptop and that was it. Pretty much everything worked out of the box (see below), even though this is a totally different manufacturer, model, chipset, graphics card, wireless card, and so on. The only exception being (of course) my small Windows partition on that disk, which is now unusable as the drive is on different hardware and Microsoft doesn't like me to do that. Free Software: 1, Microsoft: 0.

Audio

Works out of the box using the snd_intel8x0 driver. The hardware is onboard audio in the southbridge (82801DB / ICH4) and uses the Analog Devices AD1981B codec.

Bluetooth

Works out of the box using the bluetooth and hci_usb driver. The laptop's Bluetooth device is USB-attached internally and shows up in lsusb as:

  $ lsusb
  Bus 003 Device 004: ID 1668:0441 Actiontec Electronics, Inc. [hex] IBM Integrated Bluetooth II

The device is not enabled per default though (which is a good thing), you can enable it like this:

  $ echo enable > /proc/acpi/ibm/bluetooth

Disabling is equally simple:

  $ echo disable > /proc/acpi/ibm/bluetooth

After that, you can use hcitool / hciconfig etc. as usual, and/or enable more related stuff with /etc/init.d/bluetooth restart.

Modem

Untested, I don't need it.

IrDA

Untested so far.

Sensors

Works out of the box.

  $ sensors
  acpitz-virtual-0
  Adapter: Virtual device
  temp1:       +51.0°C  (crit = +93.0°C)                  

  thinkpad-isa-0000
  Adapter: ISA adapter
  fan1:       3698 RPM
  temp1:       +51.0°C                                    
  temp2:       +42.0°C                                    
  temp3:       +32.0°C                                    
  temp4:       +49.0°C                                    
  temp5:       +33.0°C                                    
  ERROR: Can't get value of subfeature temp6_input: Can't read
  temp6:        +0.0°C                                    
  temp7:       +28.0°C                                    
  ERROR: Can't get value of subfeature temp8_input: Can't read
  temp8:        +0.0°C                                    

HPET

The Intel ICH4-M southbridge in this laptop supports High Performance Event Timers (HPET) which allows for more power savings and thus improved battery life.

  $ dmesg | grep -i hpet
  pci 0000:00:1f.0: Force enabled HPET at 0xfed00000
  hpet clockevent registered
  HPET: 3 timers in total, 0 timers will be used for per-cpu timer
  hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0
  hpet0: 3 comparators, 64-bit 14.318180 MHz counter

You can check with powertop that the number of wakeups-from-idle is drastically reduced (from 70 to less than 10) when adding hpet=force to the kernel command line.

Network card

Works out of the box using the e1000 driver.

  $ modprobe e1000
  Intel(R) PRO/1000 Network Driver - version 7.3.20-k2-NAPI
  Copyright (c) 1999-2006 Intel Corporation.
  ACPI: PCI Interrupt 0000:02:01.0[A] -> Link [LNKA] -> GSI 11 (level, low) -> IRQ 11
  e1000: 0000:02:01.0: e1000_probe: (PCI:33MHz:32-bit) 00:11:22:33:44:55
  e1000: eth0: e1000_probe: Intel(R) PRO/1000 Network Connection

Touchpad

Works out of the box, both in X as well as in the console using gpm.

TrackPoint

Works out of the box, both in X as well as in the console using gpm.

Suspend-to-disk and suspend-to-RAM

Both work out of the box (on 2.6.26 or 2.6.29 kernels), or at least it used to; I think I'm seeing some hangs upon resume nowadays (Capslock LED is blinking, schreen is blank. I'll investigate.). I'm using the hibernate Debian package. You can explicitly force the usage of either method in /etc/hibernate/hibernate.conf by uncommenting the respective lines.

# TryMethod suspend2.conf
TryMethod disk.conf
# TryMethod ram.conf

Wireless

Works out of the box using the ath5k driver. I tested WEP as well as WPA.

CPU frequency scaling

Works out of the box using the acpi_cpufreq driver.

$ cpufreq-info
analyzing CPU 0:
  driver: acpi-cpufreq
  CPUs which need to switch frequency at the same time: 0
  hardware limits: 600 MHz - 1.50 GHz
  available frequency steps: 1.50 GHz, 1.40 GHz, 1.20 GHz, 1000 MHz, 800 MHz, 600 MHz
  available cpufreq governors: userspace, powersave, ondemand, conservative, performance
  current policy: frequency should be within 800 MHz and 1.50 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency is 800 MHz (asserted by call to hardware).
  cpufreq stats: 1.50 GHz:69.76%, 1.40 GHz:0.11%, 1.20 GHz:0.13%, 1000 MHz:0.16%, 800 MHz:29.83%, 600 MHz:0.00%  (4010)

Use cpufreq-set -g performance if you need full CPU power, cpufreq-set -g powersave otherwise.

PC Speaker

Works fine out of the box, tested with beep.

CDRW/DVD

Works out of the box. You can play DVDs or CD-ROMs, and burn CDs (but not DVDs):

  $ wodim foo.iso
  [...]
  Device type    : Removable CD-ROM
  Version        : 0
  Response Format: 2
  Capabilities   :
  Vendor_info    : 'MATSHITA'
  Identification : 'UJDA745 DVD/CDRW'
  Revision       : '1.02'
  Device seems to be: Generic mmc2 DVD-ROM.
  Using generic SCSI-3/mmc   CD-R/CD-RW driver (mmc_cdr).
  Driver flags   : MMC-3 SWABAUDIO BURNFREE
  Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R96R

Ejecting a CD-ROM/DVD using the eject command line tool also works fine.

Graphics card

Works out of the box using the radeon driver.

  $ xrandr
  Screen 0: minimum 320 x 200, current 1400 x 1050, maximum 1400 x 2048
  VGA-0 disconnected (normal left inverted right x axis y axis)
  DVI-0 disconnected (normal left inverted right x axis y axis)
  LVDS connected 1400x1050+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
     1400x1050      50.0*+
     1280x800       60.0  
     1280x768       60.0  
     1024x768       60.0  
     800x600        60.3  
     640x480        59.9  
  S-video disconnected (normal left inverted right x axis y axis)

DRI works out of the box with the (mainline, open-source) driver:

  $ glxinfo | grep direct
  direct rendering: Yes

If you attach an external monitor or projector, you can enable it using xrandr as usual:

  $ xrandr --output VGA-0 --auto

You can also use a dual-head setup by adding this to your "Screen" section in /etc/X11/xorg.conf:

  SubSection "Display"
    # Virtual 2048 2048
    Virtual 1400 2048
  EndSubSection

After restarting the X server, you can play with xrandr and move the external screen (VGA-0) "below" the laptop's LCD screen (LVDS) for a simple dual-head setup. The GUI tools arandr or grandr are probably a bit simpler to use than plain command line xrandr.

The maximum size for the "Virtual" line is 2048x2048 if you want to keep DRI enabled (you can use higher values if you don't care about DRI).

S-Video

Untested so far.

Parallel port

Yes, this model still has an actual parallel port, which is nice as I can use it for random JTAG stuff (e.g. OpenOCD) with several cheapo parallel port JTAG adapters I own.

JTAG adapter for parallel port

PCMCIA

This laptop has a type II/III PCMCIA slot which works out of the box using the pcmcia and yenta_socket drivers. You can probe/handle PCMCIA cards using the pccardctl tool:

  $ pccardctl status
  Socket 0:
    no card
  Socket 1:
    no card

USB

Works fine, of course. Luckily it's USB 2.0 (not USB 1.1) so I can successfully do high-speed stuff, e.g. watching DVB-T using kaffeine. The only small problem is that there are only two USB ports, more would have been better.

Disk drive

Works fine, of course, it's just a normal PATA drive. You can check if DMA gets properly enabled with hdparm /dev/hda | grep dma.

ThinkLight

Works out of the box (Fn + PgUp). This is a tiny, but useful light embedded in the screen, which is helpful if you're working in dark rooms or in trains during the night etc.

Special keys

What works out of the box: brightness control buttons, audio volume control + mute buttons, thinklight button.

TODO: Access IBM, F3, F4, F5, F7, F12, left/right special keys, Fn+Space.

LEDs

All of them seem to work fine, including the Bluetooth on/off and Wireless on/off LEDs, as well as the suspend LED.

Detailed system information

lspci -tvnn

-[0000:00]-+-00.0  Intel Corporation 82855PM Processor to I/O Controller [8086:3340]
           +-01.0-[0000:01]----00.0  ATI Technologies Inc Radeon RV250 [Mobility FireGL 9000] [1002:4c66]
           +-1d.0  Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 [8086:24c2]
           +-1d.1  Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 [8086:24c4]
           +-1d.2  Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 [8086:24c7]
           +-1d.7  Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller [8086:24cd]
           +-1e.0-[0000:02-08]--+-00.0  Texas Instruments PCI1520 PC card Cardbus Controller [104c:ac55]
           |                    +-00.1  Texas Instruments PCI1520 PC card Cardbus Controller [104c:ac55]
           |                    +-01.0  Intel Corporation 82540EP Gigabit Ethernet Controller (Mobile) [8086:101e]
           |                    \-02.0  Atheros Communications Inc. AR5212 802.11abg NIC [168c:1014]
           +-1f.0  Intel Corporation 82801DBM (ICH4-M) LPC Interface Bridge [8086:24cc]
           +-1f.1  Intel Corporation 82801DBM (ICH4-M) IDE Controller [8086:24ca]
           +-1f.3  Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller [8086:24c3]
           +-1f.5  Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller [8086:24c5]
           \-1f.6  Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Modem Controller [8086:24c6]

cat /proc/cpuinfo

processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 9
model name      : Intel(R) Pentium(R) M processor 1500MHz
stepping        : 5
cpu MHz         : 1500.000
cache size      : 1024 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr mce cx8 sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 tm pbe up bts est tm2
bogomips        : 2997.72
clflush size    : 64
power management:

All in all it's a really nice piece of hardware, and it works without much hassle with recent distros/kernels.

Updates for the Starcraft-using-Wine article

One A110 netbook running Starcraft

Just FYI, I've updated my Playing Starcraft on Linux using Wine article from a few days ago, adding some more info about:

  • Brood War installation.
  • Multiplayer LAN games, firewall settings for network gaming.
  • Playing Starcraft on netbooks (which works astonishingly well), tested on my One A110 VIA VX800 netbook.

Please read the updated article for details.

Speed up Linux crypto operations on the One A110 laptop with VIA Padlock

One Mini A110 subnotebook

OK, so I've been hacking on and testing my shiny new One A110 mini-laptop during the last few days and I must say I'm very happy with it. I'll write up some more details later (check the wiki if you're impatient), but today I want to highlight a very nice feature of this laptop (compared to, for instance, the Eee PC): The VIA C7-M ULV CPU in the laptop has VIA Padlock support.

VIA Padlock is a hardware feature in recent VIA CPUs which provides hardware-accelerated AES and SHA-1/SHA-256 support, among other things. This can be used in Linux (with the proper drivers and patches) to improve performance of dm-crypt, OpenSSL (and all programs using it), scp, sha1sum, OpenVPN, etc. etc.

I have written a quite extensive VIA Padlock HOWTO and benchmarks in the A110 wiki (but all of this will work on other systems which have VIA Padlock, too). To summarize, here are the most important benchmarks:

dm-crypt (256bit AES, cbc-essiv:sha256)

VIA Padlock dm-crypt benchmark

Without VIA Padlock support:

$ hdparm -tT /dev/mapper/hdc2_crypt
/dev/mapper/hdc2_crypt:
 Timing cached reads:   448 MB in  2.00 seconds = 223.47 MB/sec
 Timing buffered disk reads:   22 MB in  3.07 seconds =   7.17 MB/sec

With VIA Padlock support:

$ hdparm -tT /dev/mapper/hdc2_crypt
/dev/mapper/hdc2_crypt:
 Timing cached reads:   502 MB in  2.00 seconds = 250.41 MB/sec
 Timing buffered disk reads:   90 MB in  3.07 seconds =  29.36 MB/sec

The native speed of the SSD in the laptop is 31.01 MB/sec, so there is almost no performance penalty when using VIA Padlock.

OpenSSL

VIA Padlock OpenSSL benchmark

OpenSSL speed benchmark, first line without Padlock, second line with Padlock enabled:

$ openssl speed -evp aes-256-cbc [-engine padlock]
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
aes-256-cbc       9187.18k    10572.28k    11054.32k    11179.36k    11218.02k
aes-256-cbc      47955.92k   150619.73k   325730.73k   458320.11k   520520.79k

ssh/scp

VIA Padlock scp benchmark

Without VIA Padlock support:

$ scp -c aes256-cbc bigfile.dat localhost:/dev/null
bigfile.dat                100%  159MB   5.9MB/s   00:27

With VIA Padlock support:

$ scp -c aes256-cbc bigfile.dat localhost:/dev/null
bigfile.dat                100%  159MB  14.5MB/s   00:11

OpenVPN

A real speed benchmark is pending (not measurable easily on 100MBit LAN, will try on a slower link), but as OpenVPN uses OpenSSL it should have roughly the same speedup iff you tell OpenVPN to use AES (it uses Blowfish per default).

Also, there's a measurable difference in CPU load while tranferring large files over OpenVPN: 8% CPU load with VIA Padlock (vs. 20% CPU load without VIA Padlock).

sha1sum / phe_sum

VIA Padlock sha1sum / phe_sum benchmark

phe_sum is a small C program which can be used as drop-in replacement for sha1sum (which doesn't support VIA Padlock yet). Quick benchmark:

sha1sum, without VIA Padlock:

$ time sha1sum bigfile.dat
real    0m6.511s
user    0m5.864s
sys     0m0.412s

phe_sum (with VIA Padlock support):

$ time ./phe_sum bigfile.dat
real    0m1.149s
user    0m0.704s
sys     0m0.424s

All in all VIA Padlock gives you a pretty impressive speedup for many crypto-using applications on Linux, which is especially useful on the A110 mini-laptop (think OpenVPN or scp for mobile usage, and dm-crypt for an encrypted SSD, of course).

One A110 mini-laptop with pre-installed Linux for 199.- plus Debian installation HOWTO

One Mini A110 subnotebook

OK, so I've spent my last money on the One Mini A110 subnotebook recently. Yep, yet another ASUS Eee PC clone, but this one has the great benefit of costing only 199.- Euros and has similar specs as the Eee PC 2G Surf (700), I think.

This is really a great little machine as far as I can tell. It's a VIA C7-M ULV 1GHz with 512MB DDR2 RAM and a 2 GB Solid-State-Disk (SSD), 7" screen at supposedly 800x480, VGA out, card reader slot for SD/MMC/MS, 2x USB, wireless, modem, audio. No webcam, no bluetooth.

Yesterday I created a wiki at a110wiki.de (for the A110, but also the A120 from the same vendor, which has a 4 GB SSD), where A110 users can collect information, HOWTOs, photos, etc. There's already quite some content there, especially some early tutorials and photos on the inner workings of the A110.

Today I've installed a stock Debian unstable distro on the SSD with 2.6.25 kernel, and I'm currently checking which parts of the hardware work out of the box, and which need further fixing. There's a a bunch of source code tarballs and patches on the vendor website, but most of it seems to be meant for 2.6.22, we'll see if and/or how much work it'll take to merge all this upstream (if it's not already done)...

My Debian Installation HOWTO is also available from the wiki, of course; I'll add more info and photos during the day.

Now for all interested parties: The vendor of the A110 has (again) announced a special weekend offer (valid until Sunday, June 1, 2008, i.e. tomorrow) where they'll sell the A110 for 199,- Euros again, the regular price will be 229,- Euros after that. So if you're thinking about buying one, now is probably the right time.

Check the wiki for issues which are important to you, some quirks remain at this point (but will probably mostly be figured out sooner or later), e.g. the wifi seems to have issues (the vendor said they'll send a driver update to all affected customers), the RAM is builtin and can't be upgraded, and some other, more or less important issues, depending on what you expect from the laptop.

For real-time communication there's also the #a110 IRC channel on Freenode.

Syndicate content