nefarius / ScpToolkit

Windows Driver and XInput Wrapper for Sony DualShock 3/4 Controllers
http://forums.pcsx2.net/Thread-ScpToolkit-XInput-Wrapper-aka-ScpServer-Reloaded
GNU General Public License v3.0
3.1k stars 538 forks source link

ScpService/server: high cpu usage even when idle #95

Closed JamEnergy closed 7 years ago

JamEnergy commented 8 years ago

Happens on 2 machines. Windows 10 or Windows 7.

It doesn't happen on my other Windows 7 machine though.

What are the common causes of this?

Would any logs be helpful?

I uninstalled and reinstalled a few times.

nefarius commented 8 years ago

What is "high" CPU usage? What are the specs of the machine(s)?

JamEnergy commented 8 years ago

Hi there, I should have been more specific but here goes: The "good" machine is indeed quite powerful, like 4.2GHz. And I'm seeing SCPService consume under 1% CPU there.

The "bad" machine I'm on now is a Surface pro 3 (ok, I know they aren't power houses but it's an i7 that can boost up to like 3GHz). It seems to be eating up 25+% CPU (I'm guessing that's one core at max + a bit). Of course I expect this machine to exhibit higher CPU usage, but not so much more.

resource 2 resource

The other "bad" machine is like a 3GHz i5. Again, it was using one core at max.

nefarius commented 8 years ago

What version of the software are you using? Are you using a Bluetooth adapter? Are any controllers connected? Does this also happen if you manually restart the service from the service console?

JamEnergy commented 8 years ago

Thanks for quick replies, and sorry for omitting such obvious information! Version of ScpServer and ScpService (I tried both). 1.6.126.15319

I'm wondering if I ticked the wrong boxes/too many boxes/something bad when installing it, but I don't exactly remember what options I picked. The functionality does indeed work though (ie, controller works fine... it's just that the scpService/server uses abnormally high CPU usage despite not doing anything)

version info

Yes, I tried stop/start from Services.msc.

No bluetooth adapter. No controllers are currently connected.

nefarius commented 8 years ago

The release you're using if over a month old. Please update and try again.

JamEnergy commented 8 years ago

Okay, thanks. I will do that, test, and get back to you.

Do I need to do anything special to upgrade? Or just stop services then run new installer and follow options?

nefarius commented 8 years ago

You don't have to stop the service by your own, the installer will take care of everything and prompt you for any additional actions needed. I recommend you to get the latest beta.

JamEnergy commented 8 years ago

1.6.206.15349 exhibits same behaviour. I can try the beta too.

JamEnergy commented 8 years ago

Same symptom in beta.

Could try ScpCleanWipe.exe (haven't yet).

Are there symbols in this build btw? Could VerySleepy it.

nefarius commented 8 years ago

You can select installing them in the setup under Testing & Troubleshooting / ScpToolkit Debug Symbols

JamEnergy commented 8 years ago

Doesn't mean a lot to me lol, but fwiw:

scp sleepy
nefarius commented 8 years ago

You could do a Save as... and submit the .sleepy file so I can open and analyze it myself.

JamEnergy commented 8 years ago

Ok, sure thing.

JamEnergy commented 8 years ago

Google drive link to 10s of profiling on the suspect thread:

https://drive.google.com/file/d/0B15-n_tt44MeOEc3N241MzlJUUU/view?usp=sharing

For reference: SCPServer.exe build 1.6.212.15353

nefarius commented 8 years ago

Great, thanks. I'll have a look.

nefarius commented 8 years ago

Can I also have you log package please.

JamEnergy commented 8 years ago

Logs.zip Logs folder from C:\Program Files\Nefarius Software Solutions\ScpToolkit

Sorry for late reply, here's the log dir. If you meant something else, I can go and fetch that.

Thanks

Jan200101 commented 8 years ago

To get the Log pack Search for ScpToolkit Debug Info Collector in your start menu, run it and follow its instructions.

JamEnergy commented 8 years ago

Oh, thanks for that tip. Here it is. ScpToolkit_Log-Package_jeremy_1450551150.zip

Jan200101 commented 8 years ago

Question: There is a arrow next to SCPService in your Taskmanager click on it and look if it looks like this

![Taskmanager](https://cloud.githubusercontent.com/assets/15076013/11966627/330eef14-a8fd-11e5-8a87-e732811f8b4e.png)
alex-mazzariol commented 8 years ago

I'm experiencing this problem too - 1 out of 4 cpu cores is at 100% utilization by ScpService. Attaching VerySleepy log of 10 seconds and log package, may help in differential analysis.

I'm using the latest stable, 1.6.229.15365. Windows 7 x64 fully updated. The abnormal CPU utilization is happening both with or without any controllers attached, either playing or without any inputs from the controller.

DebugInformation_20151231.zip

brianj64 commented 8 years ago

Same issue here NOTHING ATTACHED(Bluetooth stick not attached, Dualshock 4 not attached) highcpuusage

Windows 10 Pro x64, freshly installed(this includes Threshold 2 aka version 1511)

All I was doing was watching some anime in Media Player Classic Home Cinema x64

CPU is i5 4690 quad core @3.5Ghz(sayin 3.75 because of intel turbo)

untitled

ArtStepanyuk commented 8 years ago

Im having the same issue Windows 10 intel core i5 -4430 cpu 3.00GHz 25-30% load at idle state

shoebaker commented 8 years ago

Same issue windows 7 x64 intel at 25% idle. With controller connected or not, its always maxed one core out. PS3 controller with cable, no bluetooth. It all still works.

tried versions 1.6.229.15365 and 1.6.238.16010 same thing.

ScpDsxService_asafs.log.xml.txt

Jan200101 commented 8 years ago

My last guess would be a Virtual Controller

shoebaker commented 8 years ago

Tried v1.5.5787.40106 and this problem does not occur. (previously tried v1.6.229.15365 and v1.6.238.16010)

nefarius commented 8 years ago

I now know what the problem is but not yet how to fix it. Stay tuned.

JamEnergy commented 8 years ago

Thanks for the update. Nice for us users to see that glimmer of hope.

Good luck.

I'm pretty curious as to what the issue is though. When you're done, could you sum it up? Were you able to reproduce it locally? If not, I can make a point to verify the fix for you.

nefarius commented 8 years ago

I think the libusbK.sys driver is to blame here (which I ditched in the upcoming release) so please check out the very next release to see if this fixes your issues.

NPException commented 7 years ago

I just wanted to let you know that I had the same problem. I now installed the latest Beta (this one), and the problem seems to be gone.

Thank you very much! :)

danyboy666 commented 7 years ago

This fix is working perfectly. Processor usage dropped from 20% to 0.1%. Thanks.