Debian on ThinkPad Edge 11″

Vincent Bernat

It has been sev­eral months since I last used my lap­top, an Asus S5N: it was crip­pled by a short bat­tery life and was hit by sev­eral bugs, most of them tar­get­ing the i855GME graphic chipset thanks to the use of GEM and KMS in the lat­est Xorg. I did not want to in­vest too much in a lap­top and I have found a re­bate from Lenovo for Think­Pad Edge se­ries. Voilà, I have a Think­Pad Edge 11″.

Hardware#

Think­Pad Edge is an en­try-level note­book from Lenovo. In France, it is avail­able for around €500, thanks to the usual par­ity be­tween dol­lar and euro.

Hardware configuration#

Lenovo does not sell di­rectly in France. There­fore, you can­not con­fig­ure your lap­top as you want. There are two or three con­fig­u­ra­tions avail­able. This can be a bit frus­trat­ing if you want some­thing specific.

Here is the con­fig­u­ra­tion I bought:

  • In­tel Core i3 380UM at 1.33 GHz CPU.
  • 11.6″ LED screen, with a res­o­lu­tion of 1366x768.
  • 4 GiB RAM.
  • 320 GiB hard drive.
  • Wire­less net­work (Cen­trino Wire­less-N) and bluetooth.
  • Broad­band mo­dem (WWAN)

It’s a small lap­top but it is not as light as it should be (1.5 kg or 3.3 pounds). Apart from the power sup­ply, you don’t get any ex­tra. My Asus was shipped with a wire­less mouse, a trans­port bag, a sleeve, a USB key and a CD burner.

On one side, you get two USB ports and on the other side, one USB port, an HDMI port, a net­work out­let and a speaker jack. The VGA con­nec­tor is placed on the rear.

BIOS#

First step: check­ing BIOS set­tings. WiMAX can be dis­abled as well as any other com­po­nent that you may not need. The key­board can be con­fig­ured so that func­tion keys are avail­able di­rectly in­stead of hav­ing to use the Fn key.

There is an op­tion called Com­pu­trace from AbsoluteSoftware which seems tar­geted at re­cov­er­ing your lap­top in case it gets stolen or just let the FBI know where you are. I have dis­abled it.

Debian installation#

De­bian can be in­stalled from a USB stick. This is re­ally easy now. You grab the ISO im­age you want to use (I take the one for AMD64 in test­ing be­cause I will run un­sta­ble) and to copy it on the USB stick:

# dd if=debian-testing-amd64-netinst.iso of=/dev/sdb

The pre­vi­ous way of mak­ing the USB stick bootable, in­stalling a ker­nel, an ini­trd and the ISO im­age is dep­re­cated (and does not work).

More­over, us­ing test­ing to in­stall De­bian al­lows me to use a 2.6.37 ker­nel and cir­cum­vent some prob­lems that may have hap­pened with an older kernel.

Dur­ing the in­stal­la­tion, I choose a guided par­ti­tion­ing us­ing en­crypted LVM. I choose to have sev­eral par­ti­tions but I keep /usr in the root par­ti­tion since hav­ing a sep­a­rate /usr is less and less sup­ported, es­pe­cially with soft­ware like udev.

The par­ti­tion­ing tool in De­bian in­staller does not al­low you to re­size vol­umes, you need to de­stroy them and recre­ate them as well as their con­tent. How­ever, this is still faster than writ­ing a patch for this.

When the in­stal­la­tion is fin­ished, the lap­top boots on a 2.6.38 ker­nel, asks for the passphrase to de­crypt the LUKS vol­ume, and dis­plays the lo­gin prompt a few sec­onds later.

Software configuration#

Most of the hard­ware seems to be sup­ported. No ob­scure com­mands to run to get a work­ing net­work. There­fore, I start by set­ting up my usual en­vi­ronment.

Setting up the desktop#

First, I change /etc/​apt/​sources.​list to get unstable:

deb http://ftp.fr.debian.org/debian/ unstable main
deb-src http://ftp.fr.debian.org/debian/ unstable main
deb http://ftp.fr.debian.org/debian/ experimental main contrib non-free

I also want that ev­ery­thing that is in­stalled from ex­per­i­men­tal to be up­graded if an up­date is avail­able in ex­per­i­men­tal. This is done by cre­at­ing a file /etc/​apt/​preferences.​d/experimental:

Package: *
Pin: release experimental
Pin-Priority: 101

Then, I in­stall the fol­low­ing packages:

  • zsh, my favourite shell with my hand-made mat­u­rat­ing con­fig­u­ra­tion. I should put it on GitHub one day.
  • mg, is the ed­i­tor that I use to quickly edit a con­fig­u­ra­tion file. I do not like vi. I have used jed for a long time but its de­fault con­fig­u­ra­tion can be cum­ber­some and it misses some emacs key­binding.
  • emacs, my work en­vi­ron­ment. I use it as a text ed­i­tor and mail reader (with Gnus). I do not use it as a browser nor as a ter­mi­nal. As for zsh, I have my con­fig­u­ra­tion files ready to be copied anywhere.
  • fvwm, my win­dow man­ager since quite some time. I use fvwm-crystal on top of it. My con­fig­u­ra­tion is de­scribed in an­other post. I also use conky.
  • rxvt-unicode, a ter­mi­nal. It has a very good ter­mi­nal em­u­la­tion and some fancy fea­tures like trans­parency (us­ing com­posit­ing or not). It is light and fast and al­lows me to search in the back­buffer. It can use a client/server sys­tem that will close all your win­dows when the server crashes. This al­most never happens.
  • unison, a syn­chro­ni­sa­tion tool that al­lows me to keep the same files on my dif­fer­ent computers.
  • gdm3 is the only dis­play man­ager that is able to talk cor­rectly to ConsoleKit and get the rights set cor­rectly with­out adding your­self to a lot of groups.

Nowa­days, I use the ker­nel from De­bian and I do not have to build my own con­fig­u­ra­tion for it. The glory days where I had to re­com­pile the ker­nel be­fore plug­ging a new USB toy have passed.

I re­move rpcbind and nfs-common. I use ferm to set up a sim­ple fire­wall. Here is my ferm.conf:

domain (ip ip6) {
  table filter {
    chain INPUT {
        policy DROP;
        mod state state INVALID DROP;
        mod state state (ESTABLISHED RELATED) ACCEPT;
        interface lo ACCEPT;
        proto tcp dport ssh ACCEPT;
    }
    chain OUTPUT {
        policy ACCEPT;
        mod state state (ESTABLISHED RELATED) ACCEPT;
    }
    chain FORWARD {
        policy DROP;
    }
  }
}

unison will then sync my con­fig­u­ra­tion files and my doc­u­ments. Af­ter this step, my en­vi­ron­ment is ready.

Hardware configuration#

This is usu­ally the most trou­ble­some part. How­ever, look­ing at the out­put of lspci and lsusb, ev­ery­thing seems pretty easy to get supported.

Here is lspci output:

00:00.0 Host bridge: Intel Corporation Core Processor DRAM Controller (rev 02)
00:02.0 VGA compatible controller: Intel Corporation Core Processor Integrated Graphics Controller (rev 02)
00:16.0 Communication controller: Intel Corporation 5 Series/3400 Series Chipset HECI Controller (rev 06)
00:1a.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 06)
00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 06)
00:1c.0 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 1 (rev 06)
00:1c.1 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 2 (rev 06)
00:1c.5 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 6 (rev 06)
00:1d.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 06)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev a6)
00:1f.0 ISA bridge: Intel Corporation Mobile 5 Series Chipset LPC Interface Controller (rev 06)
00:1f.2 SATA controller: Intel Corporation 5 Series/3400 Series Chipset 4 port SATA AHCI Controller (rev 06)
00:1f.3 SMBus: Intel Corporation 5 Series/3400 Series Chipset SMBus Controller (rev 06)
00:1f.6 Signal processing controller: Intel Corporation 5 Series/3400 Series Chipset Thermal Subsystem (rev 06)
03:00.0 Network controller: Intel Corporation Centrino Wireless-N 1000
09:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 03)
ff:00.0 Host bridge: Intel Corporation Core Processor QuickPath Architecture Generic Non-core Registers (rev 02)
ff:00.1 Host bridge: Intel Corporation Core Processor QuickPath Architecture System Address Decoder (rev 02)
ff:02.0 Host bridge: Intel Corporation Core Processor QPI Link 0 (rev 02)
ff:02.1 Host bridge: Intel Corporation Core Processor QPI Physical 0 (rev 02)
ff:02.2 Host bridge: Intel Corporation Core Processor Reserved (rev 02)
ff:02.3 Host bridge: Intel Corporation Core Processor Reserved (rev 02)

And lsusb out­put (I have dis­abled the broad­band mo­dem in the BIOS and there­fore, it does not ap­pear here):

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 003: ID 0bda:0158 Realtek Semiconductor Corp. USB 2.0 multicard reader
Bus 001 Device 004: ID 0a5c:217f Broadcom Corp. Bluetooth Controller
Bus 002 Device 003: ID 5986:01a7 Acer, Inc Lenovo Integrated Webcam

There is a ded­i­cated page for the Think­Pad Edge 11″ on ThinkWiki. This wiki is one of the best sources of in­for­ma­tion when you get a ThinkPad.

The ker­nel as shipped by De­bian ker­nel team con­tains ev­ery mod­ule that you may need. One of them, thinkpad_​acpi will han­dle most of the perks un­der the hood.

I do not use a com­plete desk­top like GNOME. I usu­ally pre­fer to use com­mand line tools and put them in .xsession for per­sis­tence. There is usu­ally some graph­i­cal util­ity to do the same thing. There are how­ever some con­fig­u­ra­tion steps that are now far eas­ier to do with a graph­i­cal tool. Since I use X all the time, I just rely on these tools when necessary.

BIOS upgrade#

From lshw out­put, I see that I al­ready have the lat­est BIOS avail­able. No need to up­date then. In case you need to up­date yours, ThinkWiki has a doc­u­men­ta­tion to up­grade. You can find memdisk im­age in syslinux package.

Graphic card#

The graphic card is in­te­grated into the CPU. In­tel usu­ally ships graphic cards well sup­ported by open source driv­ers. ThinkWiki tells us:

A very re­cent Linux dis­tri­bu­tion with ker­nel 2.6.33 and In­tel Xorg driver 2.11 or newer is rec­om­mended. Note that XVideo (Xv) play­back at cer­tain frame sizes does not work prop­erly un­less you have at least ver­sion 2.12 of the In­tel Xorg driver.

With De­bian Wheezy, you get ver­sion 2.15. There­fore, con­fig­ur­ing the graphic card is just a mat­ter of in­stalling xserver-xorg-video-intel and that’s all. No /etc/​X11/​xorg.​conf needed.

HDMI and VGA out­puts are de­tected with­out con­fig­ur­ing any­thing. They can be en­abled with xrandr. I did not try if it was pos­si­ble to use both of them at the same time.

Screen 0: minimum 320 x 200, current 1366 x 768, maximum 8192 x 8192
LVDS1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 256mm x 144mm
   1366x768       60.0*+   50.0
   1360x768       59.8     60.0
   1024x768       60.0
   800x600        60.3     56.2
   640x480        59.9
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis)

Com­posit­ing works with­out any prob­lem. I use only trans­parency and there­fore, I don’t know what the speed is on a desk­top with all ef­fects turned on.

Re­gard­ing video ac­cel­er­a­tion, XVideo is sup­ported but the graphic card also fea­tures hard­ware de­cod­ing with i965-va-driver pack­age. Here is the out­put of vainfo:

libva: libva version 0.32.0
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib/dri/i965_drv_video.so
libva: va_openDriver() returns 0
vainfo: VA API version: 0.32
vainfo: Driver version: i965 Driver 0.1
vainfo: Supported profile and entrypoints
  VAProfileMPEG2Simple            :    VAEntrypointVLD
  VAProfileMPEG2Main              :    VAEntrypointVLD
  VAProfileH264Baseline           :    VAEntrypointVLD
  VAProfileH264Main               :    VAEntrypointVLD
  VAProfileH264High               :    VAEntrypointVLD

With De­bian, VLC can make use of this if you put ffmpeg-hw=1 in your ~/.​config/​vlc/​vlcrc. We are then greeted by this:

[0x2629040] avcodec decoder: Using VA API version 0.32 for hardware decoding.

Network#

The net­work card works out of the box. ThinkWiki tells us that there can be sta­bil­ity prob­lems with 2.6.36 ker­nel. Dur­ing the in­stal­la­tion, a 2.6.37 was used with­out any prob­lem. I am now run­ning a 2.6.38 and never got a glitch. It is likely that the de­scribed prob­lem was solved with 2.6.37.

UltraNav#

UltraNav is the com­bi­na­tion of the usual touch­pad and the track­point which is a small joy­stick in the cen­ter of the key­board and is well known to Think­Pad users since most of them have one. The track­point is a great in­put device.

Nowa­days, all in­put de­vices are con­fig­ured with the help of xinput com­mand. Here is the out­put of xinput list:

⎡ Virtual core pointer           id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer id=4    [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad id=11    [slave  pointer  (2)]
⎜   ↳ TPPS/2 IBM TrackPoint      id=12    [slave  pointer  (2)]
⎣ Virtual core keyboard          id=3    [master keyboard (2)]
↳ Virtual core XTEST keyboard    id=5    [slave  keyboard (3)]
↳ Power Button                   id=6    [slave  keyboard (3)]
↳ Video Bus                      id=7    [slave  keyboard (3)]
↳ Power Button                   id=8    [slave  keyboard (3)]
↳ Integrated Camera              id=9    [slave  keyboard (3)]
↳ AT Translated Set 2 keyboard   id=10    [slave  keyboard (3)]
↳ ThinkPad Extra Buttons         id=13    [slave  keyboard (3)]

The com­mand xinput list-props will give you ad­di­tional in­for­ma­tion on each in­put de­vice listed above. You can then con­fig­ure any set­tings us­ing xinput set-prop. For ex­am­ple, if you want to en­able scrolling by us­ing the edges of the touch­pad and en­able palm de­tec­tion, you can use the fol­low­ing commands:

$ xinput set-int-prop "SynPS/2 Synaptics TouchPad" 'Synaptics Edge Scrolling' 8 1 1 0
$ xinput set-int-prop "SynPS/2 Synaptics TouchPad" 'Synaptics Palm Detection' 8 1

If you want to dis­able the touch­pad and only use the track­point, use the fol­low­ing command:

$ xinput set-int-prop "SynPS/2 Synaptics TouchPad" 'Synaptics Off' 8 1

Each prop­erty has a type and a size. There is no place for guess­ing since ev­ery prop­erty is listed in man 4 synaptics. The same ap­plies for the track­point but the cor­rect man­ual page is man 4 evdev. For ex­am­ple, if you want to en­able scrolling us­ing the mid­dle but­ton, use:

$ xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation" 8 1
$ xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Button" 8 2

All these com­mands can be tossed in ~/.​xsession.

Keyboard hot keys#

Think­Pad lap­tops usu­ally have a lot of hot keys. This is not the case of the Think­Pad Edge which only fea­tures a few of them:

  • vol­ume control
  • bright­ness control
  • we­b­cam and ex­ter­nal screen toggle
  • wire­less toggle
  • mul­ti­media keys

All these keys trig­ger an event in one of the key­board listed in xinput list. There­fore, your win­dow man­ager or any other ap­pli­ca­tion can in­ter­cept them and act upon. You can use evtest to check which key trig­gers which event on which keyboard.

The acpid dae­mon lis­ten on these key­boards and can also trig­ger some ac­tions. For ex­am­ple, it will run ibm-wireless.sh when you hit the wire­less tog­gle. By de­fault, this will en­able or dis­able your wire­less card. But you can con­fig­ure the script to use a mul­ti­state tog­gle and dis­able or en­able the blue­tooth card as well.

Sound card#

As for the net­work card, the sound card works out of the box.

I use Pulse­Audio be­cause it al­lows per-ap­pli­ca­tion vol­ume con­trol and per-ap­pli­ca­tion sound card se­lec­tion. It comes in handy if you have a blue­tooth head­set. To make Pulse­Audio the de­fault ap­pli­ca­tion for most ap­pli­ca­tions, I put this in my ~/.​asoundrc:

pcm.!default {
  type pulse
}

ctl.!default {
  type pulse
}

Wireless card#

A firmware is needed to make this card work. On De­bian, you need to in­stall firmware-iwlwifi pack­age. Then, iwlagn mod­ule needs to be loaded. You can check with rfkill list that the wire­less card has not been dis­abled. iw list will then give the status:

Wiphy phy0
Band 1:
    Capabilities: 0x872
        HT20/HT40
        Static SM Power Save
        RX Greenfield
        RX HT20 SGI
        RX HT40 SGI
        No RX STBC
        Max AMSDU length: 3839 bytes
        No DSSS/CCK HT40
    Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
    Minimum RX AMPDU time spacing: 4 usec (0x05)
    HT RX MCS rate indexes supported: 0-15, 32
    TX unequal modulation not supported
    HT TX Max spatial streams: 1
    HT TX MCS rate indexes supported may differ
    Frequencies:
        * 2412 MHz [1] (14.0 dBm)
        * 2417 MHz [2] (14.0 dBm)
        * 2422 MHz [3] (14.0 dBm)
        * 2427 MHz [4] (14.0 dBm)
        * 2432 MHz [5] (14.0 dBm)
        * 2437 MHz [6] (14.0 dBm)
        * 2442 MHz [7] (14.0 dBm)
        * 2447 MHz [8] (14.0 dBm)
        * 2452 MHz [9] (14.0 dBm)
        * 2457 MHz [10] (14.0 dBm)
        * 2462 MHz [11] (14.0 dBm)
        * 2467 MHz [12] (14.0 dBm) (passive scanning, no IBSS)
        * 2472 MHz [13] (14.0 dBm) (passive scanning, no IBSS)
    Bitrates (non-HT):
        * 1.0 Mbps
        * 2.0 Mbps (short preamble supported)
        * 5.5 Mbps (short preamble supported)
        * 11.0 Mbps (short preamble supported)
        * 6.0 Mbps
        * 9.0 Mbps
        * 12.0 Mbps
        * 18.0 Mbps
        * 24.0 Mbps
        * 36.0 Mbps
        * 48.0 Mbps
        * 54.0 Mbps
max # scan SSIDs: 20
Supported interface modes:
     * IBSS
     * managed
     * monitor

I do not know why, but 802.11a chan­nels have been dis­abled. I do not have any in­ter­est in them and there­fore I did not in­ves­ti­gate why this happens.

iwlagn 0000:03:00.0: Detected Intel(R) Centrino(R) Wireless-N 1000 BGN, REV=0x6C
iwlagn 0000:03:00.0: device EEPROM VER=0x15d, CALIB=0x6
iwlagn 0000:03:00.0: Device SKU: 0X9
iwlagn 0000:03:00.0: Valid Tx ant: 0X1, Valid Rx ant: 0X3
iwlagn 0000:03:00.0: Tunable channels: 13 802.11bg, 0 802.11a channels
iwlagn 0000:03:00.0: irq 44 for MSI/MSI-X
iwlagn 0000:03:00.0: loaded firmware version 128.50.3.1 build 13488

Wire­less is one of the things that make me use graph­i­cal ap­pli­ca­tions like Net­work Man­ager. Com­mand line tools are too low level to quickly con­nect to some ran­dom wire­less network.

There was a large de­bate on debian-devel@ldo to de­ter­mine if Net­work Man­ager was ready to re­place ifup and ifdown com­mands, even for servers. It seems that this is not some­thing im­pos­si­ble and there­fore, I think it has be­come flex­i­ble enough to han­dle most of the con­fig­u­ra­tion tasks I need.

Bluetooth#

The blue­tooth chipset is hosted on the USB bus. hci_​usb mod­ule will take care of it. It sup­ports A2DP and can be used to lis­ten to mu­sic with a com­pat­i­ble head­set. hciconfig will tell us if the chipset is working.

Again, blue­tooth is eas­ier to con­fig­ure with a graph­i­cal tool. BlueZ, the blue­tooth stack in Linux, uses DBus to com­mu­ni­cate with other ap­pli­ca­tions. The com­mand line tools have been dep­re­cated and there­fore, you need to fight with some DBus bind­ing to pair your com­puter to your headset.

gnome-bluetooth pack­age comes with an ap­plet which al­lows you to quickly pair to any de­vice. If you in­stall pulseaudio-module-bluetooth pack­age, any blue­tooth head­set should work out of the box.

Broadband (WWAN)#

To con­fig­ure the broad­band mo­dem, the most dif­fi­cult thing to do is to grab the ap­pro­pri­ate firmware. ThinkWiki comes with var­i­ous in­struc­tions to get it. I did not keep my Win­dows in­stal­la­tion and there­fore, I grabbed the Qual­comm Gobi 2000 Wire­less WAN driver and I un­packed it with some Win­dows host with msiexec as in­structed (I did have to ex­e­cute the in­stal­la­tion pro­gram first, oth­er­wise, msiexec tells that the file is in­valid). I chose the de­fault firmware since my lap­top is un­locked. ThinkWiki page ex­plains which firmware to choose in which situation.

The pack­age gobi-loader needs to be in­stalled. The firmware files amss.​mbn, apps.​mbn and UQCN.​mbn should be placed in /lib/​firmware/​gobi. They will be loaded by udev. To avoid re­boot­ing, I used this command:

# /lib/udev/gobi_loader -2000 /dev/ttyUSB0 /lib/firmware/gobi

To con­fig­ure the 3G con­nec­tion, I just used Net­work Man­ager. En­sure with rfkill list that your WWAN card is not blocked. I did not test the GPS part, which needs to be en­abled on Windows.

Webcam#

Nowa­days, USB we­b­cams are UVC de­vices and there is a driver to sup­port this class of de­vices. Check that the uvcvideo mod­ule is cor­rectly loaded and you should have some­thing like this in your dmesg:

uvcvideo: Found UVC 1.00 device Integrated Camera (5986:01a7)

cheese is a small ap­pli­ca­tion that can be used to check if the we­b­cam op­er­ates as expected.

Card reader#

Noth­ing to do. This works out of the box.

Suspend to memory and disk#

In­stall the uswsusp pack­age which will also pull pm-utils. You will get pm-suspend and pm-hibernate commands.

pm-suspend will en­able sus­pend to mem­ory. On re­sume, the sys­tem takes a whole minute to be­come op­er­a­tional. I get the fol­low­ing message:

r8169 0000:09:00.0: eth0: unable to apply firmware patch
PM: resume of devices complete after 60786.035 msecs
PM: Finishing wakeup.

In­stalling firmware-realtek pack­age solves this is­sue. It should also be solved by a fu­ture ker­nel. I also have this mes­sage when I come back from sleep:

[drm:i915_hangcheck_ring_idle] *ERROR* Hangcheck timer elapsed... render ring idle [waiting on 9297, at 9297], missed IRQ?

The X server is then slow as hell. The mes­sage can be fixed by us­ing i915.​semaphores=1 as a ker­nel pa­ram­e­ter but the X server is still slow. It seems that run­ning powertop re­stores the orig­i­nal speed. This is a known problem.

On sleep, the bat­tery loses 2% ev­ery 6 hours. This al­lows you to keep your lap­top on sleep for sev­eral days if needed.

pm-hibernate en­ables sus­pend to disk. The sus­pend part works well but on re­sume, the ker­nel freezes af­ter read­ing back the im­age into mem­ory. There are some doc­u­men­ta­tion to de­bug this prob­lem but I pre­fer to wait for 2.6.39 which may just solve this issue.

Power management#

Let’s see how we could en­hance bat­tery life. First, cpufrequtils pack­age will slow down the pro­ces­sor when it is not used by us­ing the ondemand gov­er­nor. The fre­quency will drop from 1.33 GHz to 666 MHz.

Sev­eral tools are then available:

  • pm-utils pack­age comes with scripts to en­able some pow­er­sav­ing fea­tures. These scripts are run on ACPI events (for ex­am­ple, when you un­plug the AC adapter). There is no way to put the lap­top to sleep af­ter two hours of in­ac­tiv­ity for ex­am­ple. You need some­thing like sleepd to han­dle this part. I have found noth­ing that could dim the screen on in­activity.
  • laptop-mode-tools is also a set of script to be run on ACPI events. It is there­fore some­what su­per­seded by pm-utils.
  • gnome-power-manager is a dae­mon that makes use of upowerd. De­spite its name, you can run it out­side of the GNOME en­vi­ron­ment. It will put your lap­top to sleep on in­ac­tiv­ity and will dim the screen when needed. All other func­tion­al­i­ties are han­dled to upowerd. This seems the way to go on to­day’s Linux desktops.

Up­date (2011-06)

Check my ar­ti­cle about GNOME Power Man­ager with­out a GNOME desk­top to know all the cons about run­ning GNOME Power Man­ager with­out run­ning a full-blown GNOME desktop.

Be­hind the scenes, upowerd will call at some point pm-powersave from pm-utils. This al­lows you to run scripts when un­plug­ging the AC adapter. There are some scripts shipped in /usr/​lib/​pm-utils/​power.d. You can add your own in /etc/​pm/​power.d. Some scripts are con­fig­urable. For ex­am­ple, if you cre­ate /etc/​pm/​config.​d/local and put SATA_​ALPM_​ENABLE=​true in it, this will en­able SATA ALPM mode on battery.

You can check what needs to be done with powertop or go to a web­site like Less Watts to get some tips on what to con­fig­ure to get a bet­ter bat­tery life.

With­out adding any script, I get 5 hours of bat­tery life with the lap­top do­ing al­most noth­ing. Lenovo tells that you should get 6 hours of bat­tery life. I think that on mod­er­ate work­loads, you should get 4 hours.

Conclusion#

This Lenovo Edge has a good value for money. It fea­tures a great key­board for a lap­top of its size. It could be lighter and thin­ner. Its bat­tery life is pretty good.

Al­most ev­ery­thing works out of the box with GNU/Linux. I hope that 2.6.39 ker­nel will solve the re­main­ing is­sues like the sus­pend on disk issue.