Errors when resuming from sleep
I'm getting errors on resume from suspend with the CorsairLink plugin pulling pump speed and liquid temperature from my AIO. The AIO is the iCUE Link H150i and all the USB devices between the AIO and the PCI Express bus have the ability to go to sleep to save power disabled in Device Manager.
I'm running v194 of Fan Control and 1.6.0 of the CorsairLink plugin.
I've attached logs below, but the error is :
2024-06-27T06:00:18.5472265Z [WRN] Device Initialization: An error occurred initializing device 'iCUE LINK System Hub (900395E8868AC453ABFC355596C0B961)' (\?\hid#vid_1b1c&pid_0c3f&mi_00#a&11cbf70e&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}): 2024-06-27T06:00:18.5472265Z [ERR] Device Initialization: Type: CorsairLink.CorsairLinkDeviceException Message: Operation canceled: The expected data type was not read within the specified time. Source: FanControl.CorsairLink HResult: -2146233088 Stack Trace: at CorsairLink.Devices.ICueLink.ICueLinkHubDevice.SendCommand(ReadOnlySpan
1 command, ReadOnlySpan1 data, ReadOnlySpan1 waitForDataType) at CorsairLink.Devices.ICueLink.ICueLinkHubDevice.ReadFromEndpoint(ReadOnlySpan1 endpoint, ReadOnlySpan`1 dataType) at CorsairLink.Devices.ICueLink.ICueLinkHubDevice.RefreshImpl(Boolean initialize) at CorsairLink.Devices.ICueLink.ICueLinkHubDevice.Connect() at FanControl.CorsairLink.CorsairLinkPlugin.FanControl.Plugins.IPlugin.Initialize() Data: command: 0801 data: waitForDataType: 2100
If I refresh sensor detection, Fan Control recovers and works fine, but I often have to reattach the sources that are on the AIO to the appropriate cards on Fan Control. Logs are attached below.
Hi @notthatwillsmith, I was able to reproduce this and I'm currently working on a fix.
@Rem0o Do you think Fan Control should close plugins on Suspend (and reload them on Resume) in lieu of plugins needing to handle SystemEvents.PowerModeChanged on their own?
It does already actually, but you can't "stop" the suspend process to allow code to run until completion, it will do the best it can before the suspend comes into effet, and whatever was not done will be executed on resume. Fun fact, handling sleep in FanControl is the single hardest and most complicated thing in the software to handle.
The most reliable way to deal with this has been to do everything on resume (full refresh, so close + init).
Fun fact, handling sleep in FanControl is the single hardest and most complicated thing in the software to handle.
Haha - I don't doubt that. Thanks!
The plugin's behavior has been improved when sleeping/resuming as of v1.7.0-beta.5. However, some devices will still need their USB connections cycled to recover properly as that is not yet handled by the plugin. A workaround is provided in #205.
@notthatwillsmith Can you try v1.7.3 and let me know if you are still experiencing the issue? Thanks!