Davidobot / BetterJoy

Allows the Nintendo Switch Pro Controller, Joycons and SNES controller to be used with CEMU, Citra, Dolphin, Yuzu and as generic XInput
Other
3.86k stars 341 forks source link

100% CPU usage after a while, eats up my whole PC 6600k performance #209

Closed borgqueenx closed 4 years ago

borgqueenx commented 4 years ago

I'm using this application together with Citra, and after a while the game i play starts to lag, and then it starts to get worse, worse and worse. Checking in my task manager i see that the app uses 100% of my computer CPU and every other application also severely lags, until i force close the beterjoyforcemu task. So it appears there is a leak in the application that eats up all cpu performance, since when i restart the application it works again for a while. Windows 10 64 bit installed with a intel 6600k.

Davidobot commented 4 years ago

When that happens, try restarting BetterJoyForCemu.

borgqueenx commented 4 years ago

When that happens, try restarting BetterJoyForCemu.

that works, but only temporarily, i have to restart it every ~10 minutes or so.

Davidobot commented 4 years ago

Which version are you running? Maybe try disabling HIDgaurdian and see if that helps?

How many devices do you have connected?

borgqueenx commented 4 years ago

Which version are you running? Maybe try disabling HIDgaurdian and see if that helps?

How many devices do you have connected?

just a single nintendo pro controller with USB. where do i disable HIDguardian? Furthermore, im using the latest version (downloaded yesterday from this github) but i'd like to add that i didn't ran into these issues about a half year ago, running a older version. But the older version is not compatible anymore with this windows version it seems, as it wont work anymore, while the latest version works until it starts to hog all the CPU.

Davidobot commented 4 years ago

Hm, try uninstalling and reinstalling the drivers.

HIDgaurdian can be turned off in the app settings.

ShrinkWrapper commented 4 years ago

Experiencing the same problem. First time installing it today. On version 6.0, Windows 10 1903 using a switch pro controller. About 10-15 min in it starts eating up cpu. Tested with HidGuardian disabled, but same result. Just tried uninstalling and reinstalling the driver with same result.

Any logfiles or other things I can do to make it easier to troubleshoot?

ComedyRussel commented 4 years ago

Same issue with i5 8400. Are there any solutions yet?

Davidobot commented 4 years ago

Does this happen on the previous nightly build? https://drive.google.com/open?id=1gDt0_vhOmqWYeaeo7E6B0b6mYLOcja3d (64-bit)

ComedyRussel commented 4 years ago

Yes I am using that build and have tried uninstalling and reinstalling the drivers as well as disabling Hid Guardian but it still uses almost all of the computer's CPU.

kkuphal commented 4 years ago

Experiencing this same behavior also. USB + Switch Pro Controller

Davidobot commented 4 years ago

Is this happening on all the builds or just the newest one?

kkuphal commented 4 years ago

I've only tried it on the latest nightly build. @ComedyRussel notes above that it is also occurring for them on the previously nightly build. Do you have a particular build you want to be tested with other than those two? I'm not sure how to download anything other than the tagged v5 if there is something to try.

Davidobot commented 4 years ago

Could you try the build I linked? You can access the older nighties by looking through the commit history.

ShrinkWrapper commented 4 years ago

Testing that build now, will come back with results.

Edit: Same outcome with this build as well.

BetterJoyForCemu_v6-Nightly-8_x64 Currently at 70% CPU usage

Davidobot commented 4 years ago

I'll investigate when I find the time. Thanks.

Insan1ty0ne commented 4 years ago

I can corroborate this issue as well. I have an i7 5960X overclocked to 4.5 Ghz and I am using BetterJoyForCemu_v6-Nightly-9_x64. After roughly ~10-20 minutes of play BetterJoy uses roughly 97-99% of my CPU.

Note: I have tested this using BetterJoy while playing both the latest CEMU public build and CITRA Canary build.

image

remziz4 commented 4 years ago

Having this same issue. Really unfortunate since the app works great otherwise

Falkaar commented 4 years ago

I have the same issue on my somewhat older 4670k. BetterJoyForCemu reaches around 30-40% of CPU usage after anywhere from 10 to 45 minutes of playing, and subsequently my controls stop working until I replug it and restart BetterJoyForCemu. Using Switch Pro Controller via USB, Cemu 1.15.20d, and the latest nightly build. Would love to see a fix because the app is great when it does work.

StealthEXE commented 4 years ago

I'm having a similar issue on i5-6600k. Using Switch Pro Controller with USB. Never any problem with just 1 player, but when I try to connect a second Switch Pro Controller via USB, BetterJoyForCemu sometimes has difficulty discovering the second controller and playing Mario Kart 8 on Cemu splitscreen brings BetterJoyForCemu to 70-80% of CPU in 5 minutes and makes the game lag. Interestingly the issue has never happened with one player in MK8 or BoTW. Wondering if it's because I'm connecting a second controller?

EDIT: I was originally using the USB ports on the front of my PC. I switched it to the USB port directly connecting to the motherboard and it seems the issue has stopped (only did one race on MK8 so not completely sure). Maybe it's an issue with certain USB ports?

stinklord commented 4 years ago

I’m also having this problem with the latest nightly on windows 10. CPU is a I7 9700K. I have little knowledge of coding but would love to help in any way possible!

pyserf commented 4 years ago

Hi, I was experiencing this issue as well, 70%+ cpu usage from BetterJoyForCemu within minutes when using a Switch pro controller over USB. 64 bit nightly build

After a lot of testing, I realized that this does not happen when connected via Bluetooth. I've been playing for an hour and have not encountered CPU issues.

The switch pro controller's native USB input does some weird things so that's probably related. Hope this helps :)

Davidobot commented 4 years ago

So some investigation into the USB high-cpu usage... (also relevant: https://github.com/Davidobot/BetterJoyForCemu/issues/225)

I tried replicating the issue but to no avail 🤔 Are there other USB devices connected? Perhaps a Dolphin mayflash bar or something? I tested with HidGuardian disabled and Passive Scanning on.

It will be helpful to know if the issue goes away if you turn off the Passive Scanning option.

stinklord commented 4 years ago

As for USB devices I have my mouse, keyboard, and USB headphones. Also, I have had the program open for about 30 minutes with Passive Scanning turned off and the issue is NOT occurring! I'll keep it open and see if it jumps up at all.

Artkrai commented 4 years ago

I had the same problem, using Pro Controller + USB increases CPU Usage to 50% or more. But turning off Passive Scanning seems to be a workaround, it's not happening anymore!

smack0007 commented 4 years ago

I can also confirm turning off Passive Scanning seems to have fixed the problem for me.

ShrinkWrapper commented 4 years ago

Same as above, disable passive scanning makes the problem go away.

Davidobot commented 4 years ago

Fixed in https://github.com/Davidobot/BetterJoyForCemu/commit/45baa6360f2a14db0ce79b193b6b6cd7494bc3dd