Patch — Tee86 #144 post-suspend LCD recovery + architectural cleanup.
User-facing fix
- #144 Tee86 — LCD stays black after Linux suspend/resume. The OS suspend cycle dropped USB power on the panel, but the app held a cached SCSI fd whose underlying USB device had silently re-enumerated; subsequent writes went into a closed handle and the firmware never saw a fresh handshake. v9.5.8 hooks systemd-logind's
PrepareForSleepD-Bus signal at the Platform layer (was previously GUI-only), tears down every device's transport cleanly before the suspend, and re-runs full discovery on resume. Suspend, wake, the LCD comes back without a reboot. CLI long-runners (trcc serve) and the API daemon survive suspend/resume now too.
Architecture
- Sealed UI ↔ adapters seam with a
flake8-tidy-importsbanned-api lint rule. UIs cannot import fromtrcc.adapters.device.*— every device action travels throughtrcc.lcd/trcc.led/trcc.control_center/trcc.probe/trcc.handshake/trcc.cleanup. Six pre-existing bypass sites deleted. - Pythonic Platform + Trcc surface.
Platform.for_current_os()classmethod,for d in platform,platform.sensors@cached_property,(vid, pid) in trcc,trcc[(vid, pid)]. Reads like English. - Resolution alias merge — 5 names → 1.
output_resolution/canvas_resolution/effective_resolution/_rotated_resolutionall collapsed intocanvas_size. The pattern that produced #137 (FW360 Ultra upside-down) was alias drift — fixed structurally. SYSTEM_SUSPENDED/SYSTEM_RESUMEDevents on the EventBus. Newdev/smoke_sleep_cycle.py(13 assertions) verifies the full cycle without real hardware.ControllerBuildercleanup — 5 thin one-line wrappers deleted; callers go straight to source. Two real composers stay.
Install
Distro-specific:
# Arch / CachyOS / Manjaro
wget -c https://github.com/Lexonight1/thermalright-trcc-linux/releases/latest/download/trcc-linux-latest-any.pkg.tar.zst
sudo pacman -U trcc-linux-latest-any.pkg.tar.zst
# Fedora / RHEL / Bazzite (rpm-ostree: substitute `sudo rpm-ostree install`)
wget -c https://github.com/Lexonight1/thermalright-trcc-linux/releases/latest/download/trcc-linux-latest.noarch.rpm
sudo dnf install ./trcc-linux-latest.noarch.rpm
# Ubuntu / Debian (modern, 24.04+)
wget -c https://github.com/Lexonight1/thermalright-trcc-linux/releases/latest/download/trcc-linux-latest_all.deb
sudo dpkg -i trcc-linux-latest_all.deb
# Ubuntu / Debian (legacy, 22.04 and older)
wget -c https://github.com/Lexonight1/thermalright-trcc-linux/releases/latest/download/trcc-linux-latest.legacy_all.deb
sudo dpkg -i trcc-linux-latest.legacy_all.deb
# pipx
pipx upgrade trcc-linux
After install, re-run sudo trcc setup-udev so the v9.5.7 udev rule changes apply.