Bug 110473 - FreeSync / VRR stops working after window switching or minimizing
Summary: FreeSync / VRR stops working after window switching or minimizing
Status: RESOLVED MOVED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/AMDgpu (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: xf86-video-ati maintainers
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-19 19:30 UTC by bmilreu
Modified: 2019-11-19 07:20 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
xorg log (60.91 KB, text/plain)
2019-04-20 13:15 UTC, bmilreu
no flags Details
dmesg (63.58 KB, text/plain)
2019-04-20 13:16 UTC, bmilreu
no flags Details
VRR debugging output (2.49 KB, patch)
2019-04-30 15:10 UTC, Michel Dänzer
no flags Details | Splinter Review
Xorg log with debugging patch and notes (55.69 KB, text/plain)
2019-05-03 10:08 UTC, Peter
no flags Details
VRR debugging output (2.00 KB, patch)
2019-05-15 10:56 UTC, Michel Dänzer
no flags Details | Splinter Review
Xorg log with second debugging patch (160.67 KB, text/plain)
2019-07-08 09:20 UTC, Peter
no flags Details

Description bmilreu 2019-04-19 19:30:09 UTC
As title says, FreeSync stops working for me after I alt+tab or minimize the fullscreened game window.

I mentioned the issue in RADV VRR merge request on Mesa gitlab -https://gitlab.freedesktop.org/mesa/mesa/merge_requests/672
 - because I can only reproduce it with Vulkan games, but M. Danzer mentioned other people had it with radeonsi/OpenGL so the problem likely is in xf86-video-amdgpu.

All drivers (kernel, mesa, xf86) are latest from git.
Comment 1 Peter 2019-04-19 23:31:12 UTC
As discussed in https://gitlab.freedesktop.org/bnieuwenhuizen/mesa/commit/260d6f0e3c270ebfd7319f2f8fa67beececa68f5#note_145169 I can get Freesync back in World of Warcraft by maximizing other windows over top of WoW and minimizing them all until just WoW is left.

Bioshock Infinite is an OpenGL game which displays similar behavior - after alt-tabbing out of the game and returning, Freesync doesn't work. Bioshock minimizes itself if it loses focus, so the trick described above doesn't work. It needs to be closed and run again to get Freesync back.

Michel Dänzer suggested it might be a bug in the code keeping track of which window is flipping and whether or not Freesync should be enabled for it.
Comment 2 Michel Dänzer 2019-04-20 12:25:27 UTC
Please attach the corresponding Xorg log file and output of dmesg, captured after reproducing the problem.
Comment 3 bmilreu 2019-04-20 13:15:59 UTC
Created attachment 144049 [details]
xorg log
Comment 4 bmilreu 2019-04-20 13:16:48 UTC
Created attachment 144050 [details]
dmesg
Comment 5 Michel Dänzer 2019-04-30 15:10:39 UTC
Created attachment 144119 [details] [review]
VRR debugging output

Please build the driver with this patch attached, reproduce the problem and attach the resulting Xorg log file.

If you can capture the log file locally after each step and then add markers for each step in the attachment, that would be extra helpful.
Comment 6 Peter 2019-05-03 10:08:36 UTC
Created attachment 144141 [details]
Xorg log with debugging patch and notes

My Xorg log with the debugging patch and notes about what I was doing.
Comment 7 Michel Dänzer 2019-05-15 10:56:55 UTC
Created attachment 144280 [details] [review]
VRR debugging output

Thanks, but I had trouble making sense of it. Can you try again with this patch instead?

BTW, it looks like VRR is unintentionally enabled during normal desktop operation for you, possibly because the variant of kwin you're using isn't blacklisted in Mesa. This might contribute to the problem.
Comment 8 Peter 2019-05-21 13:05:19 UTC
I can't reproduce the problem any more.

I updated to Plasma 5.15.5 from 5.15.0 and now Freesync is properly working whenever I switch back to a game.

I had the issue with Freesync not re-activating properly ever since Freesync started working on Linux, and now it's just disappeared.

Perhaps it was a KDE bug after all?

I am still seeing Freesync active on the desktop, but it doesn't seem to be causing problems now.
Comment 9 Michel Dänzer 2019-06-06 16:59:32 UTC
(In reply to Peter from comment #8)
> Perhaps it was a KDE bug after all?

Probably just luck that newer KDE doesn't trigger it anymore. Even a broken compositor / window manager shouldn't be able to cause these symptoms.

> I am still seeing Freesync active on the desktop, but it doesn't seem to be
> causing problems now.

Your compositor should definitely get blacklisted in Mesa though.
Comment 10 Peter 2019-07-08 09:19:35 UTC
I think I am still seeing the same bug, it's just that I'm only hitting it once every few weeks which makes it hard to produce useful information. I see WoW stuttering and Freesync not working, and then I have to try and remember what I was just doing.

Today I switched back to WoW and saw Freesync not working.

I switched out and back, still no Freesync.

I alt-tabbed out and checked my Xorg log file. This was at 110209.766.

When I switched back to WoW again, I had Freesync.

The relevant section seems to be from 109971 to 110309 in my log file. Alt-tabbing produces those "Deleting VRR property for window 0x2f44c50" lines, but clicking a window on the taskbar doesn't.

I think I alt-tabbed away from WoW at 109971.346, and then alt-tabbed three times and clicked WoW once. Between 110209 and 110309 I looked at my log file and made a note of what I'd just been doing, then clicked WoW on the taskbar and had Freesync back at 110309.
Comment 11 Peter 2019-07-08 09:20:40 UTC
Created attachment 144718 [details]
Xorg log with second debugging patch
Comment 12 Martin Peres 2019-11-19 07:20:16 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/driver/xf86-video-amdgpu/issues/3.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.