mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-01-11 14:40:25 +01:00
monitor id changes when physical monitor switches off - therfeore komorebi is broken #27
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 @pigmej on GitHub (Sep 8, 2021).
Originally assigned to: @LGUG2Z on GitHub.
Not sure how to report but here it is.
I'm using laptop with dock station, I have configured that my monitors are switching off after 10 mins. I have 2 standalone physical monitors + laptop screen.
I observed that whenever the monitor switches on again (and therefore passes the windows login screen again) then the monitor id changes.
My flow is following:
That completely breaks komorebi state and forces me to restart it that at the end makes all windows appear in random places.
I was thinking that maybe instead of that id komorebi could use native windows numbering OR some name matching. Because all "windows" related settings of the screens are somehow persisted in Windows so there should be some API to identify them in other way than this changing ID.
I think that problem exists for most of the "mobile" users, not sure about desktop with similar power plans, it could be related to thunderbolt dell dock station (WD19S).
When I DON'T use komorebi I had to use Persistent Windows on windows10 to make my windows stay at correct screens, and in windows 11 it somehow self resolved (komorebi issue visible at both 10 and 11)
@pigmej commented on GitHub (Sep 8, 2021):
The other option that I thought of is to figure way to "replace" old ids with new ids, as that could be easily done with some hook everytime when monitor on/off happens behind the scenes for komorebi. I checked few times and the order of ids was always the same, I mean it was NOT changing. So monitor 1 had always lower value than monitor 2.
I was trying to understand the code and figure out how that could be done but that's currently beyond my time limit sadly ;/
@LGUG2Z commented on GitHub (Sep 10, 2021):
@pigmej I've made a start on tracking the hot plugging/unplugging of monitors on the
feature/monitor-trackingbranch. Monitors should now be added and removed from the window manager state appropriately without breaking the window manager functionality.I think any sort of persistent window functionality is ultimately out of scope for this project, but I believe that with these new monitor tracking changes,
komorebishould be able to work in tandem with other software such as Persistent Windows.@pigmej commented on GitHub (Sep 10, 2021):
Hey,
Cool. Today i stumbled upon https://superuser.com/questions/453446/how-can-i-stop-windows-re-positioning-after-waking-from-sleep which I will test when I will find time. Maybe then this will become somehow simpler for Komorebi and others facing similar issue. Maybe the fix is doable with going the Intel GPU settings instead of windows default one.
I will also check your branch obviously :).
@LGUG2Z commented on GitHub (Sep 13, 2021):
I've spent the last few days putting the hot plugging detection through its paces and I'm happy to have it merged to the
masterbranch now. If you find a solution that you like for window permanence, please feel free to open a PR to the README for others that may have the same requirements.@pigmej commented on GitHub (Sep 14, 2021):
I've been running the branch version from yesterday morning. So far so good. Seems that currently, it works good with PersistentWindows. Sadly none of the stuff from the link above helped permanently.