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

[BUG]: Komorebi doesn't start on a VDI using RDP #883

Open
azinsharaf opened this issue Jun 17, 2024 · 3 comments
Open

[BUG]: Komorebi doesn't start on a VDI using RDP #883

azinsharaf opened this issue Jun 17, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@azinsharaf
Copy link
Sponsor

Describe the bug
Upgrading to 0.1.27-dev.0 breaks komorebi on a VM machine connected via RDP.

To Reproduce
running komorebic start --config "C:\Users\<username>\.config\komorebi\komorebi.json" --whkd returns this:

Start-Process 'komorebi.exe' -ArgumentList '--config="C:\Users\asharaf\.config\komorebi\komorebi.json"' -WindowStyle hidden
Waiting for komorebi.exe to start...komorebi.exe did not start... Trying again
Start-Process 'komorebi.exe' -ArgumentList '--config="C:\Users\asharaf\.config\komorebi\komorebi.json"' -WindowStyle hidden
Waiting for komorebi.exe to start...komorebi.exe did not start... Trying again
Start-Process 'komorebi.exe' -ArgumentList '--config="C:\Users\asharaf\.config\komorebi\komorebi.json"' -WindowStyle hidden
Waiting for komorebi.exe to start...komorebi.exe did not start... Trying again

Running komorebi.exe directly for detailed error output

error: unexpected argument ''--config="C:\Users\asharaf\.config\komorebi\komorebi.json"'' found

Usage: komorebi.exe [OPTIONS]

For more information, try '--help'.

Operating System

OS Name:                   Microsoft Windows 10 Pro
OS Version:                10.0.19045 N/A Build 19045

komorebic check Output

KOMOREBI_CONFIG_HOME detected: C:\Users\asharaf\.config\komorebi

Looking for configuration files in C:\Users\asharaf\.config\komorebi

Found komorebi.json; this file can be passed to the start command with the --config flag

Found C:\Users\asharaf\.config\whkd\whkdrc; key bindings will be loaded from here when whkd is started, and you can start it automatically using the --whkd flag

Additional context
To troubleshoot it further, i built the latest release 0.1.27-dev from the source. then I cloned the https://github.com/LGUG2Z/win32-display-data and in its src folder i created a main.rs file with the following content:

fn main() {
    win32_display_data::connected_displays_all();
}

then i added two debug lines in device.rs file. The snippet is:

pub fn connected_displays_all() -> impl Iterator<Item = Result<Device, SysError>> {
    unsafe {
        let device_info_map = match get_device_info_map() {
            Ok(info) => info,
            Err(e) => return Either::Right(once(Err(e))),
        };

        let hmonitors = match enum_display_monitors() {
            Ok(monitors) => monitors,
            Err(e) => return Either::Right(once(Err(e))),
        };
	dbg!(&hmonitors);

        Either::Left(hmonitors.into_iter().flat_map(move |hmonitor| {
            let display_devices = match get_display_devices_from_hmonitor(hmonitor) {
                Ok(p) => p,
                Err(e) => return vec![Err(e)],
            };
			
	   dbg!(&display_devices);

then ran cargo run in its src folder. this is the result:


 ╭─ ~\Downloads\win32-display-data-master\win32-display-data-master\src 
 ╰─λ cargo run
   Compiling win32-display-data v0.1.0 (C:\Users\asharaf\Downloads\win32-display-data-master\win32-display-data-master)
warning: unused implementer of `Iterator` that must be used
 --> src\main.rs:2:5
  |
2 |     win32_display_data::connected_displays_all();
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: iterators are lazy and do nothing unless consumed
  = note: `#[warn(unused_must_use)]` on by default

warning: `win32-display-data` (bin "win32-display-data") generated 1 warning
    Finished dev [unoptimized + debuginfo] target(s) in 1.61s
     Running `C:\Users\asharaf\Downloads\win32-display-data-master\win32-display-data-master\target\debug\win32-display-data.exe`
@azinsharaf azinsharaf added the bug Something isn't working label Jun 17, 2024
@azinsharaf azinsharaf changed the title [BUG]: Short descriptive title [BUG]: Komorebi doesn't start on a VDI using RDP Jun 17, 2024
@azinsharaf
Copy link
Sponsor Author

on version 0.1.27:

╰─λ komorebi.exe
2024-06-21T17:14:35.331377Z  INFO foreground_lock_timeout: komorebi::windows_api: current value of ForegroundLockTimeout is 0
2024-06-21T17:14:35.335438Z  INFO komorebi: creating window manager from static configuration file: C:\Users\asharaf\.config\komorebi\komorebi.json
2024-06-21T17:14:35.345024Z  INFO init: komorebi::window_manager: initialising
Error:
   0: there is no monitor with that index

Location:
   komorebi\src\window_manager.rs:428

   1: BaseThreadInitThunk<unknown>
      at <unknown source file>:<unknown line>
   2: RtlUserThreadStart<unknown>
      at <unknown source file>:<unknown line>

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
Run with RUST_BACKTRACE=full to include source snippets.

komorebic monitor-information

thread 'main' panicked at komorebic\src/main.rs:1255:23:
No connection could be made because the target machine actively refused it. (os error 10061)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

@LGUG2Z
Copy link
Owner

LGUG2Z commented Jun 21, 2024

I think this one is gonna require me spinning up a VDI somewhere 😓

Is there a way I could reproduce a similar environment on a Azure?

@azinsharaf
Copy link
Sponsor Author

azinsharaf commented Jun 21, 2024

this is a work machine so i am not sure how you can spin it up free (or cheap). We are using Workspot Inc. (using win 10) as an enterprise solution.
Maybe using Azure Virtual Desktop could be a similar environment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants