Status of EFI, Power Management, TP Buttons in Linux

Solaris, RedHat, FreeBSD and the like
Post Reply
Message
Author
kenevel
Posts: 1
Joined: Wed Aug 24, 2011 2:28 am
Location: London, United Kingdom

Status of EFI, Power Management, TP Buttons in Linux

#1 Post by kenevel » Wed Aug 24, 2011 3:54 am

Hi everyone,

Dotted around in many posts seem to be gems of knowledge with regard to the status of support for the various different technologies incorporated in the Thinkpad range. I have a particular interest in their applicability to T520s, as I'm thinking of installing Linux on a separate partition to Windows. I have a few questions about which fellow users may wish to flame me for not trawling through the forum, but in my defence I'll pre-emptively say that quite a few of those gems are very old in dog/distro years. Perhaps this thread could become a repository for the latest user experience with the technologies? To that end, it would be very helpful if respondents could post their hardware and OS types and versions.

The questions are:

- Does your distro/kernel function correctly with the EFI implementation in your Thinkpad? If so, which versions do (or perhaps more importantly, do not) work?
- Does your distro successfully suspend-to-RAM and hibernate?
- Can you assign functions to the Thinkpad-specific keys, power button and the lid-close event?
- If you installed Linux on a new partition, did you overwrite the MBR, or did you create a new bootable partition? Could you post a link to the guide you followed, as well as issues you encountered and choices you made?
- I'm quite impressed by the battery-saving software which Lenovo ships with the Windows distribution. Have you been able to manage the DVD-drive shutdown, CPU scaling/turbo or GPU Optimus technology from your distro? If so, how?
- If you've decided to run Linux as your primary OS, and run Windows in a VM (using your OEM product key), where did you source your copy of Windows? Did you approach Lenovo or simply use a friend's? I'm willing to bet that the data on the Recovery partition is no use in this respect, but please post if you disagree.
- What mileage, if any, have you had with running Linux under a VM in Windows? It seems that I get all the hardware from the Thinkpad plus the ability to work in Linux...

Best wishes,

Michael

------------------
PS As seems to be the custom, here are some hardware specs: Core i7-2620M CPU, 8GB RAM, 128 GB SSD, Nvidia NVS 4200M

Elchund
Posts: 16
Joined: Mon Feb 28, 2011 8:40 am
Location: Spydeberg, Norway

Re: Status of EFI, Power Management, TP Buttons in Linux

#2 Post by Elchund » Thu Sep 01, 2011 8:54 am

I have installed a number of different Linux distros on my thinkpads, both older machines like R32 and T40 and more modern ones like my late T61. My experience has been that ubuntu linux is the one were most things work "out of the box", like:

- audio volume and mute buttons
- all the "FN key" switchable functions; sleep, hibernate, baklight, thinklight etc.
- WIFI and Bluetooth

I can easily assign functions to various buttons and lid-close event. My machines go to sleep on lid-close and I have assigned the thinkvantage button to open my home-folder.

Power saving is not a strong point of the linux distros I have tried, it takes a bit of work to achieve battery life that is equal to or better than on windows, but it can be done with some "thinkering".

I have tried, and use, both thinkfan and thinkpad fan control apps to fine-tune fancontrol, they both work very well.

My nvidia graphics card work out of the box (Ubuntu use nvidias own linux driver) with an GUI to change settings etc. CPU frequency scaling works out of the box, even "turbo mode" in my T61.

In short, i think most people will find that their machines just work as they should after installing Ubuntu, my experience comes from installing it on these machines: R32, T40, T43, R60, T61 (and an ACER D250.....). With Mint and Xubuntu I have had to do some work to make everything function.

I prefer to use WINE for running windows programs, I do not think VMs work well enough, so if you cannot run the necessary W apps in WINE I suggest dual boot is a better solution. I do however run Windows 7 in virtualbox on my T61 because I need it for work, and I can get the job done that way. W7 behaves like it would in a regular install, but the graphics are a bit off and its noticeably slower. I bought an install DVD trough internet here in Norway and was able to use the product key on my machine, its validated and runs just fine with updates and everything.

Installing Ubuntu from a CD (download the ISO from ubuntu and burn it) really could no be easier, it will give you the option to keep your windows install and let you decide the size of the partitions. After installing you will have the option, when you power on, to choose to boot either windows or ubuntu. I have never had any problems with my dual boot setups, and never had any problems with windows after installing ubuntu (or mint and xubuntu). I really dislike to have to power on and off to switch between W and linux though, so I only kept the dual boot setup on my T43, on my R60 I run Ubuntu 11.04 with five or six windows apps running in WINE, on my T61 I use both WINE and W7 in VB.

WINE is neat (when it works) because the apps run just like they were native linux apps, but not every windows app will run in WINE.



Tron
T40, T43, R60e, T61, W500, X60

chenxiaolong
Posts: 4
Joined: Tue Aug 02, 2011 1:33 pm
Location: Solon, Ohio

Re: Status of EFI, Power Management, TP Buttons in Linux

#3 Post by chenxiaolong » Mon Sep 19, 2011 12:32 pm

I have a W520, which should be pretty much identical to your laptop, except for the graphics card. So:

- Does your distro/kernel function correctly with the EFI implementation in your Thinkpad? If so, which versions do (or perhaps more importantly, do not) work?
Yes, it does. A kernel after version 3.0 will work with the ThinkPad's in UEFI mode, include reboot, CPU core utilization, etc. Any previous version will need to be booted with "noefi" (useful for the first boot before installing a new kernel), but only 1 CPU core can be used. Also, a 64 bit distro/kernel must be used.

More importantly, you will need to use the UEFI version of Grub 2. Otherwise you will not be able to boot. To install Grub 2 UEFI, boot a live CD (I highly suggest the Arch Linux CD. It contains kernel 3.0.) and mount your root (/) partition to /mnt and your boot partition (if it's on a separate partition) to /mnt/boot with:

Code: Select all

mount /dev/sda# /mnt
mount /dev/sda# /mnt/boot
then mount your EFI partition to /mnt/boot/efi

Code: Select all

mkdir -p /mnt/boot/efi
mount /dev/sda1 /mnt/boot/efi
then bind mount the /dev, /proc, and /sys directories to /mnt:

Code: Select all

mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
then chroot into the mount point and install Grub 2 UEFI

Code: Select all

chroot /mnt
#Install Grub 2 UEFI with your package manager. It will be named like grub2-efi-x86_64 or something similar
#Install Grub 2 UEFI to your EFI partition. Replace grub_efi_x86_64-install with the appropriate program name for your distro.
grub_efi_x86_64-install --recheck --no-floppy
#Add "pcie_aspm=force" to the "GRUB_CMDLINE_LINUX" variable in /etc/default/grub. It fixes the power regression introduced in kernel 2.6.38 and it can increase your battery life by over an hour (at least it did for me).
#Regenerate the /boot/grub/grub.cfg with
update-grub
#or
grub-mkconfig -o /boot/grub/grub.cfg
That should be it! This is a one time thing, so you'll never need to do it again unless you want to reinstall your distro. Updates will not break the ability to boot.

- Does your distro successfully suspend-to-RAM and hibernate?
Yes. If you use Kernel 3.0 or higher, there's no need to unload the Intel wireless driver or the USB 3.0 driver before suspending.

- Can you assign functions to the Thinkpad-specific keys, power button and the lid-close event?
Yes. The power button and lid-close events are recognized. All the buttons on the laptop are recognized by the xev command, so I assume you can assign functions to them (like for running a program).

- If you installed Linux on a new partition, did you overwrite the MBR, or did you create a new bootable partition? Could you post a link to the guide you followed, as well as issues you encountered and choices you made?

There's no need to worry about the MBR if you are going to use UEFI. UEFI requires an EFI partition where each bootloader is stored in its own directory. The bootloaders can then be chosen if you press F12 when you see the Lenovo logo. I suggest installing Windows in UEFI mode first, since that will create and format the EFI partition automatically. Make sure you backup your C:\DRIVERS and C:\swtools directories.

- I'm quite impressed by the battery-saving software which Lenovo ships with the Windows distribution. Have you been able to manage the DVD-drive shutdown, CPU scaling/turbo or GPU Optimus technology from your distro? If so, how?
DVD-drive shutdown is done by the BIOS, which means that it will work in any OS. CPU scaling should work automatically. nVidia Optimus can work with the Bumblebee software, but it's not very stable and I wouldn't recommend it. Both the Intel and nVidia graphics cards are supported well though.

- If you've decided to run Linux as your primary OS, and run Windows in a VM (using your OEM product key), where did you source your copy of Windows? Did you approach Lenovo or simply use a friend's? I'm willing to bet that the data on the Recovery partition is no use in this respect, but please post if you disagree.
The recovery partition is pretty useless for this. It's just an image of the hard drive, not an installer. You will need to burrow a friend's DVD. I'm not sure if Microsoft sells their DVD's without a key anymore. Back in the Vista days, you could order a DVD without a product key for $1.00 with free shipping.

- What mileage, if any, have you had with running Linux under a VM in Windows? It seems that I get all the hardware from the Thinkpad plus the ability to work in Linux...
Any recent Linux distro will work well in a VM with the exception of the Unity and Gnome Shell window managers.

I hope that answered all your questions. Feel free to ask if anything was unclear. :)

EDIT: If you are planning on installing Ubuntu or Fedora, I suggest waiting for Fedora 16 or Ubuntu 11.10. Both will be able to be installed in UEFI mode without any of the steps above.

Post Reply
  • Similar Topics
    Replies
    Views
    Last post

Return to “Linux Questions”

Who is online

Users browsing this forum: No registered users and 6 guests