{"id":48959221,"url":"https://github.com/tonky/tux-rs","last_synced_at":"2026-04-18T01:07:36.127Z","repository":{"id":350874380,"uuid":"1207585825","full_name":"tonky/tux-rs","owner":"tonky","description":"Rewrite of 'tccd' and Tuxedo Control Center in Rust + Ratatui","archived":false,"fork":false,"pushed_at":"2026-04-12T15:40:11.000Z","size":1030,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-12T16:11:47.153Z","etag":null,"topics":["tcc","tccd","tuxedo-laptop"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tonky.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-04-11T05:54:45.000Z","updated_at":"2026-04-12T15:40:20.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/tonky/tux-rs","commit_stats":null,"previous_names":["tonky/tux-rs"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/tonky/tux-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonky%2Ftux-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonky%2Ftux-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonky%2Ftux-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonky%2Ftux-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tonky","download_url":"https://codeload.github.com/tonky/tux-rs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonky%2Ftux-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31952229,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"ssl_error","status_checked_at":"2026-04-18T00:39:20.671Z","response_time":62,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["tcc","tccd","tuxedo-laptop"],"created_at":"2026-04-18T01:07:35.438Z","updated_at":"2026-04-18T01:07:36.118Z","avatar_url":"https://github.com/tonky.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Disclaimer\n\n1. This is 100% LLM-assisted project. I haven't looked much at the code.\nI did quite a lot of planning, steering and testing, though(you can check the `impl` folder). I did fix some obvious hallucinations like `Arc\u003cMutex\u003cArc\u003cdyn Settings\u003e\u003e\u003e`.\n\n2. This is only tested on my machine(Infinitybook Pro 16 Gen8). Support is currently limited to it, no other hardware is expected to work. Not all features are implemented yet. Original TCC compatibility is partially implemented.\n\n3. My goal was to see if this could be done via LLM power-coding as a weekend project. Now it looks like a good starting point to gather interest and community feedback. Maybe people with other Tuxedo hardware knowledge will find this useful and contribue as well.\n\n# tux-rs\n\nUnified Rust implementation of TUXEDO laptop support and Tuxedo Control Center as a TUI app.\nHardware support is currently only for a single machine that i own, rest are untested(although a brave soul confirmed it working on IBP14G9!).\n\nSee [docs/architecture.md](docs/architecture.md) for the architecture deep dive, and [docs/hardware_support.md](docs/hardware_support.md) for the supported hardware list.\n\n![tux-rs demo](demo.gif)\n\n\n\n## Crates\n\n| Crate | Type | Description |\n|-------|------|-------------|\n| `tux-core` | lib | Hardware model system — device table, trait hierarchy, platform types |\n| `tux-daemon` | bin | Root system daemon — fan control, D-Bus API, profile management |\n| `tux-tui` | bin | Terminal UI — ratatui-based control interface |\n\n## Development\n\nRequires Rust stable and [just](https://github.com/casey/just).\n\n### Edit — Test — Run\n\n```sh\njust check              # fmt + clippy + test\njust daemon-debug       # stop systemd service, run daemon with debug logging\njust tui                # launch TUI against the running daemon\njust live-test          # regression tests against a live daemon\njust runit-smoke-repeat # run runit/dbus smoke container twice\n```\n\n### Individual commands\n\n```sh\njust build              # build all crates\njust test               # run all tests\njust clippy             # lint with warnings as errors\njust fmt                # check formatting\n```\n\n### Driver \u003c-\u003e Daemon Reliability Suite\n\nThese checks are hardware-independent and are meant to be run both locally and in CI.\n\n```sh\nflox activate -- just fixture-contract-test   # schema + deterministic replay contracts\nflox activate -- just reliability-test         # fixture contracts + daemon integration/fault matrix\nflox activate -- just ci                       # full CI-equivalent pipeline\n```\n\n### Fixture Refresh Workflow (Manual Hardware Capture)\n\n1. Capture a candidate fixture from real hardware:\n\n```sh\nflox activate -- just fixture-capture-uniwill\n```\n\nTo fail fast when capture warnings occur:\n\n```sh\nCAPTURE_STRICT=1 flox activate -- just fixture-capture-uniwill\n```\n\n2. Compare candidate vs canonical fixture:\n\n```sh\nlatest=$(ls -1t tmp/uniwill-contract-*.toml | head -n 1)\ngit --no-pager diff --no-index \\\n  tux-daemon/tests/fixtures/driver_contract/uniwill/sample-ibp16g8-v1.toml \\\n  \"$latest\"\n```\n\n3. Review drift before promotion:\n- Expected drift: kernel/daemon version fields, timestamp metadata, intentionally changed normalization rules.\n- Unexpected drift: changed fan-duty mapping, health semantics, or charging profile/priority normalization.\n- Any behavior drift must include a short rationale in the stage worklog/review notes.\n\n4. Validate before opening PR:\n\n```sh\nflox activate -- just fixture-contract-test\nflox activate -- just reliability-test\n```\n\n## Installation\n\n**Prerequisite:** Install [tuxedo-drivers](https://github.com/tuxedocomputers/tuxedo-drivers) for your kernel (available via DKMS or your distro's package manager).\n\n### 1. Daemon\n\n#### Systemd (most distros)\n\n```sh\njust deploy-daemon      # build release, install to /usr/bin, start systemd service\n```\n\n#### Dinit (Artix, etc.)\n\n```sh\njust deploy-dinit       # build release (no systemd deps), install to /usr/bin, install + start dinit service\n```\n\nOr manually:\n```sh\ncargo build --release -p tux-daemon --no-default-features --features tcc-compat\nsudo cp target/release/tux-daemon /usr/bin/tux-daemon\nsudo cp dist/tux-daemon.dinit /etc/dinit.d/tux-daemon\nsudo dinitctl enable tux-daemon\nsudo dinitctl start tux-daemon\n```\n\n#### Runit (Artix-runit, Void, etc.)\n\n```sh\njust deploy-runit      # build release (no systemd deps), install to /usr/bin, install + start runit service\n```\n\nDefault `just deploy-runit` paths are:\n- service dir: `/etc/sv/tux-daemon`\n- enabled symlink: `/var/service/tux-daemon`\n\nThe bundled run script waits briefly for `/run/dbus/system_bus_socket` before\nstarting `tux-daemon` to reduce early-boot startup races.\n\nFor Artix-runit layouts, override paths:\n\n```sh\njust deploy-runit SERVICE_DIR=/etc/runit/sv/tux-daemon ENABLE_DIR=/run/runit/service/tux-daemon\n```\n\nOr manually:\n```sh\ncargo build --release -p tux-daemon --no-default-features --features tcc-compat\nsudo cp target/release/tux-daemon /usr/bin/tux-daemon\nsudo mkdir -p /etc/sv/tux-daemon\nsudo cp dist/tux-daemon.runit/run /etc/sv/tux-daemon/run\nsudo cp dist/tux-daemon.runit/finish /etc/sv/tux-daemon/finish\nsudo chmod +x /etc/sv/tux-daemon/run /etc/sv/tux-daemon/finish\nsudo ln -sfn /etc/sv/tux-daemon /var/service/tux-daemon\nsudo sv up /var/service/tux-daemon\n```\n\nTroubleshooting:\n```sh\nsudo sv status /var/service/tux-daemon\nsudo sv down /var/service/tux-daemon\nsudo sv up /var/service/tux-daemon\n```\n\nValidation scope note:\n- `just runit-smoke` and `just runit-smoke-repeat` validate runit supervision,\n  dbus service registration, and restart behavior in a container with `--mock`.\n- They do not validate real EC/sysfs hardware behavior; keep real machine checks\n  (especially Artix-runit) as final verification before release.\n\n### 2. TUI\n\n```sh\njust install-tui        # install tux-tui binary\ntux-tui                 # run (daemon must be running)\n```\n\n### NixOS (Flakes)\n\nAdd `tux-rs` to your flake inputs:\n\n```nix\n{\n  inputs.tux-rs.url = \"github:tonky/tux-rs\";\n}\n```\n\nThen enable the module in your NixOS configuration:\n\n```nix\n{ inputs, ... }: {\n  imports = [ inputs.tux-rs.nixosModule ];\n  services.tux-daemon.enable = true;\n}\n```\n\nThis will automatically:\n- Install `tux-daemon` and `tux-tui`.\n- Configure the systemd service and D-Bus policy.\n- Build and load `tuxedo-drivers` for your configured kernel package.\n\nYou can also run the TUI directly without installing:\n```sh\nnix run github:tonky/tux-rs#tux-tui\n```\n\n### NixOS (classic Nix, no flakes)\n\nIf you're not using flakes, the repository exposes `default.nix`.\n\n#### Simple usage\n\n```nix\n# /etc/nixos/configuration.nix\n{ pkgs, ... }:\nlet\n  tux-rs = import (builtins.fetchTarball {\n    url = \"https://github.com/tonky/tux-rs/archive/main.tar.gz\";\n  }) { inherit pkgs; };\nin {\n  imports = [ tux-rs.nixosModule ];\n  services.tux-daemon.enable = true;\n}\n```\n\n## License\n\nGPL-3.0-or-later\n\n## Ram and CPU usage\n\n```\n% systemctl status tux-daemon\n● tux-daemon.service - TUXEDO Hardware Daemon\n     Loaded: loaded (/etc/systemd/system/tux-daemon.service; disabled; preset: enabled)\n     Active: active (running) since Mon 2026-04-06 23:39:38 CEST; 8min ago\n Invocation: 33674fdb700d462d874633b47e6fe79f\n   Main PID: 2505426 (tux-daemon)\n      Tasks: 15 (limit: 37921)\n     Memory: 2.9M (peak: 5.2M)\n        CPU: 2.316s\n\n% systemctl status tccd\n● tccd.service - TUXEDO Control Center Service\n     Loaded: loaded (/etc/systemd/system/tccd.service; enabled; preset: enabled)\n     Active: active (running) since Mon 2026-04-06 23:57:15 CEST; 8min ago\n Invocation: 5aec8f98800c4873a8a3250d0d4db673\n   Main PID: 2515503 (MainThread)\n      Tasks: 10 (limit: 37921)\n     Memory: 76.7M (peak: 78.8M)\n        CPU: 15.264s\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftonky%2Ftux-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftonky%2Ftux-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftonky%2Ftux-rs/lists"}