A GUI application with system tray integration for toggling CPU SMT (Simultaneous Multi-Threading / Hyperthreading) on Linux.
- Toggle SMT on/off via a simple GUI toggle switch
- System tray icon - closing the window minimizes to tray
- Automatic privilege escalation via pkexec when needed
- Displays current SMT status (on, off, forceoff, notsupported)
The application reads and writes to /sys/devices/system/cpu/smt/control to control SMT. If direct write fails (no root permissions), it uses pkexec tee to prompt for authentication.
- Linux (uses Linux sysfs interface)
- GTK3 development libraries
- libappindicator3 or libayatana-appindicator3 (for system tray)
- libxdo (required by tray-icon crate)
- pkexec (polkit) for privilege escalation
- Rust toolchain (edition 2024)
sudo dnf install gtk3-devel libappindicator-gtk3-devel libxdo-develsudo apt install libgtk-3-dev libayatana-appindicator3-dev libxdo-devsudo pacman -S gtk3 libappindicator-gtk3 xdotoolcargo build --releaseThe binary will be at target/release/smt-toggle.
./target/release/smt-toggleThe application starts with a window showing the current SMT status. Use the toggle to enable/disable SMT. Closing the window hides it to the system tray - use the tray icon menu to show the window again or quit the application.
- iced 0.14 - GUI framework
- tray-icon 0.21.3 - System tray
- gtk 0.18 - GTK bindings (for tray support)
- tokio 1 - Async runtime
AGPL-3.0