Thinkpad X1 Carbon GPU Undervolting in Arch Linux

After successfully installing Arch Linux on my Thinkpad X1 Carbon Generation 6 I began experimenting with laptop component undervolting to reduce heat and improve performance. Unfortunately it seems that the set points are being ignored to some extent.

Indeed, Francesco Palmarini reported on Github:

It is kind of impossible that your GPU can work at -1V offset voltage. On XTU I get an instant reboot on -500mV

However, despite the apparent physical impossibility of applying such a large voltage offset, there seems to be a real effect on performance. Applying a -500 mV voltage offset resulted in approximately 2 watts lower peak power consumption as measured by throttled monitoring.

I benchmarked GPU performance at different voltage offsets to see if they are ignored after a certain point. The result shows diminishing returns beyond 300 millivolt undervoltage. Still, it is not clear whether the larger undervoltage settings are actually being set correctly because it should not be possible for the CPU to operate when undervolted 900 mV.

# config.toml

start = 0
stop = -1000
step = -100

import toml
from subprocess import run
from multiprocessing import Process
from tempfile import NamedTemporaryFile
from jinja2 import Template
from tqdm import tqdm

def undervolt_gpu(voltage):
    log = f"undervolt___{voltage}.log"
    print(f"undervolt_gpu: saving to {log}")
    with open("lenovo_fix.conf") as fd:
        tpl = Template(
    with NamedTemporaryFile(mode="w") as ntf:
        cmd = f"sudo /usr/lib/throttled/ --monitor --log {log} --config {}"
        print("voltage", voltage, "cmd", cmd)
        run(cmd, check=True, shell=True)

if __name__ == "__main__":
    cfg = toml.load("config.toml")
    voltages = list(range(cfg["voltage"]["start"], cfg["voltage"]["stop"], cfg["voltage"]["step"]))
    for voltage in tqdm(voltages):
        p = Process(target=undervolt_gpu, args=(voltage,))
        cmd = f"glmark2 -b :duration=2.0 --fullscreen | tee glmark___{voltage}.log"
        print("process launched")
        run(cmd, check=True, shell=True)
        print("process terminating")
        print("process terminated")

I generated a CSV report by regex parsing the data logged from glmark2 and


import re
import os.path
import toml
import csv

cfg = toml.load("config.toml")
voltages = list(range(cfg["voltage"]["start"], cfg["voltage"]["stop"], cfg["voltage"]["step"]))

with open('undervolting.csv', 'w', newline='') as csvfile:
    fieldnames = ['glmark', 'voltage', 'package_watts', 'graphics_watts', 'dram_watts']
    writer = csv.DictWriter(csvfile, fieldnames=fieldnames)
    for voltage in voltages:
        glmark_p = f"glmark___{voltage}.log"
        undervolt_p = f"undervolt___{voltage}.log"
            with open(glmark_p) as fd:
                    glmark_s ="(?:glmark2 Score: )(\d+)",
                except AttributeError:
        except FileNotFoundError:
            with open(undervolt_p) as fd:
                for line in fd:
                    package, graphics, dram = getattr(
                        "(?:Package: )(\d*\.?\d+)(?: W - Graphics: )(\d*\.?\d+)(?: W - DRAM: )(\d*\.?\d+)", line
                    ), "groups", lambda: ("0", "0", "0",))()
        except FileNotFoundError:

throttled GPU voltage offset adjustment has some effect on GPU performance, but it is unclear to what extent this is meaningful with the Linux implementation. GPU voltage offset adjustment parameters are not on the same scale as those within the Windows-based Intel XTU utility. The relationship between throttled GPU voltage offset and Intel XTU voltage offset warrants further research to fully unlock the battery life and calculation performance potential of our machines.

To set your GPU voltage offset to -400 mV, edit lenovo_fix.conf which is located at /etc/lenovo_fix.conf on Arch Linux if you installed throttled from the throttled package.