T480s
T480s setup
Install / Use
/learn @KJoke70/T480sREADME
Thinkpad T480s
Martin Lautenbacher :toc: :icons: :numbered: :Revision: //:website: //:reproducible: //:source-highlighter: rouge //:source-highlighter: coderay //:listing-caption: Listing
Dualboot with Arch, Windows 10 and disk encryption
- Turn of secure boot in the BIOS.
- See link:dualboot.asciidoc[here].
Nvidia Optimus & Linux
- https://www.youtube.com/watch?v=5nGbWE-pvIE
- https://wiki.archlinux.org/index.php/PRIME
- https://wiki.archlinux.org/index.php/NVIDIA_Optimus
- https://wiki.archlinux.org/index.php/bumblebee
Bumblebee
1. `pacman -Syu mesa xf86-video-intel nvidia bumblebee bbswitch`
2. `sudo gpasswd -a user bumblebee` (replace _user_ with your
username)
3. `sudo systemctl enable bumblebeed.service`
4. If tlp is installed and enabled:
- Find the address of the GPU with `lspci | grep 3D` (First
column, such as `01:00.0`)
- Edit `/etc/default/tlp`:
+
...
RUNTIME_PM_BLACKLIST="01:00.0"
...
5. Configure bbswitch by editing: `/etc/modprobe.d/bbswitch.conf`
+
options bbswitch load_state=0 unload_state=1
6. Reboot
Usage/Testing
^^^^^^^^^^^^^
1. To see if the dGPU is turned off/on: `cat /proc/acpi/bbswitch`
2. To manually turn the dGPU on: `sudo tee /proc/acpi/bbswitch <<< ON`
3. To manually turn the dGPU off: `sudo tee /proc/acpi/bbswitch <<< OFF`
4. To unload nvidia modules manually: `sudo rmmod nvidia_uvm && sudo rmmod
nvidia`
5. To test if bumblebee is working correctly:
- Check if dGPU is turned OFF
- Run `optirun glxspheres64` or `optirun glxgears -info` (both in package
`mesa-demos`)
- While `glxgears` runs, check if dGPU is ON
- Close the optirun terminal
- Check if dGPU is OFF
- For performance comparison, run `glxspheres64` or `glxgears` (without
optirun)
6. For improving performance, check https://wiki.archlinux.org/index.php/bumblebee#Optimizing_speed
.References
* http://lenovolinux.blogspot.com/2018/02/bumblebee-on-lenovo-t440p-nvidia-gt.html?m=1
* https://wiki.archlinux.org/index.php/Bumblebee
HiDPI & Linux
-------------
Adding this to my `~/.Xresources` has solved 90% of scaling for me (120 for 125% scaling):
.`~/.Xresources`
--------------------------
Xft.dpi: 120
Xft.autohint: 0
Xft.lcdfilter: lcddefault
Xft.hintstyle: hintfull
Xft.hinting: 1
Xft.antialias: 1
Xft.rgba: rgb
...
--------------------------
.References
* https://wiki.archlinux.org/index.php/HiDPI
* https://wiki.archlinux.org/index.php/Xorg#Display_size_and_DPI
CPU throttling fix
------------------
* Install `throttled` from the community repository.
* Configure `/etc/lenovo_fix.conf` with the desired undervolting etc.
* Start the service with `sudo systemctl enable --now lenovo_fix.service`
* **ATTENTION**: Choose your parameters carefully and do proper testing. Bad
values may cause system instability, inability to boot or worse (possibly, I
don't really know). Just be careful and change values incrementally with tests
in between. Optimal values are individual to your machine.
.References
* https://www.reddit.com/r/thinkpad/comments/870u0a/t480s_linux_throttling_bug/
* https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X1_Carbon_(Gen_6)#Power_management.2FThrottling_issues
* https://github.com/erpalma/throttled
Power Management
----------------
* Packages:
- `tlp`
- `acpi_call`
.References
* http://thinkwiki.de/TLP_-_Linux_Stromsparen
* https://wiki.archlinux.org/index.php/TLP
* https://wiki.archlinux.org/index.php/Fan_speed_control
* https://wiki.archlinux.org/index.php/Undervolting_CPU
* https://wiki.archlinux.org/index.php/PHC
* https://wiki.archlinux.org/index.php/CPU_frequency_scaling
* https://wiki.archlinux.org/index.php/Laptop
* https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_T480s
* https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_T480
Other
-----
Special Buttons
Some buttons (Fn+F11, Fn+F12) have a keycode above 255 and are
thus not supported by X. They can be remapped using:
ACPI Events ^^^^^^^^^^^
pacman -Syu acpidsudo systemctl enable acpid.service- Modify
/etc/acpi/handler.sh:
./etc/acpi/handler.sh
[source,Bash]
...
ibm/hotkey)
case "$4" in
00001311)
logger 'Favorites'
/etc/acpi/actions/favorites-key.sh
;;
00001315)
logger 'Keyboard'
/etc/acpi/actions/keyboard-key.sh
;;
*)
logger "ACPI action undefined: $1 : $2 : $3 : $4"
;;
esac ;;
...
.References
- https://wiki.archlinux.org/index.php/acpid
udev hwdb ^^^^^^^^^
- Modify
/etc/udev/hwdb.d/90-thinkpad-keyboard.hwdb:
./etc/udev/hwdb.d/90-thinkpad-keyboard.hwdb
evdev:name:ThinkPad Extra Buttons:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn* KEYBOARD_KEY_45=prog1 KEYBOARD_KEY_49=prog2
sudo udevadm hwdb --updatesudo udevadm trigger --sysname-match="event*"
.References
- https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_T480#Special_buttons
- https://wiki.archlinux.org/index.php/Map_scancodes_to_keycodes
View on GitHub62/100
Security Score
Audited on Jun 3, 2025
No findings
