antonpup / Aurora

Unified lighting effects across multiple brands and various games.
http://www.project-aurora.com/
MIT License
1.83k stars 365 forks source link

Ducky Response Lag When Not Debugging #2086

Closed umbreon222 closed 3 years ago

umbreon222 commented 4 years ago

Expected Behaviour

~30ms device response time

Actual Behaviour

~154ms device response time

Reproduction steps

When debugging Aurora, I get around a 30ms device response time and no visual lag. When I run Aurora without debugging, I get around a 144ms device response time with a lot of visual lag. This only affects the keyboard, both my mouse (Logitech G703) and the bitmap preview have no visual lag.

Screenshot (1) Screenshot (3)

Frequency

This happens every time I launch Aurora.

Aurora Version:

I'm using the current code base (Beta v0.8.0).

Previously an Issue?

This issue is prevalent in all past versions since the Ducky keyboard support has been added.

thedmd commented 4 years ago

Still here in v0.8.1

Rukario commented 4 years ago

Hope to see it fixed soon, just got Ducky One2 TKL board today and I can see the animation lags too much compared to Logitech G910.

craftycorvid commented 3 years ago

Still seeing this issue on my Ducky One2 on the latest bleeding edge build.

tibernero commented 3 years ago

Just chiming in to say that I'm having response lag issues as well, pretty much identical to Umbreon's issue.

Running v0.8.1 on the Ducky Shine 7.

umbreon222 commented 3 years ago

I'm currently playing around with this issue and I think I have a fix. I'm not certain why the code which is causing this was added so I want to take some time to test out my fix over the course of a week or so. I just want to be certain I didn't break anything or cause instability. If you're curious or want to test out my fix I made a branch called "umbreon222:bugfix/ducky_response_lag_2".

Edit: I based my first branch off master instead of dev so I updated my comment with the new branch name

tibernero commented 3 years ago

Thanks so much for letting me know! I would love to give it a try.

Are there instructions I can find on how to install the branch?

umbreon222 commented 3 years ago

Thanks so much for letting me know! I would love to give it a try.

Are there instructions I can find on how to install the branch?

Unfortunately, you'd have to build the branch and run it manually using visual studio.

tibernero commented 3 years ago

Thanks so much for letting me know! I would love to give it a try. Are there instructions I can find on how to install the branch?

Unfortunately, you'd have to build the branch and run it manually using visual studio.

Tried building it in VS but it seems there is a solution missing that doesn't allow me to build the project, called "SBAuroraReactive.vcxproj"

I think I'll just wait for you guys to hopefully integrate this into the application itself. But I'm looking forward to it!

umbreon222 commented 3 years ago

Thanks so much for letting me know! I would love to give it a try. Are there instructions I can find on how to install the branch?

Unfortunately, you'd have to build the branch and run it manually using visual studio.

Tried building it in VS but it seems there is a solution missing that doesn't allow me to build the project, called "SBAuroraReactive.vcxproj"

I think I'll just wait for you guys to hopefully integrate this into the application itself. But I'm looking forward to it!

Oh, you probably forgot to pull the submodules. Running git submodule update --init --recursive would solve your issue.

As an update, I had aurora running with my changes all night and so far so good. I'll probably create the PR either today or tomorrow.

tibernero commented 3 years ago

Thanks so much for letting me know! I would love to give it a try. Are there instructions I can find on how to install the branch?

Unfortunately, you'd have to build the branch and run it manually using visual studio.

Tried building it in VS but it seems there is a solution missing that doesn't allow me to build the project, called "SBAuroraReactive.vcxproj" I think I'll just wait for you guys to hopefully integrate this into the application itself. But I'm looking forward to it!

Oh, you probably forgot to pull the submodules. Running git submodule update --init --recursive would solve your issue.

As an update, I had aurora running with my changes all night and so far so good. I'll probably create the PR either today or tomorrow.

Ended up taking the branch and integrating it and now it looks like the Ducky is working great on the "Fine" setting.

Awesome work, thank you so much!

umbreon222 commented 3 years ago

Bad news, my branch causes my ducky shine 7 to hang after a random amount of time. I've tried everything I can think of to try and remedy this but I'm starting to think that the current support for ducky devices might need to be rewritten. I'll leave my branch available as a starting point for anyone who stumbles into this thread. I can't guarantee that I'll tackle this issue myself anymore since this has unfortunately become a bigger task. Sorry if I got any of your hopes up!

craftycorvid commented 3 years ago

A workaround for this issue is to use the OpenRGB integration instead of the built-in Ducky support

tibernero commented 3 years ago

A workaround for this issue is to use the OpenRGB integration instead of the built-in Ducky support

So I actually started using openrgb with it but unfortunately it stills hangs after a certain period of time, requiring to restart aurora to fix it. It also is unable to detect the LEDs for the Calculator, Volume up, and Volume down keys.

craftycorvid commented 3 years ago

I just submitted a PR to fix the Calc and Volume key issues. Haven't had it hang yet, but we'll see.

Rukario commented 3 years ago

Sorry, how can I build Aurora with this patch? I'm on Windows 10, I'll tell you if my TKL board makes a difference

tibernero commented 3 years ago

I just submitted a PR to fix the Calc and Volume key issues. Haven't had it hang yet, but we'll see.

Thank you!

craftycorvid commented 3 years ago

Just had it hang for the first time. It seems like OpenRGB can't talk to the keyboard anymore. I had to unplug and replug the keyboard to get the RGB to start working again. Seems like the issue might be on Ducky's side unfortunately.

tibernero commented 3 years ago

Just had it hang for the first time. It seems like OpenRGB can't talk to the keyboard anymore. I had to unplug and replug the keyboard to get the RGB to start working again. Seems like the issue might be on Ducky's side unfortunately.

Thanks so much for looking into it, though! I installed the openrgb fix branch you put out so at least all the LEDs are detected now. Ducky would really gain my respect if they updated their software to be more third party friendly. It is what it is!

Lexevolution commented 3 years ago

I've tested my fix for this, so I hope it works for all of you :). Here it is. And the pull request is above this comment.

tibernero commented 3 years ago

I've tested my fix for this, so I hope it works for all of you :). Here it is. And the pull request is above this comment.

Just installed it now, and so far no problems. Thank you so much! :D

umbreon222 commented 3 years ago

Thanks for looking into this - I'll also join in on testing your branch. I'm going to leave it running all day to see if the device hangs and will report back end of the day. Fingers crossed 🤞

Update: Welp looks good to me! It's been a solid 10 hours and my keyboard hasn't hung at all. Nice!

craftycorvid commented 3 years ago

This is it! I've been running it since yesterday and it hasn't frozen a single time.

Rukario commented 3 years ago

I haven't encountered a single problem with TKL board either which is good news right? Logitech G910 seem to have problem reinitializing custom lighting after PC wakes up but maybe that's unrelated to this patch.

Rukario commented 3 years ago

Something I've failed to notice... CPU usage is little too high to my liking, Ducky is on 15%, meanwhile Logitech G910 alone can be as low as 1%.

ckosmic commented 3 years ago

I know this issue has basically been resolved with Rexevolution's patch, but I'd like to add this bit of information in case someone's wondering what may be causing it: for me the issue didn't start until I started using a Razer mouse. I don't know if it's something with Razer products/Synapse specifically, but that seemed to be the cause of it for me. After building Rexevolution's branch, everything was back to normal.

Shangsou commented 3 years ago

I've tested my fix for this, so I hope it works for all of you :). Here it is. And the pull request is above this comment.

Just installed it now, and so far no problems. Thank you so much! :D

I have the same issue with the lag/response time as mentioned above - but it looks like the build/fix you mentioned doesnt exist anymore

Does anyone have a link to the version that works? (Ducky shine 7)

Lexevolution commented 3 years ago

I have the same issue with the lag/response time as mentioned above - but it looks like the build/fix you mentioned doesnt exist anymore

Does anyone have a link to the version that works? (Ducky shine 7)

This is the continuous integration builds that are automatically compiled/generated when a new pull request/fix is uploaded.

This includes my fix :)

To download it, just click on the link and then click on the artifacts button. The .exe is the installer and the .zip is the portable version.

https://ci.appveyor.com/project/antonpup/aurora

Read new comments below.

Lexevolution commented 3 years ago

Also if there's no artifacts anymore on the latest ci build (meaning no one has done anything with the code of aurora for over a month), message me on discord (you can find me as a developer on the aurora discord as Lexevo#0876) and I'll happily build the newest version and send it to you :)

thedmd commented 3 years ago

I tested latest build Aurora-v0.8.1+902-buhwdnlc.zip and lag is still there. image

Is the fix on some different branch?

Lexevolution commented 3 years ago

Ah yeah I realise that because my pull request with my fix in it hasn't been merged in to the dev branch, none of the later builds will actually have my fix in it. If you want, my fix is still available here if you want to build it yourself here: https://github.com/Lexevolution/Aurora/tree/fix/ducky-lag

Or my previous comment about me sending anyone the built version is still viable.

thedmd commented 3 years ago

Build from this branch indeed works. Thanks!