This are a collection of fixes and tweaks I used to get Xubuntu 18.04 LTS working on a lenovo thinkpad X380 yoga laptop.
-
Bios:
- First UPDATE IT, since some old bioses may cause bricking when settings are changed. I used 1.22 and it was fine, but it's no garuntee for others.
- you can use linux or the preinstalled windows to update the bios http://positon.org/lenovo-thinkpad-bios-update-with-linux-and-usb
- put into legacy mode (not UEFI) before install, to allow undervolting (to save power and heat)
- 'Security -> Secure Boot - Set to "Disabled"'
- (optional) turn off hyperthreading if you want to save more power
- (optional) find the settings for cpu power management and switch to power saving or balanced mode on battery (if not already)
- turn off thunderbolt security. This will let you use thunderbolt docks
- thunderbolt BIOS Assist Mode - Set to "Enabled".
- WARNING Some people have noticed bricking when changing this on similar lenovo machines. Update your bios first and you should be hopefully fine.
- When disabled, on Linux, power usage appears to be significantly higher because of a substantial number of CPU wakeups during s2idle.
- First UPDATE IT, since some old bioses may cause bricking when settings are changed. I used 1.22 and it was fine, but it's no garuntee for others.
-
xubuntu
- Screen is too high res
- Change dpu as per these instructions https://wiki.archlinux.org/index.php/HiDPI#Xfce
- also use high res window theme such as http://xfce-look.org/p/1204333
- edit the power manager to suspent when the lid is shut on battery, and for system power saving
- Screen is too high res
-
power usage (this gets me ~8 hours):
- in the BIOS turn of components you wont use like the fingerprint sensor, sdcard reader
- install powertop,
and auto optimize at startup more(don't do this, it makes stylus and other things sleep too often)- also check for devices that are drawing lots of power or doing frequent wakeups. The biggest power draw should be the screen/backlight.
- tlp
- install
sudo apt-get install tp-smapi-dkms acpi-call-dkms tlp tlp-rdw
- enable
sudo systemctl enable tlp
sudo systemctl enable tlp-sleep
- (optional) I also set min and max battery charge for extra life, I use tlpui
- undervolt using https://github.com/georgewhewell/undervolt this will save power and reduce heat on your lap
- for me this setting worked under cpu stress `sudo ./undervolt.py --gpu -120 --core -120 --cache -120 --uncore -100 --analogio -100``
- overall -100mV seems like a good starting point (focus on changing core and cache)
- install
s-tui
and use to monitor core temp. Mine went from 55 to 45, and some people got down to 35 degrees (sometimes with reapplying thermal paste). Even 45 makes it more comftorble for lap use. - more here
- install
-
keyboard:
- to enable the media keys corresponding with f11 and f12 https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X1_Carbon_(Gen_6)#Keyboard_Fn_Shortcuts?
-
fix s3 wakeup.
- without this fix it sometimes has a black screen on wake/login. I could work around this by closing the lid then opening it, but the following is a proper fix
- set linux commandline option
acpi.ec_no_wakeup=1
e.g.- one might edit /etc/default/grub and edit GRUB_CMDLINE_LINUX_DEFAULT:
- e.g.
GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi.ec_no_wakeup=1"
- run
sudo update-grub
- s3 is supported
dmesg | grep "ACPI: (supports"
:ACPI: (supports S0 S3 S4 S5)
-
ssd
- setup fstrim as per these instructions http://www.thinkwiki.org/wiki/X1_Linux_Tweaks#SSD_Optimizations
-
FIX: To allow youself to scroll with the touchscreen in firefox (with one finger):
- you need to run
xsetwacom --set "Wacom Pen and multitouch sensor Finger touch" Gesture off
to have touch register as touch in firefox- to make this persist edit
/usr/share/X11/xorg.conf.d/70-wacam.conf
to haveOption "Gesture" "false"
lines in the 2 or 3 "Wacom touchscreen class" entry.
- to make this persist edit
- start firefox with
MOZ_USE_XINPUT2=1 firefox
- you need to run
-
Tablet mode scripts. These will do things like auto-rotate the screen
- use my repo for the x380
https://github.com/wassname/thinkpad-x380-yoga-scripts
- auto rotation works
- auto brightness works
- deactivate touchscreen when pen in proximity works
- disabling touchpad, clickers in tablet mode works (and oncreen keyboard)
- use my repo for the x380
https://github.com/wassname/thinkpad-x380-yoga-scripts
- http://www.thinkwiki.org/wiki/X1_Linux_Tweaks
- https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X1_Yoga_(Gen_3)#Enabling_S2idle
- https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X1_Carbon_(Gen_6)#Automatic_(Linux_Vendor_Firmware_Service)
lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 13d3:584b IMC Networks
Bus 001 Device 005: ID 8087:0a2b Intel Corp.
Bus 001 Device 004: ID 056a:5155 Wacom Co., Ltd
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
$ hwinfo --short
cpu:
Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz, 872 MHz
Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz, 894 MHz
Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz, 892 MHz
Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz, 892 MHz
keyboard:
/dev/input/event4 AT Translated Set 2 keyboard
mouse:
/dev/input/mice Wacom Pen and multitouch sensor
/dev/input/mice ETPS/2 Elantech TrackPoint
/dev/input/mice ETPS/2 Elantech Touchpad
monitor:
LG Display LCD Monitor
graphics card:
Intel VGA compatible controller
sound:
Intel Audio device
storage:
Intel Non-Volatile memory controller
network:
enp0s31f6 Intel Ethernet Connection (4) I219-LM
wlp4s0 Intel Dual Band Wireless-AC 8265
network interface:
wlp4s0 Ethernet network interface
enp0s31f6 Ethernet network interface
lo Loopback network interface
disk:
/dev/nvme0n1 Intel Disk
partition:
/dev/nvme0n1p1 Partition
/dev/nvme0n1p2 Partition
/dev/nvme0n1p5 Partition
usb controller:
Intel Sunrise Point-LP USB 3.0 xHCI Controller
bios:
BIOS
bridge:
Intel PCI bridge
Intel ISA bridge
Intel Host bridge
Intel Sunrise Point-LP PCI Express Root Port #9
Intel Sunrise Point-LP PCI Express Root Port #5
Intel PCI bridge
hub:
Linux Foundation 2.0 root hub
Linux Foundation 3.0 root hub
memory:
Main Memory
bluetooth:
Intel Bluetooth Device
unknown:
FPU
DMA controller
PIC
Keyboard controller
Intel Sunrise Point-LP PMC
Intel Skylake Gaussian Mixture Model
Intel Unclassified device
Intel Skylake Processor Thermal Subsystem
Intel Sunrise Point-LP CSME HECI #1
Intel Serial controller
Intel Sunrise Point-LP Thermal subsystem
Intel Sunrise Point-LP SMBus
Serial controller
IMC Networks Integrated Camera
lspci
00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers (rev 08)
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (rev 07)
00:04.0 Signal processing controller: Intel Corporation Skylake Processor Thermal Subsystem (rev 08)
00:08.0 System peripheral: Intel Corporation Skylake Gaussian Mixture Model
00:13.0 Non-VGA unclassified device: Intel Corporation Sunrise Point-LP Integrated Sensor Hub (rev 21)
00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21)
00:14.2 Signal processing controller: Intel Corporation Sunrise Point-LP Thermal subsystem (rev 21)
00:16.0 Communication controller: Intel Corporation Sunrise Point-LP CSME HECI #1 (rev 21)
00:16.3 Serial controller: Intel Corporation Device 9d3d (rev 21)
00:1c.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port (rev f1)
00:1c.2 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port (rev f1)
00:1c.4 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #5 (rev f1)
00:1d.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #9 (rev f1)
00:1f.0 ISA bridge: Intel Corporation Device 9d4e (rev 21)
00:1f.2 Memory controller: Intel Corporation Sunrise Point-LP PMC (rev 21)
00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 21)
00:1f.4 SMBus: Intel Corporation Sunrise Point-LP SMBus (rev 21)
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (4) I219-LM (rev 21)
04:00.0 Network controller: Intel Corporation Wireless 8265 / 8275 (rev 78)
05:00.0 Non-Volatile memory controller: Intel Corporation Device f1a6 (rev 03)
xinput
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ ETPS/2 Elantech TrackPoint id=14 [slave pointer (2)]
⎜ ↳ ETPS/2 Elantech Touchpad id=15 [slave pointer (2)]
⎜ ↳ Wacom Pen and multitouch sensor Finger touch id=10 [slave pointer (2)]
⎜ ↳ Wacom Pen and multitouch sensor Pen stylus id=11 [slave pointer (2)]
⎜ ↳ Wacom Pen and multitouch sensor Pen eraser id=17 [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)]
↳ Power Button id=8 [slave keyboard (3)]
↳ Sleep Button id=9 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=13 [slave keyboard (3)]
↳ ThinkPad Extra Buttons id=16 [slave keyboard (3)]
↳ Integrated Camera: Integrated C id=12 [slave keyboard (3)]
A 1 year followup review: everything works great except for one gripe. On linux, the stylus goes to sleep if it's >4cm from the screen. It takes about 4 seconds to wakeup. Changing this is not supported in the linux wacom stylus driver.
You can work around this by keeping the pen near the screen when drawing, but if drawing collaboratively it becomes annoying since you need to explain it to people. Stylus sleep isn't a problem on windows.