mirror of
https://github.com/ChrisTitusTech/winutil
synced 2026-06-04 14:17:27 +00:00
Powerplan fix (#4521)
* Update Invoke-WPFUltimatePerformance.ps1 * Update Invoke-WPFButton.ps1 * Update Invoke-WPFUltimatePerformance.ps1 * Update KnownIssues.md * Update KnownIssues.md * Update Invoke-WPFUltimatePerformance.ps1 * Update Invoke-WPFUltimatePerformance.ps1 * Update Invoke-WPFUltimatePerformance.ps1 * Update tweaks.json
This commit is contained in:
+2
-2
@@ -1823,7 +1823,7 @@
|
|||||||
},
|
},
|
||||||
"WPFAddUltPerf": {
|
"WPFAddUltPerf": {
|
||||||
"Content": "Ultimate Performance Profile - Enable",
|
"Content": "Ultimate Performance Profile - Enable",
|
||||||
"category": "Performance Plans",
|
"category": "Performance Plans - NOT FOR LAPTOPS",
|
||||||
"panel": "2",
|
"panel": "2",
|
||||||
"Type": "Button",
|
"Type": "Button",
|
||||||
"ButtonWidth": "300",
|
"ButtonWidth": "300",
|
||||||
@@ -1831,7 +1831,7 @@
|
|||||||
},
|
},
|
||||||
"WPFRemoveUltPerf": {
|
"WPFRemoveUltPerf": {
|
||||||
"Content": "Ultimate Performance Profile - Disable",
|
"Content": "Ultimate Performance Profile - Disable",
|
||||||
"category": "Performance Plans",
|
"category": "Performance Plans - NOT FOR LAPTOPS",
|
||||||
"panel": "2",
|
"panel": "2",
|
||||||
"Type": "Button",
|
"Type": "Button",
|
||||||
"ButtonWidth": "300",
|
"ButtonWidth": "300",
|
||||||
|
|||||||
@@ -27,3 +27,9 @@ If you run WinUtil and get the error:
|
|||||||
`"WinUtil is unable to run on your system, powershell execution is restricted by security policies,"`
|
`"WinUtil is unable to run on your system, powershell execution is restricted by security policies,"`
|
||||||
|
|
||||||
this means that your PowerShell session is in **Constrained Language Mode**, which prevents WinUtil from running.
|
this means that your PowerShell session is in **Constrained Language Mode**, which prevents WinUtil from running.
|
||||||
|
|
||||||
|
### Ultimate Performance Plan Not Working
|
||||||
|
|
||||||
|
The Ultimate Performance power plan may not work on some laptops who do not fully support this power plan.
|
||||||
|
|
||||||
|
In these cases, the power plan may fail to apply, This is expected behavior on unsupported hardware.
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ function Invoke-WPFButton {
|
|||||||
"WPFClearInstallSelection" {Invoke-WPFPresets -imported $true -checkboxfilterpattern "WPFInstall*"}
|
"WPFClearInstallSelection" {Invoke-WPFPresets -imported $true -checkboxfilterpattern "WPFInstall*"}
|
||||||
"WPFtweaksbutton" {Invoke-WPFtweaksbutton}
|
"WPFtweaksbutton" {Invoke-WPFtweaksbutton}
|
||||||
"WPFOOSUbutton" {Invoke-WPFOOSU}
|
"WPFOOSUbutton" {Invoke-WPFOOSU}
|
||||||
"WPFAddUltPerf" {Invoke-WPFUltimatePerformance -Do}
|
"WPFAddUltPerf" {Invoke-WPFUltimatePerformance -Enable}
|
||||||
"WPFRemoveUltPerf" {Invoke-WPFUltimatePerformance}
|
"WPFRemoveUltPerf" {Invoke-WPFUltimatePerformance}
|
||||||
"WPFundoall" {Invoke-WPFundoall}
|
"WPFundoall" {Invoke-WPFundoall}
|
||||||
"WPFUpdatesdefault" {Invoke-WPFUpdatesdefault}
|
"WPFUpdatesdefault" {Invoke-WPFUpdatesdefault}
|
||||||
|
|||||||
@@ -1,35 +1,9 @@
|
|||||||
function Invoke-WPFUltimatePerformance {
|
function Invoke-WPFUltimatePerformance ([switch]$Enable) {
|
||||||
param(
|
if ($Enable) {
|
||||||
[switch]$Do
|
powercfg /setactive (powercfg /duplicatescheme e9a42b02-d5df-448d-aa00-03f14749eb61 | Select-String -Pattern '[A-Fa-f0-9-]{36}').Matches.Value
|
||||||
)
|
[System.Windows.MessageBox]::Show("Ultimate Power Plan plan installed and activated.","Success","OK","Information")
|
||||||
|
|
||||||
if ($Do) {
|
|
||||||
if (-not (powercfg /list | Select-String "ChrisTitus - Ultimate Power Plan")) {
|
|
||||||
if (-not (powercfg /list | Select-String "8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c")) {
|
|
||||||
powercfg /restoredefaultschemes
|
|
||||||
if (-not (powercfg /list | Select-String "8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c")) {
|
|
||||||
Write-Host "Failed to restore High Performance plan. Default plans do not include high performance. If you are on a laptop, do NOT use High Performance or Ultimate Performance plans." -ForegroundColor Red
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$guid = ((powercfg /duplicatescheme 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c) -split '\s+')[3]
|
|
||||||
powercfg /changename $guid "ChrisTitus - Ultimate Power Plan"
|
|
||||||
powercfg /setacvalueindex $guid SUB_PROCESSOR IDLEDISABLE 1
|
|
||||||
powercfg /setacvalueindex $guid 54533251-82be-4824-96c1-47b60b740d00 4d2b0152-7d5c-498b-88e2-34345392a2c5 1
|
|
||||||
powercfg /setacvalueindex $guid SUB_PROCESSOR PROCTHROTTLEMIN 100
|
|
||||||
powercfg /setactive $guid
|
|
||||||
Write-Host "ChrisTitus - Ultimate Power Plan plan installed and activated." -ForegroundColor Green
|
|
||||||
} else {
|
|
||||||
Write-Host "ChrisTitus - Ultimate Power Plan plan is already installed." -ForegroundColor Red
|
|
||||||
return
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if (powercfg /list | Select-String "ChrisTitus - Ultimate Power Plan") {
|
powercfg /restoredefaultschemes
|
||||||
powercfg /setactive SCHEME_BALANCED
|
[System.Windows.MessageBox]::Show("Power Plan was reset to defaults.","Success","OK","Information")
|
||||||
powercfg /delete ((powercfg /list | Select-String "ChrisTitus - Ultimate Power Plan").ToString().Split()[3])
|
|
||||||
Write-Host "ChrisTitus - Ultimate Power Plan plan was removed." -ForegroundColor Red
|
|
||||||
} else {
|
|
||||||
Write-Host "ChrisTitus - Ultimate Power Plan plan is not installed." -ForegroundColor Yellow
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user