Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation: Recommended actions after resume from sleep/hibernation? #5

Open
xoblite opened this issue Mar 5, 2020 · 3 comments
Labels
question Further information is requested

Comments

@xoblite
Copy link

xoblite commented Mar 5, 2020

Hi Corsair & Co,

I am working on an SDK client application for Windows 10, using the default shared access mode (i.e. no CorsairRequestControl / CorsairReleaseControl needed), which will typically be running for longer periods of time.

As this topic is not currently [or at least not explicitly] covered by the documentation, do you happen to have any recommendations with regards to what actions to perform when the system is e.g. resuming from sleep/hibernation? Should I perform a new CorsairPerformProtocolHandshake then for example? Anything else one should be aware of?

Thanks for making the SDK available; keep up the good work!

BR//KHH (@xoblite)

@xoblite
Copy link
Author

xoblite commented Mar 6, 2020

Update:

I have now tried a few different approaches, including initiating a new handshake/update upon WM_POWERBROADCAST / PBT_APMRESUMEAUTOMATIC (i.e. resume from low power notification) as well as WM_WTSSESSION_CHANGE / WTS_SESSION_UNLOCK (i.e. screen unlock notification).

However, the only semi-working one I've found so far is by also setting a two second delay timer (read: enough delay on my pretty fast computer at least) upon WM_WTSSESSION_CHANGE / WTS_SESSION_UNLOCK, after which I attempt a new handshake with the CUE SDK, and if successful updating the device LEDs etc via regular means, i.e. pretty much like a regular application startup. Any thoughts?

I'm using the latest CUE SDK v3.0.301 (CUESDK_2013.dll) + the latest iCUE version 3.26.95.

BR//KHH (@xoblite)

@RobertBeekman
Copy link

Hello,

I'd recommend releasing the library handle on hibernate with FreeLibrary and reinstantiating with LoadLibrary on wake.

That way you shouldn't run into any race conditions

@xoblite
Copy link
Author

xoblite commented Mar 6, 2020

Hi @SpoinkyNL ,

unfortunately this is not an option for this particular application, but thanks for the suggestion.

BR//KHH (@xoblite)

@kadimgh kadimgh added the question Further information is requested label Mar 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants