Rich Dougherty

Installing Ubuntu Linux on the Lenovo ThinkPad E14 Gen 2 (AMD)

I bought myself a cheap ThinkPad. Although not officially supported for Linux it was pretty easy to get going. It installed fine with Ubuntu 20.04, only requiring a newer kernel version to be installed.

Details:

Lenovo ThinkPad E14 Gen 2 (AMD)
Model Type Number: 20T6-0008AU
CPU: AMD Ryzen 5 4500U (6C / 6T, 2.3 / 4.0GHz, 3MB L2 / 8MB L3)
Notebookcheck review

A page with a lot of info about Linux on Thinkpad E14 is here, although it seems like it's based on a Gen 1 (Intel) rather than a Gen 2 (AMD) model.

Step by step instructions

Part I: Windows prep

This laptop comes with Windows 10 Home. A few things are needed before installing Linux. A lot of info I used came from here.

  1. Run Lenovo Vantage and do a System Update.
  2. Update BIOS from support site (v1.08 was latest at the time) — this step may have already been handled by the System Update above, not sure
  3. Disable fast startup
  4. Turn off BitLocker encryption with Start menu > Device Encryption > Turn Off. See discussion here.

For the next part you'll need a bootable Ubuntu USB stick. I set up my USB stick from Linux but you can do it from Windows too. See Create a bootable USB stick on Windows. You'll want to download Ubuntu from the release site and use the 64-bit PC (AMD64) desktop image.

Part II: BIOS

  1. Reboot and press F1 to enter the BIOS menu.
  2. Disable Secure Boot.

    This should be unnecessary with versions of Ubuntu after 20.04 as we only need this to install a newer kernel. Future versions of Ubuntu should ship with a recent enough kernel out of the box.

Part III: Ubuntu install

  1. Reboot and press F12 to choose the boot device. Choose USB HDD to boot from the USB stick.
  2. Run the installation. Use normal installation options but choose the following options:
    • Install third party drivers. Probably needed for wifi?
    • Install alongside Windows.
  3. Reboot after installation when prompted.
  4. Install system updates when prompted.
  5. Reboot again when prompted.

Part IV: Kernel upgrade

I have verified this as working with kernel v5.8.10-050810. In theory later kernels should work, but I did try one at one point and had trouble, so went back to 5.8.10. I'll try a newer kernel again when I have some time to experiement.

  1. Download mainline kernel script: ubuntu-mainline-kernel.sh
  2. Install new kernel.
    sudo ./ubuntu-mainline-kernel.sh -i
    
  3. Reboot and verify the kernel version with uname -a.

Part V: Workarounds

Two workarounds are required for use:

  1. Each time the system starts you'll need to do a manual suspend to get sleep and function keys working

    From then on sleep and function keys works normally until rebooted again.

    I have verified that everything works after doing this, and that it fixes the function keys, but I didn't actually verify that sleep was broken initially. I'm just going on what I've read.

    sudo systemctl suspend
    

    Then wait 30 seconds for the screen to turn off. Then wake the laptop from sleep.

    See:

  2. Wifi power saving needs to be disabled

    The Realtek wifi adapter is a bit flaky. In normal power saving mode it sometimes doesn't work after a sleep. So we just disable power saving. I haven't checked what impact this has on power usage.

    Here's the model controller I have. It may vary.

    $ lspci
    03:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8822CE 802.11ac PCIe Wireless Network Adapter
    

    Update the power saving settings:

    $ sudo nano /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf
    

    Edit the file to look like this:

    [connection]
    wifi.powersave = 2
    

    Restart a service to pick up the new settings:

    $ sudo systemctl restart NetworkManager
    

    This change only needs to be done once; it will be picked up automatically on each restart.

    See:

Part VI: Ready for use!

With these two workarounds, the system is now ready for use.

What works and what doesn't

Here's a quick summary of what works and what doesn't.

  1. CPU - works fine for me. No need for throttling workarounds as described here and implemented here. I think the ThinkPad throttling issues is Intel only.

    To verify I ran Geekbench 5 and got the following results which seemed in the ballpark:

    For comparison NotebookCheck got single core: 1108, multi core: 4618. There may be a drop in multi core performance based on this so I should probably investigate by running the benchmarks again and on Windows.

    During the testing I monitored CPU usage and temp with s-tui.

    apt install s-tui
    s-tui
    

    Here's what it looks like while idle on battery.

  2. Wifi is reliable after disabling its power saving as discussed in the workarounds section above.

  3. Function keys work fine once the system has been suspended manually, as discussed in the workarounds section above. Brightness, volume, keyboard backlighting - all work. FnLock doesn't work but that's fine with me.

  4. Bluetooth - not checked yet, but apparently fine.

  5. Fingerprint scanner - not supported yet.

    $ lsusb
    Bus 003 Device 002: ID 27c6:55a4 Shenzhen Goodix Technology Co.,Ltd. Goodix FingerPrint Device
    

    There is a bug report to add support for this device if anyone wants to contribute.

  6. Battery - seems good. I was able to use the ThinkPad battery health settings.

    See:

    # Command line
    sudo apt install tlp
    # Manual vars
    START_CHARGE_THRESH_BAT0=65
    STOP_CHARGE_THRESH_BAT0=80
    # Verifying
    sudo tlp-stat -s # see if running
    sudo tlp-stat --config # dump config
    # UI
    sudo add-apt-repository ppa:linuxuprising/apps
    sudo apt install tlpui
    
  7. External monitors - not checked yet.

  8. RAM is OK but may be a bit too low, depending what you're doing. It's easy to upgrade. I ordered a 16GB DDR4 SODIMM and installed it in spare slot. This brought the laptop up to 24GB of RAM, which is a lot better.

    Schematics for the laptop are available here. Check out the section Memory shield and memory module for a picture.

All in all it was a fairly smooth experience with the main difference to a vanilla Ubuntu install being the kernel update. In future versions of Ubuntu this probably won't be needed, as they'll ship with newer kernels already.

Updated 11 January 2020: