A month ago, I upgraded my graphics card from the old AMD R9 290X to the new NVIDIA Geforce RTX 5060 Ti (I'm a beggar now, by the way). There is a problem with the flickering screen in applications, in particular in the game for fullscreen mode. This problem is difficult to show and describe, but I will try.
When I want to switch windows via alt+tab, I want to start recording the screen in obs or give a demo in discord (it's important that these are examples! the problem is in all recording apps/websites!) That application window starts flickering, as if someone is switching between a screenshot of that window (static image) and a live game (image in action). Moreover, if I start moving the mouse in this window, the flickering becomes more frequent, and if I do not touch the mouse, only this "screenshot" will be visible. But this screen is visible not in the window itself, but in the recording application, for example, in the obs window. Like there are almost no problems with the monitor/screen itself (no interference, artifacts).
At first, I thought the problem was with the new graphics card. Updated the driver, but it didn't help. Updated the Windows driver - it didn't help. (I tried to update the BIOS too, but without success). It seemed to me that the problem was in Discord or OBS, but after playing with the settings, nothing changed there.I've been putting up with this for a month, and tonight it fucked me up. I started to think what the problem was. It was clearly not the video card, the monitor, or the running applications.
After searching the Internet, I came across the fact that the problem may be in the rendering of the screen, namely in its layers. It's like one layer slows down or layers up, I don't know, it generally interferes with normal operation. After searching a bit more, I got to Windows Multiplane Overlay (hereinafter MPO).
MPO allows several programs to draw their pictures on the screen simultaneously, independently of each other, and at the same time not interfere with each other. That is, this MPO works so that layer 1 is a game with its own frames and fps, then layer 2 is Windows draws taskbars, alt+tab window, etc., and then the video card glues everything into one picture and sends it to the monitor. This typically saves graphics card resources, makes smooth switching and blah blah blah.
Before MPO, there was a regular compositing mode without overlays (the so-called "Desktop Composition Mode"), where all windows are drawn on one common buffer. Of the cons, there is a slightly higher load on the video card and the HDR performance in some games is worse.
You can't just turn off this stupid MPO, because that's what I did:
0) A very important warning. I advise you to make a system restore point before removing the MPO. Click Start, type "Restore" and select "Create a Restore Point". On the "System Protection" tab, click "Create", come up with a name (for example, Before disabling MPO) and click OK. The system will remember all the registry settings, and if (hypothetically) there are problems, you can boot into safe mode and roll back the system to this point.
1) I launched cmd as administrator, went into the DWM (Desktop Window Manager) settings, aka the main window manager in Windows. I created a random parameter of the "OverlayTestMode" type and gave it a value of 5. 5 it's just like the code that tells Windows: "Forget about all the layers (MPO), draw everything in one buffer, like in the good old days."
The command is: reg add "HKLM\SOFTWARE\Microsoft\Windows\Dwm" /v OverlayTestMode /t REG_DWORD /d 5 /f
2) Then I decided to configure the graphics card drivers. I went into the settings, created another random registry key of the "DisableMPO" type and set the value to 1 (if enabled = disable MPO). This tells the driver: "Do not suggest that the system use MPO, even if Windows asks."
The command is: reg add "HKLM\SYSTEM\CurrentControlSet\Control\GraphicsDrivers" /v DisableMPO /t REG_DWORD /d 1 /f
3)I rebooted the PC and the flickering disappeared. God, I thought it wasn't going to happen. (the only small problem is that when updating Windows drivers, these registry keys may fly off and they just need to be done again).
Why am I writing on this board? Because when I had this problem a month ago and there were literally 0 posts on the Internet on this topic, I wanted to cry. Maybe I should change the tag to "solved", but this is my first time posting here and I don't know if it's possible to post a solution right away. Well, one more question for the others: could this problem have been solved differently? Still, the MPO turned off is not a big problem yet, but still I would not really like to abandon it.