#CPU High Usage

83 messages · Page 1 of 1 (latest)

brittle tangle
#

It can reach to 10-15% for R5 9600x, and it looks like not the limit for DSX since my CPU was running at 100%.
It goes normal just after unplugging the controller then reconnecting it. Any fix?

gloomy ice
#

Can you send log files and your profiles?
Also you use DSEdge with OC?

brittle tangle
#

Yeah I use DSEdge, and sorry what is OC? I will upload log files and profiles together when I counter this issue next time. Thanks!

gloomy ice
#

Overclock

brittle tangle
#

Umm probablay not. Never heard I can OC a controller before. I primarily use cable to connect the controller to my PC.

#

The polling rate is 999Hz for sure, according to device info

#

I just found out I have 3 1GB size log files, maybe it correlate with the issue. I can't open them since they are too large. However I found a 230MB log file. The content is repeated for one thing. Here's the scrshot

#

Do I need to open another thread for this?

#

Sorry I didn't reveal full text for previous pic

gloomy ice
#

Weird. I think you cal leave it here
Without creating another thread

#

Just send this log files via Discord if you had nitro or with Google drive

#

and send public link

brittle tangle
brittle tangle
#

Hi I got high CPU usage situation again. I am not playing game, just back my room and found this

gloomy ice
#
2025-01-22 16:56:55 [ERR] [ControllerCommunication] Failed to read Feature Reports while device is still connected.
System.IO.IOException: GetFeature failed.
 ---> System.ComponentModel.Win32Exception (0x80004005): The operation completed successfully.
   --- End of inner exception stack trace ---
   at HidSharp.Platform.Windows.WinHidStream.GetFeature(Byte[] buffer, Int32 offset, Int32 count)
   at DSX.Core.DeviceManagement.DeviceManager.<>c__DisplayClass84_0.<StartReadControllerInput>b__4()
2025-01-22 16:56:55 [ERR] [ControllerCommunication] Failed to write Output Reports while device is still connected.
System.IO.IOException: Operation failed early: A device which does not exist was specified.
 ---> System.ComponentModel.Win32Exception (433): A device which does not exist was specified.
   --- End of inner exception stack trace ---
   at HidSharp.Platform.Windows.NativeMethods.OverlappedOperation(IntPtr ioHandle, IntPtr eventHandle, Int32 eventTimeout, IntPtr closeEventHandle, Boolean overlapResult, NativeOverlapped* overlapped, UInt32& bytesTransferred)
   at HidSharp.Platform.Windows.WinHidStream.Write(Byte[] buffer, Int32 offset, Int32 count)
   at System.IO.Stream.Write(ReadOnlySpan`1 buffer)
   at DSX.Core.DeviceManagement.DeviceManager.<>c__DisplayClass87_0.<StartWriteControllerOutput>b__0()

@granite owl @stark wedge
Do you have any ideas?

brittle tangle
#

Get this crazy usage again

#

this time the log looks a bit different

#

I'm not playing games, and my controller connected through Bluetooth before then it's in idle.

celest fern
#

Haha, holy shit

#

Yeah something is hung in an infinite loop, trying things again and again with no grace periods or backoff times

#

No wonder the CPU doesn't like that

celest fern
stark wedge
#

@brittle tangle I need to know your controller details

#

Getting feature reports for Motion calibration has been annoying

#

@brittle tangle In controllers page under home page, show me the device information plz

#

Need to compare our edges to see the difference

#

fokin 360mb log file

#

jeez

#

@celest fern maybe we need a limit on these logs

#

or have custom sink to not print out identical exceptions over and over

celest fern
#

I'm sure we're not the first to encounter this, there has to be something we can reuse

stark wedge
#

i mean, HidSharp is only calling the native method, idk how this is even fixable

celest fern
#

This function reports error details by calling GetLastError afterwards on failure

#

We need that info to figure it out

stark wedge
#

let me re-look at the log

celest fern
#

This is the perfect use case for Polly btw

stark wedge
#

fokin windows

celest fern
#

We already use it for the Web retry stuff

celest fern
stark wedge
celest fern
#

Any other code in between can overwrite it

stark wedge
#

oh, did not know that

#

i show you method in DM

stark wedge
#

The only difference i can see, is the hardware variation, you have a higher number, meaning you could have in hand revision 2, which could potentially have different firmware behavior

#

Have you tried to remove the device from windows fully, and doing the pairing again?

brittle tangle
#

I see. But I haven't tried to remove controller after I set up my PC

#

I can try it

stark wedge
#

go to BT settings, and remove device

#

then pair it again

#

close DSX while doing this

brittle tangle
#

I just paired the controller as you said

stark wedge
#

Run DSX -> go to logs page, and see if there are errors everywhere

brittle tangle
#

No error messages found

#

Only green and grey

stark wedge
#

how about the high CPU usage?

brittle tangle
#

Now it's normal. It seems happened randomly

stark wedge
#

interesting, so before, everytime you open DSX, you would have high CPU usage right?

brittle tangle
#

nah, just sometimes

stark wedge
#

I see, currently we’ve updated our code where it would give us the actual error message from windows, so when you get the new beta version, it will help if you still have this issue

#

Let me know if you encounter it again soon, I could send you a private build to get the error information quicker

brittle tangle
#

sometimes if I left my controller to turn off, then I back to my PC I found this

brittle tangle
#

Looks like it happened three times while I was playing Helldivers 2 and three times when I was away

brittle tangle
#

It happened again

#

If I launch DSX, then I get loop every time

#

It can happen even I didn't connect my controller

granite owl
#

rlly weird
it's happens only in bt connection or wired too?

brittle tangle
stark wedge
#

Seems like it’s going in circles finding a device, then discarding it and it opens over and over which consumes resources by the system

celest fern
#

Check that code path and make sure you're not doing the famous

catch { /* fucking nothing */ }
brittle tangle