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

Lag after restoring primary.cfg #56

Closed
nbriffa opened this issue Nov 17, 2024 · 8 comments
Closed

Lag after restoring primary.cfg #56

nbriffa opened this issue Nov 17, 2024 · 8 comments

Comments

@nbriffa
Copy link

nbriffa commented Nov 17, 2024

After I switch back to my correct monitor configuration, I will get about 1 second of intense lag, in 20 second intervals. This only started happening after I started using MonitorSwapAutomation.

@nbriffa
Copy link
Author

nbriffa commented Nov 17, 2024

I've confirmed that this is related to PowerShell staying open, and trying to run a command of some kind. Manually ending the task seems to fix the issue.

@nbriffa nbriffa closed this as completed Nov 17, 2024
@nbriffa nbriffa reopened this Nov 17, 2024
@djoli
Copy link

djoli commented Nov 28, 2024

Noticed the same thing when I started using this. Given the lack of response on the issue, I might take an attempt to fix it.

@djoli
Copy link

djoli commented Nov 28, 2024

After some diagnosing, I found the clean up process was getting stuck in an infinite loop as it was unable to determine my primary monitor. This was because, at some point in the set up process, I modified the primary.cfg and dummy.cfg files to escape slashes in the monitor names.

Undoing this change caused the script to succeed and shut down correctly, and so far i've not noticed any side effects.

If you did the same thing as me, perhaps undo that change and see if it solves the problem for you.

@nbriffa
Copy link
Author

nbriffa commented Nov 28, 2024

I don't think I've fucked that up, but may have? Example below.

[Monitor0]
Name=\.\DISPLAY1
MonitorID=MONITOR\AUS2722{4d36e96e-e325-11ce-bfc1-08002be10318}\0002
SerialNumber=L4LMQS044358
BitsPerPixel=32
Width=2560
Height=1440
DisplayFlags=0
DisplayFrequency=144
DisplayOrientation=0
PositionX=3440
PositionY=0
[Monitor1]
Name=\.\DISPLAY2
MonitorID=MONITOR\DELA212{4d36e96e-e325-11ce-bfc1-08002be10318}\0003
SerialNumber=
BitsPerPixel=32
Width=3440
Height=1440
DisplayFlags=0
DisplayFrequency=165
DisplayOrientation=0
PositionX=0
PositionY=0
[Monitor2]
Name=\.\DISPLAY5
MonitorID=MONITOR\MTT1337{4d36e96e-e325-11ce-bfc1-08002be10318}\0004
SerialNumber=
BitsPerPixel=0
Width=0
Height=0
DisplayFlags=0
DisplayFrequency=0
DisplayOrientation=0
PositionX=0
PositionY=0

@djoli
Copy link

djoli commented Nov 28, 2024

Your monitor names don't look quite right, according to my testing.

Name=\.\DISPLAY5
MonitorID=MONITOR\LNX0000{4d36e96e-e325-11ce-bfc1-08002be10318}\0000
SerialNumber=
BitsPerPixel=32
Width=2560
Height=1600
DisplayFlags=0
DisplayFrequency=90
DisplayOrientation=0
PositionX=0
PositionY=0

Note the double \ at the start.

If that doesn't work, try replacing the Helpers.ps1 file in the directory with the one in this file. MonitorSwapper.zip. It just hard codes the debugging. Then clear out all of the logs inside the logs folder, start and stop a stream, and upload the log it created so I can try to diagnose.

@djoli
Copy link

djoli commented Nov 28, 2024

Noticed that github seems to strip the slashes...

Name=\\.\DISPLAY5
MonitorID=MONITOR\LNX0000\{4d36e96e-e325-11ce-bfc1-08002be10318}\0000
SerialNumber=
BitsPerPixel=32
Width=2560
Height=1600
DisplayFlags=0
DisplayFrequency=90
DisplayOrientation=0
PositionX=0
PositionY=0

@nbriffa
Copy link
Author

nbriffa commented Nov 30, 2024

Ah so it does, here is the blocked version of mine.

[Monitor0]
Name=\\.\DISPLAY1
MonitorID=MONITOR\AUS2722\{4d36e96e-e325-11ce-bfc1-08002be10318}\0002
SerialNumber=L4LMQS044358
BitsPerPixel=32
Width=2560
Height=1440
DisplayFlags=0
DisplayFrequency=144
DisplayOrientation=0
PositionX=3440
PositionY=0

Thanks for all your help, but due to Issue #44 I've decided to just move to MonitorSwitcher, which has been flawless.

@Nonary
Copy link
Owner

Nonary commented Dec 11, 2024

The latest version of this script now uses MonitorSwitcher due to issues with 24H2 and general reliability seems to be better.

@Nonary Nonary closed this as completed Dec 11, 2024
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

No branches or pull requests

3 participants