Skip to content

Fix for black screen flicker in fullscreen games on hybrid Intel+NVIDIA laptops (Windows 11 24H2/25H2) #136

Description

@REalArthoar

Windows Build Number

26200.8894

Processor Architecture

x64 ( Intel I7 13650HX ; Nvidia RTX 5070 laptop gpu )

Memory

24gb

Storage Type, free / capacity

NVME 1T + 2TB

Relevant apps installed

powershell, notepad

Traces collected via Feedback Hub

Personal problem, troubleshooted for days... solved, i want to help you to save days in time. thanks to Claude AI, i was able to trackdown the root cause.

Isssue description

If you've got an Intel + NVIDIA hybrid-GPU laptop and your games are flickering black in a very specific, weird pattern, this might save you days of troubleshooting.

Does this match your problem? (symptom fingerprint)
Laptop with hybrid Intel + NVIDIA graphics (Optimus / Advanced Optimus)
Running Windows 11, version 24H2 or 25H2
If you launch the game immediately after booting into Windows, it runs completely fine
If you wait a bit before launching (even on your very first attempt after a fresh boot — how long depends on your system), the flicker can appear even on that "first" launch
Flickering reliably starts on the second launch (or any relaunch without rebooting), regardless of how the first one went
The flicker only happens while the game window has full, uncontested visual focus — no other window overlapping it
The flicker stops instantly the moment anything else is layered on top (Start menu, Alt-Tab, another window, even just pressing the Windows key)
It happens across completely different game engines, so it's not a game-specific bug
Driver reinstalls, DDU clean wipes, Windows resets, and BIOS/vBIOS updates do not fix it

If most of that matches, you very likely have the same issue.

Root cause

This is a Windows 11 24H2/25H2 regression in DWM (Desktop Window Manager), specifically in how it handles the "independent flip" fast presentation path for fullscreen/borderless apps that have sole visual precedence on screen, combined with the extra cross-adapter frame handoff required on hybrid-GPU systems.

When a fullscreen game has zero window overlap, Windows tries to use this optimized low-overhead path instead of full compositing. On affected hybrid-GPU systems, that fast path has a synchronization bug that occasionally sends a garbage/unready frame to the display — the flicker. The moment anything else overlaps the game, Windows is forced back onto the normal, full-compositing path, which doesn't have the bug.

This is a known, still-unpatched Microsoft bug, tracked publicly here: #129

What does NOT fix it (save yourself the time)
Reinstalling/updating NVIDIA and Intel GPU drivers (including a full DDU clean wipe)
Disabling NVIDIA overlay, Steam overlay, Xbox Game Bar/GameDVR
Disabling Multiplane Overlay (MPO)
Disabling Hardware-accelerated GPU Scheduling (HAGS)
Disabling VRR/G-Sync, locking to a fixed refresh rate
Forcing discrete-GPU-only mode
Disabling CTF/Text Services Framework
sfc /scannow and DISM /RestoreHealth
Windows "Reset this PC"
Creating a fresh Windows user profile
A clean GPU vBIOS reflash
A full BIOS/EC firmware reset
Switching between Exclusive Fullscreen and Borderless/Windowed Fullscreen

The fix

Keep a tiny, invisible, click-through window always on top of everything. This keeps Windows on the safe full-compositing path at all times.

Setup:

Open Notepad, paste the script below, save as setup-anti-flicker.ps1 (Save as type: All Files)
Open PowerShell as Administrator
Run:
cd
Set-ExecutionPolicy -Scope CurrentUser RemoteSigned -Force
.\setup-anti-flicker.ps1
It prints "Done" — installed and running, auto-starts silently at every login going forward.

Recommended: add a Defender exclusion for %LOCALAPPDATA%\AntiFlickerOverlay since the technique used can occasionally get heuristic-flagged.

The script:

powershell
$installDir = "$env:LOCALAPPDATA\AntiFlickerOverlay"
New-Item -ItemType Directory -Path $installDir -Force | Out-Null

$overlayScriptPath = Join-Path $installDir "overlay.ps1"
$launcherPath = Join-Path $installDir "launcher.vbs"

$overlayCode = @'
Add-Type -AssemblyName System.Windows.Forms
Add-Type -AssemblyName System.Drawing

Add-Type @"
using System;
using System.Runtime.InteropServices;
public class WinAPI {
[DllImport("user32.dll")]
public static extern int GetWindowLong(IntPtr hwnd, int index);
[DllImport("user32.dll")]
public static extern int SetWindowLong(IntPtr hwnd, int index, int newStyle);
}
"@

$form = New-Object System.Windows.Forms.Form
$form.FormBorderStyle = 'None'
$form.StartPosition = 'Manual'
$form.Location = New-Object System.Drawing.Point(0, 0)
$form.Size = New-Object System.Drawing.Size(4, 4)
$form.TopMost = $true
$form.ShowInTaskbar = $false
$form.BackColor = [System.Drawing.Color]::Black
$form.Opacity = 0.02
$form.Text = "AntiFlickerOverlay"

$form.Add_Shown({
$hwnd = $form.Handle
$GWL_EXSTYLE = -20
$WS_EX_TRANSPARENT = 0x20
$WS_EX_LAYERED = 0x80000
$WS_EX_TOOLWINDOW = 0x80
$style = [WinAPI]::GetWindowLong($hwnd, $GWL_EXSTYLE)
[WinAPI]::SetWindowLong($hwnd, $GWL_EXSTYLE, $style -bor $WS_EX_TRANSPARENT -bor $WS_EX_LAYERED -bor $WS_EX_TOOLWINDOW)
})

'@

Set-Content -Path $overlayScriptPath -Value $overlayCode -Encoding UTF8

$vbsContent = 'CreateObject("WScript.Shell").Run "powershell.exe -ExecutionPolicy Bypass -WindowStyle Hidden -File ""{0}""", 0, False' -f $overlayScriptPath
Set-Content -Path $launcherPath -Value $vbsContent -Encoding ASCII

Unregister-ScheduledTask -TaskName "AntiFlickerOverlay" -Confirm:$false -ErrorAction SilentlyContinue

$action = New-ScheduledTaskAction -Execute "wscript.exe" -Argument ('"{0}"' -f $launcherPath)
$trigger = New-ScheduledTaskTrigger -AtLogOn
Register-ScheduledTask -TaskName "AntiFlickerOverlay" -Action $action -Trigger $trigger | Out-Null

Start-Process "wscript.exe" -ArgumentList ('"{0}"' -f $launcherPath)

Write-Host ""
Write-Host "Done. The anti-flicker overlay is installed and running silently."
Write-Host "It will auto-start invisibly every time you log in from now on."
Write-Host "Installed to: $installDir"
Write-Host ""

To uninstall later:

powershell
Unregister-ScheduledTask -TaskName "AntiFlickerOverlay" -Confirm:$false
Remove-Item -Path "$env:LOCALAPPDATA\AntiFlickerOverlay" -Recurse -Force
Why this is more reliable than a driver rollback or clean install

A clean install or driver rollback can temporarily avoid the trigger condition, but the underlying DWM regression is baked into the Windows build itself — any future driver update or feature update can reintroduce the exact conditions that trigger it again. This fix works regardless of driver version or Windows build.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions