-
-
Notifications
You must be signed in to change notification settings - Fork 857
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
Add new API to modify display devices for Windows #2582
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2582 +/- ##
=========================================
- Coverage 9.57% 8.80% -0.77%
=========================================
Files 97 115 +18
Lines 17586 19289 +1703
Branches 8336 9275 +939
=========================================
+ Hits 1683 1699 +16
- Misses 13174 14529 +1355
- Partials 2729 3061 +332
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Due to recent changes to the docs, all the doc changes to |
b81c566
to
e31f0ae
Compare
Very little note while I was going through my comments.. But HDR control may require a "extra" mode to plug into nvapi (which somehow I just noticed you already pulled in as a dependency?) for games that do their magic through it. |
For now this PR will focus on interacting with Windows API only and enabling "global" HDR setting only. |
I can't wait for this PR to get merged, I can't stress how amazing this is, thank you! If I were to take this, build it, install, would everything work as expected aside from a bug here or there? Assuming this would be the case but just want to verify since I'm not involved in this project. |
I play almost every day with this dev on Windows 11 and I have no problems. You can download it with your eyes closed |
@bradleycundari as moi952 just mentioned, you can download Github artifacts. However, they are needlessly hidden for someone without some previous knowledge: |
This comment was marked as off-topic.
This comment was marked as off-topic.
Please don't hijack this PR for off-topic discussions. |
d00e2fc
to
16febac
Compare
@kanjieater Since I do not know which monitor is gone, I cannot just stop trying to restore the initial configuration. However, what about an intermediate phase?
|
@FrogTheFrog sorry for interfering, but do we even want to mess with manual restoration of multiple displays? |
Originally i was thinking: |
Well, I have multiple displays that are mostly always inactive. I do not want them to be restored when we "extend" it on the way out. Also, what if the extension is incomplete and uses currently enabled devices OR fails (because not all devices are available, for example), then we are in the same stupid situation where "sleeping" displays would have to be restored manually. Thus, I chose to at least keep trying. |
The problem is sleeping displays - we cannot differentiate between disconnected ones (physically) and the ones that are off. So, a simple user would end up with a monitor that is permanently off since it could not be restored. As for what you have suggested, that's what I'll be trying to do - restore as much as possible, but still keep trying to restore until either used acknowledges that it's time to stop or we succeed. |
Windows stores display configurations (resolutions and placement on the virtual desktop) on the per monitor set per topology basis. If you have any monitor disabled in one topology, switching to another topology and back will restore that too. That's why it will also resolve the newly mentioned issue, windows stores separate configurations for both |
We have talking about this in private and for now, we stick to the current, but a little improved approach. Future changes/adjustments will be possible once the PRs are merged. |
Do you know when you will have time to finish and when it will be released? |
When it's done. Please don't manipulate people into giving deadlines, since they're all unpaid volunteers. Thank you. |
I'm not manipulating anyone, I'm just asking the question to know when it will be finished because that also allows us to have the latest developments. |
I'm not saying you're doing it intentionally, god forbid. But it's still emotional manipulation, the person will naturally try to give to the closest reasonable date possible, then feel bad if they will be failing to meet it for whatever reason. Extra stress with no gain for all parties involved. |
Please try windows build from: The non-existent displays will not block partially reverting active displays. But it will still try to do it every 5 seconds and as I've said before, you need to tell Sunshine to stop if you're happy with current displays. Note that this build is based on new stuff - you need to re-enable options in Sunshine and there is no resolution/refresh rate remapping yet |
I've been using the update as you recommended @FrogTheFrog . It did fix all of my issues, just wanted to confirm that - thanks for updating & sharing |
Random query for this, in the inital PR @FrogTheFrog states that the list of available monitors is outputted as part of Sunshines startup, could this list just be piped into a selection box in the UI for the user to select from instead of hunting through logs etc? This would create a better user experience and also likely help to reduce user error by putting the wrong value in. |
Someone was already working on it little by little, however for this PR it's out of scope |
This is a continuation of the #2032 PR after a rebase fiasco...
Description
New changes allow for Sunshine to control display devices on Windows, such as:
It also moves away from the
\\.\DISPLAY1
-like configurable output names to proper that are pretty persistent (IDs changed a little after I reinstalled my GPU drivers, after DDU).The applied changes are saved additionally saved to a file in case the PC dies or something so that Sunshine can undo the changes once it is started again.
Screenshot
Example of the new options exposed to the user:
Type of Change
.github/...
)Checklist
Branch Updates
LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch
must be updated before it can be merged. You must also
Allow edits from maintainers.
Known issues (all resolved)
IDD HDR driver displays high-contrast colors when the display is activated and was inactive before. Seems to be a driver issue, since it does not happen with HDR dongle. A workaround would be to reset all the HDR states to off and then on again, but I don't think we should implement this workaround for this.Sound fails to reset back to whatever was used before after the stream ends if a new display (without the same sink) was the only active display.