mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-01-11 14:40:25 +01:00
[BUG]: Multiple monitors layout mix up #493
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @alexgorbatchev on GitHub (Oct 14, 2024).
Summary
I'm experiencing repeated monitor ID issue. I have 3 monitors arranged in this configuration:
The
monitor-informationalways returns this for me:My config has the following:
I found that after Windows sleep,
monitors[1]andmonitors[2]get swapped. I would say this happens pretty much every time, or nearly as frequent. My solution is to swap the values in the.jsonfile manually every time. So essentially I keep rotatingbandcto fix the issue.At this point I've probably done it a few dozen times.
Version Information
Komorebi Configuration
Hotkey Configuration
Output of komorebic check
@LGUG2Z commented on GitHub (Oct 14, 2024):
This is an unordered map, so the order these values are printed in don't have any special meaning.
Assuming that this is the desired index layout:
You probably need to set
display_index_preferenceslike this:@alexgorbatchev commented on GitHub (Oct 15, 2024):
Thank you for you help, unfortunately I already have
display_index_preferencesin my config referenced above and so I believe the problem is elsewhere.@LGUG2Z commented on GitHub (Oct 15, 2024):
You should try replacing the value in your config with the value I have given- I made a change to the ordering based on the diagram you drew.
@alex-ds13 commented on GitHub (Oct 17, 2024):
I don't think this is the case because usually the main monitor (index 0) is the one with
top/leftat0,0, which here is "GBT3204", then monitor "GSM775" has negativetopwhich means it is above the previous one (theyaxis is positive towards the bottom...) and monitor "DELA0AA" also has negativetopbut has positiveleftwhich means it is to the right of main monitor but starts higher that main monitor. Which means that the OP's order should've been right from the start...Also this appears to only be happening after sleep, which means before the order was correct.
@alexgorbatchev Have you tried checking the windows screen settings when the swap happens to make sure that it isn't Windows itself swapping the screens? Also try running the
komorebic monitor-infoagain after the swap to see if there are any changes... From what I see, if the monitors kept the same id komorebi should see that it already had them and keep them just the same as before going to sleep...@alex-ds13 commented on GitHub (Oct 18, 2024):
@LGUG2Z I think I've found a bug in the way that the monitors are currently being rearranged when there are index preferences. It is on this code here.
Try putting the following example on a rust playground:
If you uncomment the line
let mut indices = vec![0,1,2];and comment the line below it (simulating a system with 3 monitors) this always seems to work unless the exact combination after the shuffle is[2, 1, 0]which then the result is wrong. But if you use it as is (simulating a system with 4 monitors) it will get a wrong result a lot of times! If you use the commented linelet mut indices = vec![0,1,2];and then uncomment the line//indices.insert(0, 3);which makes the last index always be at the start then it will fail almost every time (unless your are lucky enough to get[3,0,1,2]).I believe this is what might be causing the issues reported here and on other related issues...
@alex-ds13 commented on GitHub (Oct 18, 2024):
Doing something like this instead should fix it:
I've used indices all the way through 9, like there were 9 monitors to increase the probability of having bad scenarios that would give wrong result.