Replies: 0 comments 2 replies
-
@alyssadev This is very helpful ! I use sunlight to stream to the living room TV BUT since I often need to rearrange my displays (+had to reset CMOS recently), my config was invalid. Great idea to have it in a script ! Thanks for sharing 🤓 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I use Sunshine and Moonlight every day to repurpose my laptop as a second monitor for my desktop computer. I have an HDMI cable going to the room TV, when I use the TV I turn it on, but otherwise the laptop is showing the TV's monitor. This has so many advantages other than just providing an extra monitor on my desk, mainly that the laptop also passes through all Bluetooth devices including headphones and kb/m with minimal latency, as the desktop motherboard doesn't have wireless support.
The issue is that if I change the screen layout, set it to Duplicate or Display only on x, the \DISPLAYn number changes and therefore Sunshine loses track of it. The other day I installed a GPU driver update and the numbers changed to DISPLAY6 and DISPLAY7 for some reason; usually though the change is limited to DISPLAY1 and DISPLAY2 switching around. You'd expect the main monitor to be DISPLAY1, but currently it's DISPLAY2.
So I made this script that I can run when Sunshine is pointing to the wrong or invalid screen, which fixes it to point to the 1080p screen, as opposed to the 1200p main monitor.
edit: I've updated this to now check if the display name changes, and also allow selecting display by serial number. Save the PowerShell script at the bottom to monitor.ps1 in the same directory as the Python script.
My next plan is probably to
set this up to run automatically,check if the display Sunshine is pointing to is an invalid screen, andfix it when there are no clients connected, pointing to the 1200p main screen as a last resort.I hope this is helpful for others who might want to use Sunshine and Moonlight to repurpose otherwise-unused hardware for their setup.
Beta Was this translation helpful? Give feedback.
All reactions