The Corsair User Forums

The Corsair User Forums (https://forum.corsair.com/forums/index.php)
-   Corsair Link (https://forum.corsair.com/forums/forumdisplay.php?f=209)
-   -   How To Reduce Corsair Link Stuttering By Changing Process Priority (https://forum.corsair.com/forums/showthread.php?t=178356)

GaryPuttsinburg 06-05-2018 11:38 PM

How To Reduce Corsair Link Stuttering By Changing Process Priority
 
I installed LL RGB fans with the Corsair Link software system and noticed stuttering and high CPU usage while it runs in the background. To get around this, I've created a windows PowerShell script which sets the two process priorities to their lowest levels which runs every time my machine starts up. Maybe this will help someone else too.

Script Pseudocode:
  • Store a log file with full path in a variable
  • Store both corsair processes in variables
  • Set maximum number of try attempts
  • try to get the first process
  • while the process is not found, try again until max try attempts is reached, sleeping for 2 seconds after each try
  • if the process is found, set its priority to "idle", otherwise log that the process was not found
  • reset try and repeat same logic for second corsair process.

Below is the script and how to install it:
  • Open a blank notepad document and paste the code below. Save the file as myscript.ps1 in the a safe place that won't get deleted (a folder in your documents, perhaps). You may have to change the file type from .txt to "all files".

Code:

$outFile = "C:\Users\<USER>\Documents\<CUSTOM_FOLDER>\customlog.txt"
$now = (Get-Date).ToUniversalTime()
"Starting corsair priority droop: $now" > $outFile
$CorsairP1 = "CorsairLink4"
$CorsairP2 = "CorsairLink4.Service"
$maxtrys = 20
#try to get process number 1
$process = Get-Process -Name $CorsairP1 -ErrorAction SilentlyContinue
$trys = 0
while(!$process -And $trys -le $maxtrys)
{
        "$CorsairP1 not found: $trys" >> $outFile
        $trys++
        Start-Sleep -s 2
        $process = Get-Process -Name $CorsairP1 -ErrorAction SilentlyContinue
}
if($process)
{
    "$process found after try [$trys]" >> $outFile
    $process.PriorityClass = 'IDLE'
    "$process set to IDLE" >> $outFile
}
else
{
    "$process did not start in time" >> $outFile
}

#try to get process number 2
$trys = 0
$process = Get-Process -Name $CorsairP2  -ErrorAction SilentlyContinue
while(!$process -And $trys -le $maxtrys)
{
        "$CorsairP2 not found: $trys" >> $outFile
        $trys++
        Start-Sleep -s 2
        $process = Get-Process -Name $CorsairP2  -ErrorAction SilentlyContinue
}
if($process)
{
    "$process found after try [$trys]" >> $outFile
    $process.PriorityClass = 'IDLE'
    "$process set to IDLE" >> $outFile
}
else
{
    "$process did not start in time" >> $outFile
}

  • Replace <USER> with your windows username
  • Replace <CUSTOM_FOLDER> with a folder where you'd like the script log to be saved.

Assign the script in the Local Group Policy Editor
  1. From the start menu search " Edit Group Policy"
  2. In the console tree, click Scripts (Startup/Shutdown) . The path is Computer Configuration\Windows Settings\Scripts (Startup/Shutdown) .
  3. In the right window pane, double-click Startup.
  4. Choose the PowerShell Scripts tab at the top, click Add.
  5. Click Browse and find for the myscript.ps1 script file you saved above.
  6. Click Ok, then Ok again to close the "Startup Properties" box.
  7. Close the Local Group Policy Editor, you're done.

Restart and check the log file to make sure both processes were found and their priority levels were lowered. You can also verify the script worked by checking their priorities in the Task Manager (right click each corsair process, click "go to details", click "set priority", see that it is at its lowest value)

Resources:
Assign Computer Startup Scripts
How to Write and Run PowerShell Scripts

screwtech02 06-06-2018 03:09 PM

Have ya got a fix for it not seeing AMD gpu's?

SpeedyV 06-07-2018 06:14 PM

This is a very clever and elegant solution so thank you for posting it. I have read many posts complaining about the high CPU usage of Corsair Link, which I guess may be even worse now that Corsair is using software based control for their LL series fans. I don't use LL series fans (or Corsair Link) so I don't have this problem. But if I did, I would be implementing this solution. I am sure this will prove to be useful for many here who do not want to trade system performance for bling. Thanks again.


All times are GMT -4. The time now is 04:37 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.