Power Saving for X1 Extreme Gen 2 (X1E2)

I googled and applied these things without checking how long powertop says my X1E2 lasts with battery. So you may not need to do this at all.

The articles I found about power saving, looked old a bit. So I applied the ones which seem to be applicable for X1E2.

After applying things, powertop said my X1E2 lasts for 7 hours when I logged in from sleep. Some posts say the values on powertop are not accurate, but I am just going to keep mucking around and move on when I got bored about this topic.

Regardless, some of the items mentioned in post, may be useful for your X1E2.

Additional Info

I initially installed Lubuntu to my X1E2 and installed Kubuntu later. So some files may be mixed up and that may be generating extra power usage. I am not sure.

Things I did

  • Added a service to execute /usr/sbin/powertop --auto-tune to /etc/systemd/system/powertop.service.

  • (UPDATE: Disabled this because I noticed Kernel 5.9.1 rejects what this program tries to do because of this?) Installed undervolt. Created the service as mentioned at the website. I used the values in ThrottleStop configuration file:

```

/etc/systemd/system/undervolt.service

(I did not install the command so it is executing it from the source directory)

(Omitting) ExecStart=/usr/local/src/undervolt/undervolt.py --core -140 --gpu -100 --cache -140 --uncore -40 ```

  • Created the following files in /etc/modprobe.d and did update-initramfs:

```

drm.custom.conf

options drm vblankoffdelay=1

iwlwifi.custom.conf

options iwlwifi power_save=1

thinkpad_acpi.custom.conf

options thinkpad_acpi fan_control=1

psmouse.custom.conf

(Not to apply this)

("dmesg" suggests to try this and it stops making touchpad work when resuming from Sleep)

(Touchpad becomes less responsive)

(For instance, I have to tap "SAVE" button twice to save a post at Reddit)

(Mouse cursor becomes moving less smooth when rubbing touchpad as well)

(And I found this page so just leaving a note and not to apply)

(https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1788928)

options psmouse synaptics_intertouch=1

i915.custom.conf

options i915 enable_guc=-1

blacklist-webcam.custom.conf

(I am going to disable this when I started using the webcam)

blacklist uvcvideo

blacklist-microphone.custom.conf

(This disables the speakers as well, so not doing it)

Note: cat /proc/asound/modules

blacklist snd_hda_intel

```

  • Added pcie_aspm=force to /etc/default/grub and then did update-grub. Not sure if this can be done via modprobe. There was time that I thought I do not have to mention this kernel parameter to make tlp change PCIe ASPM accordingly, but that seems to have been my imagination.

    • The page about PCIe ASPM at Arch Linux Website (Search "Active State Power Management") says if you have to do pcie_aspm=force, there may be a reason it is disabled.
    • lspci -vv | grep 'ASPM.*abled;' (or lspci -vvv | grep LnkCtl:) says some PCIe devices use ASPM without pcie_aspm=force. tlp seems to change the status depending on the current power source with PCIE_ASPM_ON_BAT=powersupersave, but my recognition is that we have to mention to use ASPM. Something I am not aware must be happening?
    • The last message from dmesg | egrep -i "aspm" says FADT indicates ASPM is unsupported, using BIOS configuration and X1E2 does not let you enable/disable ASPM in BIOS Setting. Does that mean kernel decided to use it...?
    • This page gives me an impression that tlp needs pcie_aspm=force to be mentioned to apply PCIE_ASPM_ON_BAT.
    • I also saw another old forum page saying Lenovo somehow stopped enabling PCIe ASPM with BIOS for recent Thinkpads.
    • Arch's website warns you to do pcie_aspm=force and my X1E2 has not crashed with it so far.
  • Installed tlp, tlp-rdw, acpi-call-dkms.

    • tp-smapi-dkms is not mentioned above because it does not seem to provide its functionality for X1E2.
    • tlpui is not mentioned above because it did not let me select powersupersave for PCI Express Active State Power Management (PCIe ASPM) when I was focusing on this topic (I installed tlpui, discovered powersupersave, realized tlpui does not let me select powersupersave, and uninstalled tlpui so that I can avoid myself to revert the change via tlpui after forgetting about the issue; According to the code at Github, around this line needs to be amended...?).
    • cat /sys/module/pcie_aspm/parameters/policy shows powersupersave so I put PCIE_ASPM_ON_BAT=powersupersave.
    • /sys/module/pcie_aspm/parameters/policy shows up without mentioning pcie_aspm=force in /etc/default/grub, but it seems I have to mention it to use PCIE_ASPM_ON_BAT.
  • Installed powertop and then did powertop --calibrate. Left it over 10 minutes until it finished the calibration.

    • powertop says Bad for some items like VM writeback timeout, but those settings seem to be adjusted depending on the power source (AC vs Battery). For instance, tlp sets 6000 for VM writeback timeout when using battery and powertop somehow thinks it is Bad. Later, I have disabled VM writeback timeout to apply 1500 regardless because I frequently reboot my X1E2 and did not want to risk having a higher chance to lose data.
  • echo 3000 > /sys/class/backlight/intel_backlight/brightness

    • /sys/class/backlight/intel_backlight/max_brightness is 24242. According to the articles about power saving, the value should be less than 2/3 of the maximum brightness which is about 16161. And that is too bright for me. powertop tells me that my X1E2 mostly consumes the power from the display brightness.
    • I was using 2424 (1/10 of the maximum level) for awhile and increased the value to 3000 later because the white color looked like grey in dark theme. I am probably going to change this value periodically.
    • I ended up setting the brightness close to 3000 at Energy Saving because my X1E2 sometimes sets the brightness to full when I open the lid.
    • Now I plan to amend more by putting a file in /etc/pm/sleep.d where we can do something when the lid is opened/closed because the situation did not change.
  • Disabled hyperthreading in BIOS Setting. Did this because it seems this reduces energy comsumption and I have not seen all the CPUs are fully used on htop command.