Take a look at our
ThinkPads.com HOME PAGE
For those who might want to contribute to the blog, start here: Editors Alley Topic
Then contact Bill with a Private Message

Distro for new X220

Linux on ThinkPads
Post Reply
Message
Author
olssy
Posts: 7
Joined: Mon Feb 20, 2012 8:47 am
Location: Montreal, Canada

Distro for new X220

#1 Post by olssy » Mon Feb 20, 2012 8:53 am

I'm receiving my X220 this afternoon and still haven't decided if I should go with Ubuntu or Debian(or something completly different...). I've been using Ubuntu for over 3 years now and have it installed on my two other machines but after a few nightmares with backported kernels I'm seriously thinking about installing Debian Squeeze, I used Debian years and years ago and can't really remember that much about it.. Does anyone have any opinion if one distro would be superior to another for the X220? It's the i7 version with a usb 3 port, bluetooth and centrino advanced wi-fi. Any opinions would be great, thanks.

ThinkRob
Senior ThinkPadder
Senior ThinkPadder
Posts: 2394
Joined: Wed May 20, 2009 9:54 am
Location: near RTP, NC

Re: Distro for new X220

#2 Post by ThinkRob » Mon Feb 20, 2012 1:02 pm

I've got a T420 running Debian, and since the X220 hardware is quite similar squeeze should work fine, *provided* that you use the newer Xorg packages in backports, and a 3.x kernel. The former is dead simple to install (one line in your apt sources, and one apt-get command to update the Xorg packages), and the latter is pretty simple to build yourself using kernel-package.

Feel free to PM me or post here if you need instructions for either of those. (I'm also usually on FreeNode under the handle ThinkRob if IRC works better for you.)
Need help with Linux or FreeBSD? PM or catch me on IRC: I'm ThinkRob on FreeNode and EFnet.
Laptop: X270, running Fedora
Desktop: Intellistation 285 (currently dead)
Workstation: owned by my employer ;)
Toy: Miata!

GomJabbar
Moderator
Moderator
Posts: 9872
Joined: Tue Jun 07, 2005 6:57 am

Re: Distro for new X220

#3 Post by GomJabbar » Mon Feb 20, 2012 11:12 pm

I have Arch XFCE, Fedora 16 Gnome (3), and Mageia 1 KDE installed on my X220 (in addition to Win 7). I tend to prefer Arch XFCE to the other two linux distros, however Arch takes more work to get configured than Fedora or Mageia. Gnome 3 of Fedora is not really to my liking, but there are some gnome shell forks such as Cinnamon and MATE that seem quite well received (haven't tried them yet myself). See Fedora Forums: Guides & Solutions http://forums.fedoraforum.org/forumdisplay.php?f=12 for a couple of active threads on this.

Introducing Cinnamon: The GNOME 3 Replacement

MATE (GNOME 2 Fork) For The Fedora Desktop?

Review: Linux Mint 12 "Lisa" GNOME + MATE

Linus Torvalds Drops Gnome 3 for Xfce, Calls It 'Crazy'

Why GNOME refugees love Xfce
DKB

olssy
Posts: 7
Joined: Mon Feb 20, 2012 8:47 am
Location: Montreal, Canada

Re: Distro for new X220

#4 Post by olssy » Tue Feb 21, 2012 8:28 am

Thanks for the replies you two. I received my x220 last night and I only had an Ubuntu iso available so I installed that, eveything went smooth and everything 'seems' to be working.
But like I said before, Ubuntu got me into some trouble a while back because of a backported kernel I installed and other problems with Gnome. So right now I am trying to install Debian and will install the backported xorg packages and a 3.x kernel. I'm also going to have a look at Fedora as it is a distro I have never tried so I am a bit curious as to how the experience is with it.

I got to say this is one nice laptop :)

I was also wondering if either of you have tried kernel 3.2.7 and if you had if your battery lasted any longer with it?

Thanks again

ThinkRob
Senior ThinkPadder
Senior ThinkPadder
Posts: 2394
Joined: Wed May 20, 2009 9:54 am
Location: near RTP, NC

Re: Distro for new X220

#5 Post by ThinkRob » Tue Feb 21, 2012 11:29 am

olssy wrote: I was also wondering if either of you have tried kernel 3.2.7 and if you had if your battery lasted any longer with it?

Thanks again
I'm on 3.2.6 with a couple additional patches (grsecurity/PaX, different IO schedulers, etc.) and battery life is about the same as it was under 3.1.*

Which is to say: really good. I'm getting about 6 hours on the 6-cell with medium backlight brightness, mostly-idle CPU usage, and reasonable WiFi use (i.e. sitting on my couch surfing + using IRC.)
Need help with Linux or FreeBSD? PM or catch me on IRC: I'm ThinkRob on FreeNode and EFnet.
Laptop: X270, running Fedora
Desktop: Intellistation 285 (currently dead)
Workstation: owned by my employer ;)
Toy: Miata!

olssy
Posts: 7
Joined: Mon Feb 20, 2012 8:47 am
Location: Montreal, Canada

Re: Distro for new X220

#6 Post by olssy » Tue Feb 21, 2012 11:56 am

Just finished updating xorg and my kernel from the backports, I'm at 3.2.6 also and almost everything works, I lso have to say think I prefer Debians way of doing things to Ubuntu but time will tell. I might try a few kernel options for battery life as I'm "only" getting 5 hours on my 6 cell battery with no wi-fi and 50% brightness.
One thing that surprised me is I can set my CPU to 2.8Ghz even on battery power, I thought the BIOS made it throttle to 800Mhz... In any case, I prefer it to throttle on battery power.
Also, the wi-fi isn't working yet but I presume it's a simple module to load, I'll be trying that now. All my software is working fine and everything looks amazing on the matte IPS screen.
ThinkRob, have you seen any improvements in performance using a different IO scheduler?

ThinkRob
Senior ThinkPadder
Senior ThinkPadder
Posts: 2394
Joined: Wed May 20, 2009 9:54 am
Location: near RTP, NC

Re: Distro for new X220

#7 Post by ThinkRob » Tue Feb 21, 2012 12:19 pm

olssy wrote:Just finished updating xorg and my kernel from the backports, I'm at 3.2.6 also and almost everything works, I lso have to say think I prefer Debians way of doing things to Ubuntu but time will tell. I might try a few kernel options for battery life as I'm "only" getting 5 hours on my 6 cell battery with no wi-fi and 50% brightness.
Install laptop=mode-tools and powertop. Enable LMT, paying particular attention to the HD and WLAN options. Once you've done that, check your results with powertop. The only part of its [powertop's] advice that you'll want to ignore is the writeback timeout if you've set a more generous value via LMT.

Oh, and I wouldn't use the bpo kernels. I don't see much reason too: they're older than mainline and the kernel-package tool makes it very easy to build your own kernel debs so you're really not gaining much. I run relatively close to mainline (often a minor version behind, but that's often due to laziness), and it's dead simple to keep my kernel up to date, roll back, etc. via the Debian kernel packaging tools.

(If, on the other hand, I parsed your statement wrong and you're using the backported X packages but *not* the backported kernels, then carry on... :lol:)
ThinkRob, have you seen any improvements in performance using a different IO scheduler?
Yes, but not on general purpose workloads or with a mechanical disk. CFQ is very, very good on spinning rust for general usage, particular in recent kernels where it picks up the nice bits of auto cgroups.
Need help with Linux or FreeBSD? PM or catch me on IRC: I'm ThinkRob on FreeNode and EFnet.
Laptop: X270, running Fedora
Desktop: Intellistation 285 (currently dead)
Workstation: owned by my employer ;)
Toy: Miata!

olssy
Posts: 7
Joined: Mon Feb 20, 2012 8:47 am
Location: Montreal, Canada

Re: Distro for new X220

#8 Post by olssy » Tue Feb 21, 2012 2:07 pm

You're right, I just grabbed a pre-compiled kernel from the backports, I'll try compiling my own tomorrow along with some of the suggestions from powerop. I did manage to drop from about a 20watt load to 13w just by applying a few of its suggestions, very nice tool :)

ThinkRob
Senior ThinkPadder
Senior ThinkPadder
Posts: 2394
Joined: Wed May 20, 2009 9:54 am
Location: near RTP, NC

Re: Distro for new X220

#9 Post by ThinkRob » Tue Feb 21, 2012 10:17 pm

olssy wrote:You're right, I just grabbed a pre-compiled kernel from the backports, I'll try compiling my own tomorrow along with some of the suggestions from powerop. I did manage to drop from about a 20watt load to 13w just by applying a few of its suggestions, very nice tool :)
Make sure you set up laptop-mode-tools to do the power savings for you!

Let me know if you need any help with kernel-package et al.
Need help with Linux or FreeBSD? PM or catch me on IRC: I'm ThinkRob on FreeNode and EFnet.
Laptop: X270, running Fedora
Desktop: Intellistation 285 (currently dead)
Workstation: owned by my employer ;)
Toy: Miata!

olssy
Posts: 7
Joined: Mon Feb 20, 2012 8:47 am
Location: Montreal, Canada

Re: Distro for new X220

#10 Post by olssy » Wed Feb 22, 2012 2:29 pm

Ah, finally managed to compile a working kernel!
Took a while, my first try I modified tons of options but got a kernel panic on rebooting and instead of investigating further I just thought my configuration was causing the problem. But after compiling another kernel based off the bpo kernel I still had the same error.
Turns out that I was missing my initrd and it kept causing a kernel panic with a message along the line of "VFS: Unable to mount root filesystem... "
Took me a while to figure out what the problem was and in case anyone else is having the same problem here are the steps to get it working:

Code: Select all

update-initramfs -k {kernel-version} -c
And then

Code: Select all

dpkg-reconfigure {linux-image}
Where, in my case, the linux image was: "linux-image-3.2.4.220212" And the kernel version was just "3.2.4.220212"
The first step created the file /boot/initrd.img-3.2.4.220212 and the second command updated my GRUB correctly.

But now I think I am hooked on configuring my kernel, I'm going to try next with the no-op scheduler and removing as many options as I can from the configuration.

Still can't seem to get laptop-mode-tools working... it seems to never be enabled and I followed some instructions to get it enabled but I doubt it really is... But, by using powertop and putting this line in my grub for my new kernel:

Code: Select all

pcie_aspm=force i915.i915_enable_rc6=1 i915.i915_enable_fbc=1 i915.lvds_downclock=1
I know am idling at 8.3w for 9.3 hours of battery time(6 cell battery), wi-fi is still enabled and I forgot to enable inotify in the kernel so I may be able to lower the power consumption some more. At this point I am just curious as to how much theoretic battery life I can get.

This is such a nice laptop! And I am really liking Debian now :) Soon I'll try it out on the road developping, I'm afraid the screen size might be an issue for coding...

ThinkRob
Senior ThinkPadder
Senior ThinkPadder
Posts: 2394
Joined: Wed May 20, 2009 9:54 am
Location: near RTP, NC

Re: Distro for new X220

#11 Post by ThinkRob » Wed Feb 22, 2012 9:55 pm

olssy wrote: Where, in my case, the linux image was: "linux-image-3.2.4.220212" And the kernel version was just "3.2.4.220212"
The first step created the file /boot/initrd.img-3.2.4.220212 and the second command updated my GRUB correctly.
?!? That can't be right. What make-kpkg options did you use? IIRC if you use the defaults you won't get anything postpended to the version.

Also, you shouldn't have to manually call update-initramfs if you built and installed the kernel debs correctly.
Still can't seem to get laptop-mode-tools working... it seems to never be enabled and I followed some instructions to get it enabled but I doubt it really is...
What instructions did you follow?

As a side-note: no-op and deadline are really only good for specific workloads on SSDs. Be sure to benchmark before and after changing the scheduler!
Need help with Linux or FreeBSD? PM or catch me on IRC: I'm ThinkRob on FreeNode and EFnet.
Laptop: X270, running Fedora
Desktop: Intellistation 285 (currently dead)
Workstation: owned by my employer ;)
Toy: Miata!

olssy
Posts: 7
Joined: Mon Feb 20, 2012 8:47 am
Location: Montreal, Canada

Re: Distro for new X220

#12 Post by olssy » Thu Feb 23, 2012 10:02 am

?!? That can't be right. What make-kpkg options did you use? IIRC if you use the defaults you won't get anything postpended to the version.
I used a tutorial that suggested using the append-to-version option for make-kpkg and add the date as to have grub list the newer kernel first.
Also, you shouldn't have to manually call update-initramfs if you built and installed the kernel debs correctly.
Yes, that did strike be as bizarre but I don't seem to be the only one with this issue: http://forums.debian.net/viewtopic.php?p=243740
I'm contemplating trying to compile all the modules for the filesystem in the kernel and then remove the initrd option in the kernel. It seems like it could be quite some work tho.

I also got the laptop-mode-tools working now, it doesn't seem to like 3.x kernels, a quick modification of the startup script to accept 3.2 kernels fixed it and now everything seems to be working! Thje only small issue is powertop is telling me I haven't enabvled INOTIFY in the kernel yet I have so I'm guessing it may be a false positive.

Again, thanks a lot for all your help ThinkRob :)

ThinkRob
Senior ThinkPadder
Senior ThinkPadder
Posts: 2394
Joined: Wed May 20, 2009 9:54 am
Location: near RTP, NC

Re: Distro for new X220

#13 Post by ThinkRob » Thu Feb 23, 2012 12:38 pm

olssy wrote:I used a tutorial that suggested using the append-to-version option for make-kpkg and add the date as to have grub list the newer kernel first.
Oh. That explains that.

I simply do one kernel package per release of the mainline, so the problem sorta solves itself. (Until Linus starts numbering in reverse... ;)) I do multiple revisions, but since they're revisions they install over older ones.
Yes, that did strike be as bizarre but I don't seem to be the only one with this issue: http://forums.debian.net/viewtopic.php?p=243740
I'm contemplating trying to compile all the modules for the filesystem in the kernel and then remove the initrd option in the kernel. It seems like it could be quite some work tho.
/ FS modules shouldn't matter.

I have basically the same hardware, am running the same kernel as you, built with the same tools, and I don't need to make the initrd manually.

Oh. Hang on. Are you running make-kpkg using fakeroot? You should be!

Here's the exact command I use for my builds:

Code: Select all

export CONCURRENCY_LEVEL=5; fakeroot make-kpkg --append-to-version "-rthink" --revision "0.1" --us --uc --initrd kernel_image kernel_headers
The resulting .debs will install and work with nothing more than "dpkg -i [.deb names here]".
I also got the laptop-mode-tools working now, it doesn't seem to like 3.x kernels, a quick modification of the startup script to accept 3.2 kernels fixed it and now everything seems to be working! Thje only small issue is powertop is telling me I haven't enabvled INOTIFY in the kernel yet I have so I'm guessing it may be a false positive.
It may be a false positive. I know it is if you run grsecurity, since some of the options block powertop from sniffing the config. I'd double check that it's enabled in your config, and if it is, ignore powertop.
Need help with Linux or FreeBSD? PM or catch me on IRC: I'm ThinkRob on FreeNode and EFnet.
Laptop: X270, running Fedora
Desktop: Intellistation 285 (currently dead)
Workstation: owned by my employer ;)
Toy: Miata!

olssy
Posts: 7
Joined: Mon Feb 20, 2012 8:47 am
Location: Montreal, Canada

Re: Distro for new X220

#14 Post by olssy » Fri Feb 24, 2012 11:11 am

Hehe, seems I should have read the doc for make-kpkg instead of following a tutorial, I was just missing the --initrd option... I was doubly dumb and just compiled kernel 3.3 removing the initrd option but specified it for make-kpkg, needless to say that the kernel didn't boot.
I'm compiling it again with initrd support and then I will try again without.
Hopefully I will eventually remove all the modules not needed from the kernel, though I doubt I'll ever see a difference in boot time as my machine is booting to the login screen in under 10 seconds, I love this machine :)

ThinkRob
Senior ThinkPadder
Senior ThinkPadder
Posts: 2394
Joined: Wed May 20, 2009 9:54 am
Location: near RTP, NC

Re: Distro for new X220

#15 Post by ThinkRob » Fri Feb 24, 2012 3:09 pm

olssy wrote: Hopefully I will eventually remove all the modules not needed from the kernel, though I doubt I'll ever see a difference in boot time as my machine is booting to the login screen in under 10 seconds, I love this machine :)
Removing unused modules shouldn't affect boot time at all. Modules that aren't needed (and/or that aren't explicitly specified in /etc/modules and the like) won't be loaded, so whether they're built doesn't really matter. The only thing that removing them would affect would be kernel compile times.

I'd recommend using something like bootchart if you're serious about improving boot speed, but honestly I think it's a little bit of a pointless exercise. It can be fun to see just how fast you can boot a box, but outside of embedded applications I really don't think it's worth the time it takes. I have done some embedded deployments where boot time was of critical importance -- audio player front-end machines, for example, need to boot as quickly as possible, so every second counts. But the techniques you use when you have a static config, known hardware, and just one main userspace app to support are generally not things you want for your average desktop/laptop.
Need help with Linux or FreeBSD? PM or catch me on IRC: I'm ThinkRob on FreeNode and EFnet.
Laptop: X270, running Fedora
Desktop: Intellistation 285 (currently dead)
Workstation: owned by my employer ;)
Toy: Miata!

Post Reply
  • Similar Topics
    Replies
    Views
    Last post

Return to “Linux Questions”

Who is online

Users browsing this forum: No registered users and 37 guests