mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-01-11 14:40:25 +01:00
[BUG]: Komorebi doesn't start on a VDI using RDP #412
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 @azinsharaf on GitHub (Jun 17, 2024).
Describe the bug
Upgrading to
0.1.27-dev.0breaks komorebi on a VM machine connected via RDP.To Reproduce
running
komorebic start --config "C:\Users\<username>\.config\komorebi\komorebi.json" --whkdreturns this:Operating System
komorebic checkOutputAdditional context
To troubleshoot it further, i built the latest release
0.1.27-devfrom the source. then I cloned thehttps://github.com/LGUG2Z/win32-display-dataand in itssrcfolder i created amain.rsfile with the following content:then i added two debug lines in
device.rsfile. The snippet is:then ran
cargo runin itssrcfolder. this is the result:@azinsharaf commented on GitHub (Jun 21, 2024):
on version
0.1.27:komorebic monitor-information
@LGUG2Z commented on GitHub (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 commented on GitHub (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?
@azinsharaf commented on GitHub (Jul 11, 2024):
@LGUG2Z I am wondering if you have had a chance to work on this. I am not able to use komorebi anymore. I understand that it isn't a common case, but hopefully there would be a solution.
@LGUG2Z commented on GitHub (Jul 11, 2024):
I tried reproducing this on an Amazon Lightsail Windows Server 2022 instance but I was not able to ^
@LGUG2Z commented on GitHub (Jul 11, 2024):
Can you try running your experiment from before again, but this time explicitly call the iterator with a for loop? I think the underlying functions weren't actually called based on the output:
@azinsharaf commented on GitHub (Jul 12, 2024):
@LGUG2Z commented on GitHub (Jul 12, 2024):
Can you try doing a search and replace in
device.rsforQDC_ONLY_ACTIVE_PATHStoQDC_ALL_PATHSand then try running the samemain.rssnippet again?@azinsharaf commented on GitHub (Jul 12, 2024):
getting the exact same error.
@LGUG2Z commented on GitHub (Jul 12, 2024):
https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-querydisplayconfig#parameters
The only other valid parameter in the docs for this function is
QDC_DATABASE_CURRENT, worth giving it a try too 🤔You should probably try different DISPLAYCONFIG_TOPOLOGY values too: https://learn.microsoft.com/en-us/windows/win32/api/wingdi/ne-wingdi-displayconfig_topology_id
@LGUG2Z commented on GitHub (Jul 12, 2024):
Actually I wonder if your specific VDI configuration falls under this: https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-querydisplayconfig#head-mounted-and-specialized-monitors
@azinsharaf commented on GitHub (Jul 13, 2024):
i tried some of them , same result.
@azinsharaf commented on GitHub (Jul 13, 2024):
i doubt if my machine as an specialized one (like medical device display, etc.).
@LGUG2Z commented on GitHub (Jul 13, 2024):
Not the most elegant solution but I think this should work:
d2782f3b91fc64bd1b99@azinsharaf commented on GitHub (Jul 13, 2024):
thanks for working on this. I built it from the source again but getting the same
there is no monitor with that indexerror again.@azinsharaf commented on GitHub (Jul 13, 2024):
but running the
src\main.rsinwin32-display(after adding debugging lines) returns this:@LGUG2Z commented on GitHub (Jul 13, 2024):
I think we are getting closer, can you try commenting out this line?
fc64bd1b99/src/device.rs (L359)@azinsharaf commented on GitHub (Jul 13, 2024):
output:
@LGUG2Z commented on GitHub (Jul 13, 2024):
I have tried replicating what the old code for monitor information resolution does here if you can try running the debug loop against it:
087c128e69@azinsharaf commented on GitHub (Jul 14, 2024):
it returns more information:
@LGUG2Z commented on GitHub (Jul 14, 2024):
I think this is the fix! 🎉
@azinsharaf commented on GitHub (Jul 14, 2024):
excited! Do you merge the branch or i can use the new rev # to test it?
@LGUG2Z commented on GitHub (Jul 14, 2024):
3c8a6cb7bdUpdated here 🤞@azinsharaf commented on GitHub (Jul 14, 2024):
:(
@LGUG2Z commented on GitHub (Jul 14, 2024):
Almost there 🤞
7b854616f7@azinsharaf commented on GitHub (Jul 14, 2024):
@LGUG2Z commented on GitHub (Jul 14, 2024):
Think I got all of the calls where we try to compute the
device_idhere:7435089010tl;dr of the root cause:
RDPUDD Chained DDvirtual monitor devices don't seem to ever have adevice_id(unlikeRemote Display Adapterdevices which do)@azinsharaf commented on GitHub (Jul 14, 2024):
it works now! Thank you so much!! <3
@LGUG2Z commented on GitHub (Jul 14, 2024):
I'll clean this up and add it for the v0.1.28 release 🎉