Skip to content

linuxPackages_latest.tuxedo-drivers: build failure #576266

Open

Description

@cguentherTUChemnitz

Nixpkgs version

  • Stable (26.05)

Describe the bug

After linux 7.3 update the tuxedo-driver package does not build anymore.

Steps to reproduce

nix build github:NixOS/nixpkgs/nixos-26.05#linuxPackages_latest.tuxedo-drivers

Minimal reproducer

Expected behaviour

It should build. Also unclear for me, if it is related to the point that the drivers package got outdated:
https://gitlab.com/tuxedocomputers/development/packages/tuxedo-drivers

A current version is 4.25.0

Screenshots

No response

Relevant log output

error: build of '/nix/store/a4dhqb1r2d6izf4gssr6npfardx58fcl-tuxedo-drivers-7.3-4.20.1.drv' on 'ssh-ng://remotebuild@runner-1' failed: Cannot build '/nix/store/a4dhqb1r2d6izf4gssr6npfardx58fcl-tuxedo-drivers-7.3-4.20.1.drv'.
       Reason: builder failed with exit code 2.
       Output paths:
         /nix/store/19la2xsk40ylq8g4m143lsim18rydsz9-tuxedo-drivers-7.3-4.20.1
       Last 25 log lines:
       > src/clevo_acpi.c:258:16: note: (near initialization for 'clevo_acpi_driver')
       > src/clevo_acpi.c:264:10: error: 'struct acpi_driver' has no member named 'drv'
       >   264 |         .drv.pm = &clevo_driver_pm_ops
       >       |          ^~~
       > src/clevo_acpi.c:264:19: warning: excess elements in struct initializer
       >   264 |         .drv.pm = &clevo_driver_pm_ops
       >       |                   ^
       > src/clevo_acpi.c:264:19: note: (near initialization for 'clevo_acpi_driver')
       > src/clevo_acpi.c:268:1: warning: data definition has no type or storage class
       >   268 | module_acpi_driver(clevo_acpi_driver);
       >       | ^~~~~~~~~~~~~~~~~~
       > src/clevo_acpi.c:268:1: error: type defaults to 'int' in declaration of 'module_acpi_driver' [-Wimplicit-int]
       > src/clevo_acpi.c:268:1: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type]
       > src/clevo_acpi.c:250:27: error: storage size of 'clevo_acpi_driver' isn't known
       >   250 | static struct acpi_driver clevo_acpi_driver = {
       >       |                           ^~~~~~~~~~~~~~~~~
       > src/clevo_acpi.c:250:27: warning: 'clevo_acpi_driver' defined but not used [-Wunused-variable]
       > make[5]: *** [/nix/store/nwbp0bvjzvhbf4w6mximhl3ws44vrrj3-linux-7.3-dev/lib/modules/7.3.0/source/scripts/Makefile.build:290: src/clevo_acpi.o] Error 1
       > make[4]: *** [/nix/store/nwbp0bvjzvhbf4w6mximhl3ws44vrrj3-linux-7.3-dev/lib/modules/7.3.0/source/scripts/Makefile.build:551: src] Error 2
       > make[3]: *** [/nix/store/nwbp0bvjzvhbf4w6mximhl3ws44vrrj3-linux-7.3-dev/lib/modules/7.3.0/source/Makefile:2229: .] Error 2
       > make[2]: *** [/nix/store/nwbp0bvjzvhbf4w6mximhl3ws44vrrj3-linux-7.3-dev/lib/modules/7.3.0/source/Makefile:248: __sub-make] Error 2
       > make[2]: Leaving directory '/build/source'
       > make[1]: *** [/nix/store/nwbp0bvjzvhbf4w6mximhl3ws44vrrj3-linux-7.3-dev/lib/modules/7.3.0/source/Makefile:248: __sub-make] Error 2
       > make[1]: Leaving directory '/nix/store/nwbp0bvjzvhbf4w6mximhl3ws44vrrj3-linux-7.3-dev/lib/modules/7.3.0/build'
       > make: *** [Makefile:29: all] Error 2
       For full logs, run:
         nix log /nix/store/a4dhqb1r2d6izf4gssr6npfardx58fcl-tuxedo-drivers-7.3-4.20.1.drv
error: Cannot build '/nix/store/a4dhqb1r2d6izf4gssr6npfardx58fcl-tuxedo-drivers-7.3-4.20.1.drv'.
       Reason: builder failed with exit code 1.
       Output paths:
         /nix/store/19la2xsk40ylq8g4m143lsim18rydsz9-tuxedo-drivers-7.3-4.20.1

Additional context

No response

System metadata

❯ nix-shell -p nix-info --run "nix-info -m"
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring

  • system: "x86_64-linux"
  • host os: Linux 7.2.11, NixOS, 26.05 (Yarara), 26.05.20261018.8ce7336
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.34.9
  • nixpkgs: /nix/store/jp4c6jcd6sr11az6r2754d2ycify5ph1-source

Notify maintainers


Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)

I assert that this issue is relevant for Nixpkgs

Is this issue important to you?

Add a 👍 reaction to issues you find important.

Activity

  1. mserajnik commented on Oct 21, 2026

    @mserajnik
    Member

    tuxedo-drivers also fails before reaching the 7.3 compile errors on nixos-unstable (02c087f), and not only for 7.3; linuxPackages_7_2.tuxedo-drivers (7.2.11) fails as well.

    This seems to be caused by the module signing flags from #571181. The make flags now include cmd_sign=/nix/store/...-kmodigest-0.1.0/bin/kmodigest$$(space)$$@, and the all target in tuxedo-drivers' own Makefile passes them through the shell again (make -C $(KDIR) M=$(PWD) $(MAKEFLAGS) modules), where the parenthesis breaks:

    bash: -c: line 1: syntax error near unexpected token `('
    make: *** [Makefile:29: all] Error 2
    

    Calling the kernel's build directly (make -C $KDIR M=$PWD modules) instead of the package's all target would presumably avoid this. Of course, the 7.3 errors still need a newer tuxedo-drivers release.

  2. fxthiry commented on Oct 21, 2026

    @fxthiry

    Can confirm @mserajnik's analysis. This override works for me on 7.3 (unstable 02c087f, InfinityBook Pro Gen8; Fn keys and backlight OK):

    nixpkgs.overlays = [
      (final: prev: {
        linuxPackages_latest = prev.linuxPackages_latest.extend (kfinal: kprev: {
          tuxedo-drivers = kprev.tuxedo-drivers.overrideAttrs (old: {
            version = "4.25.0";
            src = final.fetchFromGitLab {
              group = "tuxedocomputers";
              owner = "development/packages";
              repo = "tuxedo-drivers";
              rev = "v4.25.0";
              hash = "sha256-AER+JPl3lem1OFV51VdOZAnr3Uy1BFSpEJNrE+shYis=";
            };
            postPatch = (old.postPatch or "") + ''
              substituteInPlace Makefile \
                --replace-fail 'make -C $(KDIR) M=$(PWD) $(MAKEFLAGS)' '$(MAKE) -C $(KDIR) M=$(PWD)'
            '';
            postInstall =
              final.lib.replaceStrings [ "usr/lib/udev" ] [ "files/usr/lib/udev" ] old.postInstall
              + ''
                rm -f $out/lib/modules/*/modules.*
              '';
          });
        });
      })
    ];
  3. mserajnik commented on Oct 22, 2026

    @mserajnik
    Member

    I tested a similar override on an InfinityBook Pro AMD Gen10 with Linux 7.3 (02c087f). My variant removes $(MAKEFLAGS) from the Makefile and sets DEPMOD=true.

    However, after a minute or two of sustained load, every core drops to about 610 MHz (apparently the CPU's minimum) and does not recover to normal speeds even after the load ends, until rebooting. I do not see anything in the journal relating to the clock drop.

    I never had this issue on Linux 7.2.10 with tuxedo-drivers 4.20.1 or any other previous versions, so this seems to be either a Linux 7.3 or tuxedo-drivers 4.25.0 bug, potentially specific to this hardware. I have reported it upstream here (and reverted to Linux 7.2.10 with tuxedo-drivers 4.20.1 for now): https://gitlab.com/tuxedocomputers/development/packages/tuxedo-drivers/-/work_items/405

  4. cguentherTUChemnitz commented on Oct 23, 2026

    @cguentherTUChemnitz
    Author

    Can confirm @mserajnik's analysis. This override works for me on 7.3 (unstable 02c087f, InfinityBook Pro Gen8; Fn keys and backlight OK):

    nixpkgs.overlays = [
    (final: prev: {
    linuxPackages_latest = prev.linuxPackages_latest.extend (kfinal: kprev: {
    tuxedo-drivers = kprev.tuxedo-drivers.overrideAttrs (old: {
    version = "4.25.0";
    src = final.fetchFromGitLab {
    group = "tuxedocomputers";
    owner = "development/packages";
    repo = "tuxedo-drivers";
    rev = "v4.25.0";
    hash = "sha256-AER+JPl3lem1OFV51VdOZAnr3Uy1BFSpEJNrE+shYis=";
    };
    postPatch = (old.postPatch or "") + ''
    substituteInPlace Makefile
    --replace-fail 'make -C $(KDIR) M=$(PWD) $(MAKEFLAGS)' '$(MAKE) -C $(KDIR) M=$(PWD)'
    '';
    postInstall =
    final.lib.replaceStrings [ "usr/lib/udev" ] [ "files/usr/lib/udev" ] old.postInstall
    + ''
    rm -f $out/lib/modules//modules.
    '';
    });
    });
    })
    ];

    How should we continue from here? Do you @fxthiry think that this can be already placed a a package update merge-request, or should be something elsde discussed about the changed module loading here?

  5. mserajnik commented on Oct 23, 2026

    @mserajnik
    Member

    However, after a minute or two of sustained load, every core drops to about 610 MHz (apparently the CPU's minimum) and does not recover to normal speeds even after the load ends, until rebooting. I do not see anything in the journal relating to the clock drop.

    I am debugging this further at the moment and there is definitely a bug in tuxedo-drivers 4.25.0 that seems unrelated to 7.3, since I can reproduce it under 7.2.10 too. It causes PROCHOT and thus throttles the CPU. Will update once I know the exact cause.

  6. fxthiry commented on Oct 23, 2026

    @fxthiry

    @mserajnik a data point for #405: I can't reproduce it on a TUXEDO InfinityBook Pro Gen8 (MK1), Linux 7.3.0 + 4.25.0 (same override as above, driver code unpatched), freshly booted.

    • Board PH4PRX1_PH6PRX1, BIOS N.1.10A08 (2024-01-30), EC 1.26
    • i7-13700H, microcode 0x6134, intel_pstate active, governor powersave
    • power-profiles-daemon balanced, thermald running; no fan-control daemon (no TCC, no tailord), so tuxedo_io is loaded but nothing talks to it

    My test differs from yours: 4 minutes of pure CPU load on all 20 threads (one yes > /dev/null per thread), then 2 minutes idle, then a 5 s single-thread burst, sampling /proc/cpuinfo every 10 s.

    battery (80 %) USB-C PD 90 W (20 V / 4.5 A, battery charging)
    all-core under load 2.7–3.0 GHz, max 73 °C 2.0–2.4 GHz, max 65 °C
    single-thread burst afterwards 4.9–5.0 GHz 4.3–4.7 GHz
    RAPL PL1/PL2 45/45 W 45/45 W

    The clock always recovered, and the kernel logged nothing. EPP was balance_power on battery and balance_performance on AC. The kernel's thermal_throttle counters stayed at 0, but those don't count EC-asserted PROCHOT, so they don't rule that out. The all-core clock was lower on AC than on battery. The battery was charging at about 34 W at the time, which may explain it, but I haven't looked into it.

    So either it's specific to your board/EC, or it needs something my setup doesn't do. The obvious difference is tailord, which you mention driving the fans through tuxedo_io. Have you tried reproducing it with tailord stopped?

  7. mserajnik commented on Oct 23, 2026

    @mserajnik
    Member

    Edit: The fan table revert in the override below is not the right workaround, and my conclusion about a targeted fix for a nixpkgs update is incorrect too. See here.


    @fxthiry You just commented while I was writing this comment, I found the cause:

    I am debugging this further at the moment and there is definitely a bug in tuxedo-drivers 4.25.0 that seems unrelated to 7.3, since I can reproduce it under 7.2.10 too. It causes PROCHOT and thus throttles the CPU. Will update once I know the exact cause.

    I found the cause of the throttling: tuxedo-drivers commit 95e30d5, first released in 4.22.0. It makes uw_init_fan write 0x01 instead of 0x00 as the base speed of the fan tables, and on my InfinityBook Pro AMD Gen10 the embedded controller then asserts PROCHOT under load. The kernel version does not matter here; 4.25.0 causes the same problem on 7.2.10 as it does on 7.3. I bisected it and updated the upstream issue with the details: https://gitlab.com/tuxedocomputers/development/packages/tuxedo-drivers/-/work_items/405#note_4075024268

    uw_init_fan only runs when software controls the fans, such as tailord or TUXEDO Control Center, and only on boards with "universal EC fan control". The commit was specifically meant for the InfinityBook Pro Gen9 AMD, where reverting it probably brings back the fan burst it works around. So if upstream has not fixed it by then, a nixpkgs update to 4.25.0 should contain a targeted fix, not a revert (for example, one that applies the workaround only to the Gen9 AMD).

    This is my full override for nixos-unstable (02c087f), which runs without problems on 7.3 now, including under load:

    nixpkgs.overlays = [
      (final: prev: {
        linuxPackages_latest = prev.linuxPackages_latest.extend (
          kfinal: kprev: {
            tuxedo-drivers = kprev.tuxedo-drivers.overrideAttrs (old: {
              version = "4.25.0";
              src = final.fetchFromGitLab {
                group = "tuxedocomputers";
                owner = "development/packages";
                repo = "tuxedo-drivers";
                rev = "v4.25.0";
                hash = "sha256-AER+JPl3lem1OFV51VdOZAnr3Uy1BFSpEJNrE+shYis=";
              };
              postPatch = (old.postPatch or "") + ''
                substituteInPlace Makefile --replace-fail ' $(MAKEFLAGS)' ""
                substituteInPlace src/uniwill_keyboard.h \
                  --replace-fail 'addr_cpu_custom_fan_table_fan_speed, 0x01, 3)' 'addr_cpu_custom_fan_table_fan_speed, 0x00, 3)' \
                  --replace-fail 'addr_gpu_custom_fan_table_fan_speed, 0x01, 3)' 'addr_gpu_custom_fan_table_fan_speed, 0x00, 3)'
              '';
              makeFlags = old.makeFlags ++ [ "DEPMOD=true" ];
              postInstall = builtins.replaceStrings [ "usr/lib/udev" ] [ "files/usr/lib/udev" ] old.postInstall;
            });
            yt6801 = kprev.yt6801.overrideAttrs (old: {
              makeFlags = kfinal.kernelModuleMakeFlags ++ old.makeFlags ++ [ "DEPMOD=true" ];
            });
          }
        );
      })
    ];
  8. cguentherTUChemnitz commented on Oct 23, 2026

    @cguentherTUChemnitz
    Author

    @mserajnik , slightly of topic
    Since we are here deeply on fan in combination with the InfinityBook Pro AMD Gen10:
    AaronErhardt/tuxedo-rs@03e810e

    I needed to patch tuxedo-rs for this running currently on a flake build from source for this. Main problem i discovered back than was that this device has two fans and one is registered as cpu and one is registered as gpu fan, when not running tcc or tuxedo-rs. So when doing sustained load on just cpu, only one fan gets spun up to do the cooling load and the other one idles. MAybe also check on your side for that effect. With the linked change i was properly able to switch the device into overboost mode (65W TDP) and get propper sustained load with not too high temperatures. You can easily check with you hand if the airflow is present for both.

  9. mserajnik commented on Oct 23, 2026

    @mserajnik
    Member

    @cguentherTUChemnitz

    Thanks for this, as it turns out not off-topic at all:

    This shows that the fan table revert I mentioned in my comment above is not the right fix. The throttling only happens because tailord 0.3.1, which nixpkgs packages as tuxedo-rs, controls only one of the two fans on the InfinityBook Pro AMD Gen9 and Gen10. tuxedo-rs main fixes that (AaronErhardt/tuxedo-rs#185), and with it the unmodified 4.25.0 runs without throttling for me, with both fans running (I somehow never noticed that only one was running under load with 0.3.1, but I was able to confirm this too). I added that info to the upstream issue and closed it accordingly, since it is not a tuxedo-drivers bug.

    So I dropped the second substituteInPlace from my override and use a newer tuxedo-rs. This is my full overlay now:

    nixpkgs.overlays = [
      (final: prev: {
        linuxPackages_latest = prev.linuxPackages_latest.extend (
          kfinal: kprev: {
            tuxedo-drivers = kprev.tuxedo-drivers.overrideAttrs (old: {
              version = "4.25.0";
              src = final.fetchFromGitLab {
                group = "tuxedocomputers";
                owner = "development/packages";
                repo = "tuxedo-drivers";
                rev = "v4.25.0";
                hash = "sha256-AER+JPl3lem1OFV51VdOZAnr3Uy1BFSpEJNrE+shYis=";
              };
              postPatch = (old.postPatch or "") + ''
                substituteInPlace Makefile --replace-fail ' $(MAKEFLAGS)' ""
              '';
              makeFlags = old.makeFlags ++ [ "DEPMOD=true" ];
              postInstall = builtins.replaceStrings [ "usr/lib/udev" ] [ "files/usr/lib/udev" ] old.postInstall;
            });
            yt6801 = kprev.yt6801.overrideAttrs (old: {
              makeFlags = kfinal.kernelModuleMakeFlags ++ old.makeFlags ++ [ "DEPMOD=true" ];
            });
          }
        );
        tuxedo-rs = prev.tuxedo-rs.overrideAttrs (
          finalAttrs: _: {
            version = "0.3.1-unstable-2026-07-24";
            src = final.fetchFromGitHub {
              owner = "AaronErhardt";
              repo = "tuxedo-rs";
              rev = "74bbabeedfa2e53c80600623940fef87741b61d7";
              hash = "sha256-TPhfLXvesz0YYK/OVlcG7w4wr4dEcehx7OqMkqHjkzU=";
            };
            cargoDeps = final.rustPlatform.fetchCargoVendor {
              inherit (finalAttrs) src;
              hash = "sha256-c3D2/Dzop5FfRaAQ4eQGOlirrc4CvOQ/WanyL89FcNM=";
            };
            # main still reports 0.3.1.
            doInstallCheck = false;
          }
        );
      })
    ];
  10. cguentherTUChemnitz commented on Oct 23, 2026

    @cguentherTUChemnitz
    Author

    So that means, we should aim for https://github.com/AaronErhardt/tuxedo-rs to make a new tag / release that we can version bump here in nixpkgs to properly solve it?

  11. mserajnik commented on Oct 23, 2026

    @mserajnik
    Member

    So that means, we should aim for https://github.com/AaronErhardt/tuxedo-rs to make a new tag / release that we can version bump here in nixpkgs to properly solve it?

    From what I understand, a release would be the cleanest way. But the fix consists of two small commits to a single file (from AaronErhardt/tuxedo-rs#184 and AaronErhardt/tuxedo-rs#185), and both apply cleanly to 0.3.1 as patches. 0.3.1 with these builds on nixos-unstable with the existing cargoHash (neither commit touches the dependencies):

    patches = [
      (fetchpatch {
        url = "https://github.com/AaronErhardt/tuxedo-rs/commit/43c10db8c7796bd0533c2ceb10fe8adaa5ba8b2b.patch";
        hash = "sha256-5k2RrfgW0eFxOUJgQ5Y1qYujnJVBDFNDDP9NLd9pppQ=";
      })
      (fetchpatch {
        url = "https://github.com/AaronErhardt/tuxedo-rs/commit/bfadc2e6cfd4b12dd7c14009d121262ea4b48f5d.patch";
        includes = [ "tuxedo_ioctl/*" ];
        hash = "sha256-+F4I2lG1WuRuA2wnC/kff31Th2CM/6EfnUkqMsbK4+g=";
      })
    ];

    These are the only changes to the hardware layer since 0.3.1, so the fan detection then matches main, which I tested on my own InfinityBook Pro AMD Gen10. So nixpkgs could apply these patches downstream to fix the throttling issue that would be introduced once tuxedo-drivers gets bumped to 4.25.0 and to get the second fan running at all (which is already a problem right now).

    Side note: since this concerns tuxedo-rs and not tuxedo-drivers, it should probably be a separate PR.

  12. cguentherTUChemnitz commented on Oct 23, 2026

    @cguentherTUChemnitz
    Author
     Side note: since this concerns `tuxedo-rs` and not `tuxedo-drivers`, it should probably be a separate PR.
    

    Exactly my thinking. That means we could already start a merge request to version-bump tuxedo-drivers for nixpkgs, right? But this still needs this postpatch makefile stuff or should we wait for something settling there on kernel depmod changes settling here?

  13. mserajnik commented on Oct 23, 2026

    @mserajnik
    Member

    Exactly my thinking. That means we could already start a merge request to version-bump tuxedo-drivers for nixpkgs, right? But this still needs this postpatch makefile stuff or should we wait for something settling there on kernel depmod changes settling here?

    Yes, I think the tuxedo-drivers update can proceed regardless. I am not comfortable making that PR myself since I am quite new to NixOS, but from what I can tell, these changes are needed besides the version and the hash:

    • Remove $(MAKEFLAGS) from the kernel make calls in the top-level Makefile, for example with substituteInPlace Makefile --replace-fail ' $(MAKEFLAGS)' "" in postPatch. That is about the cmd_sign flag from linux: generate deterministic module signatures and certificates #571181, not about depmod.
    • Change the udev path in postInstall from usr/lib/udev to files/usr/lib/udev, since upstream moved it in 4.21.0.

    Depmod does not need any adjustments anymore: on master, kernelModuleMakeFlags (which the package uses) already contains DEPMOD=true (since b46ebdd). And the existing no-cp-usr.patch still applies to 4.25.0.

  14. mserajnik commented on Oct 25, 2026

    @mserajnik
    Member

    Someone opened a PR to update tuxedo-drivers to 4.25.0 here: #577948

  15. mserajnik commented on Oct 25, 2026

    @mserajnik
    Member

    And I opened a PR to apply those patches to tuxedo-rs 0.3.1 while we wait for a new upstream release: #578782

  16. silikeite commented on Oct 27, 2026

    @silikeite

    Question here: Is this only supposed to affect linux 7.3 or also 6.18? Not sure if that should be a separate bug to this one.

  17. BerriJ commented on Oct 29, 2026

    @BerriJ
    Contributor

    23. Question here: Is this only supposed to affect linux 7.3 or also 6.18? Not sure if that should be a separate bug to this one.

    The reason why the build fails is #571181 and since this was merged, the build failure happens regardless of 6.18 or 7.3. I'm really eager for the fix being merged. Tried to craft an overalay from PR #577948 but I wasn't succesfull with it.

  18. BerriJ commented on Nov 2, 2026

    @BerriJ
    Contributor

    While waiting I was able to create a working overlay. Maybe someone else also wants to use it while we wait for the PR's to get merged (and reach the channels). Below you find the overlay for tuxedo-drivers. I'm not using tuxedo-rs so thats left out.

    Overlay
    # overlay.nix
    _final: prev: {
      kernelPackagesExtensions = prev.kernelPackagesExtensions ++ [
        (lpself: lpsuper: {
          tuxedo-drivers = lpself.callPackage ../pkgs/tuxedo-drivers.nix { };
        })
      ];
    }
    # tuxedo-drivers.nix
    {
      lib,
      stdenv,
      fetchFromGitLab,
      kernel,
      kernelModuleMakeFlags,
      kmod,
      pahole,
      gitUpdater,
      udevCheckHook,
      bash,
    }:
    
    stdenv.mkDerivation (finalAttrs: {
      pname = "tuxedo-drivers-${kernel.version}";
      version = "4.25.0";
    
      src = fetchFromGitLab {
        group = "tuxedocomputers";
        owner = "development/packages";
        repo = "tuxedo-drivers";
        rev = "v${finalAttrs.version}";
        hash = "sha256-AER+JPl3lem1OFV51VdOZAnr3Uy1BFSpEJNrE+shYis=";
      };
    
      patches = [ ./no-cp-usr.patch ];
    
      postInstall = ''
        substituteInPlace files/usr/lib/udev/rules.d/* \
          --replace-quiet "/bin/bash" "${lib.getExe bash}" \
          --replace-quiet "/bin/sh" "${lib.getExe bash}"
    
        install -Dm0644 \
          -t "$out/etc/udev/rules.d" \
          files/usr/lib/udev/rules.d/*
      '';
    
      buildInputs = [ pahole ];
      nativeBuildInputs = [
        kmod
        udevCheckHook
      ]
      ++ kernel.moduleBuildDependencies;
    
      makeFlags = kernelModuleMakeFlags ++ [
        "KERNELRELEASE=${kernel.modDirVersion}"
        "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
        "INSTALL_MOD_PATH=${placeholder "out"}"
      ];
    
      doInstallCheck = true;
    
      passthru.updateScript = gitUpdater {
        rev-prefix = "v";
      };
    
      meta = {
        broken = stdenv.hostPlatform.isAarch64 || (lib.versionOlder kernel.version "5.5");
        description = "Keyboard and hardware I/O driver for TUXEDO Computers laptops";
        homepage = "https://gitlab.com/tuxedocomputers/development/packages/tuxedo-drivers";
        license = lib.licenses.gpl2Plus;
        longDescription = ''
          Drivers for several platform devices for TUXEDO notebooks:
          - Driver for Fn-keys
          - SysFS control of brightness/color/mode for most TUXEDO keyboards
          - Hardware I/O driver for TUXEDO Control Center
    
          Can be used with the "hardware.tuxedo-drivers" NixOS module.
        '';
        maintainers = with lib.maintainers; [
          aprl
          blanky0230
          keksgesicht
          XBagon
          wetisobe
        ];
        platforms = lib.platforms.linux;
      };
    })
    # no-cp-usr.patch
    diff --git a/Makefile b/Makefile
    index 757393e..33df020 100644
    --- a/Makefile
    +++ b/Makefile
    @@ -23,14 +23,13 @@
     KDIR := /lib/modules/$(shell uname -r)/build
     
     all:
    -	make -C $(KDIR) M=$(PWD) $(MAKEFLAGS) modules
    +	$(MAKE) -C $(KDIR) M=$(PWD) modules
     
     install: all
    -	make -C $(KDIR) M=$(PWD) $(MAKEFLAGS) modules_install
    -	cp -r usr /
    +	$(MAKE) -C $(KDIR) M=$(PWD) modules_install
     
     clean:
    -	make -C $(KDIR) M=$(PWD) $(MAKEFLAGS) clean
    +	$(MAKE) -C $(KDIR) M=$(PWD) clean
     	rm -rf build/
    
    

    Make sure to include an empy last line in no-cp-usr.patch.

  19. mserajnik commented on Nov 2, 2026

    @mserajnik
    Member

    @BerriJ #577453 got merged a while ago so I think you can remove the yt6801 part.

  20. BerriJ commented on Nov 2, 2026

    @BerriJ
    Contributor

    26. @BerriJ #577453 got merged a while ago so I think you can remove the yt6801 part.

    Thanks for the hint! It hasn't been in nixos-unstable when I created this overlay (I think 3 days ago) so I thought its still needed but now it is. I have adjusted my previous comment and remove the yt6801 part. Thanks! :)

  21. cguentherTUChemnitz commented on Nov 2, 2026

    @cguentherTUChemnitz
    Author

    @BerriJ

    I am currently using this config for TUXEDO InfinityBook Pro 14 - Gen10 - AMD, until we get the merges through:

    config
    # TUXEDO InfinityBook Pro 14 - Gen10 - AMD
    #
    # NixOS configuration for TUXEDO InfinityBook Pro 14 Gen10 with AMD
    # Enables TUXEDO-specific drivers and tools for hardware management
    
    {
      pkgs,
      inputs,
      ...
    }:
    {
      imports = [
        inputs.nixos-hardware.nixosModules.common-cpu-amd
        inputs.nixos-hardware.nixosModules.common-cpu-amd-pstate
        inputs.nixos-hardware.nixosModules.common-gpu-amd
        inputs.nixos-hardware.nixosModules.common-pc-laptop
        inputs.nixos-hardware.nixosModules.common-pc-laptop-ssd
        inputs.nixos-hardware.nixosModules.tuxedo-infinitybook-pro14-gen10-amd
      ];
    
      # https://github.com/NixOS/nixpkgs/pull/578782
      # Second fan detection on InfinityBook Pro AMD. Uses the package expression from the PR head.
      nixpkgs.overlays = [
        (final: _prev: {
          tuxedo-rs = final.callPackage (final.fetchurl {
            url = "https://raw.githubusercontent.com/NixOS/nixpkgs/fcf0b1fb075276f7384a2abead5fb78a12781f30/pkgs/by-name/tu/tuxedo-rs/package.nix";
            hash = "sha256-UNbLZ8R8Z8uiMmQRwJe2XqP/EqcOUFGzZ17uAqF+5jg=";
          }) { };
        })
      ];
    
      # https://github.com/NixOS/nixpkgs/pull/577948#issuecomment-6401766211
      boot.kernelPackages = pkgs.linuxPackages_latest.extend (
            kernelFinal: kernelPrev: {
              tuxedo-drivers = kernelPrev.tuxedo-drivers.overrideAttrs (_old: {
                version = "4.25.0";
    
                src = pkgs.fetchFromGitLab {
                  group = "tuxedocomputers";
                  owner = "development/packages";
                  repo = "tuxedo-drivers";
                  rev = "v4.25.0";
                  hash = "sha256-AER+JPl3lem1OFV51VdOZAnr3Uy1BFSpEJNrE+shYis=";
                };
    
                postInstall = ''
                substituteInPlace files/usr/lib/udev/rules.d/* \
                  --replace-quiet "/bin/bash" "${pkgs.lib.getExe pkgs.bash}" \
                  --replace-quiet "/bin/sh" "${pkgs.lib.getExe pkgs.bash}"
    
                install -Dm0644 \
                  -t "$out/etc/udev/rules.d" \
                  files/usr/lib/udev/rules.d/*
              '';
              });
            }
          );
    
      hardware = {
        tuxedo-drivers = {
          enable = true;
          settings = {
            charging-profile = "stationary";
            charging-priority = "performance";
          };
        };
        tuxedo-rs = {
          enable = true;
          tailor-gui.enable = true;
        };
      };
    }

    The nixos-hardware input is a flake input from: https://github.com/NixOS/nixos-hardware/

  22. vbrandl commented on Nov 2, 2026

    @vbrandl
    Contributor

    https://github.com/AaronErhardt/tuxedo-rs/releases

    There have been new releases in tuxedo-rs. Once those get released in nixpkgs, the kernel should build again, I guess?

    Will this still get into NixOS 26.05, or do we have to use unstable or wait for 26.11?

  23. mserajnik commented on Nov 2, 2026

    @mserajnik
    Member

    @vbrandl

    There is already a PR open with the patches applied that make it work with the old version: #578782
    I will update it to bump the version instead tomorrow when I find the time.
    Edit: Found some time today still, so I updated it already.

    I will also tag it for backporting once it got merged, so 26.05 should get the fix too.

  24. devurandom commented on Nov 25, 2026

    @devurandom
    Contributor

    The fix for 26.05 (#583561) requires someone to approve and merge. 🙏
    Similarly, the fix for the overheating issue for 26.05 (#583557) is also waiting for a review. 🙏

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions