EvanMulawski/FanControl.CorsairLink

Commander CORE XT fails to refresh

Closed this issue · 18 comments

I'm getting this popup error message every minute and very bloated logs that repeat the same error message.

  • Corsair iCUE Commander Core XT
  • Fan Control v181
  • Corsairlink v1.6.0-beta.1 (same with v1.6.0-beta.2)
  • I don't use any Corsair software.
  • FanControl.CorsairLink.dll is unblocked
  • Windows 11

corsairlink

log_1.txt

2024. 03. 07. 22:41:05: System.IO.IOException: Unable to flush logs - timeout expired.
   at FanControl.CorsairLink.CorsairLinkPluginLogger.FileLogger.Flush()
   at FanControl.CorsairLink.CorsairLinkPlugin.CloseImpl()
   at System.Collections.Generic.List`1.ForEach(Action`1 action)
   at FanControl.Domain.ComputerAccessLayer.Close()

CorsairLink.27.log

2024-03-09T18:28:35.1091683Z [ERR] CORSAIR iCUE COMMANDER CORE XT (b10410203a4abbaa4d4264167091005f): An error occurred refreshing device 'CORSAIR iCUE COMMANDER CORE XT (b10410203a4abbaa4d4264167091005f)' (\\?\hid#vid_1b1c&pid_0c2a&mi_00#7&124a1d65&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030})

Type: System.IO.IOException
Message: Operation failed early: The device is not connected
Source: HidSharp
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.Read(Byte[] buffer, Int32 offset, Int32 count)
   at HidSharp.HidStream.Read()
   at CorsairLink.Hid.HidSharpDeviceProxy.ClearEnqueuedReports()
   at CorsairLink.Hid.HidSharpDeviceProxy.Write(Byte[] buffer)
   at CorsairLink.Devices.CommanderCoreDevice.SendCommand(ReadOnlySpan`1 command, ReadOnlySpan`1 data, ReadOnlySpan`1 waitForDataType)
   at CorsairLink.Devices.CommanderCoreDevice.ReadFromEndpoint(ReadOnlySpan`1 endpoint, ReadOnlySpan`1 dataType)
   at CorsairLink.Devices.CommanderCoreDevice.RefreshImpl(Boolean initialize)
   at FanControl.CorsairLink.CorsairLinkPlugin.<>c__DisplayClass41_0.<RefreshAsync>b__0()
Inner Exception:
    Type: System.ComponentModel.Win32Exception
    Message: The device is not connected
    Source: 
    Stack Trace:

Hi @defaultsecurity, did anything precede this, e.g. resuming from sleep, or does it occur when Fan Control starts?

Hi @EvanMulawski
Nothing precedes it. I have sleep disabled. I did a test: I closed fan control, deleted the logs and started it up again, the popup appeared within 5 minutes. Here is the complete log of that time. The log grows eventually up to 120 megabytes in size in 24 hours.
CorsairLink.log

Also been getting this popping up on Windows 10. No iCue, unblocked dll(s), installed driver per readme for PSU.
log.txt
CorsairLink.log

@defaultsecurity Any RGB software running at the same time?

@firereverie Please try the latest v1.6 beta release - that should resolve the issue with your Platinum-series AIO.

@firereverie Please try the latest v1.6 beta release - that should resolve the issue with your Platinum-series AIO.

Installed 3.21.24
Initial installation 1.62 Beta
Failure: Plugin fails to init and loads 0 devices

  • Troubleshooting:
    • Check for DLL blocking
      NA
    • Install 1.61 Beta
      NC
    • Disable Libre PSU
      NC (Wasn't a note for my model but didn't seem necessary so left disabled anyways)
    • Check FanControl was a .NET install
      NC (FanControl .NET 4.8, .NET 4.8 installed)
  • Solution:
    • Reboot system (suspect that loaded DLL was in memory? and didn't like being upgraded despite FanControl being closed when changing plugin version)

Will monitor, as of writing system uptime is <10m, from previous observation FanControl/Corsair plugin would begin throwing errors at uptime ~ +2hr mark.

Note: OpenRGB Stable had been installed at the time of the original post, updating to pipeline build resulted in NC.

@EvanMulawski

I have made extensive tests, here are the results:

  • When CorsairLink stops working and gives the error popup and I can no longer control the fans and the rpm values aren't changing.
  • Restarting FanControl fixes the issue temporarily, but it will start giving the error again within a timeframe of 10 minutes to 24 hours.
  • If I start iCue right after CorsairLink stops, with iCue I can still control the fans correctly.

Other infos:

  • I'm not running any rgb software.
  • I have iCue installed, but only to test if this was a hardware failure, which it doesn't seem to be.
  • I tried to run FanControl as admin, non-admin.
  • Added exe and dll to bitdefender exceptions.
  • Tried various Corsairlink versions v1.4.0 v1.5.1 v1.6.0-beta.2

@defaultsecurity Since iCUE is installed, also ensure the "Corsair Service" Windows service is stopped and set to Manual/Disabled startup.

@defaultsecurity Also please try the attached build.

FanControl.CorsairLink-CCIssue-v20240327r001.zip

@EvanMulawski
We're good! Outstanding work! I've been testing the dll for the last two days. Multiple restarts, some gaming, I have even left the computer on for more than 24 hours. No error popups. There are a few minor error entries in the log. But the log is nothing compared to the multi hundred megabyte logs I used to have. I will attach the log for you, if you feel the need to do a follow-up check.
I'm glad you could fix the problem and hopefully made the plugin more resilient in the process.
I thank you immensely for your time, work and dedication. I salute you, mate!

CorsairLink.log

@EvanMulawski
I spoke too soon. I got the popup again just now. Log attached.

CorsairLink.log

With the old dll it was System.TimeoutException, now it is System.IO.IOException.

What do you think it is?

@defaultsecurity The new errors indicate the device was disconnected from the USB port and Windows can no longer see it. Did it resolve after refreshing or restarting Fan Control?

Yes, restarting fan control resolved it.

@defaultsecurity Has this occurred again? I'm working on a potential fix and will post a build for you to test this weekend.

@EvanMulawski
Unfortunately. The error is ongoing. Sometimes it doesn't come on for a day. Then it keeps coming on constantly. I think it has gotten better with the beta version you have posted. Honestly, I really can't put my finger on it. Could it be a hardware issue? But then why does restarting Fan Control fix it temporarily?

@EvanMulawski
Thank you! I'll report back in a couple days.

@defaultsecurity I've been testing these changes with my XT - haven't seen this issue again. This fix has been made available in v1.6.0-beta.6.