obs-studio icon indicating copy to clipboard operation
obs-studio copied to clipboard

obs-nvenc: Fix GPU selector visibility on dual-GPU systems

Open 0x1stvan opened this issue 1 month ago • 1 comments

Description

This change ensures the GPU (encoder device) selector is visible whenever at least one compatible device is detected, rather than requiring two or more devices.

Motivation and Context

Problem: On systems where a previously saved GPU encoder device has been removed or disabled, OBS returns a CUDA_ERROR_INVALID_DEVICE error when attempting to stream or record. In dual-GPU configurations, the device selector dropdown not appear, leaving users unable to select the remaining valid GPU through the UI.

How Has This Been Tested?

Not a breaking change, but tested the build on a dual-GPU setup with Windows 11 Professional (x64) Build 26100.7171 (24H2)

Types of changes

Checklist:

  • [x] My code has been run through clang-format.
  • [x] I have read the contributing document.
  • [x] My code is not on the master branch.
  • [x] The code has been tested.
  • [x] All commit messages are properly formatted and commits squashed where appropriate.
  • [ ] I have included updates to all appropriate documentation.

0x1stvan avatar Nov 16 '25 13:11 0x1stvan

Is the general reproduction here that both GPUs are Nvidia to start, and then later aren't? Or that both GPUs are Nvidia and one is disabled via Device Manager?

WizardCM avatar Dec 13 '25 23:12 WizardCM

Is the general reproduction here that both GPUs are Nvidia to start, and then later aren't? Or that both GPUs are Nvidia and one is disabled via Device Manager?

  1. System has 2 NVIDIA GPUs installed (GPU1 at index 0, GPU2 at index 1)
  2. OBS encoder is configured to use GPU2 (index 1)
  3. GPU2 is physically removed from motherboard OR disabled in Device Manager
  4. System restarts, OBS starts

GPU selector becomes invisible/hidden in UI, but OBS still attempts to use GPU2 (index 1) for encoding

0x1stvan avatar Dec 16 '25 10:12 0x1stvan