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

fix(video): prevent encoder probing with no active displays #3592

Merged
merged 1 commit into from
Jan 26, 2025

Conversation

FrogTheFrog
Copy link
Collaborator

Description

Since Windows 11 24H2 update it seems that Windows can get into a broken state where probing encoders (or likely also just using DXGI API) will break Sunshine in such a way that it cannot start any stream nor the libdisplaydevice is able to access the windows API to do any changes.

While this is not a perfect solution to the problem, the user can at least do something (plug or unplug displays) or libdisplaydevice could try restoring previous config once the API is available.

Issues Fixed or Closed

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
1 New issue
1 New Code Smells (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Copy link

codecov bot commented Jan 26, 2025

Codecov Report

Attention: Patch coverage is 0% with 13 lines in your changes missing coverage. Please review.

Project coverage is 11.63%. Comparing base (a5c7916) to head (54022b9).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/display_device.cpp 0.00% 8 Missing and 1 partial ⚠️
src/video.cpp 0.00% 2 Missing and 1 partial ⚠️
src/nvhttp.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3592      +/-   ##
==========================================
- Coverage   11.64%   11.63%   -0.01%     
==========================================
  Files          93       93              
  Lines       17302    17314      +12     
  Branches     8081     8086       +5     
==========================================
  Hits         2014     2014              
- Misses      12808    12818      +10     
- Partials     2480     2482       +2     
Flag Coverage Δ
Linux 11.31% <0.00%> (-0.02%) ⬇️
Windows 13.04% <0.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/nvhttp.cpp 18.54% <0.00%> (ø)
src/video.cpp 21.85% <0.00%> (-0.07%) ⬇️
src/display_device.cpp 54.62% <0.00%> (-1.46%) ⬇️

@ReenigneArcher ReenigneArcher merged commit 0631472 into LizardByte:master Jan 26, 2025
35 of 37 checks passed
@FrogTheFrog FrogTheFrog deleted the fallback branch January 27, 2025 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HDR does not revert to On State upon disconnect
2 participants