-
Notifications
You must be signed in to change notification settings - Fork 9
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
Reboot and using wrong monitor #16
Comments
You don't have to use RDP to sign in anymore on the latest Sunshine version (0.21.0). You can simply just sign in using "Desktop", which will ignore the errors returned from prep commands if the user is not signed in. Once you have signed in using Moonlight, you end the stream and start it again. As for making this work on reboots, it's a bit tricky to do that. Monitor swaps can only work after the user has signed in, and the display will not always be available when the user first signs in. I believe it would be possible but would require a lot of changes to the script and at best, it would only work after you've signed in, not at the logon screen. |
I went about some of this a different way but not helping overall. So I figured out without getting into Microsoft accounts how to auto login with my local/domain account in Windows 11. I then used the Multi Monitor app as a scheduled task on login to run the primary cfg. With this I end up with:
|
Well, if you're fine with automatic sign in, you can easily have it restore monitor by adding this to your startup commands (like task scheduler) powershell.exe -executionpolicy bypass -windowstyle hidden -Command "& { . 'F:\sources\MonitorSwapAutomation\MonitorSwapper-Functions.ps1'; OnStreamEnd }" Change the path to match your machine, what that does is essentially the same thing, it will poll until the monitor is restored, like when ending your stream. |
That though now to figure out why it doesn't work at all. So the below log (deleted a few pieces) when I'm disconnected seems to make you think it's successfully switched back to the monitor, but the screen is blank. Windows PowerShell transcript start Transcript started, output file is .\log.txt Id Name PSJobTypeName State HasMoreData Location Command 1 MonitorSwapp... BackgroundJob Running True localhost ... Windows PowerShell transcript end If it's helpful, I know the keyboard and mouse are working as I typed in ctrl-esc to pull up the search dialog and then typed in notepad. When I went thru Moonlight that notepad file was there. Monitor does show in device manager. Also if this helps, believe before the latest Sunshine and Moonlight was working. Also based on the documentation I changed my config files for the monitor swap. Below is what they were before, and what they are now as far as how the monitor and dummy plug are listed: The Dummy file used to list: The Primary file used to list: Now I have: Dummy file: Primary File: So in the old one the displays would swap between Monitor0 and Monitor1 and also \.\DISPLAY1 and \.\DISPLAY2. Now they do not as the example I followed now doesn't do that. Not sure if that's relevant at all. Technically either way they list the correct monitor information to switch to. |
Might be a bug with multimonitor tool? Try the workaround #9 |
I can give it a try but thinking I need to be on the primary monitor when doing this from what I'm reading. Of course can't get the primary monitor to show. Do you think I need to disable MonitorSwap and ResolutionAutomation or maybe even Sunshine? If so can I do this without removing them? Maybe disabling the Sunshine service would kill everything and reboot? |
Latest nightly of both Sunshine and MonitorSwap. Been working fine but recently remotely rebooted. Since I couldn't get in with Moonlight until I logged in once, I RDP into the Windows 11 computer and then used my batch file to disconnect:
I was then able to connect with Moonlight but was on Display 1 which is the one my monitor is connected to. How do I get it to use Display 2 which is the HDMI dongle after a reboot?
dummy.cfg.txt
primary.cfg.txt
At this point also if I go to the monitor attached it's blank so assuming when not connected thru Moonlight it's on thr 4k dongle and things are reversed.
The text was updated successfully, but these errors were encountered: