Hardware/TUXEDO: Difference between revisions

From NixOS Wiki
imported>Occhioverde
Created page with instructions on how to install the TCC and Tuxedo-Keyboard (old version)
 
Jopejoe1 (talk | contribs)
m Make Title look nice
 
(8 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{Hardware/breadcrumb}}
{{DISPLAYTITLE:TUXEDO}}
TUXEDO Computers is a German company that specializes in assembling devices specifically designed to work out-of-the-box with Linux OSes.
TUXEDO Computers is a German company that specializes in assembling devices specifically designed to work out-of-the-box with Linux OSes.


Line 6: Line 8:


== Tuxedo Control Center ==
== Tuxedo Control Center ==
The Tuxedo Control Center is an open source utility developed by TUXEDO Computers to provide a GUI interface for managing thermal and power settings on TUXEDO laptops.
[[File:TCC_Dashboard.png]]


As of today, the Tuxedo Control Center is unfortunately not available in Nixpkgs, making it impossible to install it right away.
As of today, the Tuxedo Control Center is unfortunately not available in Nixpkgs, making it impossible to install it right away.
Line 13: Line 19:
Doing this operation is quite straightforward, whether your system is configured to use [[Flakes]] or not.
Doing this operation is quite straightforward, whether your system is configured to use [[Flakes]] or not.


=== Installation with Fakes ===
=== Installation with Flakes ===


At the time of writing, the Flake interface is still experimental, but is stable enough to use it to import and enable this module in your system configuration.
At the time of writing, the Flake interface is still experimental, but is stable enough to use it to import and enable this module in your system configuration.


Here you can find what you should add to your <source enclose="none">flake.nix</source> to install the TCC:
Here you can find what you should add to your <syntaxhighlight inline>flake.nix</syntaxhighlight> to install the TCC:


<source lang="nix">
<syntaxHighlight lang=nix>
{
{
   inputs = {
   inputs = {
Line 41: Line 47:
   };
   };
}
}
</source>
</syntaxHighlight>


=== Installation without Flakes ===
=== Installation without Flakes ===
Line 47: Line 53:
In case you prefer to avoid enabling and using Flakes, the Tuxedo Control Center can be installed in the old and stable way:
In case you prefer to avoid enabling and using Flakes, the Tuxedo Control Center can be installed in the old and stable way:


<source lang="nix">
<syntaxHighlight lang=nix>
{ config, pkgs, ... }:
{ config, pkgs, ... }:
let
let
Line 57: Line 63:
   hardware.tuxedo-control-center.enable = true;
   hardware.tuxedo-control-center.enable = true;
}
}
</source>
</syntaxHighlight>


=== Troubleshooting on Nixpkgs > 22.11 ===
=== Troubleshooting on Nixpkgs > 22.11 ===
Line 63: Line 69:
As noted in an issue on the project's GitHub page<ref>'''Build broken on nixos-unstable #5''', Nov 13, 2022 - https://github.com/blitz/tuxedo-nixos/issues/5</ref>, blitz's TCC distribution is tested exclusively against Nixpkgs 22.11; as such, there might be errors when building it after overriding its Nixpkgs version to a newer one.
As noted in an issue on the project's GitHub page<ref>'''Build broken on nixos-unstable #5''', Nov 13, 2022 - https://github.com/blitz/tuxedo-nixos/issues/5</ref>, blitz's TCC distribution is tested exclusively against Nixpkgs 22.11; as such, there might be errors when building it after overriding its Nixpkgs version to a newer one.


To avoid such problems, it can be useful to delete the <source lang="nix" enclose="none">inputs.nixpkgs.follows = "nixpkgs";</source> line in the example above and to specify <source lang="nix" enclose="none">tuxedo-control-center.package = tuxedo-nixos.packages.x86_64-linux.default;</source> right after the enable instruction. Doing this, in fact, will build the TCC against the Nixpkgs version it is meant to.
To avoid such problems, it can be useful to delete the <syntaxhighlight lang="nix" inline>inputs.nixpkgs.follows = "nixpkgs";</syntaxhighlight> line in the example above and to specify <syntaxhighlight lang="nix" inline>hardware.tuxedo-control-center.package = tuxedo-nixos.packages.x86_64-linux.default;</syntaxhighlight> right after the enable instruction. Doing this, in fact, will build the TCC against the Nixpkgs version it is meant to.


== Tuxedo Keyboard ==
== Tuxedo Keyboard ==


{{expansion|Tuxedo released an update that removes the old Kernel parameters and exposes the corresponding settings via a new SysFS interface}}
The keyboard installed on some TUXEDO Laptops has a variable color backlight that, once a specific Kernel module is inserted, can be controlled via the TCC (since version 3.2.0 of the module) or via some Kernel commandline parameters (up to version 3.1.4 of the module).


The keyboard installed on some TUXEDO Laptops has a variable color backlight that can be controlled via specific kernel parameters that, obviously, are not available on a generic NixOS installation.
The tuxedo-keyboard module is currently present on Nixpkgs and can easily be enabled by adding the <syntaxhighlight lang="nix" inline>hardware.tuxedo-keyboard.enable = true;</syntaxhighlight> option to your NixOS configuration. If you are on version 3.2.0 (or later) this one will be the only change that you'll need to do in the configuration, as the backlight control will then be available directly from "Tools" > "Keyboard Backlight" in the Tuxedo Control Center (see above if you haven't installed it yet).


The Kernel module that allows you to set these parameters, however, is already present on Nixpkgs and can easily be enabled by adding the <source lang="nix" enclose="none">hardware.tuxedo-keyboard.enable = true;</source> option to your NixOS configuration.
[[File:TCC_KeyboardBacklightSettings.png]]


After specifying this setting, it is in fact trivial to add the <source enclose="none">tuxedo_keyboard</source> options to the Kernel commandline by using the <source lang="nix" enclose="none">boot.kernelParams;</source> config key as in the example below:
If you installed tuxedo-keyboard 3.1.4 (or older), however, you'll have to add the <syntaxhighlight inline>tuxedo_keyboard</syntaxhighlight> options to the Kernel commandline by using the <syntaxhighlight lang="nix" inline>boot.kernelParams;</syntaxhighlight> config key as in the example below:


<source lang="nix">
<syntaxHighlight lang=nix>
{ pkgs, ... }:
{ pkgs, ... }:
{
{
Line 85: Line 91:
   ];
   ];
}
}
</source>
</syntaxHighlight>


More options can be found in the [https://github.com/tuxedocomputers/tuxedo-keyboard/blob/c36cc1e2eae6c99a40c7fbe6676d3a1b36ca5555/README.md#kernel-parameter- official <source enclose="none">tuxedo_keyboard</source> docs.]
More options can be found in the [https://github.com/tuxedocomputers/tuxedo-keyboard/blob/v3.1.4/README.md#kernel-parameter- official <syntaxhighlight inline>tuxedo_keyboard</syntaxhighlight> docs.]


== References ==
== References ==


<references />
<references />

Latest revision as of 13:52, 12 April 2024

TUXEDO Computers is a German company that specializes in assembling devices specifically designed to work out-of-the-box with Linux OSes.

When configured with their flagship distro, TUXEDO devices offer particular integrations with the Linux kernel, allowing fan management, CPU underclocking, power profile selection and the tweaking of other hardware-related settings via the preinstalled Tuxedo Control Center and Kernel modules.

In case you installed NixOS on a TUXEDO computer, however, you will have to specifically configure your system in order to gain access to those functionalities.

Tuxedo Control Center

The Tuxedo Control Center is an open source utility developed by TUXEDO Computers to provide a GUI interface for managing thermal and power settings on TUXEDO laptops.

As of today, the Tuxedo Control Center is unfortunately not available in Nixpkgs, making it impossible to install it right away.

Thanks to a project maintained by blitz (Julian Stecklina), however, you can set up the TCC on NixOS just by importing an external module hosted on GitHub.

Doing this operation is quite straightforward, whether your system is configured to use Flakes or not.

Installation with Flakes

At the time of writing, the Flake interface is still experimental, but is stable enough to use it to import and enable this module in your system configuration.

Here you can find what you should add to your flake.nix to install the TCC:

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11";
    tuxedo-nixos = {
      url = "github:blitz/tuxedo-nixos";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs = { self, nixpkgs, tuxedo-nixos }: {
    nixosConfigurations = {
      your-system = nixpkgs.lib.nixosSystem {
        modules = [
          ./configuration.nix
          tuxedo-nixos.nixosModules.default
          { hardware.tuxedo-control-center.enable = true; }
        ];
      };
    };
  };
}

Installation without Flakes

In case you prefer to avoid enabling and using Flakes, the Tuxedo Control Center can be installed in the old and stable way:

{ config, pkgs, ... }:
let
  tuxedo = import (builtins.fetchTarball "https://github.com/blitz/tuxedo-nixos/archive/master.tar.gz");
in {
  imports = [
    tuxedo.module
  ];
  hardware.tuxedo-control-center.enable = true;
}

Troubleshooting on Nixpkgs > 22.11

As noted in an issue on the project's GitHub page[1], blitz's TCC distribution is tested exclusively against Nixpkgs 22.11; as such, there might be errors when building it after overriding its Nixpkgs version to a newer one.

To avoid such problems, it can be useful to delete the inputs.nixpkgs.follows = "nixpkgs"; line in the example above and to specify hardware.tuxedo-control-center.package = tuxedo-nixos.packages.x86_64-linux.default; right after the enable instruction. Doing this, in fact, will build the TCC against the Nixpkgs version it is meant to.

Tuxedo Keyboard

The keyboard installed on some TUXEDO Laptops has a variable color backlight that, once a specific Kernel module is inserted, can be controlled via the TCC (since version 3.2.0 of the module) or via some Kernel commandline parameters (up to version 3.1.4 of the module).

The tuxedo-keyboard module is currently present on Nixpkgs and can easily be enabled by adding the hardware.tuxedo-keyboard.enable = true; option to your NixOS configuration. If you are on version 3.2.0 (or later) this one will be the only change that you'll need to do in the configuration, as the backlight control will then be available directly from "Tools" > "Keyboard Backlight" in the Tuxedo Control Center (see above if you haven't installed it yet).

If you installed tuxedo-keyboard 3.1.4 (or older), however, you'll have to add the tuxedo_keyboard options to the Kernel commandline by using the boot.kernelParams; config key as in the example below:

{ pkgs, ... }:
{
  hardware.tuxedo-keyboard.enable = true;
  boot.kernelParams = [
    "tuxedo_keyboard.mode=0"
    "tuxedo_keyboard.brightness=25"
    "tuxedo_keyboard.color_left=0x0000ff"
  ];
}

More options can be found in the official tuxedo_keyboard docs.

References

  1. Build broken on nixos-unstable #5, Nov 13, 2022 - https://github.com/blitz/tuxedo-nixos/issues/5