ThinkPad T480 with Fedora

Table of Contents

These are my notes on installing a second hand Lenovo ThinkPad T480 (20L6) for a relative of mine.

Hardware Info

Lenovo ThinkPad T480 Hardware Maintenance Manual, can be retrieved from

Weight: 1,6kg with the small external battery and 1,8kg with the large external battery.

[root@t480 ~]# dmidecode --type system | head --lines=9
# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 3.0.0 present.

Handle 0x000C, DMI type 1, 27 bytes
System Information
	Manufacturer: LENOVO
	Product Name: 20L6S4T802
	Version: ThinkPad T480
[root@t480 ~]# nvme list
Node             SN                   Model                                    Namespace Usage                      Format           FW Rev  
---------------- -------------------- ---------------------------------------- --------- -------------------------- ---------------- --------
/dev/nvme0n1     [REDACTED]           INTEL SSDPEKNW020T8                      1           2.05  TB /   2.05  TB    512   B +  0 B   004C   
[pcfe@t480 ~]$ lsblk
NAME                                          MAJ:MIN RM  SIZE RO TYPE  MOUNTPOINT
zram0                                         252:0    0    8G  0 disk  [SWAP]
nvme0n1                                       259:0    0  1,9T  0 disk  
├─nvme0n1p1                                   259:1    0  128M  0 part  
├─nvme0n1p2                                   259:2    0  100M  0 part  /boot/efi
├─nvme0n1p3                                   259:3    0 97,7G  0 part  
├─nvme0n1p4                                   259:4    0    1G  0 part  /boot
└─nvme0n1p5                                   259:5    0  1,8T  0 part  
  └─luks-[REDACTED]                           253:0    0  1,8T  0 crypt /home
[root@t480 ~]# df -h -x tmpfs -x devtmpfs
Filesystem      Size  Used Avail Use% Mounted on
/dev/dm-0       1,8T   32G  1,8T   2% /
/dev/dm-0       1,8T   32G  1,8T   2% /home
/dev/nvme0n1p4  976M  190M  719M  21% /boot
/dev/nvme0n1p2   96M   50M   47M  52% /boot/efi

Note that Fedora 34 uses btrfs by default.

[pcfe@t480 ~]$ free -h
               total        used        free      shared  buff/cache   available
Mem:            31Gi       5,4Gi        12Gi       299Mi        12Gi        25Gi
Swap:          8,0Gi          0B       8,0Gi
[pcfe@t480 ~]$ lscpu
Architecture:                    x86_64
CPU op-mode(s):                  32-bit, 64-bit
Byte Order:                      Little Endian
Address sizes:                   39 bits physical, 48 bits virtual
CPU(s):                          8
On-line CPU(s) list:             0-7
Thread(s) per core:              2
Core(s) per socket:              4
Socket(s):                       1
NUMA node(s):                    1
Vendor ID:                       GenuineIntel
CPU family:                      6
Model:                           142
Model name:                      Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz
Stepping:                        10
CPU MHz:                         1900.000
CPU max MHz:                     3600,0000
CPU min MHz:                     400,0000
BogoMIPS:                        3799.90
Virtualization:                  VT-x
L1d cache:                       128 KiB
L1i cache:                       128 KiB
L2 cache:                        1 MiB
L3 cache:                        6 MiB
NUMA node0 CPU(s):               0-7
Vulnerability Itlb multihit:     KVM: Mitigation: Split huge pages
Vulnerability L1tf:              Mitigation; PTE Inversion; VMX conditional cache flushes, SMT vulnerable
Vulnerability Mds:               Mitigation; Clear CPU buffers; SMT vulnerable
Vulnerability Meltdown:          Mitigation; PTI
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:        Mitigation; Full generic retpoline, IBPB conditional, IBRS_FW, STIBP conditional, RSB filling
Vulnerability Srbds:             Mitigation; Microcode
Vulnerability Tsx async abort:   Mitigation; Clear CPU buffers; SMT vulnerable
Flags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe sy
                                 scall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni
                                  pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_
                                 deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp
                                  tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx 
                                 smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_c
                                 lear flush_l1d

shrink pre-installed Windows down to 100 GB

  1. Open Disk Management in Windows
  2. right-click on volume C:
  3. choose Shrink Volume…
  4. increase the amount of space to shrinkin MB until there are 100000 MB (100 GB) in Total size after shrink in MB
  5. click the Shrink button
  6. wait until the spinning circle cursor is gone
  7. close the Disk Management tool

discover it is a very old image full of bloatware

Since the preloaded image had a lot of bloatware installed and the Firefox it offered was version 33 (we’re at 89 today), I decided to get rid of the bloatware and get the latest clean Windows.

While goping through the page Lenovo Recovery Media at some point it made clear Microsoft provided media were fine too (aka all drivers for network access are in the install ISO and the rest gets pulled autromagically by Windows Update)

Could I download Windows 10 OS without drivers and pre-installed APP?

Yes, please go to the Microsoft website, search MediaCreationTool and download it. It is a Microsoft official app to help download a pure version of Windows 10. You can download the needed drivers separately from Lenovo PC support website.

retrieve latest Windows 10 install ISO

I downloaded Windows 10 May 2021 Update Deutsch from Microsoft for use with libvirt (either gnome-boxes of virt-manager) and in case the Media Creation Tool can be pointed at a local image.

Because both the product key in the firmware (for the natively booting but shrunk Windows) and the product key for the additionally purchased Win 10 Pro license are German and I honestly do not know if the language of the ISO must match the language of the key. It does not matter though as the Pro version allows the addition of language packs.

install clean Win 10 Pro German to the 100GB partition

NOTE: the only reason this Windows is kept (abnd thus can be only 100 GB small) is for stuff that does not work with the Windows 10 in a VM (that is accessible when Fedora is running). Like for example firmware updates of the dock.

Normally Lenovo gets LVFS right for their ThinkPads, but for the X1 and also the T480 they seem to have mucked it up. My X230 and X270 on the other hand always upgraded fine, but for the dock one seems to always need a native Windows. :-/

I used Microsoft’s Media Creation Tool for Windows 10 to write a USB stick to install into the shrunk 100 GB C:\ drive.

As expected in a modern machine, Windows 10 Pro picked up the license automatically, Settinghs / Activation reads Windows is activated with a digital license.

And that’s good as there was no product key sticker on the machine but my bill clearly states Operating system: Windows 10 Pro - 64 Bit and I was worried for a second I’d have to chase down the vendor of the second hand machine.

But, this works just as automatically as when I last had to install Win 10 on a Dell workstation.

Minimal Win setup

Language packs

I ensured all of the following language packs are installed:

  • English(Europe)
  • English (US)
  • German (Germany)
  • France (France)
  • Luxembourg

Applied all Updates under Windows

Later, I learned that I could have set Thunderbolt “BIOS Assist Mode." to disabled which should have allowed me to successfully update the firmwares with fwupdmgr under Fedora 34 (see further below for details).

Update all firmwares with the Lenovo Tool

Windows 10’s Settings / Update & Security picked up most of the drivers automatically.

To ensure I got all the formware updates, I used Lenovo System Update

Not entirely smooth sailing, to be able to successfully update the Ultra Docking Station 40AJ that will be used with the ThinkPad T480, I had to uninstall the Intel display driver in Windows. Well, once that was uninstalled I could apply Intel Thunderbolt Software.

Ensure the Dock is also updated

Once the Thunderbolt software was current, Lenovo System Update managed to update the dock. and it seems the Intel graphics driveres are also OK because in Device Manager / Display adapters / Intel(R) UHD Graphics 620 properties I see that the driver is from Intel and I have successfully used that Windows instance with 3 screens (laptop, HDMI on dock, DisplayPort on dock).

Install Fedora 34 Workstation to the remaining 1.9TB

I installed Fedora Linux with encrypted disk.

Created an administrator user for the owner with allow user to set password on first login set.

Create an administrator user for myself and installed my ssh pubkey for my user and for root.

sshd is left off for now. See systemctl status sshd.service for details.

Noticed that the Built-In Battery is dead

part number: 01AV489

Ordered one from Jacob

Replacement itself took me less than 30 minutes, thanks to the Hardware Maintenance Manual.

UEFI Settings

Both Fedora Linux and Windows 10 work painlessly with UEFI and Secure Boot. As expected.

Thunderbolt “BIOS Assist Mode”

tl;dr: for any modern Linux with a 4.9 or newer kernel, set the option Thunderbolt “BIOS Assist Mode." to disabled.

In UEFI there is an option Thunderbolt “BIOS Assist Mode.". With a help text along the lins of It’s necessary to enable it when running Linux or Windows 10 prior version 1709.

What the help text is meant to say is something along the lines of It’s necessary to enable it when running Linux prior to kernel version 4.9 or Windows 10 prior to version 1709. Please see the thread Thunderbolt BIOS Assist Mode - clearification needed for details.