Skip to content

KJoke70/T480s

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

Thinkpad T480s

1. Dualboot with Arch, Windows 10 and disk encryption

  • Turn of secure boot in the BIOS.

  • See here.

2. Nvidia Optimus & Linux

2.1. 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

2.1.1. 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

3. 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

...

4. 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.

6. Other

6.1. 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:

6.1.1. ACPI Events

  1. pacman -Syu acpid

  2. sudo systemctl enable acpid.service

  3. Modify /etc/acpi/handler.sh:

    /etc/acpi/handler.sh
    # ...
        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
      ;;
    # ...

6.1.2. udev hwdb

  1. 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
  2. sudo udevadm hwdb --update

  3. sudo udevadm trigger --sysname-match="event*"

About

T480s setup

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published