Repository navigation
Open
Labels
P2Important issues not at the top of the work lista: desktopRunning on desktopc: crashStack traces logged to the consoleengineflutter/engine related. See also e: labels.found in release: 3.7Found to occur in 3.7found in release: 3.9Found to occur in 3.9has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-windowsBuilding on or for Windows specificallyteam-windowsOwned by the Windows platform teamtriaged-windowsTriaged by the Windows platform team
Description
While running Flutter app on a desktop, if you disable GPU, (even if enable it again) flutter app will freeze.
Expected results:
Flutter Desktop App would switch GPU or turn on software rendering.
Actual results:
Rendering has stopped. The application is frozen.
Example:
Windows app built with Flutter is set to launch on startup, but some users are experiencing issues where their GPU is not fully enabled yet, causing the app to freeze or crash. To address this, a third-party app was developed that delays the launch of the Flutter app until the GPU is fully enabled. Also when some GPU functionalities like Nvidia G-Sync were turned on AFTER the flutter app was launched, app freezes too.
flutter doctor -v
[√] Flutter (Channel master, 3.9.0-13.0.pre.4, on Microsoft Windows [Version 10.0.19045.2728], locale
en-GB)
• Flutter version 3.9.0-13.0.pre.4 on channel master at C:\src\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 8de2433a4c (2 weeks ago), 2023-03-21 06:58:24 -0400
• Engine revision e07fb9b5dd
• Dart version 3.0.0 (build 3.0.0-348.0.dev)
• DevTools version 2.22.2
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
• Android SDK at C:\Users\zhang\AppData\Local\Android\sdk
• Platform android-33-ext5, build-tools 33.0.2
• Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-9505619)
• All Android licenses accepted.
[X] Chrome - develop for the web (Cannot find Chrome executable at
.\Google\Chrome\Application\chrome.exe)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.5.3)
• Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
• Visual Studio Community 2022 version 17.5.33516.290
• Windows 10 SDK version 10.0.22000.0
[√] Android Studio (version 2022.1)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-9505619)
[√] VS Code (version 1.76.2)
• VS Code at C:\Users\zhang\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.62.0
[√] Connected device (2 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19045.2728]
• Edge (web) • edge • web-javascript • Microsoft Edge 111.0.1661.62
[√] Network resources
• All expected network resources are available.
Reacted by Loïc Sharma, Kingkor Roy Tirtho, Temirlan Zhangazy, Kevin Hoffman, bitzip, Luis Carrasco, Eerey Solutions, gromwell, Pankaj Nikam, c1yde3 and 13 more
Reacted by Eerey Solutions and Temirlan Zhangazy
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work lista: desktopRunning on desktopc: crashStack traces logged to the consoleengineflutter/engine related. See also e: labels.found in release: 3.7Found to occur in 3.7found in release: 3.9Found to occur in 3.9has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-windowsBuilding on or for Windows specificallyteam-windowsOwned by the Windows platform teamtriaged-windowsTriaged by the Windows platform team
Activity
exaby73 commentedon Apr 5, 2023
Hello @temirlanzhangazy. Are you able to reproduce this issue in debug mode? Are there any stack traces you can provide?
temirlanzhangazy commentedon Apr 6, 2023
Hello. I tried the same thing in debug mode: same result.
What is interesting:
The app seems to be fully working, all print messages are being created, and Windows cursor is reacting to hover events (pointer cursor on button).
danagbemava-nc commentedon Apr 6, 2023
Hi @temirlanzhangazy, does this occur with the sample app as well or only with your app?
temirlanzhangazy commentedon Apr 6, 2023
Yes, this occurs with the sample app too.
temirlanzhangazy commentedon Apr 6, 2023
Flashback.-.Apr.6.2023.13_44_20.mp4
Here is the sample app.
When I disable the GPU driver, all apps will switch GPU or turn on software rendering. But flutter app's rendering is freezed.
danagbemava-nc commentedon Apr 6, 2023
Hi @temirlanzhangazy, if you run the app with the
--enable-software-renderingflag, do you still have this issue? Can you also check on the latest version of themasterchannel to see if the issue is still there?temirlanzhangazy commentedon Apr 6, 2023
Yes, issue is the same with
--enable-software-renderingflag.I have the latest version of the
masterchannel.I noticed these errors after disabling GPU.
2 ERR: SwapChain11.cpp:947 (present): Present failed: the D3D11 device was removed, HRESULT: 0x887A00052142 [ERROR:flutter/shell/gpu/gpu_surface_gl_skia.cc(217)] Could not make the context current to acquire the frame.temirlanzhangazy commentedon Apr 6, 2023
How can I catch these errors so I can exit my application?
51 remaining items
KuuBee commentedon Oct 20, 2025
Our team’s Flutter-based Windows app sometimes shows a white screen on certain machines under special circumstances. After digging into it, we found that in some cases the GPU driver gets uninstalled or disabled at specific times. To handle this, we designed a workaround. Our situation may not be exactly the same as your issue, but it seems related, so we’d like to share our approach in case it helps.
By default, Flutter’s Windows engine renders via D3D11 (GPU). Since we cannot predict when a user’s machine might lose its GPU driver, we decided to force the app to use CPU rendering instead.
Google maintains a project that provides a CPU-based D3D9 implementation: SwiftShader. See: https://swiftshader.googlesource.com/SwiftShader/
Our method is to hook the
LoadLibraryWfunction. When we detect an attempt to loadd3d11.dll, we returnNULLto make the load fail. In that case, the Flutter engine falls back to D3D9. Make sure you place SwiftShader’sd3d9.dllin the same directory as your application executable so the fallback can succeed.If everything works as expected, the Flutter engine will successfully load
d3d9.dlland render via CPU-based D3D9. This does have downsides: we observe higher CPU usage on lower-end machines when using CPU rendering. Whether this is acceptable depends on your scenario.The relevant code is included in the attached archive; you can download and review it.
cpu_render_code.zip
letrungdo commentedon Oct 21, 2025
@KuuBee Thanks for your great solution. Can you tell me where to get the d3d9.dll file?
KuuBee commentedon Oct 22, 2025
@letrungdo You can directly use the dll in the compressed package I uploaded or compile it locally by yourself through this link
https://swiftshader.googlesource.com/SwiftShader/+/refs/heads/legacy-d3d9
letrungdo commentedon Nov 17, 2025
@KuuBee Your way everything is fine but unfortunately webview2 can't be used
KuuBee commentedon Nov 19, 2025
@letrungdo You can try this pub: https://pub.dev/packages/webview_cef. If that doesn't meet your needs either, then there might not be a good solution, and you'll have to choose one of the two...
letrungdo commentedon Nov 20, 2025
@KuuBee Thanks for your suggestion, I tried it but it still doesn't work.
The solution is to use https://pub.dev/packages/webview_win_floating worked for me
itschrono commentedon Jan 14, 2026
I also had the occurrence but installing a new Intel graphics. All applications freeze a few secondes but recover, all except the flutter application. I think if a EGL context error or similar is encountered multiple time in a row the flutter engine should try to reinitialize the graphic context from the beginning.
Flutter (Channel stable, 3.38.5, on Microsoft Windows [version 10.0.26200.7462], locale fr-FR)
Windows Version (11 Professionnel 64-bit, 25H2, 2009)
zxcv1884 commentedon Mar 5, 2026
I am also encountering this issue in my project.
Is there any update on this or a planned fix?
reduxdj commentedon Apr 1, 2026
This is happening with intel graphics driver updates, which happened yesterday.
Dear flutter team, can you at least add some AI bot to make us feel like you are reviewing these issues? This is so frustrating that this gets ingored. I have a workaround, if anybody wants to know how we solve it am happy to share code
DitriXNew commentedon Apr 2, 2026
I do this simple solution, and it works for me, so, mb it will helps you too.
https://github.com/DitriXNew/windows_gpu_recovery
mateusfontanaa commentedon Jun 15, 2026
We are experiencing this same behavior on two Windows 11 machines with Intel Integrated Graphics. Given that this issue has been open since 2023, is there any update or perspective for a potential fix? Let us know if further logs are needed to help move this forward.
mainjzb commentedon Oct 15, 2026
flutter windows 3.47 start use impeller, maybe we need add software rendering in impeller.
relation issue: #187763
Log rss_feed_reader's freeze and refresh the window on wake (#15)
denissilantev64 commentedon Nov 8, 2026
I am experiencing the same issue on Windows with Flutter 3.47. The app completely freezes when the GPU is disabled or after a video driver reset.
fix: relaunch the windows app after the gpu device is lost