I can believe "12 hrs of battery without ANY tweaks on the x230 in Ubuntu 12.04 with the 9--cell"
Battery life hugely depends on screen brightness setting.
I've got a X220 w/6-cell and am very pleased. Battery life of ~7 hours with somewhat dim brightness/contrast setting w/Win7.
-
-
ALLurGroceries Vegan Vermin Super Moderator
OtherSongs: Are you running linux?
-
But I expect to try a dual Win7/Linux boot with both laptops.
1st priority has been and continues to be, getting set up with boot SSD on both laptops.
X220 works great with boot mSATA SSD only, and no HDD (pulled it out on X220 thereby saving ~6oz (drive + metal sled + plastic rails)); and leaving HDD bay open for occasional clone of boot SSD to temp HDD backup).
Next few days I'll do a 2 SSD setup on my T530, boot drive in the main bay and secondary SSD in the DVD bay.
Still undecided as to which flavor(s) of Linux I'll try with a dual boot Win/Linux setup with one or both of my laptops. Odds are that I'll 1st try dual boot (Win7/Linux) with my T530.
When Crucial's new M500 512GB mSATA drives come out in a few months, I'll move to that on my X220 and then play around with a dual Win7/Linux boot setup on my X220 as I'll then have enough drive space on it to do that. -
ALLurGroceries Vegan Vermin Super Moderator
I located the problem with expresscard hotplugging (after 8 kernel builds!), and I'm working on a patch.
-
12h on a 9c without any optimizations is NOT possible on 12.04. I tried it myself. However, 9h are possible if you install TLP. With my broken 6c, I get around 5h on Ubuntu with TLP installed.
BTW, the M500 won't fit into the X220, the X220 has an mSATA Slot. -
ALLurGroceries Vegan Vermin Super Moderator
Here's a quick and dirty patch for expresscard hotplugging... this is against 3.7.7:
Code:diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c index ebb3e5f..b427aad 100644 --- a/drivers/pci/pcie/portdrv_pci.c +++ b/drivers/pci/pcie/portdrv_pci.c @@ -225,7 +225,7 @@ static int __devinit pcie_portdrv_probe(struct pci_dev *dev, * it by default. */ dev->d3cold_allowed = false; - if (!pci_match_id(port_runtime_pm_black_list, dev)) + if (pci_match_id(port_runtime_pm_black_list, dev)) pm_runtime_put_noidle(&dev->dev); return 0;
-
And with regard to the 2.5" Crucial M500 SSD drive, it's hard for me to believe that it won't have a 7mm thick option. Odds are that one can just ditch the HDD? -
-
ALLurGroceries Vegan Vermin Super Moderator
In the just released 3.8 kernel there's a bug in the e1000e driver that prevents the card from waking up after the ethernet cable is plugged in for the first time after being unplugged:
Linux-Kernel Archive: [REGRESSION 3.8-r1] broken pci irq/pm state for e1000e device
SourceForge.net: Intel Ethernet Drivers and Utilities:
It comes back after a suspend/resume. If you want to run 3.8, plan on using my expresscard hotplugging patch (posted earlier) and fixing this ethernet problem by reverting commit 42eca2302146fed51335b95128e949ee6f54478f
Here's my 3.8 config: http://www.mediafire.com/file/n53m73fdhumn3t8/config-3.8.0.txt -
Can I use that config for instance while following this instructions?
Lindqvist -- a blog about Linux and Science. Mostly.: 342. Compiling Kernel 3.8 on Debian Testing/Wheezy
Im planning to do it on a crunchbang installation.
thanks in advance
EDIT: or maybe its better to use a 3.7 for avoiding the 3.8 bug? -
ALLurGroceries Vegan Vermin Super Moderator
Yeah I would run 3.7 unless you are familiar with building and patching the kernel and really need 3.8 for some reason. If you want me to make a patch for the e1000e driver, let me know.
-
I've been seeing better power consumption lately, perhaps after a kernel upgrade to 3.8.4. My machine can now idle at 6.8W, according to PowerTop. That's with i7, 8 GB RAM, WiFi on, BT off, screen brightness 9, and an SSD. I did notice that the SSD must be idle to get that low; as with spinning drives, there is an almost 1W difference between an SSD in "active/idle" vs "standby" mode (hdparm -C). That's with Intel 320, BTW.
-
ALLurGroceries Vegan Vermin Super Moderator
--
As my X220 is getting older and I want to keep it alive longer, I'm starting to use some more aggressive fan settings. The tradeoff is more power consumption and noise. Here's my updated thinkfan.conf:
Code:sensor /sys/devices/virtual/hwmon/hwmon0/temp1_input (0, 0, 55) (1, 55, 61) (2, 59, 65) (3, 63, 69) (4, 67, 75) (5, 73, 85) (7, 81, 89) ("level disengaged", 84, 32767)
-
BTW, what made you choose Debian over the many other free Linux distros?
I had problems with current Debian on desktop PC, as Debian's default install failed to install dual boot (using GRUB2) with WinXP.
Whereas Ubuntu 12.10 properly installed dual boot on that desktop.
My near term goal with both my laptops (see sig) is to dual boot Win7 and Linux with 2 SSD on each machine; just waiting a few more weeks to order a 480GB Crucial M500 mSATA as my new X220 boot drive.
Of course, I'll move the X220's current 256GB Crucial M4 mSATA drive to my T530 (as a secondary drive on the T530, with a 2.5" M4 as boot on the T530). -
ALLurGroceries Vegan Vermin Super Moderator
-
-
ALLurGroceries Vegan Vermin Super Moderator
Code:1.68 W 1987 rpm Laptop fan
-
Erm, sorry for the little lecture, I'm a scientist and I'm typing this while at work. What I meant to say is that the per-device data can't be accurate and in fact tends to be extremely inaccurate from what I've noticed (e.g., I've seen claims that idle eth0 uses 3W or something ridiculous like that), so I suggest not to pay any attention to it. My fan does in fact spin and I'm sure that it consumes some power
.
-
ALLurGroceries Vegan Vermin Super Moderator
I'm trying to figure out where your extra ~1.5W went (you know, so that I can maybe lose it too)!
The battery rate doesn't lie, I'm not doubting your overall power consumption. But I've been running 3.8 and now 3.9-rc with nowhere near 1W less draw. -
ALLurGroceries Vegan Vermin Super Moderator
3.9 kernel was just released, here's my config: config-3.9.txt
No expresscard hotplugging or ethernet problems like 3.8. Both were due to power management code that has been changed/reverted. I've been running 3.9-rc for a while now (without problems since maybe rc6).
http://kernelnewbies.org/Linux_3.9
http://www.h-online.com/open/features/What-s-new-in-Linux-3-9-1845705.html -
With so built kernel, powertop would show idle at 6.8W (with SSD in standby, WiFi on, BT off, brightness 9/15). So if you are unable to go that low, then I don't think that the kernel config is your problem. -
6.8 Watts!
Can't wait for 3.9 to hit the Fedora repositories.
Could you perhaps share the general gist of what's changed in your custom kernel config? -
I don't think there's any secret kernel option to get to 6.8W. While I use a fairly minimal kernel configuration, ALLurGroceries' more extensive config, which he made available here (see above), showed the same consumption rate on my system. And keep in mind that 6.8W is the idle rate; it does go up when I actually do something useful on the machine.
Also, I would make sure that the BIOS is at least at version 1.29. I don't know if it changes the consumption rate, but it does fix the rate reporting bug when switching between battery and mains. I'm running BIOS 1.35, BTW. -
ALLurGroceries Vegan Vermin Super Moderator
There's no secret sauce -- you don't even need special boot options anymore for pcie aspm, i915 rc6, etc.
My kernel config started from Debian Lenny as a stripped down version for the ASUS N10J, and I've modified the same config since 2008ish for each new laptop I've owned. You can get the kernel sources for your distribution and diff their config against mine to see the exact differences. Although it originated as Debian's kernel config with stripped down options, there is nothing distro-specific about it; I run a vanilla (kernel.org) kernel on all of my machines.
On my own X220 with 1.35 I can't break ~7W since I use a slightly more power hungry atheros wifi card, and I have an mSATA + HDD setup. -
Using the boot parameters still gives me much better power savings. -
I'm getting 6.8 watts without any special boot options. Kernel 3.9.7.
-
Interesting.
Is there a guide for compiling a vanilla kernel, and explaining what all those config options do? I'm an intermediate linux user at best. Right now I'm just running whatever kernel gets shipped via the Fedora package repos but they presumably do their own kernel mods. I would assume that that's where the power consumption difference lies. -
ALLurGroceries Vegan Vermin Super Moderator
This looks like where you should start for fedora: Building a custom kernel - FedoraProject
Some tips here: KernelBuild - Linux Kernel Newbies
If you press the H key on any item in menuconfig or nconfig you will get some help text with a brief description. Often it will reference a .txt file in Documentation/ of the linux source tree for more complex things. You can also look for info on kernelnewbies or lkml by searching for the config symbol (CONFIG_WHATEVER). lwn.net also has very in-depth articles on kernel features, and h-online and kernelnewbies have "what's new in kernel x.y.z" that give a nice summary.
Also, I'm running 'laptop mode tools' which does some other tricks, and I've tuned it a bit but I'm not sure about others in this thread. For PCIe ASPM there are a number of ways of setting it, you can set it as a kernel config option, and laptop mode tools also can manage it, and you can of course use the kernel command line at boot in your grub config. -
Interesting discussion on state-of-the-art in power management on Sandy Bridge CPUs:
https://plus.google.com/117091380454742934025/posts/2vEekAsG2QT
Essentially, with 3.9/3.10 kernels, you need to make sure that you use intel_pstate scaling driver:
Code:$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver intel_pstate
-
ALLurGroceries Vegan Vermin Super Moderator
Yeah, nohz full seems to make the cpu eat more power in the very limited testing I've done, temps are much higher with it enabled. There are a number of other problems with 3.10 on the X220 that I haven't had time to investigate so I'm still on 3.9.x for now.
-
A colleague of mine complained that X became unstable for him with 3.10, but I haven't encountered any problems so far.
3.10 did fix at least one problem for me: I have an HDD in the media bay of the docking station (ultrabase) and at least with 3.8 and 3.9 kernels, the kernel would not see the new SATA device on docking, requiring a suspend/resume cycle to recognize it. It worked fine with the first 3.x kernels, then they broke it around 3.5, fixed it again, broke it again, but now it works again (I wonder for how long...).
For nohz full to be at least slightly sane in 3.10, CONFIG_NO_HZ ("Old Idle dyntics config") must be disabled. See the top post at:
https://bbs.archlinux.org/viewtopic.php?id=163524&p=2
This will prevent the fan from kicking in all the time, but the CPU will still spend much of the time in c6 instead of c7. -
ALLurGroceries Vegan Vermin Super Moderator
I've had the problem with the docking station not seeing a HDD hotplug, the workaround I used was to rescan the SCSI bus that it was attached to:
Code:echo "0 0 0" | sudo tee /sys/class/scsi_host/hostX/scan
To find this programmatically you can use something super-ugly like this (if anyone knows a better way please share):
Code:grep -n HDDMODEL /proc/scsi/sg/device_strs | cut -d ':' -f 1 | tr -d '\n' | xargs expr -1 +
-
So I'd gather that that's not where my power is going.
I've also already got the pstate scaling driver in use. -
BTW, I saw the screen corruption problem with the 3.10.0 kernel that I mentioned earlier. It often occurs after a suspend/resume cycle: the screen is completely garbled and the only remedy is to restart the X server. Here's the relevant kernel bugzilla entry:
https://bugzilla.kernel.org/show_bug.cgi?id=60530 -
Since no hardware changes have been made and since I always test under the same system load/conditions there must be a regression somewhere in the kernel. -
I'd like to disable turbo in Ubuntu. Can anyone help me?
In windows, I can do this easily by setting the max processor speed to 99%. -
ALLurGroceries Vegan Vermin Super Moderator
Install the msr-tools package.
Mi mundito • Disabling Turbo Boost in Linux -
ALLurGroceries Vegan Vermin Super Moderator
I started running 3.10, since 3.9.x has been discontinued. I'm not using NO_HZ_FULL. Here's my kernel config: config-3.10.txt
acpiphp (used for expresscard hotplugging on the X220) has turned into a built-in, and that is reflected in my config:
-
ALLurGroceries Vegan Vermin Super Moderator
Forgot to upload my 3.11 config. Here's 3.12 also.
Since 3.10, I switched the preemption model to voluntary/desktop, since low-latency preemption was giving me some video stuttering I hadn't noticed before and also had some odd effects when doing multithreaded builds. -
I'm running 3.12 as well. One thing that changed compared to 3.11 are the names of ThinkPad-specific ACPI events. E.g., the sleep button (Fn-F4) used to generate "ibm/hotkey HKEY 00000080 00001004", but now it's a more standard "button/sleep SBTN". More significantly, the WiFi on/off switch on the side no longer generates ACPI events at all, so I had to adjust some custom wifi scripts to use udev instead, which was a bit of a pain...
Linux on the X220
Discussion in 'Lenovo' started by ksvjdsvagff, May 3, 2011.