The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.
← Previous pageNext page →

    Linux on the X220

    Discussion in 'Lenovo' started by ksvjdsvagff, May 3, 2011.

  1. crunchytheory

    crunchytheory Notebook Enthusiast

    Reputations:
    0
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    5
    I'm really interested in trying out Debian (and subsequently blew away by perfectly working Ubuntu Natty install), so I put some more effort into this. Netinstall wouldn't work since the WiFi and Ethernet drivers had issues. From reading on the net, this is where most people were giving up. I was able to get 6.0.2 Squeeze (stable) installed from a full-CD iso that allows me to bypass network configuration. In my case, it seemed that the WiFi device was detected, but there's some bug where the intel driver package is missing a file. Proceed to complete the installation (delay network configuration till later). Login to Debian and if you have an Intel wireless device (I have the Intel Corporation Centrino Advanced-N + WiMAX 6250), follow this guy's advice: little things: Run WiFi on lenovo X201 in Ubuntu 10.04

    At least once you have WiFi working, you can start getting somewhere but Ethernet still doesn't work for me.

    Now I'm working on getting the display configured correctly as it can't detect the internal monitor. I'm pretty motivated to fix this as being stuck in 1024x768 really sucks. Any help would be appreciated :)
     
  2. vinuneuro

    vinuneuro Notebook Virtuoso

    Reputations:
    486
    Messages:
    2,232
    Likes Received:
    25
    Trophy Points:
    66
    How much of a battery life hit is it when you switch to Linux? I think I'm done with Windows. It's either this or switch to Mac next year.
     
  3. driekus

    driekus Notebook Consultant

    Reputations:
    100
    Messages:
    151
    Likes Received:
    0
    Trophy Points:
    30
    Id say roughly 20% dip in battery life.
    I played around with the X220T with Debian, Linux Mint 10 KDE and Linux Mint Debian. In all cases wifi didn't work and their were other minor glitches. Linux Mint 11 works brilliantly. I upgraded to the 3.0 kernel and it results in a very stable OS.
     
  4. vinuneuro

    vinuneuro Notebook Virtuoso

    Reputations:
    486
    Messages:
    2,232
    Likes Received:
    25
    Trophy Points:
    66
    Thanks for the feedback. After quick forum browsing it seems like Mint and Ubuntu (with Unity?) are probably the easiest to use for a Linux layman.

    The Ubuntu site says many Thinkpad's are Linux certified by Lenovo and the X220 was available with a pre-installed image of Ubuntu, Redhat and Novell. Anyone ever come across such configurations?
     
  5. GomJabbar

    GomJabbar Notebook Consultant

    Reputations:
    208
    Messages:
    290
    Likes Received:
    4
    Trophy Points:
    31
    I've had very good results using Mageia 1 KDE on my X220. Fedora 15 Gnome has given me mixed results on the same laptop. Having 3G mobile broadband disconnect problems in Fedora.
     
  6. Kaso

    Kaso Notebook Virtuoso

    Reputations:
    744
    Messages:
    3,546
    Likes Received:
    33
    Trophy Points:
    116
    Hmm, never come across that. In any event, ThinkPads have been known to be Linux-friendly.

    I would order a ThinkPad without OS, then install Ubuntu distro on it myself. The idea of a distro is to make it simple for anyone to install Linux without getting involved in the nitty-gritty details of compiling, etc. (I'm way too old to get any satisfaction from issuing cryptic commands and watching compiles go by on the screen!)

    Ubuntu is one of the easier distros to work with. But don't quote me on this, as Linux users are rather "emotional" about their preferences (not unlike many ThinkPad owners). :)
     
  7. GomJabbar

    GomJabbar Notebook Consultant

    Reputations:
    208
    Messages:
    290
    Likes Received:
    4
    Trophy Points:
    31
    Lenovo Support - Linux for Personal Systems

    Lenovo Support - Linux Certification - What does it mean?

    EDIT: Here's one...
    http://www.emperorlinux.com/mfgr/lenovo/raven/?tab=details&id=658
     
    Last edited by a moderator: May 8, 2015
  8. dibbs

    dibbs Notebook Geek

    Reputations:
    39
    Messages:
    76
    Likes Received:
    0
    Trophy Points:
    15
    I'm new to linux and I played around with some distros on my new x220. Yeah, Ubuntu and Mint (11.x) worked the best out of the box. I had both installed for a few days each, along with testing other distros like openSUSE KDE and Fedora. My vote would be for Mint 11 for a new user. Ubuntu's Unity interface I had mixed feelings about and was clunky feeling and practically unusable before I upped my RAM (opening dash was very laggy among other things). This was on 32bit ubuntu as well. I had to install pulse audio to get sound over DP/HDMI, where in mint I didn't have to. Pretty sure I had to install gpoint... to get the middle mouse wheel working but there are terminal commands but I'm new so I'm taking it easy with the term for now.

    The main problem I found, and was unable to fix, was that video playback wasn't perfect for anything I tried. Meaning that I would experience screen tearing horizontally on the x220's screen and also output to my HDTV. This was a deal breaker for me because I watch a lot of films and such. If anyone knows a fix please let me know (I have 6gb of RAM so it's not that). Sadly this is the main factor that made me re-install windows - along with the battery life gains of course.

    If anyone knows a fix for the video issues please let me know so I can give it another go. I really enjoyed playing around with linux though and if it weren't for that and a few other minor annoyances that could probably be fixed if I knew what I was doing I wouldn't have reinstalled windows.
     
  9. ALLurGroceries

    ALLurGroceries  Vegan Vermin Super Moderator

    Reputations:
    15,730
    Messages:
    7,146
    Likes Received:
    2,343
    Trophy Points:
    331
    Debian removed the closed firmware from their installer as of the Squeeze release. In order to have intel wifi during installation you need to put the firmware-iwlwifi package onto a usb stick: Debian -- Package Search Results -- firmware-iwlwifi

    Firmware - Debian Wiki

    You may want to try a newer kernel (say from testing or unstable) that has sandy bridge support, 2.6.37 or later. There are a number of xorg packages that may need to be pulled form testing or unstable too for full 3D support.
     
  10. allanw

    allanw Notebook Enthusiast

    Reputations:
    0
    Messages:
    39
    Likes Received:
    0
    Trophy Points:
    15
    Has anyone gotten Sandy Bridge graphics drivers to work on RHEL 6/CentOS/Scientific Linux? RHEL 6.1's release notes specifically state that they added support for Sandy Bridge graphics, but it's not working in Scientific Linux's 6.1 rolling release. Tested with elrepo's updated xorg-x11-drv-intel and libdrm.

    xorg.conf: Section "ServerLayout" Identifier "X.org Configured" Screen 0 "Scr - Pastebin.com

    Full log: X.Org X Server 1.7.7 Release Date: 2010-05-04 X Protocol Version 11, Revisio - Pastebin.com
     
  11. GomJabbar

    GomJabbar Notebook Consultant

    Reputations:
    208
    Messages:
    290
    Likes Received:
    4
    Trophy Points:
    31
    I got it to work by more or less following the instructions on the following page (I am using Fedora 15 Gnome).
    How to install Intel Graphics drivers for SandyBridge iGPU | LinuxScriber.com

    I installed the following 3 packages from Fedora's repositories (not sure which ones).
    libva-freeworld-1.0.13-2.fc15
    libva-devel-1.0.13-2.fc15
    libva-utils-1.0.13-2.fc15

    I booted up Fedora by appending the number 3 to the kernel boot line of grub. Logged in as root, then ran Xorg -configure. After that I copied xorg.conf.new to /etc/X11/xorg.conf and rebooted.

    Code:
    $ glxinfo
    name of display: :0.0
    display: :0  screen: 0
    direct rendering: Yes
    server glx vendor string: SGI
    server glx version string: 1.4
    Code:
    $ lsmod | grep video
    uvcvideo               54609  0 
    videodev               63342  1 uvcvideo
    v4l2_compat_ioctl32     6697  1 videodev
    i2c_core               25468  6 videodev,i2c_i801,i915,drm_kms_helper,drm,i2c_algo_bit
    video                  12432  1 i915
    I installed compiz and got it working by logging into gnome classic. Won't work with Gnome 3's gnome shell.

    EDIT: Also had success in Mageia 1 KDE. Installed libva, libva-devel, vainfo, and vaapi-driver-i965 (includes the /usr/lib64/dri/i965_drv_video.so file -Fedora had this file in libva).
     
  12. bennyscuba

    bennyscuba Notebook Enthusiast

    Reputations:
    0
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    5
    So I've just read through all 17 pages (as well as other forums). I know these forums tend to emphasize the problems, so I'm curious if there is consensus on the stability of the x220 with Ubuntu. I was planning to get the i7 probably 9-cell battery (due to power issues). This is primarily a work laptop so has to be stable and I will install windows as a VM - for the few times I need it.

    To this point I've mainly used dells (desk & laptops) with no problems but since work is paying for this figure i'd treat myself ;)

    I'd love to go with zareason or system76 but the specs just don't match up. If this does get the ok are there typical problems to be aware aside from the fan issue?

    EDIT: I also meant to ask - has anyone used the SSD with the x220 and linux? I know the Samsung series 9 has had some issues and was curious if that is a concern here...

    thanks,

    bg
     
  13. crunchytheory

    crunchytheory Notebook Enthusiast

    Reputations:
    0
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    5
    Thanks for the tip!

    As an update, I tried a fresh install of Debian Testing (Wheezy) and there was a lot more support right out of the box, WiFi/Ethernet/Sandy Bridge Graphics most importantly. The only thing I've noticed that doesn't work from the get-go is the fingerprint reader.
     
  14. UNIXgod

    UNIXgod Notebook Enthusiast

    Reputations:
    0
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    5
    I popped a intel ssd I had on my desktop in my x220. Works great. needed to get screws for it to remove spacer and get it to fit.

    I wrote a low level guide to ssd and linux awhile back which is still relevant. Feel free to read it:
    UNIXgod's Official UNIX/Linux SSD Guide - EXTREME Overclocking Forums
     
  15. driekus

    driekus Notebook Consultant

    Reputations:
    100
    Messages:
    151
    Likes Received:
    0
    Trophy Points:
    30

    No problems with SSD here either, I have Mint installed on the SSD without issue.
     
  16. vinuneuro

    vinuneuro Notebook Virtuoso

    Reputations:
    486
    Messages:
    2,232
    Likes Received:
    25
    Trophy Points:
    66
    I had the same screen tearing problem. Found an app DriConf that ensures vsync in the OS regardless of what you're playing, movies through VLC, Flash like Hulu, etc.
     
  17. mil2

    mil2 Notebook Consultant

    Reputations:
    382
    Messages:
    175
    Likes Received:
    9
    Trophy Points:
    31
    I'm surprised by people seeing tearing with VLC. Players such as VLC or mplayer use hardware acceleration for output scaling (the XVideo extension) which in my experience is perfectly tear-free.

    Flash is another matter. It doesn't use XVideo, though I believe it can use OpenGL for scaling. Are you saying you managed to get it tear-free by forcing DRI synchronization to vsync? I need to give it a try...
     
  18. mil2

    mil2 Notebook Consultant

    Reputations:
    382
    Messages:
    175
    Likes Received:
    9
    Trophy Points:
    31
    How many of you are running the 3.0 kernel? I'm having a major power consumption issue with it on a new x220 I just got from work (i7, 8GB RAM, Intel 320 SSD).

    With the 2.6.39 kernel, idle power draw reported by powertop goes down as low as 7.6W at brightness 9 with Wifi on. With 3.0, compiled using basically the same kernel configuration, it idles at 12.5W, or over 50% more!!!

    If anybody gets a decent idle power draw with the 3.0 kernel, could you post your kernel config file or PM it to me directly? I tried the config file from Installing Gentoo on a ThinkPad X220 - ThinkWiki, but it was just as bad. Same with the 2.6.38-based config file I copied from Fedora 15. It looks to me like it's not a config file issue.

    And the worst is that I can't easily go back to the 2.6.39 kernel. I partitioned the SSD using GPT partitioning scheme to ensure a good alignment. It turns out that on Thinkpads, you can't boot Linux from a GPT-partitioned system using BIOS. You have to use UEFI, which in turn only works on x220 with the 3.0 kernel. So to boot 2.6.39, I need to put the kernel image on a USB stick and boot from there. Very annoying.

    This issue is somehow x220-specific. I see no increase in power usage with the 3.0 kernel on my x201.

    And no, it has nothing to do with the so-called "major power issue" reported by Phoronix. People are really blowing it out of proportion. I checked Phoronix findings on three different Thinkpads (t61, x201, x220) and while all of them do indeed report PCIe ASPM as unavailable, forcing it on leads to no measurable differences in power draw.
     
  19. anarti

    anarti Notebook Geek

    Reputations:
    13
    Messages:
    87
    Likes Received:
    0
    Trophy Points:
    15
    hmm, I thought that 2.6.38, 2.6.39 had some problems with power consumption. I was certainly getting more battery on ubuntu 10.10 with 2.6.35 kernel than now with 2.6.38.

    Kernel 3.0 wouldn't even boot on my thinkpads from some reason so I haven't tried that one yet properly.

    I have aligned partition on ssd using disc command utility (can't remember name) and gparted and it works well along with trim.
     
  20. mil2

    mil2 Notebook Consultant

    Reputations:
    382
    Messages:
    175
    Likes Received:
    9
    Trophy Points:
    31
    I'm pretty sure that 2.6.35 won't work with Sandy Bridge laptops such as x220. One needs at least 2.6.37.

    Well, it boots and works just fine on my x201 at home. It's only on the x220 at work that I have the idle power draw problem. So I'm specifically interested in the experiences of others with 3.0 on x220.

    BTW, another problem I noticed is with the MTRR registers. Kernel reports during boot:

    Code:
    mtrr: no more MTRRs available
    [drm] MTRR allocation failed.  Graphics performance may suffer
    This does not happen if you only have 2GB of RAM, but it does happen with 8GB (two DIMMs) or 4GB (one DIMM). This problem seems to be universal on x220 across kernels: I'm seeing it with 2.6.39, 3.0, and also Fedora's 2.6.38-based kernel from the LiveUSB.

    I wonder how much of a difference it makes. I remember back from the old days when people first started caring about MTRR that the performance difference on X benchmarks was pretty significant.
     
  21. GomJabbar

    GomJabbar Notebook Consultant

    Reputations:
    208
    Messages:
    290
    Likes Received:
    4
    Trophy Points:
    31
    From doing some Google searches, it appears that the intel driver does not use video overlay, but instead textured video. I can't seem to choose video overlay with the 'intel' driver, but I think that is as designed. Could be wrong though.

    I discovered that (an identical) video is tearing in VLC in Mageia 1, but not in Fedora 15. I installed the Intel i965 drivers in both and even tried Fedora's xorg.conf in Mageia. Looking at the driver, /usr/lib64/dri/i965_drv_video.so in both, it appears the Fedora is using a newer version. Note that direct rendering is enabled in both as reported by glxinfo.

    DRI doesn't seem to work as advertised for me. I set XV_SYNC_TO_VBLANK to 0 using xvattr. I check it with xvinfo.

    Code:
    $ xvattr -a XV_SYNC_TO_VBLANK -v 0
     
  22. mil2

    mil2 Notebook Consultant

    Reputations:
    382
    Messages:
    175
    Likes Received:
    9
    Trophy Points:
    31
    A small update on the excessive idle power draw I observed with the 3.0 kernel. I narrowed the offending commit down to some time between 3.0-rc7 and the final 3.0 kernel, because 3.0-rc7 works fine (and can be booted on x220 from UEFI, so I no longer need to use the USB key :)). I also tested the nightly snapshot from today and the bug has not been fixed. I'll try to identify the commit responsible over the weekend and report the bug to the kernel maintainers.
     
  23. mil2

    mil2 Notebook Consultant

    Reputations:
    382
    Messages:
    175
    Likes Received:
    9
    Trophy Points:
    31
    You are absolutely correct. There is no overlay support in Sandy Bridge, or in the last year's Arrandale for that matter. It's textured video only -- and that's what I meant by "hardware accelerated", since textures are accelerated by the 3D engine in the GPU.

    I could be wrong on this, but I don't think that XVideo depends on DRI, at least not on the userspace OpenGL part of it.

    Well, setting it to 0 disables it. You should keep it at the default 1.

    I checked a video in mplayer and vlc on my x220 and compared to my x201, indeed I do seem to experience slight tearing. Weird. Yeah, looks like the problem has already been reported to the developers: https://bugs.freedesktop.org/show_bug.cgi?id=37686. Not much activity there though, mostly noise. "mplayer -vo gl2" seems to help with the tearing, though it also crashed my Xserver, so beware ;).
     
  24. GomJabbar

    GomJabbar Notebook Consultant

    Reputations:
    208
    Messages:
    290
    Likes Received:
    4
    Trophy Points:
    31
    The forum posts I was reading were saying to set this value to zero to sync vertical and horizontal. Looking some more, it seems that you are correct. At any rate I never saw much if any change regardless of what it was set at.

    [Intel-gfx] [PATCH 2/2] Remove support for 'auto'(-1) value of XV_SYNC_TO_VBLANK

    Using the Intel driver in Fedora 15 seemed to fix the problem for me. Mageia 1 has an older Intel driver as far as I can tell. The Fedora driver /usr/lib64/dri/i965_drv_video.so is 616.8 KB dated June 11, 2011. The Mageia driver /usr/lib64/dri/i965_drv_video.so is 562.5 KB and dated April 17, 2011.
     
  25. mil2

    mil2 Notebook Consultant

    Reputations:
    382
    Messages:
    175
    Likes Received:
    9
    Trophy Points:
    31
    The driver you're referring to is the DRI driver that is part of Mesa (the OpenGL infrastructure). Are you aware that that's not the "main" Intel driver? That would be /usr/lib64/xorg/modules/drivers/intel_drv.so.
     
  26. vinuneuro

    vinuneuro Notebook Virtuoso

    Reputations:
    486
    Messages:
    2,232
    Likes Received:
    25
    Trophy Points:
    66
    Which distros give the best battery life? Ubuntu is appaling. 11-12W where Win7 would use less than 7W at the same brightness. At this point power consumption is the only thing holding me back from Linux.

    Ubuntu is the only one I've fully installed so far. It seems buggier than the others. Rather laggy in unity, and I've managed to crash it even in Gnome doing things like using the software manager. I'm also not a fan of the double-panels. So far OpenSuse's UI seems the cleanest to use, but Ubuntu and Mint's software managers seem far better (but this may not matter much once the OS is setup).
     
  27. GomJabbar

    GomJabbar Notebook Consultant

    Reputations:
    208
    Messages:
    290
    Likes Received:
    4
    Trophy Points:
    31
    I wasn't really aware of that, but regardless, hardware acceleration is provided by the DRI driver I referenced. That's what's needed for good video playback.

    VAAPI hardware decoding

    freedesktop.org - Software/vaapi
     
  28. mil2

    mil2 Notebook Consultant

    Reputations:
    382
    Messages:
    175
    Likes Received:
    9
    Trophy Points:
    31
    Sorry, but no. The DRI driver you referenced has nothing to do with Xvideo playback.

    I actually just performed a very simple experiment. I removed the DRI driver file from my system and restarted. Obviously, the desktop complained about missing acceleration for 3D effects, but mplayer worked exactly as before.

    Sure, VAAPI is useful for video playback as it can perform the decoding in hardware, but again, it has nothing to do with the rendering to the screen itself.
     
  29. mil2

    mil2 Notebook Consultant

    Reputations:
    382
    Messages:
    175
    Likes Received:
    9
    Trophy Points:
    31
    My system idles at around 7.5W at brightness 9 with wifi on, but 11W is more likely if I actually try to do something useful. I'm running Gentoo -- not a distribution I would recommend to a casual user. I've booted Fedora 15 from a Live USB once or twice and saw pretty much the same power consumption.

    I doubt if there's a Linux distro that does any significantly better. In my experience, optimized power consumption simply isn't that high of a priority for Linux developers.
     
  30. GomJabbar

    GomJabbar Notebook Consultant

    Reputations:
    208
    Messages:
    290
    Likes Received:
    4
    Trophy Points:
    31
    I was not talking about Xvideo playback per se. I was talking about video playback performance of a H264 MPEG-4 video.

    All I know is that Mageia and Fedora were both using kernel 2.6.38. Both were using xorx-x11-drv-intel 2.15.0. Mageia was using Libva1 1.0.12 with vaapi-driver-i965, while Fedora was using Libva 1.0.13 which includes the vaapi i965 driver. Mageia was using Mesa 7.10.2 and Fedora Mesa 7.11.0. I have VLC version 1.1.11 in Mageia and VLC version 1.1.10 in Fedora. The identical file copied from Fedora to Mageia exhibits tearing in Mageia, but not in Fedora. All things considered, it appears to me that the hardware video acceleration provided by (newer version of) Libva (VAAPI) is the deciding factor.

    Just before I read this post, I upgraded the kernel in Fedora to 2.6.40 (3.0). Interestingly I moved the file /usr/lib64/dri/i965_drv_video.so to my Downloads directory and rebooted. Compiz appears to be working just as well before. I did not notice any error messages reported to the screen.

     
  31. mil2

    mil2 Notebook Consultant

    Reputations:
    382
    Messages:
    175
    Likes Received:
    9
    Trophy Points:
    31
    Thanks for explaining in detail what you meant, I understand now where you're coming from. Here's the problem though: the same version number across two different distributions does not indicate the same functionality. Distributors tend to apply custom patches to fix their favorite bugs. Red Hat in particular, and by extension Fedora, has a large body of developers that customize their packages. Fedora kernel typically has hundreds of patches on top of the mainline kernel version, so its behavior can be quite different to other distros running nominally the same kernel version.

    Also, a final update regarding my search for the source of the idle power consumption regression in the 3.0 kernel. I found a workaround that brings the power back down to under 8W: add i915.i915_enable_rc6=1 to the kernel command line in the bootloader. 1 used to be the default in the recent 2.6 kernels, but in the final 3.0 kernel the default was changed to 0. A quick Google search finds that the change is deliberate and that the developers were aware of its negative consequences to power usage. They changed the default anyway because some systems would apparently crash on boot otherwise. This is considered a temporary regression until the underlying cause of the crash on those systems is resolved through less drastic means. I just wish that this had been documented somewhere prominently so that I wouldn't have spent a week researching the issue.

    If you think you might be suffering from this power consumption problem, a quick:

    run as root should help to identify it. If you get a 1, you should be fine.
     
  32. GomJabbar

    GomJabbar Notebook Consultant

    Reputations:
    208
    Messages:
    290
    Likes Received:
    4
    Trophy Points:
    31
    Last edited by a moderator: May 8, 2015
  33. john46

    john46 Notebook Guru

    Reputations:
    18
    Messages:
    55
    Likes Received:
    0
    Trophy Points:
    15
    In a default ubuntu 11.04 install (not using unity, using gnome classic and mutter instead - mutter is like compiz) powertop reports while on idle with nothing open, about 13-14W :(
    If using metacity instead of mutter (so no 3d), then it drops to 12-13. Still pretty bad. And that's with the screen dimmed to about half and wifi/bluetooth off.

    Don't know how to drop it more.

    Btw is there a way to monitor consumption in linux other than powertop? (because powertop gives acpi estimates, but I think the battery itself reports its real consumption somehow)

    Oh, its a T420s

    The funny thing is that wakeups are low - I can make them be 10 while on idle when I close everything in powertop, so I guess the consumption is not caused by the cpu or something waking up the cpu.
     
  34. mil2

    mil2 Notebook Consultant

    Reputations:
    382
    Messages:
    175
    Likes Received:
    9
    Trophy Points:
    31
    The only thing that amazes me about this link is that the guy was getting two hours before 3.0 and didn't bother to fix it. Even the four hour he's getting now sound a little low for Acer 1810TZ, which IIRC is a CULV-based notebook.
     
    Last edited by a moderator: May 8, 2015
  35. mil2

    mil2 Notebook Consultant

    Reputations:
    382
    Messages:
    175
    Likes Received:
    9
    Trophy Points:
    31
    Have you read my post two messages above your post? What does

    Code:
    cat /sys/module/i915/parameters/i915_enable_rc6
    give you?

    As far as I know, ACPI estimates come from the battery itself, so there is no other way.

    T420s has an option of a discrete GPU, doesn't it? Do you have one? Is it powered on by any chance (you might want to try disabling it in the BIOS).

    Agreed. On my X220 an identical-looking problem was caused by i915_enable_rc6 being 0, which disables power management in the Sandy Bridge GPU, and was fixed by appending i915.i915_enable_rc6=1 to the kernel command line.
     
  36. john46

    john46 Notebook Guru

    Reputations:
    18
    Messages:
    55
    Likes Received:
    0
    Trophy Points:
    15
    Hey mil2

    Yes I read it. rc6 0 in my kernel, but i tried with 1, didn't see any difference (at least in powertop). I'll have to test a bit more.

    I have integrated gpu, not the discrete one, and i5 2520
     
  37. john46

    john46 Notebook Guru

    Reputations:
    18
    Messages:
    55
    Likes Received:
    0
    Trophy Points:
    15
    Ok I've done some more exhaustive tests.

    Configuration:

    - USB auto-suspend enabled (through powertop)
    - SATA link power management enabled (through powertop)
    - Runtime Device Power Management enabled (through powertop)
    - Wireless and bluetooth disabled
    - I use thinkfan for fan control and it disables the fan completely under 50 Celsius, so the fan was not running.
    - The disk is not running since there is no activity (parked)
    - The screen is dimmed to the level that gnome-screensaver dims it (not very usable under normal conditions, I'd say it's probably 3)

    With the above configuration, I managed to have powertop say that I'm 100% at C4 state and 100% at the lowest P-state (800Mhz) and wakeups under 8, so no cpu activity at all.

    The consumption under these conditions is 9.1W

    I repeated the tests many times, after reboots etc, and I did not notice any difference whatsover using i915_enable_rc6 ! I get the same readings no matter what that parameter is.

    Other interesting facts:
    -> The 320GB Hitachi 7200rpm disk if spinning raises the consumption about 0.8W. Time to get an SSD I guess.
    -> A 'workable' dim setting (maybe 6 or 7) adds about 0.7 - 0.8W also.
    -> I couldn't get an estimate of how much consumption the fan causes, but I guess it wouldn't be much for a 1000-2000RPM spin (maybe 0.3W)
     
  38. mil2

    mil2 Notebook Consultant

    Reputations:
    382
    Messages:
    175
    Likes Received:
    9
    Trophy Points:
    31
    This is a little higher than I would want it to be, but not much higher. Perhaps the larger screen on t420s makes the difference. FYI, I just booted my x220 off a Ubuntu 11.04 live USB key and it idled at 8.1W. By comparison, my Gentoo Linux build idled at about 7.2-7.5W (with wifi on).

    You are definitely not having the i915_enable_rc6 problem that I had. I couldn't bring power consumption under 12W when I had that problem. Also, you don't have any external devices plugged into your laptop while testing, do you? E.g., an external display can make as much as 2W of difference.

    I'm going to disappoint you: SSD doesn't really help all that much with power. I have Intel 320 in my x220 and I see the same 0.8W difference between standby and active/idle. Only in an SSD you can't really tell by listening, you need to run hdparm -C to query the drive state. Frankly, so far I've found the whole SSD experience rather underwhelming. Sure, the laptop boots faster, but how often does one boot?

    If you feel like experimenting with it a little more, I would suggest booting a few different distros off USB keys to see where they stand on power consumption. It sure helped me check if my own build was where it should be. I can tell you that on my x220 Fedora 15 seemed to have a slight (0.5W?) edge over Ubuntu 11.04.
     
  39. GomJabbar

    GomJabbar Notebook Consultant

    Reputations:
    208
    Messages:
    290
    Likes Received:
    4
    Trophy Points:
    31
    I am curious what you are using to get the wattage currently used.

    On a second note, I just read this about a regression in the 2.6.38 kernel regarding power consumption on laptops.

    [Phoronix] The Leading Cause Of The Recent Linux Kernel Power Problems

    EDIT: I figured out the wattage thing. Had to unplug the AC adapter for powertop to display wattage. Also found you can use the following command to get mA used:
    grep rate /proc/acpi/battery/BAT0/state
     
  40. mil2

    mil2 Notebook Consultant

    Reputations:
    382
    Messages:
    175
    Likes Received:
    9
    Trophy Points:
    31
    Yes, this was discussed earlier in this thread. In my experience, this particular issue is way overblown. I tested three different Thinkpads for that problem and *none* of them (x220 included) exhibited it (or, rather, they all disabled pcie_aspm by default, but forcefully reenabling it resulted in no further power savings).

    Exactly. The power supply must be unplugged. Actually, I have a question to other Thinkpad users about power usage. When you let powertop run long enough (I'd say about five minutes), it starts displaying a long-term average power draw in addition to the current draw. On my x220 these two are way from each other, i.e., current draw is in the 7.5-8W range, whereas the long-term average shows 15W! On older Thinkpads there was also a discrepancy between these estimates, but it was never by a factor of two!

    I'm guessing that the current draw is calculated in powertop as "present rate*present voltage", whereas the long-term average is from the sampling of "remaining capacity*present voltage" over a period of time (and should, thus, be more accurate).

    I wrote a script that calculates these values outside of powertop:

    Code:
    #!/bin/sh
    
    BAT=/sys/class/power_supply/BAT0
    INTERVAL=30
    
    time_start=`date +%s`
    if [ -f /sys/class/power_supply/BAT0/energy_now ]; then
            energy_start=$((`cat /sys/class/power_supply/BAT0/energy_now`/1000))
    else
            energy_start=$(((`cat /sys/class/power_supply/BAT0/charge_now`/1000)*(`cat /sys/class/power_supply/BAT0/voltage_now`/1000)/1000))
    fi
    
    time_last=$time_start
    energy_last=$energy_start
    
    echo "Power consumption:"
    
    while true; do
            sleep $INTERVAL
    
            if [ -f /sys/class/power_supply/BAT0/power_now ]; then
                    power_now=$((`cat /sys/class/power_supply/BAT0/power_now`/1000))
                    energy_now=$((`cat /sys/class/power_supply/BAT0/energy_now`/1000))
            else
                    voltage_now=$((`cat /sys/class/power_supply/BAT0/voltage_now`/1000))
                    current_now=$((`cat /sys/class/power_supply/BAT0/current_now`/1000))
                    power_now=$((voltage_now*current_now/1000))
                    energy_now=$(((`cat /sys/class/power_supply/BAT0/charge_now`/1000)*voltage_now/1000))
            fi
            time_now=`date +%s`
    
            power_last=$(((energy_last-energy_now)*3600/(time_now-time_last)))
            power_start=$(((energy_start-energy_now)*3600/(time_now-time_start)))
    
            echo $power_now $power_last $power_start | awk '{printf "Now: %.3f, since last: %.3f, since start: %.3f\n", $1/1000, $2/1000, $3/1000}'
    
            energy_last=$energy_now
            time_last=$time_now
    done
    You can run it as an ordinary user; it just reads some files from /sys. Every 30 seconds it displays current power consumption, average over the last 30 seconds (configurable via INTERVAL), and average since the script was started (it helps to let it run for a few minutes to get a good average). Are you seeing the same discrepancy as I am?
     
  41. GomJabbar

    GomJabbar Notebook Consultant

    Reputations:
    208
    Messages:
    290
    Likes Received:
    4
    Trophy Points:
    31
    I let it sit a bit and the laptop display powered off. Here are the results.

    Code:
    Power consumption:
    Now: 12.260, since last: 111.720, since start: 111.720
    Now: 13.056, since last: 30.840, since start: 71.280
    Now: 12.088, since last: 3.480, since start: 48.680
    Now: 11.023, since last: 18.960, since start: 41.250
    Now: 10.730, since last: 15.360, since start: 36.072
    Now: 10.421, since last: 9.960, since start: 31.720
    Now: 9.864, since last: 14.040, since start: 29.194
    Now: 9.884, since last: 15.360, since start: 27.465
    Now: 10.765, since last: 19.680, since start: 26.600
    Now: 10.736, since last: 18.000, since start: 25.740
    Now: 10.520, since last: 12.658, since start: 24.514
    Now: 9.955, since last: 10.920, since start: 23.385
    Now: 9.904, since last: 15.360, since start: 22.769
    Now: 9.899, since last: 15.120, since start: 22.224
    Now: 10.758, since last: 32.640, since start: 22.917
    Now: 10.739, since last: 3.600, since start: 21.712
    Now: 10.459, since last: 15.360, since start: 21.339
    Now: 10.122, since last: 13.560, since start: 20.907
    Now: 10.752, since last: 17.160, since start: 20.711
    Now: 10.666, since last: 22.320, since start: 20.791
    Now: 10.685, since last: 15.840, since start: 20.555
    Now: 10.591, since last: 13.200, since start: 20.222
    Now: 10.507, since last: 13.560, since start: 19.932
    Now: 9.327, since last: 7.320, since start: 19.408
    Now: 9.029, since last: 10.920, since start: 19.068
    Now: 8.518, since last: 8.040, since start: 18.645
    Now: 8.407, since last: 12.960, since start: 18.435
    Now: 8.371, since last: 10.080, since start: 18.136
    Now: 9.284, since last: 18.480, since start: 18.148
    Now: 9.213, since last: 10.920, since start: 17.908
    Now: 9.026, since last: 15.840, since start: 17.841
    Now: 8.978, since last: 10.920, since start: 17.625
    Now: 9.132, since last: 12.600, since start: 17.473
    Now: 9.017, since last: 16.722, since start: 17.450
    Now: 9.207, since last: 12.600, since start: 17.312
    Now: 8.992, since last: 9.960, since start: 17.108
    Now: 9.010, since last: 15.480, since start: 17.064
    Now: 9.112, since last: 15.480, since start: 17.022
    Now: 9.412, since last: 10.320, since start: 16.851
    Now: 9.220, since last: 12.600, since start: 16.745
    Now: 9.348, since last: 13.680, since start: 16.670
    Now: 9.036, since last: 13.200, since start: 16.587
    Now: 9.091, since last: 12.840, since start: 16.500
    Now: 9.087, since last: 14.880, since start: 16.464
    Now: 9.372, since last: 12.000, since start: 16.365
    Now: 8.962, since last: 14.760, since start: 16.330
    Now: 9.008, since last: 13.200, since start: 16.263
    Now: 9.054, since last: 11.040, since start: 16.155
    Now: 9.254, since last: 13.200, since start: 16.094
    Now: 9.141, since last: 15.360, since start: 16.080
    Now: 9.106, since last: 11.400, since start: 15.988
    Now: 8.973, since last: 11.040, since start: 15.893
    Now: 8.985, since last: 11.400, since start: 15.808
    Now: 8.991, since last: 15.960, since start: 15.811
    Now: 9.229, since last: 11.400, since start: 15.731
    Now: 9.306, since last: 14.748, since start: 15.713
    Now: 9.268, since last: 11.640, since start: 15.642
    Now: 9.030, since last: 12.480, since start: 15.587
    Now: 9.314, since last: 11.400, since start: 15.516
    Now: 9.237, since last: 15.840, since start: 15.522
    Now: 9.549, since last: 16.920, since start: 15.545
    Now: 9.053, since last: 8.760, since start: 15.435
    Now: 14.111, since last: 60.120, since start: 16.143
    Now: 13.162, since last: -2.760, since start: 15.848
    Now: 11.939, since last: 26.040, since start: 16.005
     
  42. mil2

    mil2 Notebook Consultant

    Reputations:
    382
    Messages:
    175
    Likes Received:
    9
    Trophy Points:
    31
    Thanks, this is pretty much what I'm seeing too. Not a very encouraging result, is it? It seems to me that the estimate of the current power consumption is simply bogus. I mean, what good is a prediction of six hours of battery life if in reality after one hour the battery reports 1/3 of the total charge gone? I'd be interested to know if the same happens under Windows, but I don't have Windows on my laptop (the drive with Windows is in the docking station at work).
     
  43. mil2

    mil2 Notebook Consultant

    Reputations:
    382
    Messages:
    175
    Likes Received:
    9
    Trophy Points:
    31
    I figured out the discrepancy in short-term vs long-term power estimates in powertop. GomJabbar, are you using a 4-cell battery? It shows more clearly with a 4-cell due to its higher design voltage, but it's present with all batteries to a greater or lesser extent.

    The problem is that the battery capacity is incorrectly reported by ACPI right after power up/reboot. The capacity is reported too high, as is the discharge rate, so long-term power estimates are too high. The capacity becomes correct after a suspend/resume while on battery. Here's a bug report I filed on this issue: https://bugzilla.kernel.org/show_bug.cgi?id=41062.

    Another issue I reported here a while back was failed MTRR allocation if you have 4 GB RAM or more. Adding the following options to the kernel command line works around the problem:

    Code:
    enable_mtrr_cleanup mtrr_gran_size=8M mtrr_chunk_size=128M
    A side effect is that 6 MB of RAM become inaccessible in the process, but that's hardly significant compared to the overall amount of memory in the system.
     
  44. gaglia

    gaglia Newbie

    Reputations:
    8
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    5
    Hi, I'm trying Qubes (a Xen+Fedora based linux distro) for a particular setup but I'm experiencing some difficulties. I'll try to include as many useful information as possible, in case someone could help.

    I've tried to install Qubes on the mSATA SSD of my new Thinkpad X220,
    along with Windows 7 (dual boot). Since there is no CD drive, I had to
    use the USB installer and at first everything went great: I managed to
    install Qubes on an encrypted LUKS partition, and a separate, cleartext
    /boot partition on a USB drive. In this way, turning on the pc normally
    boots windows without asking anything, while if I insert the USB stick
    prior to turning on, the Qubes bootloader starts instead.

    It worked at the first try I made, but I didn't set up swap nor a
    suitable /tmp partition, so when I accidentally closed the lid the
    system didn't recover from hybernation. I was happy nonetheless, it was
    just a test, so I decided to reinstall the system with more care and tuning.

    Since then, every time I try to boot Qubes from the USB stick to
    reinstall it, after I choose the first option on the bootloader screen,
    it hangs with the following error:

    ACPI Warning: Incorrect checksum in table [ ] - 5B, should be 9F (20100121/tbutils-314

    The recovery option doesn't work either. The normal boot from the USB
    stick hangs with a black screen. With "hangs" I mean that nothing,
    except for pressing the power key, has effect, including the magic
    REISUB key sequence.

    Windows is still working as nothing happened.

    I tried to install Ubuntu with a similar setup, and it worked.

    I tried to install Fedora with a similar setup, and it failed with a
    similar ACPI error.

    During all these tests BIOS has always been updated to the latest
    version (and this means that I'm unable to overwrite it, since the
    Lenovo utility claims that no upgrade is necessary).

    I've also posted the same issue at:
    http://forums.lenovo.com/t5/Linux-Discussion/BIOS-checksum-errors/td-...

    Any help would be greatly appreciated :(
     
  45. mil2

    mil2 Notebook Consultant

    Reputations:
    382
    Messages:
    175
    Likes Received:
    9
    Trophy Points:
    31
    I'm not sure how to read this. Have you updated the BIOS between your first (successful) experiments and your current problems or not? Out of curiousity, what BIOS version are you running?

    Well, if you suspect that BIOS might be your problem, you can try reflashing it. See recent posts on the X220 Owners Thread -- they mention a Windows utility that can be used to reflash an older version of the BIOS.

    Overall, your problem sounds very weird. The fact that Windows and Ubuntu work would suggest a problem with your distro of choice. Then again, Fedora doesn't boot for you either? I sure booted it just fine from a USB key on my system.
     
  46. kyriu

    kyriu Notebook Enthusiast

    Reputations:
    0
    Messages:
    47
    Likes Received:
    0
    Trophy Points:
    15
    how did you managed to install debian in the x220? through wifi? I'm using the 82579LM ethernet...
     
  47. gaglia

    gaglia Newbie

    Reputations:
    8
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    5
    I have flashed the BIOS prior of anything, also because otherwise my mSATA SSD was not recognized. Version is... 1.19 I think, I can't check right now, but I'm sure it's the last version you can download from Lenovo Support. I flashed it using the windows utility biosupdate.exe (and then I reinstalled windows onto the new disk).
    Yes, my suspect is that it could depend from the BIOS, so I'll check the utility you mentioned, thanks!
    Fedora doesn't boot (I'm using the USB installer since I hhave no CD drive), it gives a similar ACPI BIOS checksum error.
    I agree it's a very weird problem :( the strange fact is that I have been able to successfully install my distro of choice the first time...

    I used a USB key installer.
     
  48. mstanisz

    mstanisz Newbie

    Reputations:
    0
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    5
    Has anyone tried using a 3.0 kernel yet? I might have missed it in all the posts :)

    I'm trying to run Arch and ran into the outdated kernel issue that @chaose had so I updated to 3.0.1 using my old config. Now my screen position is off when I start X (shifted about a 1/4 of the way up so the there's a blank bar along the bottom). Does anybody have any suggestions for configuring X or if there's a better 2.6 kernel to use? I saw someone mentioned > 2.6.38 somewhere...

    Thanks!
    Matt
     
  49. gaglia

    gaglia Newbie

    Reputations:
    8
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    5
    Uhm, I can't find the thread... may you provide a link? <.<
     
  50. mil2

    mil2 Notebook Consultant

    Reputations:
    382
    Messages:
    175
    Likes Received:
    9
    Trophy Points:
    31
← Previous pageNext page →