Skip to content

Instantly share code, notes, and snippets.

@diffficult
Last active January 8, 2024 22:10
Show Gist options
  • Save diffficult/e8a09973b1541db3b041f6a10c680866 to your computer and use it in GitHub Desktop.
Save diffficult/e8a09973b1541db3b041f6a10c680866 to your computer and use it in GitHub Desktop.
Thinkpad x220 General Tweaks

Thinkpad x220 general

Power settings (powertop+tlp)

powertop setup

  1. Install powertop
sudo pacman -S powertop
  1. let powertop analyze the system (don't worry with black screens)
sudo powertop --calibrate
  1. (optional) Make the systemd service and edit the new file
sudo $EDITOR /etc/systemd/system/powertop.service
[Unit]
Description=Powertop tunings

[Service]
Type=idle
ExecStart=/usr/bin/powertop --auto-tune

[Install]
WantedBy=multi-user.target
  • save and enable it
sudo systemctl enable powertop
  • Reboot and launch powertop : you see VM writeback is still on "bad", all others are on "good"

TLP

  1. install tlp
sudo pacman -S tlp
  1. edit /etc/default/tlp and add or change the following
# ------------------------------------------------------------------------------
# tlp - Parameters for power save

# Hint: some features are disabled by default, remove the leading # to enable
# them.

# Set to 0 to disable, 1 to enable TLP.
TLP_ENABLE=1

# Dirty page values (timeouts in secs).
MAX_LOST_WORK_SECS_ON_BAT=15

# Battery charge thresholds (ThinkPad only, tp-smapi or acpi-call kernel module
# required). Charging starts when the remaining capacity falls below the
# START_CHARGE_TRESH value and stops when exceeding the STOP_CHARGE_TRESH value.
# Main / Internal battery (values in %)
START_CHARGE_THRESH_BAT0=75
STOP_CHARGE_THRESH_BAT0=90
# Ultrabay / Slice / Replaceable battery (values in %)
START_CHARGE_THRESH_BAT1=75
STOP_CHARGE_THRESH_BAT1=90
Change MAX_LOST_WORK_SECS_ON_BAT at 15 (powertop said for VM writeback) than 60. 60 make no effect.
  1. Enable tlp services
systemctl enable tlp.service  
systemctl enable tlp-sleep.service

Grub Tweaks

  1. edit grub.cfg
GRUB_CMDLINE_LINUX_DEFAULT="quiet i915.i915_enable_rc6=1 i915.i915_enable_fbc=1 i915.lvds_downclock=1 i915.semaphores=1 acpi_osi=Linux"

Wifi Led (this works if you are using iwlwifi driver)

  • Create a conf file with the following on /etc/modprobe.d/
options iwlwifi led_mode=1

You can do that in a oneliner in your terminal

$ echo "echo \"options iwlwifi led_mode=1\" >> /etc/modprobe.d/iwlwifi.conf" | sudo bash

Restart your computer for it to take effect

Sources

gist made by Koronen gist

comment by reddit user ot4con reddit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment