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

Win8 Duplication as Capture source turns off on idle #10

Closed
jwiemann opened this issue Jul 30, 2015 · 12 comments
Closed

Win8 Duplication as Capture source turns off on idle #10

jwiemann opened this issue Jul 30, 2015 · 12 comments

Comments

@jwiemann
Copy link

When I use Win8 Duplication the Adalight Ambilight turns off after a second when I dont move the cursor.

Using:
Arduino + Adalight (std. from Git)
Windows 10
Default Prismatik configuration

By the way: great work on the Win8 method, its impressively performant on the CPU! Would be great if you could fix this bug. I read in forums, that this is a known bug even in the woodenshark Lightpack. Normally a restart of the App worked.

@psieg
Copy link
Owner

psieg commented Jul 30, 2015

Hm, I don't have that behavior it with my Lightpack hardware (windows 10 pending).

  • Does it come back on if you move the cursor again?
  • Are there any warnings/errors in the log files? (C:\Users\you\Prismatik\Logs)
  • What does the FPS number in the prismatik window say?
  • What exactly did you read in forums?
  • Do you have the "send data only if colors changes" option enabled?

I'll see if it's because of Windows 10 once my upgrade is through, I'll let you know.

@jwiemann
Copy link
Author

Yes, it comes back the moment I move my mouse or something moves on screen. It seems as if the Duplication Algo does not provide any changes to you and that for you don't send anything to the Adalight. Perhaps the sending Thread is fired only on the Windows Desktop change event?

  • The FPS shows a changing (realistic) number while I move the cursor, as soon as I stop the lights go out and the FPS counter stops (still has the last number).
  • The option "send data only if colors changes" is disabled.
  • The forum did not reveal any solution, the problem just "disappeared" (http://forums.adafruit.com/viewtopic.php?f=47&p=197404)
  • The Log didn't reveal anything to me: http://pastebin.com/PSE5fZqD

@psieg
Copy link
Owner

psieg commented Jul 30, 2015

Looks like this isn't going to be too easy. After upgrading everything works fine for me.

  • What exact version of windows are you using?
  • Did you have the problem with your previous windows version?
  • Does it occur if you switch to WinAPI?
  • (As I don't know what the defaults are) What grab delay is configured in your profile?
  • (Probably unrelated, but) do you run Prismatik with Admin rights (for DX grabbing)?
  • If it comes back the moment something moves on screen: Isn't the change in FPS label a change of screen that should trigger an update?
  • If you put all grab widgets in the top left corner and move your mouse in the bottom right corner, does it happen? (aka. is it because colors are grabbed but they don't change?)

Unfortunately I have no deeper understanding of the device-side of Prismatik, aka. when which data is sent to which device. I'll try some things.
Would you install and test some special builds (I could think of a version that beeps when a screen update comes in)?

@psieg
Copy link
Owner

psieg commented Jul 31, 2015

Here's good news: I was able to reproduce the issue (except my lightpacks don't go off). I don't know how to get into that state but it is possible to get down to ~2 FPS for a few seconds before Desktop Duplication actually stops. It does not happen with WinAPI

@jwiemann
Copy link
Author

Great, the FPS do get really low, ignoring the Grab interval.
I did not test Win8 Duplication before I head windows 10..
It doesn't matter where the color grabbers are, even if I move the mouse on the bottom right corner it stays on.

@psieg
Copy link
Owner

psieg commented Jul 31, 2015

@jwiemann you wouldn't happen to know the required frequency of updates before the Adalight turns off? I found this but 15 seconds seems a lot to me

@psieg psieg mentioned this issue Jul 31, 2015
@psieg
Copy link
Owner

psieg commented Jul 31, 2015

@jwiemann can you try this version on your system: https://psieg.de/jenkins/job/Prismatik_Windows/58/
I set the frequency to every two seconds, let's see if thats enough

@jwiemann
Copy link
Author

Not bad, the backlight turns on every two seconds (and off in between). The FPS counter stays at 0.00. Can't you bind the frequency to the grab interval?

@psieg
Copy link
Owner

psieg commented Jul 31, 2015

The Desktop Duplication mechanism is rather smart: If your screen is not updated, it does not re-grab and recalculate the colors. This is why the FPS is lower than you expect and changes dynamically. I'd rather keep the updated frequency as low as possible to keep the CPU usage etc. low.

To optimize that, I need to know after how long the Adalight will switch off if no updates are received. Two seconds is too low, OK - but does it have to be 50 ms? Can you tell - roughly - how long the Adalight stays on in between the two second breaks?

@jwiemann
Copy link
Author

I changed the grab frequency to 1000 (max) -> 1.00 FPS, and there was no flickering (only occasionally when the FPS got under 1). I cant time the period any more precise.. I guess the min is 1FPS.

@psieg
Copy link
Owner

psieg commented Aug 1, 2015

If this one works for you, the limit is 1FPS. Try closing the Prismaitk window too, because the FPS updates are screen updates which trigger a grab

@jwiemann
Copy link
Author

jwiemann commented Aug 1, 2015

It works very good, I closed as much Processes as I could --> still stable.
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants