ttlcd-cpp

// Thermaltake Tower 200 · USB LCD driver · Linux · C++20

langC++20 platformLinux licenseMIT buildpassing version1.0.18
Modern C++ port of the original Python driver for the Thermaltake Tower 200 (and compatible models) 3.9-inch USB LCD panel at 480×128 resolution. Provides a highly customizable, performant system monitoring dashboard with live updates, custom TTF fonts, bar graphs, network speed, and more — running natively on Linux with full USB protocol support.
Resolution480×128
Panel Size3.9″
StandardC++20
InterfaceUSB HID
ConfigJSON

✦ Features

System-wide min | max temperature dashboard (all_temps widget)
Embedded Comic font — no external TTF required (font_file: "embedded")
Dynamic JPEG pipeline with configurable DPI (jpeg_dpi)
USB keep-alive thread — stable uploads without LCD resets
Default USB ID 264a:233d (Thermaltake Tower 200)
Live CPU & RAM usage bars with configurable dimensions
Custom TTF fonts via OpenCV FreeType
Full JSON widget configuration — layout, colors, sensors

◈ Requirements

Runtime

sudo apt install libusb-1.0-0 libstdc++6 libfreetype6 fontconfig libharfbuzz0b \
    libjpeg62-turbo libpng16-16 zlib1g \
    libopencv-core410 libopencv-imgproc410 libopencv-imgcodecs410 libopencv-contrib410

On Ubuntu 22.04/24.04 use the 4.5d or 406 OpenCV package suffixes instead of 410.

Build

sudo apt install build-essential g++ make pkg-config python3 \
    libusb-1.0-0-dev libopencv-dev libopencv-contrib-dev libfreetype6-dev \
    libfontconfig-dev libharfbuzz-dev libjpeg-dev libpng-dev zlib1g-dev

⬡ Building

make ttlcd              # build binary (auto-bumps patch version)
./ttlcd config.json     # run (udev rule recommended; see Troubleshooting)

The makefile auto-generates Version.hpp, CMakeLists.txt, all packaging files, and the GitHub Actions workflow on every build.

Clean targets

make clean            # remove build artifacts
make clean-packaging  # remove generated packaging files
make clean-all        # both

↓ Install

wget https://github.com/AaronC-585/ttlcd-cpp/releases/download/v1.0.18/ttlcd-v1.0.18-amd64.deb
sudo dpkg -i ttlcd-v1.0.18-amd64.deb
sudo rpm -i ttlcd-1.0.18-1.x86_64.rpm
# Download PKGBUILD.tar.gz from Releases, then:
tar xzf ttlcd-v1.0.18-PKGBUILD.tar.gz
makepkg -si

⟳ Release

Push a version tag to trigger the GitHub Actions workflow — it builds and publishes .deb, .rpm, and PKGBUILD automatically as release assets.

git tag v1.0.18
git push origin v1.0.18

≡ Configuration

All layout and widget settings are controlled via config.json passed at runtime.

Full config.json example
{
  "jpeg_quality": 85,
  "jpeg_dpi": 150,
  "use": "NODE",
  "orientation": "TOP",
  "background": "./backgrounds/blk.jpg",

  "font_file": "embedded",
  "font_size": 20,
  "font_color": [0, 255, 255],
  "temp_unit": "F",

  "ping_interval_sec": 8,
  "enable_dashboard": true,
  "dashboard_interval_sec": 10,
  "update_interval_sec": 10,
  "enable_ping": true,

  "widgets": [
    { "type": "text", "x": 6, "y": 82, "text": "min | max" },
    { "type": "all_temps", "x": 4, "y": 54, "font_size": 20 }
  ]
}

Key reference

KeyTypeDescription
idVendor / idProductintUSB IDs — defaults to 264a:233d (Tower 200) if omitted
jpeg_dpiintRender DPI for dynamic JPEG (default 150; design coords at 300 DPI)
temp_unitstring"F" or "C" — override with env TTLCD_TEMP_UNIT
ping_interval_secintUSB keep-alive interval (default 8s)
enable_dashboardboolEnable periodic dashboard JPEG uploads (default true)
dashboard_interval_secintDashboard JPEG refresh interval in seconds
update_interval_secintLegacy alias for dashboard_interval_sec
orientationstringTOP, BOTTOM, LEFT, or RIGHT
backgroundstringPath to background image (jpg/png)
font_filestringTTF path, or "embedded" for built-in Comic font
font_color[B,G,R]Default text color — OpenCV uses BGR order
widgetsarrayWidget list — text, all_temps, cpu_bar, line, etc.
x / yintWidget position in design pixels (300 DPI space)

Dynamic text placeholders

{cpu_percent}CPU usage percentage {ram_percent}RAM usage percentage {net_up}Upload speed in KB/s {net_down}Download speed in KB/s {loadavg}Load average — 1 / 5 / 15 min {time}Current time {date}Current date

Recommended fonts

Place .ttf files in a fonts/ directory next to the binary.

FontStyleSource
Digital-77-segmentdafont.com
DS-DigitalDigitaldafont.com
OrbitronFuturisticGoogle Fonts

⚙ Running as a Daemon

Installed by the .deb package to /usr/lib/systemd/system/ttlcd.service:

[Unit]
Description=Thermaltake Tower 200 USB LCD dashboard
After=local-fs.target network-online.target systemd-udev-settle.service
ConditionPathExists=/etc/ttlcd/config.json

[Service]
Type=simple
User=ttlcd
Group=ttlcd
ExecStart=/usr/bin/ttlcd /etc/ttlcd/config.json
WorkingDirectory=/etc/ttlcd
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target
sudo systemctl enable --now ttlcd.service

! Troubleshooting

Black screen Check console for "Device initialization sequence completed"
USB timeout Detailed libusb error codes are printed to stderr
No font Falls back to Hershey — verify font path and FreeType support in your OpenCV build
Permission denied Add udev rule: SUBSYSTEM=="usb", ATTR{idVendor}=="264a", ATTR{idProduct}=="233d", MODE="0666"
Wrong colors OpenCV uses BGR order — color arrays are [B, G, R] not RGB

♦ Credits & License

Originally inspired by the Python driver by bekindpleaserewind. Ported and enhanced in C++ for better performance and native Linux integration.

Released under the MIT License — free to use, modify, and redistribute.