New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Neovide causes a driver crash on integrated intel gpu when rendering with DX11 #2489
Comments
Would you be able to try to fix this yourself with some pointers? I think you could try adding this (in d3d.rs) both before and after the detecting a focus lost event (handled in self.gr_context.flush_submit_and_sync_cpu();
self.wait_for_gpu(); |
Sure, I'll try that tomorrow. |
I think the most likely reason is a driver bug though. Are you using the latest drivers? |
Yes, I have the latest drivers installed. |
Actually, I think for an even easier testing, you could just call |
Adding the resize call in the focus handlers didn't change anything. It looks like it has nothing to do with gaining focus because if I focus the window by clicking on the title bar nothing happens. The crash happens when rendering of the next frame is triggered. Also while running through the debugger there is a bunch of errors and warnings from the directx debug layer:
|
I don't immediately see what's wrong and some of those errors, especially the first one seem to be totally internal to skia. You could compare our code to the skia examples |
I don't see anything obviously wrong either (but I don't have any experience with DX12, I only used DX11). I think we can assume it's either a driver bug or a bug in skia. I don't really care that much about this because I'm not currently using this laptop for programming and if I ever need to I can run neovide in opengl mode. Maybe someone more experienced in DX12 and familiar with the skia codebase could take a look at that. |
You could try to add |
Describe the bug
When running an application that uses DX11 for rendering (a game for example) and then switching the window to neovide the other application crashes with error
DXGI_ERROR_DEVICE_HUNG
. Sometimes even the whole driver crashes and freezes the laptop.This does not happen with every game. I managed to get this error when running my game and Divinity Original Sin 2 (both games run fine before switching to neovide). Also running my game and Divinity at the same time and switching between them works fine.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Nothing happens when switching to neovide.
Desktop (please complete the following information):
Please run
neovide --log
and paste the contents of the.log
file created in the current directory here:neovide_rCURRENT.log
Additional context
--opengl
works fine.DXGI_ERROR_DEVICE_HUNG
my game shows a lot of errors about failed buffer and SRV creations for buffers that are used in compute shaders (this is only speculation and may not be related at all). Divinity also uses compute shaders (I checked by capturing a frame with renderdoc).ID3D11RemoveDevice: Device removal has been triggered for the following reason (DXGI_ERROR_DEVICE_HUNG: The Device took an unreasonable amount of time to execute its commands, or the hardware crashed/hung. As a result, the TDR (Timeout Detection and Recovery) mechanism has been triggered. The current Device Context was executing commands when the hang occurred. The application may want to respawn and fallback to less aggressive use of the display hardware). [ EXECUTION ERROR #378: DEVICE_REMOVAL_PROCESS_AT_FAULT]
The text was updated successfully, but these errors were encountered: