cancel
Showing results for 
Search instead for 
Did you mean: 

Aura - Temporary fix for high CPU usage and freezing lights

teiji_ishida
Level 7
Hello everyone,

Aura has this annoying bug where LightingService.exe uses high CPU load (~15-20%+) and the lights get stuck, depending on the color effects. The only way to get it working again would be to kill the LightingService.exe process and restart Aura. My lights get stuck several times a day, and I got tired of having to manually restart it all the time. Meanwhile, Asus has not fixed this problem, even with the latest stable v1.06.17.

I saw a post where a user "freemanone" wrote a PowerShell script and schedule it to automate this process, but it didn't work for me for some reason. So I did a bit of Google reading and wrote my own script. For anyone who's in the same situation as me, here's a temporary fix (until Asus fix their crappy software):

We will create 2 files, one is the powershell script (aura_guard.ps1) and one is a file to run the script (run_aura_guard.bat). Use Notepad or any text editor to copy the content below (changing only what is needed like file path, etc.) and make sure to save it in the proper format (In Notepad, make sure you select "All Files" for "Save as type" when you save the file, or it'll save as .txt).

aura_guard.ps1

<# Aura Guard
Code by: teiji_ishida

The purpose of this script is to restart the LightingService when it reaches an abnormally high CPU load,
so it won't cause the lights to freeze.

Notes:
$maxCpuPercent: change the value to whatever your LightningService CPU % was before the lights freeze.
$logFile: change the path & filename here to your choice.

#>


While ($true) {
$i++

$processName = “LightingService”
$cpuCores = (Get-WMIObject Win32_ComputerSystem).NumberOfLogicalProcessors
$samples = (Get-Counter “\Process($processName*)\% Processor Time”).CounterSamples
$cpuPercent = [Decimal]::Round(($samples.CookedValue / $cpuCores), 2)
$maxCpuPercent = 10

If ($cpuPercent -ge $maxCpuPercent) {
Restart-Service $processName -Force

$logFile = "C:\Users\\Documents\aura_guard_log.txt"
$logFileSize = (Get-Item $logFile).length
$data = (Get-Date).ToString() + "`t $processName was restarted at $cpuPercent%."

# Keep log file size small (ie. Only overwrites data in log file if it exceeds 500 KB)
If ($logFileSize/1KB -le 500) {Add-Content -Path $logFile -Value $data} Else {Set-Content -Path $logFile -Value $data}

}

Else {
Start-Sleep -Seconds 5
}
}



run_aura_guard.bat
powershell.exe -ExecutionPolicy UnRestricted -windowstyle hidden -file C:\Users\\Documents\aura_guard.ps1



What the aura_guard.ps1 does is check if LightingService.exe exceeds the max cpu percent I allow (I set mine at 10%, but you can change it to your desired percent based on your PC in the variable $maxCpuPercent). If it does exceeds it, then the script will kill the service and restart it. If not, the script will sleep for 5 seconds, and repeat. This script is very light on my PC, using <1% (0.10 to 0.30) on my 7700K @ 4.9Ghz.

One other thing to note, when the LightingService is restarted, the script will also write in a log file (aura_guard_log.txt, which you can also change the name and path in the variable $logFile) at what date/time the service was restarted and at what percentage. I wrote the script to keep the log size at max 500 KB, but you can reduce that number if you want. Or if you don't want any logging, then just delete every lines related to log in the code.

Lastly, to automate this, just open Task Scheduler and create a task for the "run_aura_guard.bat". Set it to run when a user is logged on and run with highest privilege (the bat file needs Admin privilege). If you did everything right, every time you turn on your PC and log on, it should show "The task is currently running. (0x41301)". Note: This script won't show up in your Task Manager, but you can use Process Explorer to verify that it's running (look for powershell.exe).
9,256 Views
3 REPLIES 3

freemanone
Level 7
Hey Mate!
Happy to inspire! I like the tweaks you did on the script. My version was sort of a rage deal cooked up after a really bad freeze on my system as fast i as i could. I'm still using the original version and i do update windows, just as powershell, so idk what was the problem.
Anyway really the improvements are great! I only wish ASUS would do a complete redesign....

richac
Level 7
1.07.36 Still the same issue as op since day 1. Its starting to really piss me off cause with each update the freezes happen more often. Masterasus said my system is faulty. But so many people have this same exact problem, the issue must be the bios or software. Probably won't buy anymore asus products in the future. I think most people have already given up on asus aura by now...

The freezes happen more or less open depending on cpu usage. So when playing high demanding games like bfv usually, which is what we buy a gamer mobo for!

strix b250f
7700k
1070
g.skill 32gb 2400hz

I know this is an older thread but just wanted to say thank you! This has helped out a ton. With a 5900X I have to set it pretty low, and I forgot to automate it as I was using it in ISE to test out, Lighting Service hit 49% of a 5900X!?!

Crazy that this is still a problem 3 years later.