Thinkpad L390: A Journey Under Linux

Here I will write and share a journey using Thinkpad L390 under Linux for around 1 year of use it. This laptop was replacement my “Old Beast” Asus K43s* series which has been adventures for about 7 years. This laptop is coming through with following specifications like :

ItemValue
Processori7-8565U
RAM8GB
Storage512 SSD Nvme
Display13.3" FHD IPS (1920 x 1080)

Lenovo Thinkpad L390 comes with OEM Windows 10, so I hated it then broke up and started dealing with Linux Ubuntu 20.04. Well, finally there are some problems that might be common to face it with L390 based on my experience

As I read some article and at r/thinkpad about experience using Thinkpad with Linux, They almost recommended first to install tools like tlp and powertop but I decided to used tlp for a deep config variables and also had Battery Charger Threshold especially for Thinkpad user’s.

# CPU stuff's
CPU_HWP_ON_AC=balance_performance
CPU_HWP_ON_BAT=balance_power
ENERGY_PERF_POLICY_ON_AC=performance
ENERGY_PERF_POLICY_ON_BAT=balance-power
## Disk stuff's
SATA_LINKPWR_ON_AC="med_power_with_dipm max_performance"
SATA_LINKPWR_ON_BAT="med_power_with_dipm min_power"
## Default Thinkpad Threshold
START_CHARGE_THRESH_BAT0=75
STOP_CHARGE_THRESH_BAT0=80

There are so much variable config for tlp, but if you feel to deal with GUI coming out with TLPUI . With some tlp config, this laptop can reach around 4-6 hours it’s depending on what you have done.

WTF throttle, undervolt, etc

Well, this laptop is coming through with Intel Gen 8 Whiskey Lake upgrade (maybe that’s should be Gen 8.5 🤣) and yeah it’s had so much problem about throttled and undervolt things . In my personal opinion because the Blue has lost to Red ROFL!.

As long as dealing with this prob’s i have to try with some recommended tools for linux like throttled and undervolt and throttled is one of popular OSS for dealing CPU throttle on Linux and for my experience it takes times for research and test to find best value under your laptop’s. Below is my best (for now 🤣) conf for my Thinkpad.

...
# All voltage values are expressed in mV and *MUST* be negative (i.e. undervolt)!
[UNDERVOLT.BATTERY]
# CPU core voltage offset (mV)
CORE: -100
# Integrated GPU voltage offset (mV)
GPU: -70
# CPU cache voltage offset (mV)
CACHE: -100
# System Agent voltage offset (mV)
UNCORE: -70
# Analog I/O voltage offset (mV)
ANALOGIO: 0

# All voltage values are expressed in mV and *MUST* be negative (i.e. undervolt)!
[UNDERVOLT.AC]
# CPU core voltage offset (mV)
CORE: -110
# Integrated GPU voltage offset (mV)
GPU: -80
# CPU cache voltage offset (mV)
CACHE: -110
# System Agent voltage offset (mV)
UNCORE: -80
# Analog I/O voltage offset (mV)
ANALOGIO: 0
...

For undervolt, i have been discussed with u/antoniom96 that had same problem like me and he said the best value is around -110mV - -115mV with allowed it to 95C°, like below :

$ cat /etc/systemd/system/undervolt.service
...
ExecStart=/your/home/dir/undervolt.py -v --core -110 --cache -110 --gpu -110 --temp 95
...

Since this article written, I decided to stay with throttled with bleeding trial and error and mix from this sources #198 , #205 and #209 .

When your CPU gets throttled it will trigger the fan especially when on AC plugged in. In my last tinkering is how to reduce the noise of fan and found another great wiki from arch wiki that suggest using a tool called thinkfan. There are much articles and tutorials how to use thinkfan and as a shown below it’s custom way to deal with it (thanks bhaskarkc with a bit modify 🤣).

#!/bin/env bash
#
# file location: /home/cybapunkz/.local/bin/thinkfan
# Author: Bhaskar K C <xlinkerz@gmail.com>
# Move this file to /usr/bin/thinkfan-config

sed -i '/^hwmon/d' /etc/thinkfan.conf

find /sys/devices -type f -name 'temp*_input' | xargs -I {} echo "hwmon {}" |
    sed -e '/thinkpad_hwmon\/hwmon\/hwmon[0-9]\/temp2_input$/ s/^/#\ /g' \
        >>/etc/thinkfan.conf

/usr/sbin/thinkfan $@
$ cat /lib/systemd/system/thinkfan.service

[Unit]
Description=simple and lightweight fan control program
Wants=lm_sensors.service
After=lm_sensors.service

[Service]
Type=forking
EnvironmentFile=-/etc/default/thinkfan
ExecStart=/usr/bin/thinkfan-conf $THINKFAN_ARGS
PIDFile=/var/run/thinkfan.pid
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
RestartSec=5s

[Install]
WantedBy=multi-user.target

So far with this thinkfan it can reduce the noise fan (default conf) when it is on AC Mode plugged in. For more details about conf file check out my simple dotfiles .

Upgrade BIOS Firmware

My last problem so far is when you plugged in AC mode and then you go restart the laptop is showing a blank screen after BIOS booted up (POST mode). I don’t have any idea to solve this prob, but I just go update the BIOS firmware to R10ET45W (1.30) and don’t forget to always check the update bios page at Lenovo Support .

Thank you!