Skip to content

System tray application toggle SMT hyperthreading on/off

License

Notifications You must be signed in to change notification settings

cjrh/smt-toggle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

smt-toggle

A GUI application with system tray integration for toggling CPU SMT (Simultaneous Multi-Threading / Hyperthreading) on Linux.

Features

  • 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)

How it Works

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.

System Requirements

  • 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)

Fedora/RHEL

sudo dnf install gtk3-devel libappindicator-gtk3-devel libxdo-devel

Ubuntu/Debian

sudo apt install libgtk-3-dev libayatana-appindicator3-dev libxdo-dev

Arch

sudo pacman -S gtk3 libappindicator-gtk3 xdotool

Building

cargo build --release

The binary will be at target/release/smt-toggle.

Usage

./target/release/smt-toggle

The 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.

Dependencies

  • iced 0.14 - GUI framework
  • tray-icon 0.21.3 - System tray
  • gtk 0.18 - GTK bindings (for tray support)
  • tokio 1 - Async runtime

License

AGPL-3.0

About

System tray application toggle SMT hyperthreading on/off

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages