Originally created by @ianzhang366 on GitHub (May 24, 2024).
First of all, thanks for building this project!
Describe the bug
After upgraded to 0.1.26 from 0.1.25, komorebi stop working with error message:
$ komorebic log
2024-05-24T17:17:43.239237Z ERROR komorebi::process_event: there is no monitor with that index
To Reproduce
Steps to reproduce the behavior:
start komorebi with komorebi.exe --config="C:\Users\ianzhang\source\bin\komorebi.json" --ffm
then do komorebic log
Expected behavior
Komorebi should start up properly.
Screenshots and Videos
Add screenshots and videos to help explain your problem.
Operating System
OS Name: Microsoft Windows 11 Enterprise
OS Version: 10.0.22631 N/A Build 22631
komorebic check Output
KOMOREBI_CONFIG_HOME detected: C:\Users\ianzhang\source\bin
Looking for configuration files in C:\Users\ianzhang\source\bin
Found komorebi.json; this file can be passed to the start command with the --config flag
Found C:\Users\ianzhang\.config\whkdrc; key bindings will be loaded from here when whkd is started, and you can start it automatically using the --whkd flag
@LGUG2Z commented on GitHub (May 24, 2024):
It looks like your display is not being detected anymore. Can you add this debug statement, run `cargo run --bin komorebi` and share the output?
```rust
dbg!(win32_display_data::connected_displays().collect::<Vec<_>>());
```
You can add it under this line: https://github.com/LGUG2Z/komorebi/blob/88684f991f514d0a5c9b9c19f4be45e7fa531868/komorebi/src/windows_api.rs#L234
$ cargo run --bin komorebi
Blocking waiting for file lock on package cache
Blocking waiting for file lock on build directory
Compiling komorebi v0.1.27-dev.0 (C:\Users\ianzhang\source\repos\komorebi\komorebi)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 38.94s
Running `target\debug\komorebi.exe`
2024-05-24T19:32:31.165087Z INFO foreground_lock_timeout: komorebi::windows_api: current value of ForegroundLockTimeout is 0
2024-05-24T19:32:31.172982Z INFO init: komorebi::window_manager: initialising
[komorebi\src\windows_api.rs:235:9] win32_display_data::connected_displays().collect::<Vec<_>>() = []
2024-05-24T19:32:31.177241Z INFO komorebi::process_command: listening on komorebi.sock
2024-05-24T19:32:31.177269Z INFO komorebi::process_event: listening
2024-05-24T19:32:31.177538Z INFO komorebi::border_manager: listening
2024-05-24T19:32:31.177619Z INFO komorebi::stackbar_manager: listening
2024-05-24T19:32:31.177921Z INFO komorebi::workspace_reconciliator: listening
2024-05-24T19:32:31.183716Z INFO komorebi::monitor_reconciliator: created hidden window to listen for monitor-related events
2024-05-24T19:32:31.184128Z INFO komorebi::monitor_reconciliator: listening
2024-05-24T19:32:31.184298Z INFO komorebi::reaper: watching
2024-05-24T19:32:36.252075Z ERROR komorebi::process_event:
0: there is no monitor with that index
Location:
komorebi\src\window_manager.rs:427
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⋮ 11 frames hidden ⋮
12: komorebi::window_manager::impl$4::enforce_workspace_rules::closure$0<unknown>
at C:\Users\ianzhang\source\repos\komorebi\komorebi\src\window_manager.rs:427
13: enum2$<core::option::Option<ref$<komorebi::monitor::Monitor> > >::ok_or_else<ref$<komorebi::monitor::Monitor>,eyre::Report,komorebi::window_manager::impl$4::enforce_workspace_rules::closure_env$0><unknown>
at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6\library\core\src\option.rs:1237
14: komorebi::window_manager::WindowManager::enforce_workspace_rules<unknown>
at C:\Users\ianzhang\source\repos\komorebi\komorebi\src\window_manager.rs:424
15: komorebi::window_manager::WindowManager::process_event<unknown>
at C:\Users\ianzhang\source\repos\komorebi\komorebi\src\process_event.rs:132
16: komorebi::process_event::listen_for_events::closure$0<unknown>
at C:\Users\ianzhang\source\repos\komorebi\komorebi\src\process_event.rs:46
17: core::hint::black_box<unknown>
at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6\library\core\src\hint.rs:337
⋮ 12 frames hidden ⋮
Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
Run with RUST_BACKTRACE=full to include source snippets.
Warning: SpanTrace capture is Unsupported.
Ensure that you've setup a tracing-error ErrorLayer and the semver versions are compatible
2024-05-24T19:32:36.259712Z ERROR komorebi::process_event:
0: there is no monitor with that index
It is on VM:
System Model: Virtual Machine
System Type: x64-based PC
Processor(s): 1 Processor(s) Installed.
[01]: Intel64 Family 6 Model 106 Stepping 6 GenuineIntel ~2793 Mhz
It was working on 0.1.25 tho.
@ianzhang366 commented on GitHub (May 24, 2024):
Hi @LGUG2Z I got the following:
```
$ cargo run --bin komorebi
Blocking waiting for file lock on package cache
Blocking waiting for file lock on build directory
Compiling komorebi v0.1.27-dev.0 (C:\Users\ianzhang\source\repos\komorebi\komorebi)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 38.94s
Running `target\debug\komorebi.exe`
2024-05-24T19:32:31.165087Z INFO foreground_lock_timeout: komorebi::windows_api: current value of ForegroundLockTimeout is 0
2024-05-24T19:32:31.172982Z INFO init: komorebi::window_manager: initialising
[komorebi\src\windows_api.rs:235:9] win32_display_data::connected_displays().collect::<Vec<_>>() = []
2024-05-24T19:32:31.177241Z INFO komorebi::process_command: listening on komorebi.sock
2024-05-24T19:32:31.177269Z INFO komorebi::process_event: listening
2024-05-24T19:32:31.177538Z INFO komorebi::border_manager: listening
2024-05-24T19:32:31.177619Z INFO komorebi::stackbar_manager: listening
2024-05-24T19:32:31.177921Z INFO komorebi::workspace_reconciliator: listening
2024-05-24T19:32:31.183716Z INFO komorebi::monitor_reconciliator: created hidden window to listen for monitor-related events
2024-05-24T19:32:31.184128Z INFO komorebi::monitor_reconciliator: listening
2024-05-24T19:32:31.184298Z INFO komorebi::reaper: watching
2024-05-24T19:32:36.252075Z ERROR komorebi::process_event:
0: there is no monitor with that index
Location:
komorebi\src\window_manager.rs:427
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⋮ 11 frames hidden ⋮
12: komorebi::window_manager::impl$4::enforce_workspace_rules::closure$0<unknown>
at C:\Users\ianzhang\source\repos\komorebi\komorebi\src\window_manager.rs:427
13: enum2$<core::option::Option<ref$<komorebi::monitor::Monitor> > >::ok_or_else<ref$<komorebi::monitor::Monitor>,eyre::Report,komorebi::window_manager::impl$4::enforce_workspace_rules::closure_env$0><unknown>
at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6\library\core\src\option.rs:1237
14: komorebi::window_manager::WindowManager::enforce_workspace_rules<unknown>
at C:\Users\ianzhang\source\repos\komorebi\komorebi\src\window_manager.rs:424
15: komorebi::window_manager::WindowManager::process_event<unknown>
at C:\Users\ianzhang\source\repos\komorebi\komorebi\src\process_event.rs:132
16: komorebi::process_event::listen_for_events::closure$0<unknown>
at C:\Users\ianzhang\source\repos\komorebi\komorebi\src\process_event.rs:46
17: core::hint::black_box<unknown>
at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6\library\core\src\hint.rs:337
⋮ 12 frames hidden ⋮
Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
Run with RUST_BACKTRACE=full to include source snippets.
Warning: SpanTrace capture is Unsupported.
Ensure that you've setup a tracing-error ErrorLayer and the semver versions are compatible
2024-05-24T19:32:36.259712Z ERROR komorebi::process_event:
0: there is no monitor with that index
```
It is on VM:
```
System Model: Virtual Machine
System Type: x64-based PC
Processor(s): 1 Processor(s) Installed.
[01]: Intel64 Family 6 Model 106 Stepping 6 GenuineIntel ~2793 Mhz
```
It was working on 0.1.25 tho.
There were significant changes in the latest release to support persisting state across suspend/resume cycles and monitor disconnect/reconnect cycles; hardware IDs are now used to uniquely identify monitors across these cycles, and it looks like those hardware IDs might not be emulated in virtualized environments.
@LGUG2Z commented on GitHub (May 24, 2024):
There were significant changes in the latest release to support persisting state across suspend/resume cycles and monitor disconnect/reconnect cycles; hardware IDs are now used to uniquely identify monitors across these cycles, and it looks like those hardware IDs might not be emulated in virtualized environments.
I'll look into this for the next release, it will probably require development here rather than in this repo: https://github.com/LGUG2Z/win32-display-data/
@LGUG2Z commented on GitHub (May 24, 2024):
@ianzhang366 I have tested the fix on a Win10 VM and all is good, please run from https://github.com/LGUG2Z/komorebi/commit/da7a9394d8f93fcf07279dde1bd56b63f3cdc47a until the next release 🙏
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @ianzhang366 on GitHub (May 24, 2024).
First of all, thanks for building this project!
Describe the bug
After upgraded to 0.1.26 from 0.1.25, komorebi stop working with error message:
To Reproduce
Steps to reproduce the behavior:
komorebi.exe --config="C:\Users\ianzhang\source\bin\komorebi.json" --ffmkomorebic logExpected behavior
Komorebi should start up properly.
Screenshots and Videos
Add screenshots and videos to help explain your problem.
Operating System
komorebic checkOutputAdditional context
config file:
with similar config the 0.1.25 output the following state:
@LGUG2Z commented on GitHub (May 24, 2024):
It looks like your display is not being detected anymore. Can you add this debug statement, run
cargo run --bin komorebiand share the output?You can add it under this line: https://github.com/LGUG2Z/komorebi/blob/88684f991f514d0a5c9b9c19f4be45e7fa531868/komorebi/src/windows_api.rs#L234
@LGUG2Z commented on GitHub (May 24, 2024):
Additional question, what hardware are you running this on? Is it on bare metal or a virtual machine?
@ianzhang366 commented on GitHub (May 24, 2024):
Hi @LGUG2Z I got the following:
It is on VM:
It was working on 0.1.25 tho.
@LGUG2Z commented on GitHub (May 24, 2024):
There were significant changes in the latest release to support persisting state across suspend/resume cycles and monitor disconnect/reconnect cycles; hardware IDs are now used to uniquely identify monitors across these cycles, and it looks like those hardware IDs might not be emulated in virtualized environments.
I'll look into this for the next release, it will probably require development here rather than in this repo: https://github.com/LGUG2Z/win32-display-data/
@ianzhang366 commented on GitHub (May 24, 2024):
cool, thanks.
I will rollback to 0.1.25 for now.
@LGUG2Z commented on GitHub (May 24, 2024):
@ianzhang366 I have tested the fix on a Win10 VM and all is good, please run from https://github.com/LGUG2Z/komorebi/commit/da7a9394d8f93fcf07279dde1bd56b63f3cdc47a until the next release 🙏
@ianzhang366 commented on GitHub (May 25, 2024):
@LGUG2Z Just I run it, it works great! thanks for the fix and prompt help!