[en] Notes on Thinkpad X1 Carbon 2017 + Arch Linux

changelogs

Quick Summary

I’m running Arch Linux (kernel 4.15) on a Thinkpad X1 Carbon 5th Gen (X1C5).

Most stuff works out of box,

Things partially working,

I haven’t tried,

Hardware

TrackPoint

ALPS or Elantech?

X1C5 comes with two versionshttps://patchwork.kernel.org/patch/9768231/ of TrackPoint: ALPS and Elantech. I confirmed mine has an Elantech one using TrackPointDetect.exe.

TouchPad-Flash Utility
2017-06-08 20:42:27
Command Line: "C:\Users\alexlu\Desktop\FW_Updater_1.0.0.9\TrackPointDetect.exe"
OS: 64-bit
Pst Vendor : Elan
[ERROR]: This TrackPoint is Elan (ID:03)

Cursor Speed & TrackPoint Cap

I used to take the plastic adapterThe plastic adapter from previous Thinkpad from my previous laptop - a Thinkpad E130 and trimmed a Soft Rim Cap to fit “Super Low Profile”. IMHO, a soft rim is much better than a soft dome.

I have switched to a 3d-printed rubber caps made by Saoto, it works really great.

The cursor speed and acceleration gets much better.

TrackPad

It works with libinput and pressure-based palm detection are functional. But it is still unresponsive to small movements for current release. https://bugs.freedesktop.org/show_bug.cgi?id=98839

There is a different device according to this thread.

dmesg output:

rmi4_smbus 0-002c: registering SMbus-connected sensor
rmi4_f01 rmi4-00.fn01: found RMI device, manufacturer: Synaptics, product: TM3289-002, fw id: 2492434

Fingerprint Reader

X1C5 have a Validity Sensor 138a:0097. There is no fully-working driver for it at this moment.

There is an open source reverse engineered driver working in progresshttps://github.com/nmikhailov/Validity90https://bugs.freedesktop.org/show_bug.cgi?id=94536.

Partially-Working Driver

  • Nikita Mikhailov(@nmikhailov) reverse-engineered how to use 0097 to verify fingerprint, but fingerprints need to be enrolled in Windows first.
  • Marco Trevisan(@3v1n0) wrote a match-on-host driverhttps://github.com/3v1n0/libfprint for 0090.
  • Aleksandr Saraikin(@hrenod) made a modificationhttps://github.com/hrenod/libfprint for 0097 based on @3v1n0’s work.

@hrenod’s fork make it possible to use 0097 to authenticate now. One just need to:

  1. initialize the device and enroll fingerprints in Windows,
  2. install fprintd and @hrenod’s libfprint,
  3. do a fake enroll (ex. fprintd-enroll),
  4. set up PAM rules.

WWAN

X1C5 (WWAN) comes with a Sierra EM7455 LTE Modem (1199:9079).

It works out of box using latest ModemManager.

Thunderbolt 3

Firmware Failures

My X1C5’s usb-c port dies sometime after I plug-in and out my usb-c hub, it was unable to charge and connect any devices, and it sometimes just “recovered” itself. I initially guess it is a hardware failure and sent the laptop once to repair center, but the technician can’t reproduce the issue.

Later I found there is a new Thunderbolt 3 firmware update, which says it:

  • Fixed an issue where system might not be charged after repeating AC plug-in and out.

It is not happen again after firmware updated so far. Intel WTF.

Recall for loose screws

Lenovo recently(2018/02/06) recalls X1C5 made before 2017/11 and Mine is unfortunately affected. I went to nearest Lenovo Service Center(around 4km) and it took 15~20 minutes for the technician to check. There is no loose screws at last.

Software

I’m using i3-gaps without a desktop environment.

Hardware Video Acceleration

It is possible to use the integrated graphic card to decode/encode videos, and this helps power-saving a lot.

See this article on ArchWiki for more info.

There are two spec/implement/API: VAAPI (by Intel) and VDPAU (by Nvidia). Since most software supports VAAPI, I just need to install libva-intel-driver pacakge.

libva-intel-driver

Current release version has a bughttps://github.com/01org/intel-vaapi-driver/issues/297 when decoding VP9 videos, libva-intel-driver-git package should fixes that.

chromium-vaapi

There is a VAAPI implementation for Chromium OS, and there is also a patchhttps://chromium-review.googlesource.com/c/chromium/src/+/532294 to enable that on Linux. The chromium-vaapi-bin package on AUR provides prebuilt binary, or you can build chromium-vaapi by yourself (It takes about 6 hrs first time, you can use ccache to speed up if you want to build it more than one time).

References

Outdated

These issues/tricks/workarounds are mostly outdated(linux kernel ≤ 4.12). Maybe I should just remove this section someday…

TrackPoint

Issues

  • Recognized as a “PS/2 Generic Mouse”
    ⇒ No palm-detection during trackpoint use

  • Since kernel driver doesn’t support the new trackpoint, both of sensitivity and speed aren’t adjustable.
    ⇒ The default speed/sensitivity is too slow to use.

Mark it as a pointing stick

I found I can making libinput treat the “PS/2 Generic Mouse” as a trackpoint using a custom udev hwdb entry.

Note: this should not be used anymore once trackpoint gets kernel driver supports

evdev:name:PS/2 Generic Mouse:dmi:*svnLENOVO*:pvrThinkPadX1Carbon5th*
  ID_INPUT_POINTINGSTICK=1

Better TrackPoint Acceleration

There is a patch which solves speed issue.

I get my trackpoint much usable by setting up:

  • LIBINPUT_ATTR_TRACKPOINT_RANGE=10 in hwdb
  • xinput set-prop "PS/2 Generic Mouse" "libinput Accel Speed" -0.25 in my .xinitrc

TrackPad

The trackpad is able to use rmi4 over smbus for now(4.12).

Turn it on by creating a psmouse.conf in /etc/modprobe.d/

options psmouse synaptics_intertouch=1

Palm Detection

  • pressure-based palm-detection works great (libinput ≥ 1.8)
  • palm-detection during trackpoint use requires mark it as a pointing stick.

New Hotkeys

Before linux-4.12, You needs these patches to get these buttons works.