Lenovo ThinkPad P52

As of 2018-09-30 this is a WIP page inspired by. Feel free to chat with me (zougloub on freenode) if you're figuring stuff out or have questions.

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)

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.

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:


 * libinput debug-events will show finger ids when configured properly:


 * :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)