Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HP Pavilion Fan Control

PowerShell fan-speed control utility for the HP Pavilion Plus Laptop 14-ey0xxx.

This tool was built from this laptop's ACPI/HP BIOS WMI interface. It controls the two internal fans through HP private WMI methods exposed under root\wmi:hpqBIntM.

Detailed hardware notes, WMI commands, temperature-source discovery, and raw fan test results are recorded in FINDINGS.md.

Tested Device

  • Model: HP Pavilion Plus Laptop 14-ey0xxx
  • Board: 8C21
  • CPU: AMD Ryzen 7 7840H
  • BIOS: Insyde F.13
  • OS: Windows

This is hardware-specific. Do not assume it is safe on other HP models without checking their ACPI tables first.

Requirements

  • Windows PowerShell
  • Administrator shell
  • HP BIOS WMI class root\wmi:hpqBIntM

Usage

Open PowerShell as Administrator in this folder.

Show current fan status:

powershell -NoProfile -ExecutionPolicy Bypass -File .\hp-fan-control.ps1 status

Watch fan status continuously:

powershell -NoProfile -ExecutionPolicy Bypass -File .\hp-fan-control.ps1 status -Watch

Set both fans to the same RPM:

powershell -NoProfile -ExecutionPolicy Bypass -File .\hp-fan-control.ps1 set -Rpm 3000

Set each fan separately:

powershell -NoProfile -ExecutionPolicy Bypass -File .\hp-fan-control.ps1 set -Rpm0 3200 -Rpm1 2800

Set both fans with a direct raw firmware value:

powershell -NoProfile -ExecutionPolicy Bypass -File .\hp-fan-control.ps1 set -Raw 254

Set each fan with a direct raw firmware value:

powershell -NoProfile -ExecutionPolicy Bypass -File .\hp-fan-control.ps1 set -Raw0 180 -Raw1 200

Run the fans near maximum tested speed:

powershell -NoProfile -ExecutionPolicy Bypass -File .\hp-fan-control.ps1 set -Rpm 5000

Return control to BIOS/EC automatic fan management:

powershell -NoProfile -ExecutionPolicy Bypass -File .\hp-fan-control.ps1 auto

You can also use set -Rpm 0 as a shortcut for automatic mode:

powershell -NoProfile -ExecutionPolicy Bypass -File .\hp-fan-control.ps1 set -Rpm 0

Run the 70 C thermal policy loop. Below 70 C it stops both fans with raw 255; at or above 70 C it restores BIOS/EC automatic fan management. The loop reads the actual fan state every cycle and repairs firmware state drift instead of relying only on an in-memory mode flag:

powershell -NoProfile -ExecutionPolicy Bypass -File .\hp-thermal-fan-policy.ps1

Run the same policy with a custom threshold, hysteresis, or interval:

powershell -NoProfile -ExecutionPolicy Bypass -File .\hp-thermal-fan-policy.ps1 -ThresholdC 70 -HysteresisC 3 -IntervalSeconds 5

Install the startup scheduled task. Run PowerShell as Administrator:

powershell -NoProfile -ExecutionPolicy Bypass -File .\install-startup-task.ps1 -RunNow

By default this registers a SYSTEM scheduled task that starts 30 seconds after boot and runs hp-thermal-fan-policy.ps1 with the 70 C policy. It stops the previous task instance before replacing it, then verifies that -RunNow remains running. The persistent log is %ProgramData%\HPFanControl\hp-thermal-fan-policy.log; it rotates to .log.1 at 5 MB. To remove the startup task:

powershell -NoProfile -ExecutionPolicy Bypass -File .\install-startup-task.ps1 -Remove

Safety Bounds

The script accepts 0 as automatic mode when using -Rpm 0. Manual RPM values are limited to 1-5000 RPM. Very low manual values are clamped to the lowest raw fan target that the firmware interface can express, which is about 1935 RPM on the tested laptop. Direct raw values are accepted as 0-255 and are written without RPM conversion or safety clamping.

The thermal policy script uses CPU/GPU temperature readings from LibreHardwareMonitorLib.dll if that DLL is placed next to the scripts or under .\lib. Without that DLL, it falls back to the Windows ACPI thermal zone reading exposed by this laptop.

The default 3 C hysteresis keeps automatic mode active until the temperature falls to 67 C after crossing the 70 C threshold. While stop mode is desired, the policy verifies both fans and their raw state every 5 seconds, repairs any drift immediately, and reasserts raw 255 every 60 seconds.

Always run auto after manual testing unless you intentionally want to keep manual fan control active.

Implementation Notes

The script sends HP BIOS WMI packets to hpqBIntM.

Fan status is read through the firmware's thermal data path. Manual target writes use the firmware's HODW branch:

  • fan 0 target writes through the EC mailbox path backed by register 0x94
  • fan 1 target writes through the EC mailbox path backed by register 0x82
  • automatic mode reset uses the firmware reset command 0xAA

RPM is converted to the raw firmware value with:

raw = round(0x78000 / RPM)

Smaller raw values mean higher fan speed.

Warning

This tool uses private firmware interfaces. Incorrect values or use on the wrong model can cause thermal, stability, or firmware-control problems. Use it only on the tested model unless you have independently verified the same ACPI methods on another machine.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages