Lenovo ThinkPad P40 Yoga

From ArchWiki

This article or section does not follow the Laptop page guidelines.

Reason: Missing all the required sections (accessibility, firmware and function keys). (Discuss in Talk:Lenovo ThinkPad P40 Yoga)
Hardware PCI/USB ID Working?
GPU (Intel) 8086:1916 Yes
GPU (NVIDIA) 10de:137a Yes
Wireless 8086:24f3 Yes
Audio 8086:9d70 Yes
Touchpad Yes
Touchscreen 13d3:5248 Yes
Webcam 13d3:5248 Yes
Card reader 1217:8520 Yes
Fingerprint reader 138a:0017 Yes
Bluetooth 8087:0a2b Yes
Accelerometer Yes


Automatic rotation

Install iio-sensor-proxy-gitAUR. Under GNOME, rotation will happen automatically. Under i3, you can use this script in the background:

This article or section is a candidate for merging with i3.

Notes: This script is not device specific and should be added to the i3 page instead. (Discuss in Talk:Lenovo ThinkPad P40 Yoga)
# Requires https://github.com/hadess/iio-sensor-proxy

dbus-monitor --system interface=org.freedesktop.DBus.Properties,member=PropertiesChanged,path=/net/hadess/SensorProxy 2> /dev/null |
        sed -n -u -e '/string "AccelerometerOrientation"/ {n ; s/\s*variant\s*string\s*"\(.*\)"/\1/p}' |
        while read -r line ; do
                case $line in
                        right-up )
                                xrandr -o right &> /dev/null
                        left-up )
                                xrandr -o left &> /dev/null 
                        bottom-up )
                                xrandr -o inverted &> /dev/null
                        normal | * )
                                xrandr -o normal &> /dev/null

In order to have your touchpad, Trackpoint, touchscreen and stylus also change orientation, install xrandr-align and run the following script at startup:

# Requires https://github.com/wolneykien/xrandr-align

for input in \
        "Wacom Co.,Ltd. Pen and multitouch sensor Finger touch" \
        "Wacom Co.,Ltd. Pen and multitouch sensor Pen stylus" \
        "ETPS/2 Elantech Touchpad" \
        "ETPS/2 Elantech TrackPoint" \
        "Wacom Co.,Ltd. Pen and multitouch sensor Pen eraser" ; do
        xrandr-align monitor --input="$input" &

See also

Official Support page

ThinkPad P40 Yoga Platform Specifications