1
Fork 0
mirror of https://github.com/RGBCube/superfreq synced 2025-07-27 17:07:44 +00:00

Revert "treewide: finish renaming to Watt"

This reverts commit 5a197951d9.
This commit is contained in:
RGBCube 2025-06-07 00:41:46 +03:00
parent d33659209e
commit b328c948e0
Signed by: RGBCube
SSH key fingerprint: SHA256:CzqbPcfwt+GxFYNnFVCqoN5Itn4YFrshg1TrnACpA5M
14 changed files with 132 additions and 132 deletions

View file

@ -30,11 +30,11 @@ jobs:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
name: watt-linux-amd64
name: superfreq-linux-amd64
cross: false
- os: ubuntu-latest
target: aarch64-unknown-linux-gnu
name: watt-linux-arm64
name: superfreq-linux-arm64
cross: true
runs-on: ${{ matrix.os }}
@ -88,12 +88,12 @@ jobs:
uses: robinraju/release-downloader@v1
with:
tag: ${{ github.ref_name }}
fileName: "watt-*"
fileName: "superfreq-*"
out-file-path: "."
- name: Generate checksums
run: |
sha256sum watt-* > SHA256SUMS
sha256sum superfreq-* > SHA256SUMS
- name: Upload Checksums
uses: softprops/action-gh-release@v2

98
Cargo.lock generated
View file

@ -13,9 +13,9 @@ dependencies = [
[[package]]
name = "anstream"
version = "0.6.19"
version = "0.6.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "301af1932e46185686725e0fad2f8f2aa7da69dd70bf6ecc44d6b703844a3933"
checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b"
dependencies = [
"anstyle",
"anstyle-parse",
@ -28,36 +28,36 @@ dependencies = [
[[package]]
name = "anstyle"
version = "1.0.11"
version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd"
checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9"
[[package]]
name = "anstyle-parse"
version = "0.2.7"
version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2"
checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9"
dependencies = [
"utf8parse",
]
[[package]]
name = "anstyle-query"
version = "1.1.3"
version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c8bdeb6047d8983be085bab0ba1472e6dc604e7041dbf6fcd5e71523014fae9"
checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c"
dependencies = [
"windows-sys",
]
[[package]]
name = "anstyle-wincon"
version = "3.0.9"
version = "3.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "403f75924867bb1033c59fbf0797484329750cfbe3c4325cd33127941fabc882"
checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e"
dependencies = [
"anstyle",
"once_cell_polyfill",
"once_cell",
"windows-sys",
]
@ -69,9 +69,9 @@ checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487"
[[package]]
name = "bitflags"
version = "2.9.1"
version = "2.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967"
checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd"
[[package]]
name = "cfg-if"
@ -87,9 +87,9 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
[[package]]
name = "clap"
version = "4.5.39"
version = "4.5.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fd60e63e9be68e5fb56422e397cf9baddded06dae1d2e523401542383bc72a9f"
checksum = "ed93b9805f8ba930df42c2590f05453d5ec36cbb85d018868a5b24d31f6ac000"
dependencies = [
"clap_builder",
"clap_derive",
@ -97,9 +97,9 @@ dependencies = [
[[package]]
name = "clap_builder"
version = "4.5.39"
version = "4.5.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89cc6392a1f72bbeb820d71f32108f61fdaf18bc526e1d23954168a67759ef51"
checksum = "379026ff283facf611b0ea629334361c4211d1b12ee01024eec1591133b04120"
dependencies = [
"anstream",
"anstyle",
@ -127,9 +127,9 @@ checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6"
[[package]]
name = "colorchoice"
version = "1.0.4"
version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75"
checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990"
[[package]]
name = "ctrlc"
@ -216,9 +216,9 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
[[package]]
name = "hermit-abi"
version = "0.5.1"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f154ce46856750ed433c8649605bf7ed2de3bc35fd9d2a9f30cddd873c80cb08"
checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024"
[[package]]
name = "indexmap"
@ -238,9 +238,9 @@ checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
[[package]]
name = "jiff"
version = "0.2.14"
version = "0.2.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a194df1107f33c79f4f93d02c80798520551949d59dfad22b6157048a88cca93"
checksum = "f02000660d30638906021176af16b17498bd0d12813dbfe7b276d8bc7f3c0806"
dependencies = [
"jiff-static",
"jiff-tzdb-platform",
@ -253,9 +253,9 @@ dependencies = [
[[package]]
name = "jiff-static"
version = "0.2.14"
version = "0.2.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c6e1db7ed32c6c71b759497fae34bf7933636f75a251b9e736555da426f6442"
checksum = "f3c30758ddd7188629c6713fc45d1188af4f44c90582311d0c8d8c9907f60c48"
dependencies = [
"proc-macro2",
"quote",
@ -319,19 +319,19 @@ dependencies = [
[[package]]
name = "num_cpus"
version = "1.17.0"
version = "1.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b"
checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43"
dependencies = [
"hermit-abi",
"libc",
]
[[package]]
name = "once_cell_polyfill"
version = "1.70.1"
name = "once_cell"
version = "1.21.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad"
checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
[[package]]
name = "option-ext"
@ -341,9 +341,9 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
[[package]]
name = "portable-atomic"
version = "1.11.1"
version = "1.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483"
checksum = "350e9b48cbc6b0e028b0473b114454c6316e57336ee184ceab6e53f72c178b3e"
[[package]]
name = "portable-atomic-util"
@ -447,6 +447,23 @@ version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
[[package]]
name = "superfreq"
version = "0.3.2"
dependencies = [
"anyhow",
"clap",
"ctrlc",
"dirs",
"env_logger",
"jiff",
"log",
"num_cpus",
"serde",
"thiserror",
"toml",
]
[[package]]
name = "syn"
version = "2.0.101"
@ -537,23 +554,6 @@ version = "0.11.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "watt"
version = "0.3.2"
dependencies = [
"anyhow",
"clap",
"ctrlc",
"dirs",
"env_logger",
"jiff",
"log",
"num_cpus",
"serde",
"thiserror",
"toml",
]
[[package]]
name = "windows-sys"
version = "0.59.0"

View file

@ -1,5 +1,5 @@
[package]
name = "watt"
name = "superfreq"
description = "Modern CPU frequency and power management utility for Linux"
version = "0.3.2"
edition = "2024"

View file

@ -1,5 +1,5 @@
<h1 id="header" align="center">
Watt
Superfreq
</h1>
<div align="center">
@ -8,15 +8,15 @@
<div align="center">
<br/>
<a href="#what-is-watt">Synopsis</a><br/>
<a href="#what-is-superfreq">Synopsis</a><br/>
<a href="#features">Features</a> | <a href="#usage">Usage</a><br/>
<a href="#contributing">Contributing</a>
<br/>
</div>
## What is Watt
## What is Superfreq
Watt is a modern CPU frequency and power management utility for Linux
Superfreq is a modern CPU frequency and power management utility for Linux
systems. It provides intelligent control of CPU governors, frequencies, and
power-saving features, helping optimize both performance and battery life.
@ -48,81 +48,81 @@ but most common usecases are already implemented.
```bash
# Show current system information
watt info
superfreq info
# Run as a daemon in the background
sudo watt daemon
sudo superfreq daemon
# Run with verbose logging
sudo watt daemon --verbose
sudo superfreq daemon --verbose
# Display comprehensive debug information
watt debug
superfreq debug
```
### CPU Governor Control
```bash
# Set CPU governor for all cores
sudo watt set-governor performance
sudo superfreq set-governor performance
# Set CPU governor for a specific core
sudo watt set-governor powersave --core-id 0
sudo superfreq set-governor powersave --core-id 0
# Force a specific governor mode persistently
sudo watt force-governor performance
sudo superfreq force-governor performance
```
### Turbo Boost Management
```bash
# Always enable turbo boost
sudo watt set-turbo always
sudo superfreq set-turbo always
# Disable turbo boost
sudo watt set-turbo never
sudo superfreq set-turbo never
# Let Watt manage turbo boost based on conditions
sudo watt set-turbo auto
# Let Superfreq manage turbo boost based on conditions
sudo superfreq set-turbo auto
```
### Power and Performance Settings
```bash
# Set Energy Performance Preference (EPP)
sudo watt set-epp performance
sudo superfreq set-epp performance
# Set Energy Performance Bias (EPB)
sudo watt set-epb 4
sudo superfreq set-epb 4
# Set ACPI platform profile
sudo watt set-platform-profile balanced
sudo superfreq set-platform-profile balanced
```
### Frequency Control
```bash
# Set minimum CPU frequency (in MHz)
sudo watt set-min-freq 800
sudo superfreq set-min-freq 800
# Set maximum CPU frequency (in MHz)
sudo watt set-max-freq 3000
sudo superfreq set-max-freq 3000
# Set per-core frequency limits
sudo watt set-min-freq 1200 --core-id 0
sudo watt set-max-freq 2800 --core-id 1
sudo superfreq set-min-freq 1200 --core-id 0
sudo superfreq set-max-freq 2800 --core-id 1
```
### Battery Management
```bash
# Set battery charging thresholds to extend battery lifespan
sudo watt set-battery-thresholds 40 80 # Start charging at 40%, stop at 80%
sudo superfreq set-battery-thresholds 40 80 # Start charging at 40%, stop at 80%
```
Battery charging thresholds help extend battery longevity by preventing constant
charging to 100%. Different laptop vendors implement this feature differently,
but Watt attempts to support multiple vendor implementations including:
but Superfreq attempts to support multiple vendor implementations including:
- Lenovo ThinkPad/IdeaPad (Standard implementation)
- ASUS laptops
@ -135,12 +135,12 @@ more than issue reports, as supporting hardware _needs_ hardware.
## Configuration
Watt uses TOML configuration files. Default locations:
Superfreq uses TOML configuration files. Default locations:
- `/etc/xdg/watt/config.toml`
- `/etc/watt.toml`
- `/etc/xdg/superfreq/config.toml`
- `/etc/superfreq.toml`
You can also specify a custom path by setting the `WATT_CONFIG` environment
You can also specify a custom path by setting the `SUPERFREQ_CONFIG` environment
variable.
### Sample Configuration
@ -214,7 +214,7 @@ throttle_on_battery = true
# Logging level: Error, Warning, Info, Debug
log_level = "Info"
# Optional stats file path
stats_file_path = "/var/run/watt-stats"
stats_file_path = "/var/run/superfreq-stats"
# Optional: List of power supplies to ignore
[power_supply_ignore_list]
@ -224,13 +224,13 @@ mouse_battery = "hid-12:34:56:78:90:ab-battery"
## Advanced Features
Those are the more advanced features of Watt that some users might be more
Those are the more advanced features of Superfreq that some users might be more
inclined to use than others. If you have a use-case that is not covered, please
create an issue.
### Dynamic Turbo Boost Management
When using `turbo = "auto"` with `enable_auto_turbo = true`, Watt
When using `turbo = "auto"` with `enable_auto_turbo = true`, Superfreq
dynamically controls CPU turbo boost based on:
- **CPU Load Thresholds**: Enables turbo when load exceeds `load_threshold_high`
@ -260,16 +260,16 @@ The table below explains how different combinations of `turbo` and
| ------------------ | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| `turbo = "always"` | **Always enabled**<br>Turbo is always active regardless of CPU load or temperature | **Always enabled**<br>Turbo is always active regardless of CPU load or temperature |
| `turbo = "never"` | **Always disabled**<br>Turbo is always disabled regardless of CPU load or temperature | **Always disabled**<br>Turbo is always disabled regardless of CPU load or temperature |
| `turbo = "auto"` | **Dynamically managed**<br>Watt enables/disables turbo based on CPU load and temperature thresholds | **System default**<br>Turbo is reset to system's default enabled state and is managed by the hardware/kernel |
| `turbo = "auto"` | **Dynamically managed**<br>Superfreq enables/disables turbo based on CPU load and temperature thresholds | **System default**<br>Turbo is reset to system's default enabled state and is managed by the hardware/kernel |
> [!NOTE]
> When `turbo = "auto"` and `enable_auto_turbo = false`, Watt ensures that
> When `turbo = "auto"` and `enable_auto_turbo = false`, Superfreq ensures that
> any previous turbo state restrictions are removed, allowing the
> hardware/kernel to manage turbo behavior according to its default algorithms.
### Adaptive Polling
Watt includes a "sophisticated" (euphemism for complicated) adaptive
Superfreq includes a "sophisticated" (euphemism for complicated) adaptive
polling system to try and maximize power efficiency
- **Battery Discharge Analysis** - Automatically adjusts polling frequency based
@ -294,7 +294,7 @@ idle periods, while maintaining responsiveness when needed.
### Power Supply Filtering
Configure Watt to ignore certain power supplies (like peripheral batteries)
Configure Superfreq to ignore certain power supplies (like peripheral batteries)
that might interfere with power state detection.
## Troubleshooting
@ -319,11 +319,11 @@ Not all features are available on all hardware:
2. **CPU frequencies fluctuating**: May be due to thermal throttling
3. **Missing CPU information**: Verify kernel module support for your CPU
While reporting issues, please attach the results from `watt debug`.
While reporting issues, please attach the results from `superfreq debug`.
## Contributing
Contributions to Watt are always welcome! Whether it's bug reports, feature
Contributions to Superfreq are always welcome! Whether it's bug reports, feature
requests, or code contributions, please feel free to contribute.
> [!NOTE]
@ -357,5 +357,5 @@ before committing to catch possible code smell early.
## License
Watt is available under [Mozilla Public License v2.0](LICENSE) for your
Superfreq is available under [Mozilla Public License v2.0](LICENSE) for your
convenience, and at our expense. Please see the license file for more details.

View file

@ -14,16 +14,16 @@
});
in {
overlays = {
watt = final: _: {
watt = final.callPackage ./nix/package.nix {};
superfreq = final: _: {
superfreq = final.callPackage ./nix/package.nix {};
};
default = self.overlays.watt;
default = self.overlays.superfreq;
};
packages =
nixpkgs.lib.mapAttrs (system: pkgs: {
inherit (pkgs) watt;
default = self.packages.${system}.watt;
inherit (pkgs) superfreq;
default = self.packages.${system}.superfreq;
})
pkgsForEach;
@ -34,8 +34,8 @@
pkgsForEach;
nixosModules = {
watt = import ./nix/module.nix inputs;
default = self.nixosModules.watt;
superfreq = import ./nix/module.nix inputs;
default = self.nixosModules.superfreq;
};
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);

View file

@ -10,32 +10,32 @@ inputs: {
inherit (lib.lists) optional;
inherit (lib.meta) getExe;
cfg = config.services.watt;
cfg = config.services.superfreq;
format = pkgs.formats.toml {};
cfgFile = format.generate "watt-config.toml" cfg.settings;
cfgFile = format.generate "superfreq-config.toml" cfg.settings;
in {
options.services.watt = {
options.services.superfreq = {
enable = mkEnableOption "Automatic CPU speed & power optimizer for Linux";
package = mkPackageOption inputs.self.packages.${pkgs.stdenv.system} "watt" {
package = mkPackageOption inputs.self.packages.${pkgs.stdenv.system} "superfreq" {
pkgsText = "self.packages.\${pkgs.stdenv.system}";
};
settings = mkOption {
default = {};
type = submodule {freeformType = format.type;};
description = "Configuration for Watt.";
description = "Configuration for Superfreq.";
};
};
config = mkIf cfg.enable {
environment.systemPackages = [cfg.package];
# This is necessary for the Watt CLI. The environment variable
# This is necessary for the Superfreq CLI. The environment variable
# passed to the systemd service will take priority in read order.
environment.etc."watt.toml".source = cfgFile;
environment.etc."superfreq.toml".source = cfgFile;
systemd.services.watt = {
systemd.services.superfreq = {
wantedBy = ["multi-user.target"];
conflicts = [
"auto-cpufreq.service"
@ -45,12 +45,12 @@ in {
"thermald.service"
];
serviceConfig = {
Environment = optional (cfg.settings != {}) ["WATT_CONFIG=${cfgFile}"];
Environment = optional (cfg.settings != {}) ["SUPERFREQ_CONFIG=${cfgFile}"];
WorkingDirectory = "";
ExecStart = "${getExe cfg.package} daemon --verbose";
Restart = "on-failure";
RuntimeDirectory = "watt";
RuntimeDirectory = "superfreq";
RuntimeDirectoryMode = "0755";
};
};
@ -60,14 +60,14 @@ in {
assertion = !config.services.power-profiles-daemon.enable;
message = ''
You have set services.power-profiles-daemon.enable = true;
which conflicts with Watt.
which conflicts with Superfreq.
'';
}
{
assertion = !config.services.auto-cpufreq.enable;
message = ''
You have set services.auto-cpufreq.enable = true;
which conflicts with Watt.
which conflicts with Superfreq.
'';
}
];

View file

@ -5,7 +5,7 @@
fs = lib.fileset;
in
rustPlatform.buildRustPackage (finalAttrs: {
pname = "watt";
pname = "superfreq";
version = "0.1.0";
src = fs.toSource {
@ -24,14 +24,14 @@ in
meta = {
description = "Automatic CPU speed & power optimizer for Linux";
longDescription = ''
Watt is a CPU speed & power optimizer for Linux. It uses
Superfreq is a CPU speed & power optimizer for Linux. It uses
the CPU frequency scaling driver to set the CPU frequency
governor and the CPU power management driver to set the CPU
power management mode.
'';
homepage = "https://github.com/NotAShelf/watt";
mainProgram = "watt";
homepage = "https://github.com/NotAShelf/superfreq";
mainProgram = "superfreq";
license = lib.licenses.mpl20;
platforms = lib.platforms.linux;
};

View file

@ -8,7 +8,7 @@ use std::time::Duration;
/// Prints comprehensive debug information about the system
pub fn run_debug(config: &AppConfig) -> Result<(), AppError> {
println!("=== WATT DEBUG INFORMATION ===");
println!("=== SUPERFREQ DEBUG INFORMATION ===");
println!("Version: {}", env!("CARGO_PKG_VERSION"));
// Current date and time
@ -190,11 +190,11 @@ pub fn run_debug(config: &AppConfig) -> Result<(), AppError> {
println!("\n--- DAEMON STATUS ---");
// Simple check for daemon status - can be expanded later
let daemon_status = fs::metadata("/var/run/watt.pid").is_ok();
let daemon_status = fs::metadata("/var/run/superfreq.pid").is_ok();
println!("Daemon Running: {daemon_status}");
// Check for systemd service status
if let Ok(systemd_status) = is_systemd_service_active("watt") {
if let Ok(systemd_status) = is_systemd_service_active("superfreq") {
println!("Systemd Service Active: {systemd_status}");
}

View file

@ -32,26 +32,26 @@ pub fn load_config_from_path(specific_path: Option<&str>) -> Result<AppConfig, C
)));
}
// Check for WATT_CONFIG environment variable
if let Ok(env_path) = std::env::var("WATT_CONFIG") {
// Check for SUPERFREQ_CONFIG environment variable
if let Ok(env_path) = std::env::var("SUPERFREQ_CONFIG") {
let env_path = Path::new(&env_path);
if env_path.exists() {
println!(
"Loading config from WATT_CONFIG: {}",
"Loading config from SUPERFREQ_CONFIG: {}",
env_path.display()
);
return load_and_parse_config(env_path);
}
eprintln!(
"Warning: Config file specified by WATT_CONFIG not found: {}",
"Warning: Config file specified by SUPERFREQ_CONFIG not found: {}",
env_path.display()
);
}
// System-wide paths
let config_paths = vec![
PathBuf::from("/etc/xdg/watt/config.toml"),
PathBuf::from("/etc/watt.toml"),
PathBuf::from("/etc/xdg/superfreq/config.toml"),
PathBuf::from("/etc/superfreq.toml"),
];
for path in config_paths {

View file

@ -1,4 +1,4 @@
// Configuration types and structures for Watt
// Configuration types and structures for superfreq
use crate::core::TurboSetting;
use serde::{Deserialize, Serialize};
use std::convert::TryFrom;

View file

@ -152,7 +152,7 @@ fn get_available_governors() -> Result<Vec<String>> {
// First try the traditional path with cpu0. This is the most common case
// and will usually catch early, but we should try to keep the code to handle
// "edge" cases lightweight, for the (albeit smaller) number of users that
// run Watt on unusual systems.
// run Superfreq on unusual systems.
let cpu0_path = "/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors";
if Path::new(cpu0_path).exists() {
let content = fs::read_to_string(cpu0_path).map_err(|e| {
@ -546,12 +546,12 @@ pub fn get_platform_profiles() -> Result<Vec<String>> {
}
/// Path for storing the governor override state
const GOVERNOR_OVERRIDE_PATH: &str = "/etc/xdg/watt/governor_override";
const GOVERNOR_OVERRIDE_PATH: &str = "/etc/xdg/superfreq/governor_override";
/// Force a specific CPU governor or reset to automatic mode
pub fn force_governor(mode: GovernorOverrideMode) -> Result<()> {
// Create directory if it doesn't exist
let dir_path = Path::new("/etc/xdg/watt");
let dir_path = Path::new("/etc/xdg/superfreq");
if !dir_path.exists() {
fs::create_dir_all(dir_path).map_err(|e| {
if e.kind() == io::ErrorKind::PermissionDenied {
@ -605,7 +605,7 @@ pub fn force_governor(mode: GovernorOverrideMode) -> Result<()> {
println!(
"Governor override set to '{governor}'. This setting will persist across reboots."
);
println!("To reset, use: watt force-governor reset");
println!("To reset, use: superfreq force-governor reset");
Ok(())
}
}

View file

@ -421,7 +421,7 @@ pub fn run_daemon(config: AppConfig, verbose: bool) -> Result<(), AppError> {
// Update the log level filter if needed, without re-initializing the logger
log::set_max_level(level_filter);
info!("Starting Watt daemon...");
info!("Starting superfreq daemon...");
// Validate critical configuration values before proceeding
if let Err(err) = validate_poll_intervals(

View file

@ -228,7 +228,7 @@ pub fn determine_and_apply_settings(
manage_auto_turbo(report, selected_profile_config, on_ac_power)?;
} else {
debug!(
"Watt's dynamic turbo management is disabled by configuration. Ensuring system uses its default behavior for automatic turbo control."
"Superfreq's dynamic turbo management is disabled by configuration. Ensuring system uses its default behavior for automatic turbo control."
);
// Make sure the system is set to its default automatic turbo mode.
// This is important if turbo was previously forced off.

View file

@ -413,7 +413,7 @@ fn main() -> Result<(), AppError> {
Some(Commands::Daemon { verbose }) => daemon::run_daemon(config, verbose),
Some(Commands::Debug) => cli::debug::run_debug(&config),
None => {
info!("Welcome to Watt! Use --help for commands.");
info!("Welcome to superfreq! Use --help for commands.");
debug!("Current effective configuration: {config:?}");
Ok(())
}