Skip to content
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

Device removal exception #3604

Closed
Canvas02 opened this issue Mar 19, 2023 · 9 comments · Fixed by #4709
Closed

Device removal exception #3604

Canvas02 opened this issue Mar 19, 2023 · 9 comments · Fixed by #4709
Labels
api: dx12 Issues with DX12 or DXGI external: driver-bug A driver is causing the bug, though we may still want to work around it

Comments

@Canvas02
Copy link

I don't know if this is a bug or is something wrong on my side but, when trying to run the wgpu examples I get this:

Using Intel(R) HD Graphics 4600 (Dx12)
[2023-03-19T15:27:10Z ERROR wgpu_hal::auxil::dxgi::exception] ID3D12Device::RemoveDevice: 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 #232: DEVICE_REMOVAL_PROCESS_AT_FAULT]

Additionally while trying to run the iced examples (while using the wgpu backend) I get this:

thread 'main' panicked at 'wgpu error: Validation Error

Caused by:
    In Device::create_buffer
      note: label = `(wgpu internal) StagingBelt staging buffer`
    parent device is lost

I am running windows 10 (OS Build 19045.2728) with a duel gpu setup, an Integrated (Intel) gpu and a dedicated (Nvidia) gpu

Is there any way I can fix this?

@xiaopengli89
Copy link
Contributor

@Canvas02
Copy link
Author

Canvas02 commented Mar 20, 2023

Is there any way I can force wpgu to use the dedicated gpu

I already have the "use high performance processor" in the nvidia cotrol panel

@xiaopengli89
Copy link
Contributor

You can set PowerPreference to HighPerformance when calling request_adapter.

@Canvas02
Copy link
Author

What if I am using a library like iced, is there something like an environment variable where I can force it to use the high performance adapter?

@xiaopengli89
Copy link
Contributor

I don't think so.

@Canvas02
Copy link
Author

Canvas02 commented Mar 20, 2023

What about these: https://github.com/gfx-rs/wgpu#environment-variables

Will they do the job? Or are they foe something else?

@xiaopengli89
Copy link
Contributor

These env vars only works in tests or examples.

@Canvas02
Copy link
Author

Oh ok I think I should close this issue then.

If I want to contribute an "env var overloading" feature would it get accepted or no?

@teoxoy
Copy link
Member

teoxoy commented Apr 24, 2023

If I want to contribute an "env var overloading" feature would it get accepted or no?

Since wgpu is a lib, we shouldn't switch default behavior based on env variables. Those can be implemented by applications built on top instead.

@teoxoy teoxoy closed this as not planned Won't fix, can't repro, duplicate, stale Apr 24, 2023
@teoxoy teoxoy added external: driver-bug A driver is causing the bug, though we may still want to work around it api: dx12 Issues with DX12 or DXGI labels Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: dx12 Issues with DX12 or DXGI external: driver-bug A driver is causing the bug, though we may still want to work around it
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants