BradyBrenot / huestacean

Philips Hue control app for desktop with screen syncing. C++ with Qt Quick GUI.
http://huestacean.com
Apache License 2.0
564 stars 54 forks source link

Not compatible with AMD FreeSync #130

Closed Lucan11 closed 5 years ago

Lucan11 commented 5 years ago

When FreeSync is active and the FPS is in the FreeSync range; my screen starts so flicker a lot. This also happens with the normal Hue Sync app.

The issue disappears as soon as the FPS is above the FreeSync range, when FreeSync is disabled or Hue Sync is disabled. Both on full-screen and windowed.

GPU: vega 64 Screen: Samsung CF791 (3440 x 1440) Freesync range of 48-100 Hz Tested games: Borderlands GOTY, Assassins Creed: Odyssey

Unfortunately the issue is not visable on video, so I can't post an example.

BradyBrenot commented 5 years ago

This doesn't reproduce with G-SYNC, and I don't have access to Freesync hardware. Hopefully someone can come up with an idea though...

Lucan11 commented 5 years ago

It appears to be an issue on my end; the displayport cable is not certified. I can't reproduce the issue if I drop the refresh rate in windows from 100 to 60 Hz (and lock the fps to 60).

I've ordered an actual certified DP cable and I'll update once I've tested that one.

However, I find it odd that the screen capture in combination with FreeSync triggers the issue. Because these features work perfectly fine on their own.

@BradyBrenot Do you have any experience with bad DP cables and whether this application is affected by them?

BradyBrenot commented 5 years ago

I've seen flickering with DP on non-free/gsync monitors, we've got a few monitors in the office that do that with the cables that came with them.

That shouldn't have anything to do with Huestacean or Hue Sync though. Best guess is that AMD's drivers don't like the constant polling with the desktop duplication API, or the constant texture downloads, and the refresh rate isn't holding steady enough for freesync to work. From what I understand, freesync is sort of delicate, and a lot of freesync monitors only behave well within very strict limits.

One thing I'd be interested in is how the two apps compare to something else that captures the screen, like OBS. Do you still have flickering with OBS when you use

  1. Display capture
  2. Window capture
  3. Game capture

(they all use somewhat different mechanism for capture from what I understand)

If there is a difference, I might be able to add in alternative capture methods, e.g. using https://github.com/spazzarama/Direct3DHook which is similar to OBS's "Game capture"

Lucan11 commented 5 years ago

I just installed OBS and the screen also flickers when I record. However, the intensity is different with each mode:

Game Capture: Minimal flickering (peeks at the start) Display Capture: More flickering than with the Hue application Window Capture: No flickering (However it only works in windowed mode)

Oddly enough, I can see no flickers at all running the game in windowed mode, even with the Hue application and OBS recording.

Thanks for helping me troubleshoot this issue, even though your application is not the cause! I will see if a proper DP cable solves all the issues.

BradyBrenot commented 5 years ago

"Display capture" is, if I recall correctly, the same as what Huestacean and Hue Sync (probably) do. Window Capture is I don't know what but I think the performance isn't great (maybe GDI screen capture? screen_capture_lite, which Huestacean uses, can do that). Game Capture uses a hook like that library I linked.

Lucan11 commented 5 years ago

Hi Brady,

I just received a new, certified, DP cable in the mail. Unfortunately, this did not solve the issue.

Obliviously the issue is not with the application, so I'll close this issue. But do you have any idea where to look for next? I'm probably going to try an older driver.