- Upgrade lapctl to 0.3.4, adding new hardware management commands.
- Added clap and ctrlc dependencies to enhance CLI functionality.
Enhancements
- Updated Cargo.toml to edition 2024 and aligned dependency versions.
- Refined project description and repository link.
Bug Fixes
- No bug fixes included in this change.
Enables proper handling of Ideapad laptops by skipping `set_platform_profile` when it is decoupled from fan control, improving compatibility and user feedback.
New Features
- Added `is_ideapad()` helper function.
Enhancements
- Conditional execution of `set_platform_profile` based on Ideapad detection.
- Added informative messages when platform profile is skipped on Ideapad.
Bug Fixes
- None.
New Features
- Added explicit error handling and logging for `fuser` command failures.
Enhancements
- Refined process termination logic with richer diagnostics and graceful degradation when tools are unavailable.
Bug Fixes
- Prevented silent failures when stopping `nvidia-persistenced.service` by logging errors instead of ignoring them.
- None
Enhancements- Added detailed error reporting with exit codes for privilege escalation, initramfs rebuild, service management, and session termination
- Implemented graceful handling of permission‑setting failures with proper logging
- Enhanced error messages for systemctl and loginctl commands, providing clearer diagnostics
Bug Fixes- Fixed incomplete error propagation in status matching, now reports actual exit codes or underlying errors
- **New Features**: Added detailed error logging for signal handling, directory creation, cache file operations, and service management; improved cleanup with explicit error propagation.
- **Enhancements**: Refactored Drop implementations to handle failures gracefully; upgraded status handling for systemctl commands with precise exit code reporting; strengthened directory and file removal with debug logging.
- **Bug Fixes**: Fixed missing error propagation in Ctrl+C handler; corrected service enable/disable status reporting; ensured proper removal of cache files and directories with appropriate logging of failures.
- New Features: Add `--no-reboot` flag usage example for GPU switching
- Enhancements: Document Wayland auto‑detection and new safety mechanisms (concurrency lock, interrupt‑safe restart, atomic writes)
- Bug Fixes: Minor phrasing corrections and typo fixes in README sections
The change ensures that only valid battery percentages (1‑100) are processed, preventing out‑of‑range values from reaching the underlying command.
- New Features
- Validation of battery limit percentage added.
- Enhancements - Better error reporting for invalid arguments.
- Bug Fixes
- Prevents processing of invalid battery limit values.
- Improves robustness of NVIDIA GPU PCI bus detection.
- Adds validation for unexpected PCI format strings.
- Prevents panic by handling missing command output and malformed IDs gracefully.
Add several new crates (block2, cfg_aliases, ctrlc, dispatch2, fs2, nix, objc2, objc2-encode, winapi and their sub‑crates) to support new functionality and improve compatibility. Bump versions of core crates (libc, futures-core, etc.) to latest releases.
- New Features:
- Introduce `block2`, `cfg_aliases`, `ctrlc`, `dispatch2`, `fs2`, `nix`, `objc2`, `objc2-encode`, and `winapi` (including target‑specific crates) to enable additional system interaction and async capabilities.
- Enhancements:
- Upgrade `libc`, `futures-core`, `futures-util`, `tokio`, `clap`, `serde`, and other dependencies to latest stable versions for performance and security improvements.
- Bug Fixes:
- Updated checksums and dependency resolution to reflect newer releases, reducing potential runtime issues.
Log a warning when the initramfs rebuild is skipped because the distribution is unknown, ensuring the user is informed.
New Features
- None
Enhancements
- Added explicit warning for unknown distributions to prevent silent skips
- Improved logging clarity in rebuild_initramfs
Bug Fixes
- Fixed missing warning path that could hide build issues on unsupported distros
The changes add robust interruption support, exclusive‑lock enforcement, and safer file handling to the GPU switching commands, while clarifying installation output.
- New Features - Atomic `INTERRUPTED` flag with Ctrl‑C signal handler
- `DmGuard` struct to manage display‑manager start/stop lifecycle
- `LockGuard` with exclusive lock file (`/var/lock/lapctl.lock`) to serialize GPU switches
- Safe temporary‑file write + rename for cache updates
- Enhancements
- Unified `prepare_no_reboot` returns `DmGuard` instead of `Option<String>`
- Consistent early‑exit handling with lock acquisition checks
- Improved debug/info logging for DM actions
- Restructured `finalize_no_reboot` to return a guard value
- Clarified installation success/failure messages for `lapctld`
- Bug Fixes
- Prevented race conditions on concurrent GPU switches by locking before operation
- Ensured lock is released on early return paths
- Fixed incomplete `finalize_no_reboot` handling
- Corrected daemon enable detection and user feedback logic
New Features:
- Enables cloning of GpuCommands variants for greater flexibility.
Enhancements:
- Improves CLI ergonomics by allowing command enum to be transmitted across async boundaries.
Enable automatic handling of NVIDIA commands in Wayland sessions and generate proper Xorg config snippets.
- New Features
- Adds `is_wayland_session()` that detects a Wayland environment via `WAYLAND_DISPLAY` or `XDG_SESSION_TYPE`.
- Adds `xorg_modesetting(bus_id)` that builds a full Xorg configuration snippet for the modesetting driver.
- Enhancements
- `switch_nvidia()` now automatically treats NVIDIA commands as Wayland‑aware when a Wayland session is detected.
- Refactored command matching in `execute()` to preserve original fields while injecting Wayland awareness.
- Fixed daemon invocation to pass a reference to the (potentially transformed) command.
- Bug Fixes
- Corrected argument passing in `try_call_daemon` and `execute_local` to avoid move errors.
- Prevented duplicate command handling when a Wayland session is detected.
Simplify daemon interface by removing obsolete system inhibition logic.
New Features
-
Enhancements
- Cleaned up dead code path.
-
Bug Fixes
- Prevented potential file descriptor leak by removing inhibition handling.
- New Features:
- Enhancements: Simplified command construction in rebuild_initramfs.
- Bug Fixes: Resolved potential error when systemd-inhibit is unavailable.
New Features
-
Enhancements
- Dropped inhibit subcommand and related modules.
- Cleaned up command handling logic in main.rs.
Bug Fixes- No bug fixes introduced.
Updated Cargo.lock and Cargo.toml to version 0.3.2 of the `lapctl` package.
New Features
- None
Enhancements
- Updated dependency version to 0.3.2Bug Fixes
- None
Why: Adopt local execution path to streamline command handling and reduce RPC overhead.
New Features
-
Enhancements
- Replace `gpu::execute` with `gpu::execute_local` in integrated, hybrid, and nvidia command invocations.
- Replace `crate::commands::power`, `battery`, `cooling`, and `touchpad` executions with `execute_local`.
- Remove the unused `LAPCTL_DAEMON_INTERNAL` environment variable setting.
Bug Fixes
- None
Refactored command flow to separate daemon invocation, added status handling, and improved error handling.
- New Features: Added `execute_local` helper and `BatteryCommands::Status` handling.
- Enhancements: Simplified daemon checks, removed redundant condition, improved readability and error messages.
- Bug Fixes: Fixed missed daemon return path for status command and ensured proper touchpad inhibition logic.
Set an internal environment variable when the daemon starts to allow components to detect internal mode and prepare for future runtime configuration.
- New Features
- Introduce `LAPCTL_DAEMON_INTERNAL` set to "1" inside the daemon.
- Enhancements
- Enable downstream components to detect internal daemon execution.
Adds 2‑second timeouts around D‑Bus interactions and guards against internal daemon self‑calls; refactors command handling to use a consistent async timeout pattern and improves error reporting.
New Features
- Wrap D‑Bus calls with a 2‑second timeout to prevent hangs
- Early‑exit when $LAPCTL_DAEMON_INTERNAL is set to skip self‑calls- Apply consistent timeout usage across all commands
Enhancements
- Unified error handling using the `matches!` macro
- Reduced race conditions in connection establishment
Bug Fixes
- Prevent silent failures when a connection timeout occurs