Difference between revisions of "Lenovo ThinkPad X1"

From ArchWiki
Jump to: navigation, search
(Hardware)
(15 intermediate revisions by 4 users not shown)
Line 23: Line 23:
 
{{Note|If you'd like to create Windows recovery flash drive, do it before Arch installation with the help of autorun located at recovery partition, from your installed Windows system.}}
 
{{Note|If you'd like to create Windows recovery flash drive, do it before Arch installation with the help of autorun located at recovery partition, from your installed Windows system.}}
  
Due to the fact that there is no optical drive, you need to [https://wiki.archlinux.org/index.php/USB_Installation_Media install Arch from USB stick].
+
Due to the fact that there is no optical drive, you need to [[USB Installation Media|install Arch from USB stick]].
  
The lazy way to install is just default installation, works flawlessly. Installed system will boot in legacy-BIOS mode.
+
=== Legacy-BIOS ===
  
{{Note|I had no success in UEFI-based installation, though I tried it. If anyone had any, please write here about your success story.}}
+
This procedure is far less involved then UEFI and works perfectly.
 +
 
 +
In order to turn off UEFI booting you will need to boot into your BIOS and change the boot mode to Legacy. Afterward, follow the [[Beginner's Guide]] for standard installation instructions.
 +
 
 +
=== UEFI ===
 +
 
 +
{{Note|This procedure reflects a single user's experience, and no attempt was made to experiment with different settings.}}
 +
 
 +
Download the [https://www.archlinux.org/download/ official ISO] or create your own using something like [[Archiso]]. Follow the instructions for [[UEFI#Create UEFI bootable USB from ISO|creating a UEFI bootable USB]] from the ISO. Note that the default bootloader works fine so there's no need to replace it with an alternative like rEFInd. In the BIOS under Startup, set "UEFI/Legacy Boot" to UEFI only and turn off CSM support (this step might not be necessary, try skipping it first if you like).
 +
 
 +
Upon saving your changes and restarting, the UEFI boot options from the USB stick should come up and you can proceed to installing Arch.
 +
 
 +
It appears that the default partition table (and Windows installation) uses MBR. To use UEFI, you should reformat the disk as GPT (wiping the drive in the process). Follow the instructions for [[UEFI#Create an UEFI System Partition in Linux|creating the EFI system partition]]. {{ic|gdisk}} recommends a size of 300M. Follow the [[Beginner's Guide]] to see how to correctly generate (and then fix) the fstab entry for the ESP.
 +
 
 +
Booting using an efibootmgr entry is quite simple (and doesn't require any extra packages). Simply follow the instructions for [[UEFI Bootloaders#Setting up EFISTUB|creating the EFISTUB]] and adding the [[UEFI Bootloaders#Using efibootmgr entry|efibootmgr entry]]. The note about Lenovo Thinkpads truncating the UEFI options doesn't apply to the X1: the recommended efibootmgr entry works fine. The note about escaping the backslashes in the initrd path '''does''' apply, verify with {{ic|efibootmgr -v}} that the boot entry doesn't have any missing characters.
  
 
== Hardware ==
 
== Hardware ==
  
Just everything works out of the box.
+
Almost everything works out of the box. Install synaptics and video-intel drivers.
I installed only synaptics and video-intel drivers.
+
 
 +
=== Fingerprint Reader ===
 +
 
 +
[[fingerprint-gui]] from the [[AUR]] is already patched to work with the X1's newer fingerprint reader. To get the gui's dropdown to recognize your device, you'll have to add your user to the {{ic|plugdev}} group:
 +
 
 +
{{bc|# gpasswd -a <username> plugdev}}
 +
 
 +
It has been seen that the relevant udev rules do not get set properly. To do this, open {{ic|/usr/lib/udev/rules.d/40-libbsapi.rules}} with your favorite text editor to add (or create with) the following lines:
 +
 
 +
{{hc|/usr/lib/udev/rules.d/40-libbsapi.rules|
 +
ATTRS{idVendor}&#61;&#61;”147e”, ATTRS{idProduct}&#61;&#61;”2020″,  SYMLINK+&#61;”input/touchchip-%k”, MODE&#61;”0664″, GROUP&#61;”plugdev”
 +
ATTRS{idVendor}&#61;&#61;”147e”, ATTRS{idProduct}&#61;&#61;”2020″,  ATTR{power/control}&#61;&#61;”*”, ATTR{power/control}&#61;”auto”
 +
}}
 +
 
 +
Restart your computer for the group and udev changes to take effect.
 +
 
 +
=== Adjusting Backlight Brightness ===
 +
 
 +
Add acpi_osi="!Windows 2012" to GRUB_CMDLINE_LINUX in /etc/default/grub. (See https://bbs.archlinux.org/viewtopic.php?id=158775).
  
 
== Power management ==
 
== Power management ==
  
 
Just consult [https://wiki.archlinux.org/index.php/Laptop Laptop] page to read about [https://wiki.archlinux.org/index.php/tp_smapi tp_smapi], [https://wiki.archlinux.org/index.php/pm-utils pm-utils], [https://wiki.archlinux.org/index.php/Uswsusp uswsusp] and [https://wiki.archlinux.org/index.php/Acpid acpid].
 
Just consult [https://wiki.archlinux.org/index.php/Laptop Laptop] page to read about [https://wiki.archlinux.org/index.php/tp_smapi tp_smapi], [https://wiki.archlinux.org/index.php/pm-utils pm-utils], [https://wiki.archlinux.org/index.php/Uswsusp uswsusp] and [https://wiki.archlinux.org/index.php/Acpid acpid].
 +
 +
Tp_smapi does not seem to work at all.
  
 
Suspend works fine, even with status indicator.
 
Suspend works fine, even with status indicator.
  
== Other notes ==
+
== ACPI ==
 +
 
 +
The only special keys that seems to work out of the box are the sleep, wifi, and keyboard backlight keys. All of the others (volume, brightness, etc.) need to be mapped using something like [[acpid]]. Here are the relevant acpi events
 +
{{bc|ac_adapter ACPI0003:00 00000080 00000000 # adapter unplugged
 +
ac_adapter ACPI0003:00 00000080 00000001 # adapter plugged-in
 +
battery PNP0C0A:00 00000080 00000001 # battery present
 +
button/mute MUTE 00000080 00000000 K
 +
button/volumedown VOLDN 00000080 00000000 K
 +
button/volumeup VOLUP 00000080 00000000 K
 +
video/switchmode VMOD 00000080 00000000 K
 +
button/prog1 PROG1 00000080 00000000 K # the thin button above F6
 +
video/brightnessdown BRTDN 00000087 00000000
 +
video/brightnessup BRTUP 00000086 00000000
 +
cd/prev CDPREV 00000080 00000000 K
 +
cd/play CDPLAY 00000080 00000000 K
 +
cd/next CDNEXT 00000080 00000000 K
 +
}}
 +
I had no luck getting an acpi event for the microphone mute button.
  
I will improve this page after several days using this laptop. Today is mine first day of it.
+
As an alternative to ACPI, you can use xbindkeys to catch keypress events. For instance, you can catch the XF86AudioMicMute keypress and then run an appropriate amixer command to toggle microphone muting.

Revision as of 18:43, 29 July 2013

Model description

Lenovo ThinkPad X1, Sandy Bridge (Core i5, 2,5 GHz), NWG2MRT This model has SSD 80/HDD 320 pair. Comes without optical drive. Has UEFI BIOS with BIOS-legacy fallback mode. Has Windows 7 Pro pre-installed, with tons of bloatware (bing toolbar, big Lenovo superbar button et all) pre-installed, too.

Drive space customization

By default:

- SSD: two WinRE partitions and one Windows system partition
- HDD: blank

I've chosen to:

- leave WinRE untouched (there are two such partitions)
- use SSD for my root partition
- use HDD for swap, /home, /var (~30 Gb, pacman cache goes here), /tmp

Installation method

Note: If you'd like to create Windows recovery flash drive, do it before Arch installation with the help of autorun located at recovery partition, from your installed Windows system.

Due to the fact that there is no optical drive, you need to install Arch from USB stick.

Legacy-BIOS

This procedure is far less involved then UEFI and works perfectly.

In order to turn off UEFI booting you will need to boot into your BIOS and change the boot mode to Legacy. Afterward, follow the Beginner's Guide for standard installation instructions.

UEFI

Note: This procedure reflects a single user's experience, and no attempt was made to experiment with different settings.

Download the official ISO or create your own using something like Archiso. Follow the instructions for creating a UEFI bootable USB from the ISO. Note that the default bootloader works fine so there's no need to replace it with an alternative like rEFInd. In the BIOS under Startup, set "UEFI/Legacy Boot" to UEFI only and turn off CSM support (this step might not be necessary, try skipping it first if you like).

Upon saving your changes and restarting, the UEFI boot options from the USB stick should come up and you can proceed to installing Arch.

It appears that the default partition table (and Windows installation) uses MBR. To use UEFI, you should reformat the disk as GPT (wiping the drive in the process). Follow the instructions for creating the EFI system partition. gdisk recommends a size of 300M. Follow the Beginner's Guide to see how to correctly generate (and then fix) the fstab entry for the ESP.

Booting using an efibootmgr entry is quite simple (and doesn't require any extra packages). Simply follow the instructions for creating the EFISTUB and adding the efibootmgr entry. The note about Lenovo Thinkpads truncating the UEFI options doesn't apply to the X1: the recommended efibootmgr entry works fine. The note about escaping the backslashes in the initrd path does apply, verify with efibootmgr -v that the boot entry doesn't have any missing characters.

Hardware

Almost everything works out of the box. Install synaptics and video-intel drivers.

Fingerprint Reader

fingerprint-gui from the AUR is already patched to work with the X1's newer fingerprint reader. To get the gui's dropdown to recognize your device, you'll have to add your user to the plugdev group:

# gpasswd -a <username> plugdev

It has been seen that the relevant udev rules do not get set properly. To do this, open /usr/lib/udev/rules.d/40-libbsapi.rules with your favorite text editor to add (or create with) the following lines:

/usr/lib/udev/rules.d/40-libbsapi.rules
ATTRS{idVendor}==”147e”, ATTRS{idProduct}==”2020″,   SYMLINK+=”input/touchchip-%k”, MODE=”0664″, GROUP=”plugdev”
ATTRS{idVendor}==”147e”, ATTRS{idProduct}==”2020″,   ATTR{power/control}==”*”, ATTR{power/control}=”auto”

Restart your computer for the group and udev changes to take effect.

Adjusting Backlight Brightness

Add acpi_osi="!Windows 2012" to GRUB_CMDLINE_LINUX in /etc/default/grub. (See https://bbs.archlinux.org/viewtopic.php?id=158775).

Power management

Just consult Laptop page to read about tp_smapi, pm-utils, uswsusp and acpid.

Tp_smapi does not seem to work at all.

Suspend works fine, even with status indicator.

ACPI

The only special keys that seems to work out of the box are the sleep, wifi, and keyboard backlight keys. All of the others (volume, brightness, etc.) need to be mapped using something like acpid. Here are the relevant acpi events

ac_adapter ACPI0003:00 00000080 00000000 # adapter unplugged
ac_adapter ACPI0003:00 00000080 00000001 # adapter plugged-in
battery PNP0C0A:00 00000080 00000001 # battery present
button/mute MUTE 00000080 00000000 K
button/volumedown VOLDN 00000080 00000000 K
button/volumeup VOLUP 00000080 00000000 K
video/switchmode VMOD 00000080 00000000 K
button/prog1 PROG1 00000080 00000000 K # the thin button above F6
video/brightnessdown BRTDN 00000087 00000000
video/brightnessup BRTUP 00000086 00000000
cd/prev CDPREV 00000080 00000000 K
cd/play CDPLAY 00000080 00000000 K
cd/next CDNEXT 00000080 00000000 K

I had no luck getting an acpi event for the microphone mute button.

As an alternative to ACPI, you can use xbindkeys to catch keypress events. For instance, you can catch the XF86AudioMicMute keypress and then run an appropriate amixer command to toggle microphone muting.