Configuration for ThinkPad T14s Gen 6 (Snapdragon X Elite X1E-78-100)

I would like to share the relevant part of my configuration as I spent quite some time to get NixOS booting on my ThinkPad T14s Gen 6 (Snapdragon X Elite X1E-78-100).

This would not have been possible without the working Ubuntu installer image and the support in Ubuntu 24.10 Concept ♥️ Snapdragon X Elite - Ubuntu Concept - Ubuntu Community Hub

Some things like accelerated graphics, battery gauge and sound require firmware files from the Windows image, which I did not bother with.

boot = {
    kernelPackages = let kernel_pkg = { fetchgit, buildLinux, ... } @ args:
    buildLinux (args // rec {
        version  = "6.12.0";
        src = pkgs.fetchgit {
            url  = "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git";
            rev  = "06090c9b622a7e1f797e775db4c035e0d779b76e";
            hash = "sha256-49t94CaLdkxrmxG9Wie+p1wk6VNhraawR0vOjoFR3bY=";
        };
    } // (args.argsOverride or {}));
    kernel = pkgs.callPackage kernel_pkg{};
    in
    pkgs.recurseIntoAttrs (pkgs.linuxPackagesFor kernel);
    kernelParams  = [ "cma=128M" "clk_ignore_unused" "pd_ignore_unused" ];
    kernelPatches = [ {
        name  = "snapdragon-config";
        patch = null;
        extraConfig = ''
            TYPEC y
            PHY_QCOM_QMP y
            QCOM_CLK_RPM y
            MFD_QCOM_RPM y
            REGULATOR_QCOM_RPM y
            PHY_QCOM_QMP_PCIE y
            CLK_X1E80100_CAMCC y
        '';
    } ];
    loader = {
        efi.canTouchEfiVariables =  true;
        systemd-boot = {
            enable =  true;
        };
    };
};

hardware = {
    deviceTree = {
        enable =  true;
        name   = "qcom/x1e78100-lenovo-thinkpad-t14s.dtb";
    };
    enableRedistributableFirmware =  true;
};

edit: forgot to merge the devicetree.

2 Likes

Interesting, i assume performance isn’t great without HW-accel, but how usable is it? I moved the thread to Guides btw.

1 Like

The laptop is currently building libreoffice-24.8.2.1 which will likely take some time.

When done, I’ll test firefox and chromium with WebGL Aquarium

Oops, thanks!

(libreoffice build failed).

With 10k fish 12 fps in firefox and 5 fps in ungoogled chromium.
With 5k fish 17 fps in firefox and 8 fps in ungoogled chromium.
With 1k fish 25 fps in firefox, 18 fps in ungoogled chromium.

Kernel compile takes about 33 minutes.

Have not used it much but so far the T14s feels very snappy.