ThinkPad X1 Carbon 5th Gen

I chose between this machine, a Txxx and Dell. I went the easy route this time. Not much research, just needed a replacement. The rest is going to be about using the machine with GNU/Linux Ubuntu.

Compared to the 3rd generation X1 Carbon that I’m replacing, the 5th generation is different in a couple of ways:

  • the keyboard is stiffer - you need to put more force into each keypress, and thus it’s a little noicier
  • it’s faster - my gut based guess is some 20% for the type of work I do (software development, lots of work with and inside Docker containers & images)
  • the battery lasts a lot longer - after a 3 hours Coding Dojo session (IntelliJ IDEA and HDMI, full screen brightness), I still have > 50% battery left
  • it’s a few millimeters smaller
  • speakers have moved to the front - the old setup on the side was better when the laptop sits in my lap, now the sound gets muted/muffled

Ubuntu 17.04

General and summary

Out of the box, I actually ran the Windows installer, used Windows for a few hours, getting Ubuntu Desktop 17.04 ISO and put it on a USB stick. Rebooted, pressed enter to abort normal boot, selected USB device (it said multicard reader), worked as expected from that point - except for the pointing device(s).

Summary

As of 2017-07-08:

Most stuff works out of the box (that I’ve tried), except for

  • the trackpad - ie the touchpad and trackpoint (red dot thing between keys G, H and B). This device doesn’t show up under either fresh 16.04 LTS, nor 17.04.
  • the webcam - with Cheese, I get 1 frame per second

My best current setup reduces the touchpad to single click and moving the pointer on the screen - no scrolling. This is done in grub: /etc/default/grub:GRUB_CMDLINE_LINUX_DEFAULT="i8042.reset i8042.nomux psmouse.proto=imps quiet splash"

Hardware Support and Features Tested

All of these are tested and works as expected:

  • wifi - no issues even after numerous sleep/hibernate cycles (was an issue with my X1C3)
  • built-in display (monitor)
  • USB-C multi-adapter with HDMI
  • USB-B ports
  • built-in speakers - works well, but position has changed so sound is muffled when laptop is put in your lap (as in laptop)
  • hdmi - numerous mobbing and pair programming sessions
  • bluetooth - the Microsoft Arc Touch mouse works flawlessly, pairing etc: no issues
  • all-in-one adapter - USB C to HDMI just works as expected
  • headphone jack - works

Broken out of the box (with Ubuntu 17.04):

  • webcam - takes 8 seconds to start a feed, and the feed is 1 frame per second
  • touchpad - no two finger scrolling (may be hardware issue, not resolved yet)

Not yet tested:

  • wan, gsm

Changelog

2017-07-23

On the Lenovo Forum, the touchpad issues has been marked as solved for Windows users, with firmware(!) updates. The thread has been closed and moved to a Linux section of the forum.

Upgrading BIOS from Linux

The updater doesn’t require windows, you just need to boot the ISO from a USB stick. I managed to do this using sudo apt-get install genisoimage and geteltorito -o converted.img n1mur06w.iso which I then simply wrote directly to the USB device (dd if=converted.img of=/dev/sdX), reboot, Enter (abort normal boot), F12 (enter boot menu), selected top USB option.

Before doing the upgrade, you may want to run dmidecode and save the output to a file, and compare afterwards. This took me from

version: N1MET31W (1.16 )
date: 03/10/2017

to:

version: N1MET35W (1.20 )
date: 05/17/2017

Upgrading to 1.22 is currently failing. I download files from Lenovo PC Support page for 20HR (which is what I have).

Relevant posts in that thread

(u) = unconfirmed

User Hardware OS and comment
rgba ELANTech (u) Working with patch
maz3max ? Works after BIOS upgrade and newer firmware, plus “power reset”
afunk1 ? Unclear. Not working
MarkPash ? Unclear. Not working
schröter ? Ubuntu 16.10. Not working
jno ? Unclear. Not working
_paul ? Unclear, but dual boot. Ran updates from Windows, still get occasional hickups. Tried 4.12.2 (Ubuntu build)
teehaa ? Unclear. Not working

afunk1

About completely useless, lot of dmesg errors. Have tried patched Linux kernel.

Not working: psmouse serio1: synaptics: Touchpad model: 1, fw: 8.2, id: 0x1e2a1, caps: 0xf003a3/0x940300/0x12e800/0x0, board id: 3288, fw id: 2538625

MarkPash

Not working: psmouse serio1: synaptics: Touchpad model: 1, fw: 8.2, id: 0x1e2a1, caps: 0xf003a3/0x940300/0x12e800/0x0, board id: 3288, fw id: 2538625

fredrik_wendt (me)

Not working, BIOS+fw updated: psmouse serio1: synaptics: Touchpad model: 1, fw: 8.2, id: 0x1e2a1, caps: 0xf003a3/0x940300/0x12e800/0x0, board id: 3288, fw id: 2538625

maz3max

Has two machines, claims got it working after “power reset”. Reports this: psmouse serio1: synaptics: Touchpad model: 1, fw: 8.2, id: 0x1e2b1, caps: 0xf002a3/0x940300/0x12e800/0x400000, board id: 3289, fw id: 2492434

schröter

Gets hickups every 10 minutes.

raqball

Working: psmouse serio1: synaptics: Touchpad model: 1, fw: 8.2, id: 0x1e2b1, caps: 0xf002a3/0x940300/0x12e800/0x400000, board id: 3289, fw id: 2492434

Root cause

maz3max claims this:

Hey, I’m a linuxer too. After updating the firmware, my issues are gone. I do have unsmooth scrolling sometimes, but that could as well be a software issue.

The trackpoint seems to be the bad guy interfering here. If you want to get a replacement, replace that knob.

The touchpads are all identical models manufactured by Synaptics. The trackpoints are manufactured by ALPS or ELANTech and as far as I remember, only ALPS trackpoints received the update.

Andy_Lenovo writes “Trackpoint firmware which also fixes the touchpad freezing” and “The new firmware requires BIOS […] 1.20 in order to install”

I’m going to update the BIOS to yet another newer version, 1.22, later today and see where that gets me.

2017-07-08

The touchpad issue seems to still be unresolved over at Lenovo: I’m still getting “out of stock” e-mails from the customer service case I have open with them.

ceda@lx1carbon5:~$ grep -e "Using input driver " /var/log/Xorg.0.log
[     8.118] (II) Using input driver 'libinput' for 'Power Button'
[     8.145] (II) Using input driver 'libinput' for 'Video Bus'
[     8.181] (II) Using input driver 'libinput' for 'Sleep Button'
[     8.220] (II) Using input driver 'libinput' for 'Integrated Camera'
[     8.257] (II) Using input driver 'libinput' for 'AT Translated Set 2 keyboard'
[     8.279] (II) Using input driver 'synaptics' for 'SynPS/2 Synaptics TouchPad'
[     8.381] (II) Using input driver 'libinput' for 'ThinkPad Extra Buttons'
[     9.545] (II) Using input driver 'libinput' for 'PS/2 Generic Mouse'
[    71.567] (II) Using input driver 'libinput' for 'PS/2 Generic Mouse'
[    74.237] (II) Using input driver 'libinput' for 'PS/2 Synaptics TouchPad'
[111612.831] (II) Using input driver 'synaptics' for 'SynPS/2 Synaptics TouchPad'
[111618.480] (II) Using input driver 'libinput' for 'PS/2 Generic Mouse'
[111629.496] (II) Using input driver 'libinput' for 'PS/2 Generic Mouse'
[111632.281] (II) Using input driver 'libinput' for 'PS/2 Synaptics TouchPad'

and the kernel module logged errors

ceda@lx1carbon5:~$ dmesg | egrep 'psmouse|input'
[110020.449374] Modules linked in: xt_nat xt_tcpudp veth psmouse ipt_MASQUERADE nf_nat_masquerade_ipv4 nf_conntrack_netlink nfnetlink xfrm_user xfrm_algo iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 xt_addrtype iptable_filter xt_conntrack nf_nat nf_conntrack libcrc32c br_netfilter bridge stp llc overlay ccm rfcomm cmac uhid bnep binfmt_misc snd_soc_skl snd_soc_skl_ipc snd_soc_sst_ipc snd_soc_sst_dsp snd_hda_ext_core snd_soc_sst_match i2c_designware_platform i2c_designware_core arc4 nls_iso8859_1 intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc iwlmvm snd_hda_codec_hdmi mac80211 snd_seq_midi snd_hda_codec_conexant snd_hda_codec_generic snd_seq_midi_event aesni_intel snd_soc_core aes_x86_64 crypto_simd glue_helper
[110020.449426]  cryptd snd_compress ac97_bus snd_pcm_dmaengine cdc_mbim cdc_wdm iwlwifi snd_hda_intel input_leds cdc_ncm snd_hda_codec usbnet qcserial snd_hda_core joydev usb_wwan rtsx_pci_ms mii snd_hwdep uvcvideo snd_rawmidi serio_raw usbserial snd_pcm cfg80211 videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 memstick videobuf2_core thinkpad_acpi videodev nvram media shpchp mei_me btusb mei btrtl intel_pch_thermal idma64 virt_dma intel_lpss_pci ucsi snd_seq snd_seq_device snd_timer snd hci_uart btbcm btqca soundcore btintel bluetooth intel_lpss_acpi intel_lpss mac_hid tpm_crb acpi_pad parport_pc ppdev lp parport ip_tables x_tables autofs4 rtsx_pci_sdmmc i915 i2c_algo_bit drm_kms_helper syscopyarea e1000e sysfillrect sysimgblt rtsx_pci fb_sys_fops drm ptp nvme pps_core nvme_core wmi i2c_hid pinctrl_sunrisepoint
[110020.449489]  pinctrl_intel hid video fjes [last unloaded: psmouse]
[111610.404357] psmouse serio1: synaptics: queried max coordinates: x [..5678], y [..4758]
[111610.436861] psmouse serio1: synaptics: queried min coordinates: x [1266..], y [1094..]
[111610.500660] psmouse serio1: synaptics: Touchpad model: 1, fw: 8.2, id: 0x1e2a1, caps: 0xf003a3/0x940300/0x12e800/0x0, board id: 3288, fw id: 2538625
[111610.500677] psmouse serio1: synaptics: serio: Synaptics pass-through port at isa0060/serio1/input0
[111610.543082] input: SynPS/2 Synaptics TouchPad as /devices/platform/i8042/serio1/input/input20
[111610.909226] psmouse serio3: Failed to reset mouse on synaptics-pt/serio0
[111616.201362] input: PS/2 Generic Mouse as /devices/platform/i8042/serio1/serio3/input/input21
[111616.469117] psmouse serio3: Failed to enable mouse on synaptics-pt/serio0
[111617.329663] psmouse serio1: TouchPad at isa0060/serio1/input0 lost sync at byte 1
[111617.331057] psmouse serio1: TouchPad at isa0060/serio1/input0 lost sync at byte 1
[111617.332415] psmouse serio1: TouchPad at isa0060/serio1/input0 lost sync at byte 1
[111617.342449] psmouse serio1: TouchPad at isa0060/serio1/input0 lost sync at byte 1
[111617.343726] psmouse serio1: TouchPad at isa0060/serio1/input0 lost sync at byte 1
[111617.343730] psmouse serio1: issuing reconnect request
[111618.074559] psmouse serio1: synaptics: queried max coordinates: x [..5678], y [..4758]
[111618.107492] psmouse serio1: synaptics: queried min coordinates: x [1266..], y [1094..]
[111620.679985] psmouse serio1: TouchPad at isa0060/serio1/input0 lost sync at byte 1
[111620.681160] psmouse serio1: TouchPad at isa0060/serio1/input0 lost sync at byte 1
[111620.682404] psmouse serio1: TouchPad at isa0060/serio1/input0 lost sync at byte 1
[111620.692277] psmouse serio1: TouchPad at isa0060/serio1/input0 lost sync at byte 1
[111620.693417] psmouse serio1: TouchPad at isa0060/serio1/input0 lost sync at byte 1
[111620.693421] psmouse serio1: issuing reconnect request
[111621.419865] psmouse serio1: synaptics: queried max coordinates: x [..5678], y [..4758]
[111621.452887] psmouse serio1: synaptics: queried min coordinates: x [1266..], y [1094..]
[111621.921291] psmouse serio3: Failed to reset mouse on synaptics-pt/serio0
[111627.201462] input: PS/2 Generic Mouse as /devices/platform/i8042/serio1/serio3/input/input23
[111627.469117] psmouse serio3: Failed to enable mouse on synaptics-pt/serio0
[111629.990804] input: PS/2 Synaptics TouchPad as /devices/platform/i8042/serio1/input/input25

2017-06-28

Made a new run at getting a newer kernel. My approach to building (with Docker) is here: github/FredrikWendt/x1c5-touchpad-fix

No luck - same error messages logged to dmesg.

2017-06-06 (Sweden’s National Day)

Getting source ready

  1. Uncomment all lines with deb-src in /etc/apt/sources.list
  2. As a non-root user (there’s a APT bug), get the source apt-get source linux-image-extra-4.10.0-19-generic

Building the Debian package

sudo apt-get install build-essential fakeroot devscripts
apt-get source linux-image-extra-4.10.0-19-generic
sudo apt-get build-dep linux-image-extra-4.10.0-19-generic
dpatch-edit-patch 99_lenovo_x1_carbon_5th_gen_synaptics_fix
# in the shell launched, make the changes
exit
cat debian/patches/99_lenovo_x1_carbon_5th_gen_synaptics_fix.dpatch
# ...
echo 99_lenovo_x1_carbon_5th_gen_synaptics_fix >> debian/patches/00list
dch -n 
# Edit the changelog
debuild -b -uc -us -tc

2017-05-25

I’ve mostly used the laptop connected to a external (USB) mouse and keyboard. I’ve discovered I have almost twice the runtime with this battery, compared to doing the same work on the 3rd gen X1.

I just discovered there’s a looong thread about this on Lenovo forums. I just apt update and apt upgraded just now, so I’ll disabled boot params and see where this gets me. Then I’ll read up on that e-mail thread. (With no kernel args, “nothing” works and there’s issues reported in dmesg log.)

The Thread:

  • On page 8 Frogybloop confirms that the replacement unit received, has no issues.
  • On page 16, a forum Administrator provided a link to a beta driver. The post was later updated to an official driver release
  • On page 17, I found a link to this page :-)
  • On page 21, the same forum administrator provides a link to an official release of a new driver.
  • On page 24, Andy the admin says engineers have been able to recreate the issue and are working on possible solution.

Following link to Reddit where shizonic got confirmation from a tech rep that this is a hardware issue.

2017-04-26

Added a line to 70-pointingstick.hwdb (after reading some thread on reddit, but it made no difference. xinput still doesn’t list the device:

ceda@lx1carbon5:~$ xinput
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=11   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Sleep Button                              id=8    [slave  keyboard (3)]
    ↳ Integrated Camera                         id=9    [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=10   [slave  keyboard (3)]
    ↳ ThinkPad Extra Buttons                    id=12   [slave  keyboard (3)]

Changed BIOS to:

  • disable Security » Secure Boot » Secure Boot
  • enable Security » Virtualization » Intel (R) Virtualization Technology
  • enable Security » Virtualization » Intel (R) VT-d Feature
  • enable Config » USB » Always on USB » Charge in Battery Mode
  • disable Config » Beep and Alarm » Keyboard Beep

Three ideas where posted on Launchpad a long time ago.

a) Tried modprobe psmouse resetafter=0 - just got worse.

b) Tried i8042.nomux=1 in /etd/default/grub setting GRUB_CMDLINE_LINUX_DEFAULT, and then running update-grub2. Reboot. This made it a little better, ie it works more often but still completely unusable and unreliable.

b, then a) xinput now shows the device as PS/2 Generic Mouse.

c) Kernel boot argument acpi_osi=Linux - no improvement over any of options above.

Another idea to try out was found on ubuntuforums.org: i8042.reset i8042.nomux as boot parameters to Linux kernel. This had the best result, where the mouse was useable every 5-6 seconds, for a duration of less than a second.

Someone else had issues and tried different protocols: modprobe psmouse proto=imps and the imps protocol works for simple things, but scrolling seems to not be supported - or at least working - using this protocol.

Other

apt install openssh-server
ssh -X 192.168.1.232 'x2x -east -to :0'
This work by Fredrik Wendt is licensed under CC by-sa.