tuxedo-rs icon indicating copy to clipboard operation
tuxedo-rs copied to clipboard

Tuxedo RS not building with latest kernel 6.16 NixOS

Open tilupe opened this issue 3 months ago • 12 comments

Hello, first of all thank you for creating and maintaining this project.

I recently bought myself a IBP 14 Gen 10 from Tuxedo wit the ne AMD AI 300 Chip. On my machine I let NixOS with the latest kernel (6.16) run. The device has already a few problmes and quirks. To reduce them I need the latest kernel. For a better experience, I wanted to try out the tuxedo-rs package on nixos and enabled it together with the tailor-gui. But unfortunately it won't build and I get the following error:

error: builder for '/nix/store/zs3y2d1blri99wzybmk0r129sk37wllv-tuxedo-drivers-6.16.1-4.12.2.drv' failed with exit code 2;
       last 25 log lines:
       >   CC [M]  src/ite_8297/ite_8297.o
       >   CC [M]  src/ite_829x/ite_829x.o
       >   CC [M]  src/tuxedo_compatibility_check/tuxedo_compatibility_check.o
       > In file included from src/tuxedo_compatibility_check/tuxedo_compatibility_check.c:25:
       > src/tuxedo_compatibility_check/tuxedo_compatibility_check.c:160:23: error: 'INTEL_ATOM_AIRMONT_MID' undeclared here (not in a function); did you mean 'INTEL_ATOM_AIRMONT_NP'?
       >   160 |         X86_MATCH_VFM(INTEL_ATOM_AIRMONT_MID, NULL),
       >       |                       ^~~~~~~~~~~~~~~~~~~~~~
       > /nix/store/9fh89vhcfq6a2l3rhwgg8fyiwlj38wip-linux-6.16.1-dev/lib/modules/6.16.1/source/arch/x86/include/asm/cpu_device_id.h:78:27: note: in definition of macro 'X86_MATCH_CPU'
       >    78 |         .vendor         = _vendor,                                      \
       >       |                           ^~~~~~~
       > /nix/store/9fh89vhcfq6a2l3rhwgg8fyiwlj38wip-linux-6.16.1-dev/lib/modules/6.16.1/source/arch/x86/include/asm/cpu_device_id.h:161:23: note: in expansion of macro 'VFM_VENDOR'
       >   161 |         X86_MATCH_CPU(VFM_VENDOR(vfm), VFM_FAMILY(vfm), VFM_MODEL(vfm),         \
       >       |                       ^~~~~~~~~~
       > src/tuxedo_compatibility_check/tuxedo_compatibility_check.c:160:9: note: in expansion of macro 'X86_MATCH_VFM'
       >   160 |         X86_MATCH_VFM(INTEL_ATOM_AIRMONT_MID, NULL),
       >       |         ^~~~~~~~~~~~~
       > make[6]: *** [/nix/store/9fh89vhcfq6a2l3rhwgg8fyiwlj38wip-linux-6.16.1-dev/lib/modules/6.16.1/source/scripts/Makefile.build:287: src/tuxedo_compatibility_check/tuxedo_compatibility_check.o] Error 1
       > make[5]: *** [/nix/store/9fh89vhcfq6a2l3rhwgg8fyiwlj38wip-linux-6.16.1-dev/lib/modules/6.16.1/source/scripts/Makefile.build:555: src/tuxedo_compatibility_check] Error 2
       > make[4]: *** [/nix/store/9fh89vhcfq6a2l3rhwgg8fyiwlj38wip-linux-6.16.1-dev/lib/modules/6.16.1/source/scripts/Makefile.build:555: src] Error 2
       > make[3]: *** [/nix/store/9fh89vhcfq6a2l3rhwgg8fyiwlj38wip-linux-6.16.1-dev/lib/modules/6.16.1/source/Makefile:2003: .] Error 2
       > make[2]: *** [/nix/store/9fh89vhcfq6a2l3rhwgg8fyiwlj38wip-linux-6.16.1-dev/lib/modules/6.16.1/source/Makefile:248: __sub-make] Error 2
       > make[2]: Leaving directory '/build/source'
       > make[1]: *** [/nix/store/9fh89vhcfq6a2l3rhwgg8fyiwlj38wip-linux-6.16.1-dev/lib/modules/6.16.1/source/Makefile:248: __sub-make] Error 2
       > make[1]: Leaving directory '/nix/store/9fh89vhcfq6a2l3rhwgg8fyiwlj38wip-linux-6.16.1-dev/lib/modules/6.16.1/build'
       > make: *** [Makefile:10: all] Error 2
       For full logs, run:
         nix log /nix/store/zs3y2d1blri99wzybmk0r129sk37wllv-tuxedo-drivers-6.16.1-4.12.2.drv
error: 1 dependencies of derivation '/nix/store/8ls8lpyd4vgm2m3jyndcgrfp9prfq4gv-linux-6.16.1-modules.drv' failed to build
error: 1 dependencies of derivation '/nix/store/wihfw42v3cn20r17803zxw6q6r81mn62-nixos-system-DG-BYOH-4517-25.05.20250820.9cb344e.drv' failed to build

I heard there was a problem mit a driver from tuxedo and that they were fixing it. More info to that here: See here

If you need any more info from me let me know. Kind regards

tilupe avatar Aug 24 '25 10:08 tilupe

I might be wrong, but this seems to me like a driver issue and nothing that could be fixed within this repo. Or is it caused by the Nix configs in this repo?

AaronErhardt avatar Aug 24 '25 19:08 AaronErhardt

That could very well be. Unfortunately I don't understand enough what is going on here. This error just comes when I try to add the following config:

  hardware.tuxedo-rs = {
    enable = true;
    tailor-gui.enable = true;
  };

Maybe I need to add a custom driver or Tuxedo needs to update theirs? I really don't know what the chain of dependency here is.

tilupe avatar Aug 27 '25 13:08 tilupe

I confirm the same exact build error using NixOS 25.05 channel and kernel 6.15+ Problem is that the issue has been fixed on tuxedo-drivers 4.13 (link) but NixOS 25.05 is pinned on 4.12.2.

So either you stay on 25.05 and downgrade to kernel 6.12 LTS by:

boot.kernelPackages = pkgs.linuxPackages_6_12;

or switch to unstable for now

nevarsin avatar Aug 27 '25 21:08 nevarsin

The problem was solved by NixOS/nixpkgs#441147 and sould be gone now :)

wetisobe avatar Oct 11 '25 05:10 wetisobe

I confirm the same exact build error using NixOS 25.05 channel and kernel 6.15+ Problem is that the issue has been fixed on tuxedo-drivers 4.13 (link) but NixOS 25.05 is pinned on 4.12.2.

So either you stay on 25.05 and downgrade to kernel 6.12 LTS by:

boot.kernelPackages = pkgs.linuxPackages_6_12;

or switch to unstable for now

How can I force my nixos to use only tuxedo-drivers from the unstable repository?

RokPapez avatar Oct 13 '25 12:10 RokPapez

@RokPapez Same here, having also the IBP 14 Gen 10 I'm on NixOS 25.05 and use the tuxedo-drivers (and btw also the yt6801 driver) from nixos-unstable using an overlay like that:

  boot.kernelPackages = pkgs.linuxPackages_latest.extend (self: super: {
    yt6801 = pkgs.unstable.linuxPackages_latest.yt6801;
    tuxedo-drivers = pkgs.unstable.linuxPackages_latest.tuxedo-drivers;
  });

pkgs.unstable is the overlay for nixos-unstable which has to be defined (best to google this one, e.g. I'm using flakes and there it's a bit different than with "standard" nixos config) before this will work and nixos-unstable and nixos-25.05 have to be on the same kernel version for linuxPackages_latest otherwise this will not work.

anyway once nixos-25.11 is out (which is fortunately not too far away) this should resolve itself

andeee avatar Oct 16 '25 09:10 andeee

@andeee thank you for this very much, I am still not able to make it work (after many years of arch I became a nixos noob):

I tried with this setting (let's use the latest stuff from unstable channel):

    kernelPackages = unstable.linuxPackages_latest.extend (self: super: {
      yt6801 = unstable.linuxPackages_latest.yt6801;
      tuxedo-drivers = unstable.linuxPackages_latest.tuxedo-drivers;
    });

But this give me an error like:

warning: Git tree '/etc/nixos' is dirty
building the system configuration...
warning: Git tree '/etc/nixos' is dirty
error: builder for '/nix/store/pxf0dlzjld3rapgm954gsb2b4pm5mf95-linux-6.17.2-modules-shrunk.drv' failed with exit code 1;
       last 3 log lines:
       > kernel version is 6.17.2
       > root module: nvme
       > modprobe: FATAL: Module nvme not found in directory /nix/store/45qiz09zx2isf6jbq05lmi81b8npf9s3-linux-6.17.2-modules/lib/modules/6.17.2
       For full logs, run:
         nix log /nix/store/pxf0dlzjld3rapgm954gsb2b4pm5mf95-linux-6.17.2-modules-shrunk.drv
error: 1 dependencies of derivation '/nix/store/va8cn3ks5h91bxkd0xz86s5rgfx88f38-initrd-linux-6.17.2.drv' failed to build

OK this is broken.

When using next config (kernel 6_16 from stable channel and drivers from unstable channel):

extraModulePackages = [
      (unstable.linuxPackages_6_16.yt6801.override { kernel = config.boot.kernelPackages.kernel; })
      (unstable.linuxPackages_6_16.tuxedo-drivers.override { kernel = config.boot.kernelPackages.kernel; })
    ];
...

I get the error:

error: builder for '/nix/store/sj4kp3kpz9qrp2af7z4qri2dvlf24x01-tuxedo-drivers-6.16.6-4.15.4.drv' failed with exit code
 2;
       last 25 log lines:
       > mkdir: cannot create directory '.tmp_118': Permission denied
       > mkdir: cannot create directory '.tmp_121': Permission denied
       > mkdir: cannot create directory '.tmp_124': Permission denied
       > mkdir: cannot create directory '.tmp_127': Permission denied
       > mkdir: cannot create directory '.tmp_130': Permission denied
       > mkdir: cannot create directory '.tmp_133': Permission denied
       > mkdir: cannot create directory '.tmp_136': Permission denied
       > mkdir: cannot create directory '.tmp_139': Permission denied
       > mkdir: cannot create directory '.tmp_142': Permission denied
       > mkdir: cannot create directory '.tmp_145': Permission denied
       > mkdir: cannot create directory '.tmp_148': Permission denied
       > mkdir: cannot create directory '.tmp_151': Permission denied
       > mkdir: cannot create directory '.tmp_154': Permission denied
       > mkdir: cannot create directory '.tmp_157': Permission denied
       > mkdir: cannot create directory '.tmp_160': Permission denied
       > mkdir: cannot create directory '.tmp_163': Permission denied
       > mkdir: cannot create directory '.tmp_166': Permission denied
       > mkdir: cannot create directory '.tmp_169': Permission denied
       > mkdir: cannot create directory '.tmp_172': Permission denied
       > mkdir: cannot create directory '.tmp_175': Permission denied
       > ln: failed to create symbolic link 'source': Permission denied
       > make[2]: *** [/nix/store/7idwvxgncrs5r70432l5gd314v8xmxvh-linux-6.16.6-dev/lib/modules/6.16.6/source/Makefile:
689: outputmakefile] Error 1
       > make[1]: *** [/nix/store/7idwvxgncrs5r70432l5gd314v8xmxvh-linux-6.16.6-dev/lib/modules/6.16.6/source/Makefile:
248: __sub-make] Error 2
       > make[1]: Leaving directory '/nix/store/7idwvxgncrs5r70432l5gd314v8xmxvh-linux-6.16.6-dev/lib/modules/6.16.6/bu
ild'
       > make: *** [Makefile:29: all] Error 2
       For full logs, run:
         nix log /nix/store/sj4kp3kpz9qrp2af7z4qri2dvlf24x01-tuxedo-drivers-6.16.6-4.15.4.drv

Looks like that this tries to use even newer version which has been broken on it's own. Broken.

When I tried to use kernel 6_17 and drivers from unstable channel I get:

    kernelPackages = unstable.linuxPackages_6_17;
    extraModulePackages = [
      (unstable.linuxPackages_6_17.yt6801.override { kernel = config.boot.kernelPackages.kernel; })
      (unstable.linuxPackages_6_17.tuxedo-drivers.override { kernel = config.boot.kernelPackages.kernel; })
    ];
error: builder for '/nix/store/fzaqsjd3jlk4nys4zf02va9v8s778r61-linux-6.17.2-modules-shrunk.drv' failed with exit code
1;
       last 3 log lines:
       > kernel version is 6.17.2
       > root module: nvme
       > modprobe: FATAL: Module nvme not found in directory /nix/store/qjli25qm15vizwlfpnzzqvz3srrvq43q-linux-6.17.2-m
odules/lib/modules/6.17.2
       For full logs, run:
         nix log /nix/store/fzaqsjd3jlk4nys4zf02va9v8s778r61-linux-6.17.2-modules-shrunk.drv
error: 1 dependencies of derivation '/nix/store/33082mmpqvp183fxsw46lm87nlag1x2a-initrd-linux-6.17.2.drv' failed to bui
ld
error: 1 dependencies of derivation '/nix/store/kxwvlvyj66d92hyqbj11xfq387gn2x66-nixos-system-nixy-25.05.20250910.8cd5c
e8.drv' failed to build

Broken ...

I think that I even try to setup overlay with the content from master branch, but there was other issues.

How are you satisfied with the IBP 14 Gen 10? Do you have any issues with the external monitor? I am hitting the problem, when I pull it out (USB-C or HDMI) the IBP just restarts. The most annoying thing is that this happens even if I try to disconnect it with the wlr-output (using waylad with sway) command (--off, --toggle). That's why I'd like to test the latest kernel/drivers.

RokPapez avatar Oct 19 '25 07:10 RokPapez

How are you satisfied with the IBP 14 Gen 10? Do you have any issues with the external monitor?

For me it's still not super stable but better... the latest kernel and the latest firmware update from their site helped again a little.

tilupe avatar Oct 20 '25 07:10 tilupe

I can build now with the tuxedo-rs.enabled flag. But the tailor gui doesn't have anything to control or to see there. Its pretty empty. Is that because the IBP 14 Gen 10 is such a new model? Or did I forget something?

Image

tilupe avatar Oct 20 '25 07:10 tilupe

I can build now with the tuxedo-rs.enabled flag. But the tailor gui doesn't have anything to control or to see there. Its pretty empty. Is that because the IBP 14 Gen 10 is such a new model? Or did I forget something?

@tilupe can you share your nix config? I am very interested into how did you mange to work?

For me tailord service is still complaining with the:

WARN start_runtime: tailord: No tuxedo ioctl interface available: No such file or directory (os error 2)

RokPapez avatar Oct 20 '25 11:10 RokPapez

@RokPapez this is my tuxedo.nix file otherwise I just have just the latest linux kernel

{
  lib,
  config,
  pkgs,
  ...
}:
{
  hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
  services.fstrim.enable = lib.mkDefault true;
  #
  # # COMMON PC Laptop
  services.power-profiles-daemon.enable = false;
  services.tlp.enable = lib.mkDefault (
    (lib.versionOlder (lib.versions.majorMinor lib.version) "21.05")
    || !config.services.power-profiles-daemon.enable
  );

  # boot = {
  #   # Motorcomm YT6801 LAN drivers
  #   extraModulePackages = with config.boot.kernelPackages; [ yt6801 ];
  # };

  hardware.tuxedo-drivers.enable = true;
  hardware.tuxedo-rs = {
    enable = true;
    tailor-gui.enable = true;
  };
  #
  # boot.extraModulePackages =
  # with config.boot;
  # lib.lists.optional (kernelPackages ? yt6801) kernelPackages.yt6801;
 

  ## From Hardware NixOS AMD-CPU
  boot = {
    blacklistedKernelModules = [ "k10temp" ];
    extraModulePackages = [ config.boot.kernelPackages.zenpower ];
    kernelModules = [ "zenpower" ];
    kernelParams = [ "amd_pstate=active" ];
  };
}

tilupe avatar Oct 22 '25 10:10 tilupe

@tilupe thank you for sharing this. I think this config will setup the default nixos 25.05 kernel which is 6.12.x. I decided to stick with this one too and wait for 25.11 release which should fix this (hopefully). At least now everything works as expected (network card, suspend/resume, fans are not noisy, and I manged to get rid of reboots which were happening when I was unplugging external monitor - but this was another issue).

RokPapez avatar Oct 22 '25 17:10 RokPapez