Difference between revisions of "Lenovo ThinkPad X1 Carbon"

From ArchWiki
Jump to: navigation, search
m (UEFI: fix typo)
 
(34 intermediate revisions by 17 users not shown)
Line 1: Line 1:
 
[[Category:Lenovo]]
 
[[Category:Lenovo]]
== Model description ==
+
{{Related articles start}}
 +
{{Related|Lenovo ThinkPad X1 Carbon (Gen 2)}}
 +
{{Related|Lenovo ThinkPad X1 Carbon (Gen 3)}}
 +
{{Related|Lenovo ThinkPad X1 Carbon (Gen 4)}}
 +
{{Related articles end}}
  
 
Lenovo ThinkPad X1 Carbon (X1C).
 
Lenovo ThinkPad X1 Carbon (X1C).
Line 6: Line 10:
 
Has UEFI BIOS with BIOS-legacy fallback mode.
 
Has UEFI BIOS with BIOS-legacy fallback mode.
  
{{tip| A great resource for thinkpads is
+
{{tip| A great resource for thinkpads is http://www.thinkwiki.org/wiki/ThinkWiki}}
http://www.thinkwiki.org/wiki/ThinkWiki}}
+
 
 +
== Booting ==
  
 
=== Legacy-BIOS ===
 
=== Legacy-BIOS ===
  
This procedure is far less involved then UEFI and works perfectly.
+
This procedure is far less involved than 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.
+
Boot into your BIOS and change the boot mode to Legacy. Then simply follow the normal [[installation guide]].
  
 
=== UEFI ===
 
=== UEFI ===
  
See https://bbs.archlinux.org/viewtopic.php?pid=1288500#p1288500
+
{{Accuracy|Making a custom ISO may not be necessary. Try the regular installation ISO first|Talk:Lenovo ThinkPad X1 Carbon#UEFI support}}
 +
{{Merge|GRUB#UEFI systems|unnecessary duplication}}
 +
 
 +
Use [[archboot]] to install or see https://bbs.archlinux.org/viewtopic.php?pid=1288500#p1288500
  
 
1. You follow the guide from here and skip the part about errors and refind: [[Unified_Extensible_Firmware_Interface#Create_UEFI_bootable_USB_from_ISO|Create_UEFI_bootable_USB_from_ISO]]
 
1. You follow the guide from here and skip the part about errors and refind: [[Unified_Extensible_Firmware_Interface#Create_UEFI_bootable_USB_from_ISO|Create_UEFI_bootable_USB_from_ISO]]
Line 49: Line 57:
 
initrd /arch/boot/x86_64/archiso.img
 
initrd /arch/boot/x86_64/archiso.img
 
}
 
}
 
  
 
### END /etc/grub.d/10_linux ###
 
### END /etc/grub.d/10_linux ###
Line 58: Line 65:
  
 
Success. Somethings are implied, like GPT partitiontable etc.
 
Success. Somethings are implied, like GPT partitiontable etc.
 +
 +
=== Hanging on "HWP enabled" message ===
 +
 +
This is due to a [https://bugzilla.kernel.org/show_bug.cgi?id=110941 bug] introduced in Linux 4.4. To work around it, add {{ic|1=intel_pstate=no_hwp}} to your [[kernel parameters]].
  
 
== Hardware ==
 
== Hardware ==
Line 66: Line 77:
 
Sound works out of the box.
 
Sound works out of the box.
  
=== Network ===
+
==== Xbindkeys ====
 +
For alternative window managers (Fluxbox, etc..), try installing [[xbindkeys]] and adding the following to ~/.xbindkeysrc
  
==== Wired ====
+
"amixer -c 0 set Master 1dB-"
 +
  XF86AudioLowerVolume
 +
"amixer -c 0 set Master 1dB+"
 +
  XF86AudioRaiseVolume
  
Comes with USB->Ethernet plug. Works out of the box.
+
=== Network ===
  
==== Wireless ====
+
Wired networking works out of the box with the Ethernet to USB adapter. Wireless works out of the box using the {{ic|iwlwifi}} module.
+
Works out of the box. Uses the following module
+
* iwlwifi
+
  
----
+
{{hc|$ lspci|output: Network controller: Intel Corporation Centrino Advanced-N 6205 [Taylor Peak] (rev 96)}}
{{ic|lspci}} ''output: Network controller: Intel Corporation Centrino Advanced-N 6205 [Taylor Peak] (rev 96)''
+
  
 
=== Touchscreen ===
 
=== Touchscreen ===
  
Works out of the box.
+
Works out of the box. To enable multi-touch, install [[Touchegg]].
Haven't looked for possibilities to configure multi-touch.
+
  
 
=== Video ===
 
=== Video ===
Line 89: Line 99:
 
The video card installed is Intel HD Graphics 4000. See [[intel]] for more info.
 
The video card installed is Intel HD Graphics 4000. See [[intel]] for more info.
  
Install the video driver with {{ic|pacman -S xf86-video-intel}}
+
==== Brightness control ====
 +
Default brightness adjustment keys work but need to be pressed multiple times to increase/decrease the screen brightness. Writing your own ACPI handlers for those buttons seems to have no effect. In order to use them properly you need to add the [[kernel parameter]] {{ic|1=acpi_osi="!Windows 2012"}}. See also [[Backlight#ACPI]].
  
==== SNA ====
+
Some desktop environments may lack granularity while changing brightness. This is due to the DE (e.g. gnome-settings-daemon) along with the internal graphics module changing the brightness when brightness adjustment keys are pressed causing multiple steps per press. To work around this one can add the following to their boot parameters:
 +
video.brightness_switch_enabled=0
  
To use [[Intel Graphics#Tips_and_tricks|SNA acceleration method]] add
+
===== Xbindkeys =====
 +
For alternative window managers (Fluxbox, etc..), try installing [[xbindkeys]] and adding the following to ~/.xbindkeysrc
  
{{hc|/etc/X11/xorg.conf.d/20-intel.conf|<nowiki>
+
"xbacklight -dec 5"
Section "Device"
+
  XF86MonBrightnessDown
        Identifier "Intel Graphics"
+
"xbacklight -inc 5"
        Driver "intel"
+
  XF86MonBrightnessUp
        Option "AccelMethod" "sna"
+
EndSection
+
</nowiki>}}
+
  
==== EDID bug ====
+
==== Wrong EDID for external display ====
  
{{Note|Update: This is due to the use of a mini-DP->VGA-adapter. Tested without bugs with a mini-DP->DP-cable.}}
+
With certain connectors (e.g. MiniDP to VGA), there is a bug getting EDID for the external screen while booting:
 
+
 
+
There is a bug getting EDID for the external screen when connected at bootup.
+
 
+
I get this error message
+
 
  [ 93.736330] [drm:intel_dp_i2c_aux_ch] *ERROR* too many retries, giving up
 
  [ 93.736330] [drm:intel_dp_i2c_aux_ch] *ERROR* too many retries, giving up
 +
This does not occur if the external screen is connected after booting.
  
If external screen is connected after bootup everything works fine.
+
The correct mode can be added per [[xrandr#Adding undetected resolutions]]:
 
+
{{bc|
I had to manually add a modeline and set the preferred resolution with this script.
+
xrandr --newmode 1920x1200_60 154 1920 1968 2000 2080 1200 1203 1209 1235 -hsync +vsync
{{hc|/usr/local/bin/dp-output|<nowiki>
+
xrandr --addmode DP1 1920x1200_60
# Monitor setup
+
xrandr --output DP1 --mode 1920x1200_60}}
EXTERNAL_OUTPUT="DP1"
+
INTERNAL_OUTPUT="LVDS1"
+
 
+
xrandr |grep $EXTERNAL_OUTPUT | grep " connected " | if [ $? -eq 0 ]; then
+
        xrandr --newmode 1920x1200_60 154 1920 1968 2000 2080 1200 1203 1209 1235 -hsync +vsync
+
        xrandr --addmode DP1 1920x1200_60
+
        xrandr --output $INTERNAL_OUTPUT --off --output $EXTERNAL_OUTPUT --mode 1920x1200_60
+
fi
+
</nowiki>}}
+
 
+
And add the script to startup at X-session start. Since I use [[slim]] it`s done with this setting in slim.conf
+
{{hc|/etc/slim.conf|sessionstart_cmd dp-output}}
+
  
 
=== KMS ===
 
=== KMS ===
Get [[KMS]] working by adding i915 to the modules line
+
Enable [[KMS]] using the {{ic|i915}} module and by enabling VT in BIOS.
{{hc|/etc/mkinitcpio.conf|<nowiki>MODULES="i915"</nowiki>}}
+
 
+
$ mkinitcpio -p linux
+
 
+
You also have to enable VT in BIOS.
+
  
 
=== Webcam ===
 
=== Webcam ===
Line 144: Line 133:
 
=== Fingerprint Reader ===
 
=== Fingerprint Reader ===
  
{{AUR|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:
+
Works out of the box with [[Fprint]].
 +
 
 +
For a GUI {{AUR|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 will have to add your user to the {{ic|plugdev}} group:
  
 
  $ gpasswd -a <username> plugdev
 
  $ gpasswd -a <username> plugdev
Line 163: Line 154:
 
{{hc|/etc/modprobe.d/avoid-mbib.conf|<nowiki>options cdc_ncm prefer_mbim=N</nowiki>}}
 
{{hc|/etc/modprobe.d/avoid-mbib.conf|<nowiki>options cdc_ncm prefer_mbim=N</nowiki>}}
  
Tested OK with [[networkmanager]] with {{pkg|modemmanager}} installed
+
Tested OK with [[NetworkManager]] with {{pkg|modemmanager}} installed
 
----
 
----
 
{{ic|lsusb}} ''output: 0bdb:1926 Ericsson Business Mobile Networks BV''
 
{{ic|lsusb}} ''output: 0bdb:1926 Ericsson Business Mobile Networks BV''
Line 180: Line 171:
 
Run {{ic|sudo mbm-gpsd}}
 
Run {{ic|sudo mbm-gpsd}}
  
See if there's GPS-output
+
See if there is GPS-output
 
{{ic|cat /dev/gps0}}
 
{{ic|cat /dev/gps0}}
  
Line 197: Line 188:
  
 
=== Bluetooth ===
 
=== Bluetooth ===
Works out of the box.
+
First try to set up [[Bluetooth]] normally. If you get kernel error messages:
Test with:
+
 
  $ systemctl start bluetooth
+
  kernel: bluetooth hci0: Direct firmware load for brcm/BCM20702A1-0a5c-21e6.hcd failed with error -2
  $ bluetoothctl
+
  kernel: Bluetooth: hci0: BCM: Patch brcm/BCM20702A1-0a5c-21e6.hcd not found
+
You need to manually install the proprietary firmware. The slackware wiki describes one way to do this: http://www.slackwiki.com/Btfirmware-nonfree.
[bluetooth]# power on
+
  
== Other hardware ==
+
=== Mouse/Touchpad ===
 +
Works out of the box. See [[TrackPoint]] for details.
  
 
=== Docking ===
 
=== Docking ===
This model comes without a docking port.
+
This model has no docking port.
  
Since the video for USB 3 Docking Stations currently isn't supported[http://www.displaylink.org/forum/showthread.php?t=1748], I had to go for [http://www.thinkwiki.org/wiki/USB_Port_Replicator_with_Digital_Video USB Port Replicator with Digital Video (USB 2.0)]
+
Video for USB 3 Docking Stations currently is [http://www.displaylink.org/forum/showthread.php?t=1748 not supported], so you must use a [http://www.thinkwiki.org/wiki/USB_Port_Replicator_with_Digital_Video USB Port Replicator with Digital Video (USB 2.0)]
  
This works:
+
This supports:
 
* USB-devices connected to dock
 
* USB-devices connected to dock
 
* Audio
 
* Audio
 
* Microphone
 
* Microphone
 
* Ethernet
 
* Ethernet
* Video (follow [[DisplayLink]] guide)
+
* Video (see [[DisplayLink]])

Latest revision as of 07:38, 10 June 2016

Lenovo ThinkPad X1 Carbon (X1C). There is also a touch version. Comes without optical drive. Has UEFI BIOS with BIOS-legacy fallback mode.

Tip: A great resource for thinkpads is http://www.thinkwiki.org/wiki/ThinkWiki

Booting

Legacy-BIOS

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

Boot into your BIOS and change the boot mode to Legacy. Then simply follow the normal installation guide.

UEFI

Tango-inaccurate.pngThe factual accuracy of this article or section is disputed.Tango-inaccurate.png

Reason: Making a custom ISO may not be necessary. Try the regular installation ISO first (Discuss in Talk:Lenovo ThinkPad X1 Carbon#UEFI support)

Merge-arrows-2.pngThis article or section is a candidate for merging with GRUB#UEFI systems.Merge-arrows-2.png

Notes: unnecessary duplication (Discuss in Talk:Lenovo ThinkPad X1 Carbon#)

Use archboot to install or see https://bbs.archlinux.org/viewtopic.php?pid=1288500#p1288500

1. You follow the guide from here and skip the part about errors and refind: Create_UEFI_bootable_USB_from_ISO

2. Make sure you USB is mounted to /boot/efi and install grub, like so:

$ grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --boot-directory=/boot/efi/ --recheck --debug

OBS: You can remove the entry from your EFI bootmanger, with efibootmgr by issuing:

$ efibootmgr -b XX -B

3. Now you can choose if you wanna hack you grub.cfg or use the custom config in grub.d. Either way generate the grub.cfg:

$ grub-mkconfig -o /boot/efi/grub/grub.cfg

4. Make certain appropriate changes have been made to grub.cfg. My working example, which could use cleaning:

/etc/grub.d/10_linux
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux test'  {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod ext2
	set root='hd0,gpt1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1  B35D-FE34
	else
	  search --no-floppy --fs-uuid --set=root B35D-FE34
	fi
	echo	'Loading Linux core repo kernel ...'
	linux	/arch/boot/x86_64/vmlinuz root=UUID=B35D-FE34 ro  archisobasedir=arch archisolabel=ARCH_201306
	echo	'Loading initial ramdisk ...'
	initrd	/arch/boot/x86_64/archiso.img
}

### END /etc/grub.d/10_linux ###

5. Move the grub.efi to overwrite the archiso supplied one (which btw works on my desktop. I guess GRUB includes more workarounds for buggy firmware from manufactureres. See this video, if you have time: http://mjg59.dreamwidth.org/10014.html

$ mv /boot/efi/EFI/arch_grub/grubx64.efi /mnt/efi/EFI/boot/bootx64.efi

Success. Somethings are implied, like GPT partitiontable etc.

Hanging on "HWP enabled" message

This is due to a bug introduced in Linux 4.4. To work around it, add intel_pstate=no_hwp to your kernel parameters.

Hardware

Almost everything works out of the box.

Audio

Sound works out of the box.

Xbindkeys

For alternative window managers (Fluxbox, etc..), try installing xbindkeys and adding the following to ~/.xbindkeysrc

"amixer -c 0 set Master 1dB-"
  XF86AudioLowerVolume
"amixer -c 0 set Master 1dB+"
  XF86AudioRaiseVolume

Network

Wired networking works out of the box with the Ethernet to USB adapter. Wireless works out of the box using the iwlwifi module.

$ lspci
output: Network controller: Intel Corporation Centrino Advanced-N 6205 [Taylor Peak] (rev 96)

Touchscreen

Works out of the box. To enable multi-touch, install Touchegg.

Video

The video card installed is Intel HD Graphics 4000. See intel for more info.

Brightness control

Default brightness adjustment keys work but need to be pressed multiple times to increase/decrease the screen brightness. Writing your own ACPI handlers for those buttons seems to have no effect. In order to use them properly you need to add the kernel parameter acpi_osi="!Windows 2012". See also Backlight#ACPI.

Some desktop environments may lack granularity while changing brightness. This is due to the DE (e.g. gnome-settings-daemon) along with the internal graphics module changing the brightness when brightness adjustment keys are pressed causing multiple steps per press. To work around this one can add the following to their boot parameters:

video.brightness_switch_enabled=0
Xbindkeys

For alternative window managers (Fluxbox, etc..), try installing xbindkeys and adding the following to ~/.xbindkeysrc

"xbacklight -dec 5"
  XF86MonBrightnessDown
"xbacklight -inc 5"
  XF86MonBrightnessUp

Wrong EDID for external display

With certain connectors (e.g. MiniDP to VGA), there is a bug getting EDID for the external screen while booting:

[ 93.736330] [drm:intel_dp_i2c_aux_ch] *ERROR* too many retries, giving up

This does not occur if the external screen is connected after booting.

The correct mode can be added per xrandr#Adding undetected resolutions:

xrandr --newmode 1920x1200_60 154 1920 1968 2000 2080 1200 1203 1209 1235 -hsync +vsync
xrandr --addmode DP1 1920x1200_60
xrandr --output DP1 --mode 1920x1200_60

KMS

Enable KMS using the i915 module and by enabling VT in BIOS.

Webcam

Works out of the box. Tested with guvcview

Fingerprint Reader

Works out of the box with Fprint.

For a GUI fingerprint-guiAUR 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 will have to add your user to the plugdev group:

$ gpasswd -a <username> plugdev

See fingerprint-gui for more information about config


lsusb output: 147e:2020 Upek TouchChip Fingerprint Coprocessor (WBF advanced mode)

WWAN (Mobile broadband)

This model includes a Ericsson H5321gw adapter that can be used as a mobile broadband adapter and GPS.

The SIM-card must be inserted in the back of the laptop.

Add text to the following file and reboot

/etc/modprobe.d/avoid-mbib.conf
options cdc_ncm prefer_mbim=N

Tested OK with NetworkManager with modemmanager installed


lsusb output: 0bdb:1926 Ericsson Business Mobile Networks BV

GPS

Install gpsd from extra and mbm-gpsd-git from AUR. Add this to the following file

/etc/udev/rules.d/99-mbm.rules
ATTRS{idVendor}=="0bdb", ATTRS{idProduct}=="1926", ENV{ID_USB_INTERFACE_NUM}=="09", ENV{MBM_CAPABILITY}="gps_nmea"
ATTRS{idVendor}=="0bdb", ATTRS{idProduct}=="1926", ENV{ID_USB_INTERFACE_NUM}=="03", ENV{MBM_CAPABILITY}="gps_ctrl"

Reboot to reload udev rules.

Run sudo mbm-gpsd

See if there is GPS-output cat /dev/gps0

Run sudo gpsd -b -N /dev/gps0

To test it xgps

Or use e.g. foxtrotgpsAUR in AUR.

See this link for more info.


lsusb output: 0bdb:1926 Ericsson Business Mobile Networks BV

Keyboard backlight

Works out of the box. Use FN+Space

Bluetooth

First try to set up Bluetooth normally. If you get kernel error messages:

kernel: bluetooth hci0: Direct firmware load for brcm/BCM20702A1-0a5c-21e6.hcd failed with error -2
kernel: Bluetooth: hci0: BCM: Patch brcm/BCM20702A1-0a5c-21e6.hcd not found 

You need to manually install the proprietary firmware. The slackware wiki describes one way to do this: http://www.slackwiki.com/Btfirmware-nonfree.

Mouse/Touchpad

Works out of the box. See TrackPoint for details.

Docking

This model has no docking port.

Video for USB 3 Docking Stations currently is not supported, so you must use a USB Port Replicator with Digital Video (USB 2.0)

This supports:

  • USB-devices connected to dock
  • Audio
  • Microphone
  • Ethernet
  • Video (see DisplayLink)