GMKtec K12 – CPU & SYS Fan RPM Monitoring in HWiNFO64 (PowerShell Script)
Hi everyone!
I created a PowerShell script with the help of ChatGPT that reads CPU and SYS fan speeds (RPM) through WMI on the GMKtec K12 and makes them available as custom sensors in HWiNFO64.
Feel free to use it!
The script is read-only regarding fan control. It doesn't change fan speeds, fan curves, or EC settings.
Features
- Monitors both CPU and SYS fan RPM.
- Updates readings every 2 seconds.
- Exports fan speeds to HWiNFO64 custom sensors.
- Can run manually or automatically at Windows logon.
- Doesn't require any BIOS modifications.
Download and setup
Download the PowerShell script from the Google Drive link below:
Download script
Save the file as:
C:\GMKtec-K12-HWiNFO-Fans.ps1
There are two ways to run the script.
Option 1 – Run manually
This starts the fan monitoring script manually. You'll need to run it again after restarting Windows.
The script will continue running until you press Ctrl+C or close the PowerShell window.
Open PowerShell and paste:
# Start GMKtec K12 fan monitoring
$scriptPath = "C:\GMKtec-K12-HWiNFO-Fans.ps1"
if (-not (Test-Path -LiteralPath $scriptPath)) {
throw "Script not found: $scriptPath"
}
powershell.exe -NoProfile -ExecutionPolicy Bypass -File $scriptPath
Once the script is running, start HWiNFO64.
Important: If HWiNFO64 is already running, close and restart it so it can detect the custom sensors.
Option 2 – Start automatically using Windows Task Scheduler
This creates a scheduled task that starts the monitoring script automatically whenever you log in to Windows.
The script runs in the background without a visible PowerShell window.
Instructions:
- Make sure
GMKtec-K12-HWiNFO-Fans.ps1 is saved directly in C:\. - Open PowerShell as Administrator using your normal Windows account.
- Copy and paste the following code.
- Press Enter to create and start the scheduled task.$taskName = "GMKtec K12 - HWiNFO Fans" $scriptPath = "C:\GMKtec-K12-HWiNFO-Fans.ps1" $powerShell = "$env:SystemRoot\System32\WindowsPowerShell\v1.0\powershell.exe"
- if (-not (Test-Path -LiteralPath $scriptPath)) { throw "Script not found: $scriptPath" }
- $user = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name
- $action = New-ScheduledTaskAction
-Execute $powerShell -Argument "-NoProfile -NonInteractive -WindowStyle Hidden -ExecutionPolicy Bypass -File "$scriptPath"" - $trigger = New-ScheduledTaskTrigger -AtLogOn -User $user
- $principal = New-ScheduledTaskPrincipal
-UserId $user -LogonType Interactive ` -RunLevel Limited - $settings = New-ScheduledTaskSettingsSet
-ExecutionTimeLimit (New-TimeSpan -Seconds 0) -MultipleInstances IgnoreNew -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries - Register-ScheduledTask
-TaskName $taskName -Description "Exports GMKtec K12 CPU and SYS fan RPM to HWiNFO64 custom sensors." -Action $action -Trigger $trigger -Principal $principal -Settings $settings ` -Force - Start-ScheduledTask -TaskName $taskNameWrite-Host "Scheduled task created and started: $taskName"
The scheduled task will start automatically at every Windows logon.
You can verify its status with:
Get-ScheduledTask -TaskName "GMKtec K12 - HWiNFO Fans" |
Get-ScheduledTaskInfo
The task should show Running while the monitoring script is active.
HWiNFO64
After starting the script, launch HWiNFO64 in Sensors-only mode.
Look for the custom sensor group:
GMKtec K12 Fans
It should contain:
- CPU Fan – RPM
- SYS Fan – RPM
If HWiNFO64 was already running, close and reopen it.
For automatic startup, make sure the monitoring script starts before HWiNFO64.
SYS Fan RPM reading note
Occasionally, the WMI interface briefly reports a value of 8000 for the SYS fan. This doesn't appear to represent the actual fan speed.
The script filters out this value and reports 0 RPM instead.
As a result, you may occasionally see the SYS fan reading briefly drop to 0 RPM in HWiNFO64 before returning to its normal value.
This is a reporting artifact and doesn't necessarily mean the fan has physically stopped.
Technical details
The script uses the PowerSwitchInterface WMI class and the GetFanControl method to retrieve fan speed data.
Both fan speeds are encoded in a single 32-bit value:
- Lower 16 bits: CPU Fan RPM
- Upper 16 bits: SYS Fan RPM
The script separates these readings and writes them to the Windows registry, where HWiNFO64 can access them as custom sensors.
It only reads fan information from WMI and does not send fan control commands or modify the EC.
Compatibility
Tested on my GMKtec K12 with AMD Ryzen 7 H 255 BIOS 2.03 EC 2.02 with REBAR.
Other BIOS or EC versions may behave differently, so compatibility isn't guaranteed.
If you encounter any issues or notice different fan readings on your K12, feel free to share your results.
Hope this helps other K12 owners who want to monitor both fans in HWiNFO64!