Welcome to my world!
The RGB elements in my case:
- Z370-F
- 4x Halos Lux fan frame
- 2x Gskill addressable DRAM
- 2x ws2812b addressable LED strips with a data line splitter in sync
- The second analog 4pin RGB header is not used yet, but it's going to be the front outside, and underglow lights
So, the story is, that the LightningService.exe is crashing time to time, for me it's very crazy to the point that even the whole PC freeze sometimes. Usually it is just a small hickup, because i'm not putting much load on the CPU, so it has room for this process to do the same as with your machine.
It is really, really annoying. I got fed up with asus incapable of solving the stability of this pile of crap, so i stiched together a simple powershell script, that takes care of this thing in the background, with 1-4 sec response time when the issue happens.
So, here is what I do, to stop this nonsense from happening!
First thing is to set the execution policy on powershell.
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.security/set-executionpolicy...
I don't want to go into much details about this, the website is very informative, it tells everything.
Second is to create two files on the desktop.
- aura_guard.bat
content:
powershell.exe -windowstyle hidden -file C:\Users\
\Desktop\aura_guard.ps1
- aura_guard.ps1
content:
While($true)
{
$i++
$aura_pid = (get-process "LightingService").Id[0]
$cpu_cores = (Get-WMIObject Win32_ComputerSystem).NumberOfLogicalProcessors
$proc_path = ((Get-Counter "\Process(*)\ID Process").CounterSamples | ? {$_.RawValue -eq $aura_pid}).Path
$prod_percentage_cpu = [Math]::Round(((Get-Counter ($proc_path -replace "\\id process$","\% Processor Time")).CounterSamples.CookedValue) / $cpu_cores)
If ($prod_percentage_cpu -ge 20)
{Restart-Service LightingService -force}
Else
{start-sleep -seconds 1}
}
What this does, is basically, checks the LightningService.exe if it's using above 20% CPU it will force restart the service itself, then loops again and if the process is not using much CPU the script will sleep for 1 sec, then loop again. It takes sometimes up to 4 sec, but usually i don't even notice it happened.
I have an i3-8350k what is a 4 core CPU and you mentioned i9-7900X what has 10 cores / 20 threads. So from the numbers you wrote i think you need to change this one line from "If ($prod_percentage_cpu -ge 20)" this, to "-ge 4" at the end. I would not recommend much lower threshold, as i was monitoring the process with perfmon, i've seen random spikes, and the script can take that as a false positive and restart unnecessarily.
One more advice, the "aura_guard.bat" won't have access to the service by default, so either run it as admin, or set up the privilege for it.
I run it at every windows startup from task scheduler, so it is kinda like an almost zero resource monitoring and automation.