This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.
Please visit our production wiki at https://wiki.gentoo.org
Lenovo ThinkPad P52
As of 2018-09-30 this is a WIP page inspired by [1]. Feel free to chat with me (zougloub on freenode) if you're figuring stuff out or have questions.
Hardware
Overview
root #
lscpu
Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 12 On-line CPU(s) list: 0-11 Thread(s) per core: 2 Core(s) per socket: 6 Socket(s): 1 NUMA node(s): 1 Vendor ID: GenuineIntel CPU family: 6 Model: 158 Model name: Intel(R) Xeon(R) E-2176M CPU @ 2.70GHz Stepping: 10 CPU MHz: 800.023 CPU max MHz: 4400.0000 CPU min MHz: 800.0000 BogoMIPS: 5424.00 Virtualization: VT-x L1d cache: 32K L1i cache: 32K L2 cache: 256K L3 cache: 12288K NUMA node0 CPU(s): 0-11 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp flush_l1d
root #
lspci -nnk
00:00.0 Host bridge [0600]: Intel Corporation Device [8086:3ec4] (rev 07) Subsystem: Lenovo Device [17aa:225f] 00:01.0 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16) [8086:1901] (rev 07) Kernel driver in use: pcieport 00:02.0 VGA compatible controller [0300]: Intel Corporation Device [8086:3e94] Subsystem: Lenovo Device [17aa:225f] Kernel driver in use: i915 00:04.0 Signal processing controller [1180]: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem [8086:1903] (rev 07) Subsystem: Lenovo Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem [17aa:225f] 00:08.0 System peripheral [0880]: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th Gen Core Processor Gaussian Mixture Model [8086:1911] Subsystem: Lenovo Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th Gen Core Processor Gaussian Mixture Model [17aa:225f] 00:12.0 Signal processing controller [1180]: Intel Corporation Device [8086:a379] (rev 10) Subsystem: Lenovo Device [17aa:225f] 00:14.0 USB controller [0c03]: Intel Corporation Device [8086:a36d] (rev 10) Subsystem: Lenovo Device [17aa:225f] Kernel driver in use: xhci_hcd Kernel modules: xhci_pci 00:14.2 RAM memory [0500]: Intel Corporation Device [8086:a36f] (rev 10) Subsystem: Lenovo Device [17aa:225f] 00:14.3 Network controller [0280]: Intel Corporation Device [8086:a370] (rev 10) Subsystem: Intel Corporation Device [8086:0030] Kernel driver in use: iwlwifi Kernel modules: iwlwifi 00:15.0 Serial bus controller [0c80]: Intel Corporation Device [8086:a368] (rev 10) Subsystem: Lenovo Device [17aa:225f] 00:16.0 Communication controller [0780]: Intel Corporation Device [8086:a360] (rev 10) Subsystem: Lenovo Device [17aa:225f] 00:16.3 Serial controller [0700]: Intel Corporation Device [8086:a363] (rev 10) Subsystem: Lenovo Device [17aa:225f] Kernel driver in use: serial 00:17.0 SATA controller [0106]: Intel Corporation Device [8086:a353] (rev 10) Subsystem: Lenovo Device [17aa:225f] Kernel driver in use: ahci 00:1c.0 PCI bridge [0604]: Intel Corporation Device [8086:a338] (rev f0) Kernel driver in use: pcieport 00:1c.7 PCI bridge [0604]: Intel Corporation Device [8086:a33f] (rev f0) Kernel driver in use: pcieport 00:1d.0 PCI bridge [0604]: Intel Corporation Device [8086:a330] (rev f0) Kernel driver in use: pcieport 00:1e.0 Communication controller [0780]: Intel Corporation Device [8086:a328] (rev 10) Subsystem: Lenovo Device [17aa:225f] 00:1f.0 ISA bridge [0601]: Intel Corporation Device [8086:a30e] (rev 10) Subsystem: Lenovo Device [17aa:225f] 00:1f.3 Audio device [0403]: Intel Corporation Device [8086:a348] (rev 10) Subsystem: Lenovo Device [17aa:225f] Kernel driver in use: snd_hda_intel Kernel modules: snd_hda_intel 00:1f.4 SMBus [0c05]: Intel Corporation Device [8086:a323] (rev 10) Subsystem: Lenovo Device [17aa:225f] Kernel driver in use: i801_smbus 00:1f.5 Serial bus controller [0c80]: Intel Corporation Device [8086:a324] (rev 10) Subsystem: Lenovo Device [17aa:225f] 00:1f.6 Ethernet controller [0200]: Intel Corporation Ethernet Connection (7) I219-LM [8086:15bb] (rev 10) Subsystem: Lenovo Ethernet Connection (7) I219-LM [17aa:225f] Kernel driver in use: e1000e 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation Device [10de:1cba] (rev ff) Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia 01:00.1 Audio device [0403]: NVIDIA Corporation GP107GL High Definition Audio Controller [10de:0fb9] (rev ff) Kernel driver in use: snd_hda_intel Kernel modules: snd_hda_intel 70:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS525A PCI Express Card Reader [10ec:525a] (rev 01) Subsystem: Lenovo RTS525A PCI Express Card Reader [17aa:225f] Kernel driver in use: rtsx_pci Kernel modules: rtsx_pci 71:00.0 Non-Volatile memory controller [0108]: Samsung Electronics Co Ltd NVMe SSD Controller SM951/PM951 [144d:a802] (rev 01) Subsystem: Samsung Electronics Co Ltd NVMe SSD Controller SM951/PM951 [144d:a801] Kernel driver in use: nvme
root #
lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/10p, 10000M /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/16p, 480M |__ Port 8: Dev 2, If 1, Class=Video, Driver=uvcvideo, 480M |__ Port 8: Dev 2, If 0, Class=Video, Driver=uvcvideo, 480M |__ Port 9: Dev 3, If 0, Class=Vendor Specific Class, Driver=, 12M |__ Port 10: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 12M |__ Port 10: Dev 4, If 1, Class=Human Interface Device, Driver=usbhid, 12M |__ Port 12: Dev 5, If 1, Class=Video, Driver=uvcvideo, 480M |__ Port 12: Dev 5, If 0, Class=Video, Driver=uvcvideo, 480M |__ Port 14: Dev 6, If 0, Class=Wireless, Driver=btusb, 12M |__ Port 14: Dev 6, If 1, Class=Wireless, Driver=btusb, 12M
root #
lsusb
Bus 001 Device 002: ID 04f2:b614 Chicony Electronics Co., Ltd Bus 001 Device 004: ID 056a:5191 Wacom Co., Ltd Bus 001 Device 005: ID 04f2:b615 Chicony Electronics Co., Ltd Bus 001 Device 006: ID 8087:0aaa Intel Corp. Bus 001 Device 003: ID 06cb:009a Synaptics, Inc. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Peculiarities
- Touchpad isn't working out of the box (as of 2018-09-30)
- Hybrid graphics are not a breeze to use
Power management
This section deals with:
- Tips for reducing power consumption
- Suspend/resume
TODO see Lenovo_ThinkPad_P50
Graphics
The laptop has an integrated Intel GPU (iGPU) and a second nVidia GPU (dGPU).
External displays are routed through the dGPU, and the laptop screen is connected to the iGPU.
The knobs to configure the displays are:
- The BIOS: it can either enable hybrid graphics or only the dGPU
- The bbswitch module (part of Bumblebee) can enable/disable the dGPU in a hybrid graphics configuration
- Bumblebee can route OpenGL / OpenCL calls to the dGPU
- The PRIME "thing" handles display routing through one or the other GPU
- Using the nouveau or nvidia proprietary drivers
Obviously:
- If external displays are to be used, the dGPU must be on
- The iGPU takes less power (see Power Management)
- The ideal configuration is hybrid graphics, with all display connectors available, and rendering mainly done using the iGPU, with the dGPU helping out for graphics-intensive loads. Unfortunately as of 2018-09-30, the problem when trying this configuration is that the OpenGL acceleration isn't available on the iGPU.
Notable configurations that work:
- BIOS in discrete graphics with nVidia-only display (that's the easiest way)
- BIOS in hybrid graphics with Intel-only display and Bumblebee, no external displays (everything is good except for no external displays)
FN keys
Thunderbolt
TODO test
As the thunderbolt controller is just PCIe, you don't need to do anything at all. Have PCI express hotplugging enabled in your kernel. When you insert a thunderbolt device, the BIOS will enumerate it, and simply hotplug a PCIe device, just like express port.
Similarly, if you use the port for USB 3.1 via the USB-C connector, a new XHCI controller will be hotplugged, which will have your USB device connected to it, at USB 3.1 gen 2 speeds.
Input (Trackpoint, Touchpad, Touchscreen)
root #
lsinput
0: 0000:0003 HOST PNP0C0E/button/i Sleep Button KEY 1: 0000:0005 HOST PNP0C0D/button/i Lid Switch SW 2: 0000:0001 HOST LNXPWRBN/button/ Power Button KEY 3: 0000:0006 HOST LNXVIDEO/video/i Video Bus KEY 4: 0000:0006 HOST LNXVIDEO/video/i Video Bus KEY 5: 0001:0002 I8042 isa0060/serio0/i AT Raw Set 2 keyboard KEY MSC LED 6: 001f:0001 ISA isa0061/input0 PC Speaker SND 7: 17aa:5054 HOST thinkpad_acpi/in ThinkPad Extra Buttons KEY MSC SW 8: 10ec:0285 PCI card0/codec#0/be HDA Digital PCBeep SND 9: 0000:0000 (null) ALSA HDA Intel PCH Mic SW 10: 0000:0000 (null) ALSA HDA Intel PCH Headphone SW 11: 0000:0000 (null) ALSA HDA Intel PCH HDMI/DP,pc SW 12: 0000:0000 (null) ALSA HDA Intel PCH HDMI/DP,pc SW 13: 0000:0000 (null) ALSA HDA Intel PCH HDMI/DP,pc SW 14: 0000:0000 (null) ALSA HDA Intel PCH HDMI/DP,pc SW 15: 0000:0000 (null) ALSA HDA Intel PCH HDMI/DP,pc SW 16: 0000:0000 (null) ALSA HDA NVidia HDMI/DP,pcm=3 SW 17: 0000:0000 (null) ALSA HDA NVidia HDMI/DP,pcm=7 SW 18: 0000:0000 (null) ALSA HDA NVidia HDMI/DP,pcm=8 SW 19: 0000:0000 (null) ALSA HDA NVidia HDMI/DP,pcm=9 SW 20: 0002:000e I8042 isa0060/serio1/i ETPS/2 Elantech TrackPoi KEY REL 21: 0002:000e I8042 isa0060/serio1/i ETPS/2 Elantech Touchpad KEY ABS 22: 056a:5191 USB usb-0000:00:14.0 Wacom Co.,Ltd. Pen and m KEY ABS MSC 23: 056a:5191 USB usb-0000:00:14.0 Wacom Co.,Ltd. Pen and m ABS 24: 056a:5191 USB usb-0000:00:14.0 Wacom Co.,Ltd. Pen and m KEY ABS MSC 25: 056a:5191 USB usb-0000:00:14.0 Wacom Co.,Ltd. Pen and m KEY ABS MSC 26: 056a:5191 USB usb-0000:00:14.0 Wacom Co.,Ltd. Pen and m KEY ABS MSC 27: 04f2:b614 USB usb-0000:00:14.0 Integrated Camera: Integ KEY 28: 04f2:b615 USB usb-0000:00:14.0 Integrated IR Camera: In KEY
Touchpad
In order to have the trackpoint/touchpad work:
- ensure the psmouse module has been built with elantech options
- add
elantech_smbus=0
to psmouse configuration (either by kernel command-line or modprobe.d configuration file)
Touchscreen
In order to have the touchscreen work:
- multitouch is handled by the
wacom
kernel module - multitouch at the X/wayland level is handled by the
libinput
X module (*not* wacom!).
Notes:
- mtdev-test will show a non-empty list of event if the touchscreen is configured properly:
root #
mtdev-test /dev/input/event22
supported mt events: ABS_MT_SLOT ABS_MT_POSITION_X ABS_MT_POSITION_Y ABS_MT_TRACKING_ID
- libinput debug-events will show finger ids when configured properly:
root #
libinput debug-events
... event22 TOUCH_DOWN +18.97s 0 (0) 75.90/58.04 (261.25/112.38mm) event22 TOUCH_FRAME +18.97s event22 TOUCH_UP +19.27s event22 TOUCH_FRAME +19.27s event22 TOUCH_DOWN +19.61s 1 (1) 88.99/48.35 (306.32/93.62mm) event22 TOUCH_FRAME +19.61s event22 TOUCH_DOWN +20.05s 2 (2) 95.49/55.60 (328.70/107.65mm) event22 TOUCH_FRAME +20.05s ...
- x11-libs/gtk+:3[examples]'s gtk3-demo has a multitouch test window that can be useful to visually check that everything is OK within GTK (there aren't so many multitouch-enabled apps out there)