Skip to content
Un1quer23Public

About

Windows 11 laptop refresh rate switcher with automatic power rules, confirmation and manual modes

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

LaptoHz

Languages: English | 简体中文

CI

Windows 11 x64 laptop internal-display refresh rate switcher with automatic power rules, confirmation prompts, and manual rate selection.

LaptoHz tray menu, hover hint, and result notice

Modes

Mode Behavior
Automatic Switches by power-source rules and checks at startup, on wake, and on capability changes
Confirmation Prompts before switching after an actual power-source change
Manual Lets you pick an available rate directly; power changes and wake do not override it

Default targets:

  • Plugged in (AC): highest available validated rate.
  • On battery: 60Hz, then 59Hz; otherwise the lowest rate >= 60Hz, or the highest rate if all are below 60Hz.

Download and Quick Start

Download LaptoHz-<version>-win-x64.zip from the latest GitHub Release, extract it, and run LaptoHz/LaptoHz.exe. Each release includes a .sha256 checksum file for the ZIP and SHA256SUMS.txt inside the archive.

  • No administrator privileges or external C++ runtime required.
  • First launch enables sign-in startup for the current user (LaptoHz.lnk in shell:startup).
  • Left-click or right-click the tray icon to open the unified menu.
  • Hover or focus a mode for ~0.5s to view its inline explanation.
  • Supports Simplified Chinese and English, following Windows display language by default or overridden from Language / 语言 in the tray menu.

Key Capabilities and Support Boundaries

  • Physical mode validation: verifies Windows graphics-kernel physical vs. virtual mode flags and runs CDS_TEST before exposing rates.
  • Readback and recovery: verifies nominal, desktop, and physical signal Hz plus surrounding display parameters after switching, and attempts one automatic recovery if verification fails.
  • Native Windows integration: follows Windows app light/dark/high-contrast themes and dynamically rescales popups across monitor DPI changes.
  • Boundaries: manages one clearly identifiable internal display; extended external displays are preserved. Switching is paused in duplicate-display mode, multi-internal-display setups, remote/inactive sessions, or when Windows Dynamic Refresh Rate (DRR) is enabled. ARM64 builds are not provided.

CLI Quick Reference

# Read-only hardware & driver capability report (no tray instance launched)
.\LaptoHz.exe --diagnose --output .\diagnostics.json

# Control an already-running tray instance
.\LaptoHz.exe --mode manual
.\LaptoHz.exe --switch 60
.\LaptoHz.exe --mode confirm
.\LaptoHz.exe --mode auto
.\LaptoHz.exe --status
.\LaptoHz.exe --version

Build and Validation

Built with C++20, CMake, and the Win32 API:

# Portable LLVM-MinGW toolchain (downloads to ignored .tools/, optional -Proxy)
.\scripts\bootstrap.ps1
.\scripts\build.ps1 -Portable
.\dist\LaptoHz\LaptoHz.exe --version

Or build with MSVC (Visual Studio 17 2022, x64):

.\scripts\build.ps1

scripts/build.ps1 compiles, runs CTest, and installs the release bundle under dist/LaptoHz/ with SHA256SUMS.txt.

Documentation

Security

Please report security issues privately rather than opening a public issue. See SECURITY.md for GitHub Private Vulnerability Reporting steps.

License

Licensed under the MIT License. Third-party toolchain notices are kept in licenses/LLVM-MinGW-LICENSE.txt.

About

Windows 11 laptop refresh rate switcher with automatic power rules, confirmation and manual modes

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages