-
Notifications
You must be signed in to change notification settings - Fork 8
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
Issues with restoring both monitors (dual screen) #9
Comments
Seems to work like a charm. Thanks for the writeup! |
Confirming that I had to do this, My log was spitting out the following
Etc. My monitors are "slow' to turn on though, Mon0: Dummy Plug Mon1 and Mon2 would hang and not reconnect. Adding in MonitorSwitcher worked. |
Heads up for anyone doing this fix at step 7 and can't find MonitorSwapper-Functions.ps1, the file to look in is now Events.ps1 |
Did the steps but when I close my stream via Moonlight, the first time it won't switch back, second time I close stream it switches back but then my Main display turns on and off every 5-10 seconds. |
Can you zip the entire script folder, and also upload the current_monitor_cfg file located in %temp% so I can look at that? |
|
Not seeing any errors in the log that would cause that, can you replace your Event.ps1 with this one And in settings, enable the debug option by setting it to true |
@Metrinui I think I fixed it, can you try this one and let me know? |
You're amazing, thank you so much! Problem solved!!! What an absolute legend! |
Thanks for this tip, I ended up having issues with it switching between dual monitors and a dummy because of the monitor startup time, (also OP's monitorswitcher didn't work) I found that using the commands from https://www.nirsoft.net/utils/multi_monitor_tool.html and editing events.ps1 I was able to get it working by using /enable and /disable to one by one enable and disable monitors then use /LoadConfig to set my left and right monitors to the appropriate locations
|
Based on @RikuKunMS2 comment, this is what I had to do for my "long startup" monitor. The delta is mostly auto-detecting which monitors to One might have to play with the delay variables. My Setup
Events.ps1
|
A bug has been identified in the Nirsoft MultiMonitor tool that prevents certain user setups from being able to properly restore both monitors, usually what will happen is only one of the two will be restored. I am aware of this issue and currently I do not have an easy solution to it as I do not maintain the MultiMonitor tool.
All other monitor profile loading tools are very user unfriendly compared to editing a simple config file, as such I do not have any plans to swap the backend of the script because it would become even more confusing to the general user public.
Workaround
For now, I suggest using this workaround to the issue until the issue has been resolved on Nirsoft's MultiMonitorTool.
Download Monitor Switcher from Sourceforge https://sourceforge.net/projects/monitorswitcher/
Copy the MonitorSwitcher.exe and paste it into the same folder MonitorSwapper is saved in.
Make sure you current Monitor Settings are exactly how you want them to be once you've finished streaming, as we will be saving that configuration as the restore point once you've finished streaming.
Open command prompt or PowerShell at the folder MonitorSwapper (not Switcher) is saved in, for Windows 11 users that can easily be done by right clicking a blank area in the folder and selecting Open in Terminal.
Type in MonitorSwitcher, then press tab so the terminal automatically completes the rest of the command, then type in -save:Primary.xml
It should look like this:
PowerShell will prepend the command with .\ this is normal.
Open the Events.ps1 file, or if you're using an older version of this script... open the MonitorSwapper-Functions.ps1 file instead.
In the "SetPrimaryScreen" function, look for this line:
Replace the line mentioned above with this line instead.
The text was updated successfully, but these errors were encountered: