-
Notifications
You must be signed in to change notification settings - Fork 172
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
Multiple monitors on each PC #3
Comments
Resolutions should not be a problem, but I never tried it on a multi-monitor setup. I'll try and report back :) |
hi there, any news about multiple screens? |
I believe it should work, provided that the orientation/layout is correct, but I'm traveling and have no way to test yet. My assumption is that if you have 2 machines with 2 FHD screens each, let's call them A and B, setting them up like:
would be identical as having e.g. 3840 x 1080 screen on the left and a similar one on the right. However, there are 3 major OSes to try on, as well as mismatched resolution scenario (one "left" monitor UHD and "right" monitor FHD). Unless somebody beats me to it, I'll try to see what happens in a couple of days :) |
Hi,
My mouse is switching well from B right to A left but other screens do not work. I have a "logical barrier" at borders of the main screen on both pc. I also tried a setup with vertical stack resulting in the same behavior. If I use my trackpad to get out of the barrier and then re-use the mouse connected to the pico, cursor is being teleported to the main screen. All screens are FHD and pcs are running windows 10. My soldering skills are pretty bad so let me know if any bad solder could make the picos behave like this. |
I've tested the multiple screen scenario and it works for me with no issues [tm] (as suggested above). I don't know what a logical barrier is in this context, please be so kind to explain (I have nothing similar configured, just a plain ubuntu with two monitor output on one side and the mouse just skips screens as expected). if your mouse works on PC connected to A but keyboard doesn't work on board connected to B, check solder/contacts on pins 7 and 2 of the ADuM1201 chip. Also check if you soldered pin 16 on pico A (marked GP12 on solder mask) and pin 22 on pico B (marked GP17 on solder mask). |
Sorry for not being precise on my explanation, I will try again. From B right to A left, everything works just fine. I am using two laptops for my tests. I can use my trackpad to move the mouse to my second screen (eg B right to B left). When I do so and use the mouse back, cursor is being teleported back to B right. Anyway, I think solders are not clean enough to learn much from my tests. I will try to assemble a second unit this week end as I bought enough component to do so. I will let you know how it turns out. |
Now I understand, sorry for being slow :) It seems Microsoft KB5003637 update to Win 10 brok^H^H^H^H changed the HID system behavior. I have no idea if it's going to be reverted at some point. In theory this could be worked around with a horrible hack by having a relative mode mouse just for screen hopping, or perhaps easier - activate accessibility mode to control mouse with numpad and then patch the firmware to send a numpad right/left when you reach internal screen border. Thank you for finding this and sharing,, I had no idea Windows behaved this way! |
Wow, well spotted ! Let me know if you want to build a new custom firmware someday to correct this. I would be happy to test it if needed. |
I'm focusing on basic functionality first, to cover most users and most hardware. Then we tackle the edge cases, like specific OS multi-desktop handling. I think it should be doable :) |
As of now, it works on Linux, Windows 10 might have issues after KB5003637 and so might macOS. Added to the list of feature requests/ideas, as this requires some workarounds to support. |
I noticed the problem on both of my machines and I think your proposed solution to add a driver which reports the MOUSE_VIRTUAL_DESKTOP flag is the best solution.
And apparently this is what Adder did to solve this: https://support.adder.com/tiki/tiki-read_article.php?articleId=103 |
@Trekky12 this is a great find, thank you. There is very little actual info on this anywhere. I have some ideas how to address that potentially, and avoiding any software would be great (because very often you can't install drivers, and for good reason). This brings up the complexity, as you have to model multiple screens on multiple outputs, but it's doable. Definitely in the roadmap :) |
I totally agree with you that it's best done without needing to install any software (especially on work devices where this is often not possible). Great to hear that this is on the roadmap 👍 |
Would it be possible to have a mode where the mouse isn't used for hopping? I am mostly interested in the fast switching and removing the need to restart an electrical connection with each USB device when switching desktops. I don't really need the cursor based hopping. Happy to open another issue if needed. |
You can do this by hitting Right CTRL + L to "lock" the mouse to the current screen and not have it hop. Would this be something along the lines of what you're after? |
That may work, I meant more along the lines of suppressing the absolute positioning and just passing along the mouse inputs. But thinking it through, you'd still have to be able to pass something through the pico, so I probably just need to be patient and wait for MS to roll back that KB |
I've got what's probably an odd setup with multiple monitors/displays. Currently I've got | Windows-1 | MacOS-1 | Windows-2 | Currently, I can't seem to 'reach' MacOS-2 (the inbuilt MacOS display) from MacOS-1 or any other display. Also, it's swapped Win1 and MacOS-1's positions. Not sure how to swap that back either. I use a custom mechanical keyboard and I don't actually have a Right CTRL key, I went to https://usevia.app/ to modify that, but the keyboard isn't detected (Which makes sense and I can plug it in and do that, but just thought I'd point that out as well) Is there anything I can configure to allow this or is the solution gonna be Win1|Win2|Mac1|Mac2? (Great project btw, and if anyone needs a spare board, I got a couple dozen made to gift to friends and I've still got spares) Edit: I thought I'd add a couple of other things that might help others. |
I feel almost embarrassed how basic my two-monitor setup is compared to some of you folks! :) I'm sorry but I simply have to ask out of curiosity - can you can share a picture of your setup? :))) Currently, switching is only supported in the X direction, mostly because I have to figure out how to mount my screen vertically. To swap positions, simplest way is to swap micro usb cables. Adding a software solution to set this up isn't terribly complicated but work was super-busy lately and left zero energy to work on personal stuff. You can change mouse speed per-output in the config, try changing that. It could also be that you got used to mouse acceleration feature in OS X and that is missing? Via won't work by design (I use it too and love it, it's brilliant), but even a minuscule chance of computer A exploiting some vulnerability there and using it as a vector to attack computer B is too high. The premise is - no inbound data, ever (except the LED). Not sure about Mac, but Win has a Microsoft KB5003637 issue which removed support for multi screens in absolute mode. This is something I plan to address with a silly workaround of adding relative coords as well in the descriptor and use a 1px movement to jump screens, but also need to define the concept of screen jumps that don't switch outputs, address different behavior with different OS, not make a terrible mess with configuring this etc. There will probably be better multi-monitor support, but interleaved outputs will probably not work because you can't directly jump to screen 2 with that MS restriction. |
@infosecconsultant this setup is just ... wow. I feel like a caveman now! Actually there is something you could test for me. Please test windows and mac like this: try plugging in another mouse and when you reach the right edge of screen 1 using deskhop, move the "other" mouse to the right a bit to hop on screen 2. Then continue moving the normal mouse connected through deskhop. What happens? Are you now stuck on screen 2 or returned back to screen 1? Screen 1 and screen 2 here mean multiple screens on the same output/os. This would be valuable info to determine how to try addressing this multiple monitors issue. Thanks in advance! |
Ahhh thanks lol. It took a while to find what worked great for me and honestly, there was a lot of building my own solution for things because there is no commercial alternative 🥲 Some people regularly use upwards of 6 monitors (stock traders, security guards, people in the matrix) and some people are happy with just one, whatever works 🤷 Yeah so if I use a second mouse on windows, it lets me scroll around on that screen no worries, but as soon as I touch the deskhop mouse it snaps back to the first monitor. MacOS on the other hand lets me switch between screens with the trackpad and I end up 'stuck' on that screen with the deskhop mouse. (it doesn't switch me back to the first monitor although it does reset the position of the cursor on the new screen to the last known position of the original screen). |
That's great information, thanks - so macos could benefit from that hypothetic workaround but windows would still remain broken. Oh well, it's either installing a driver for windows or going back to relative mode there. There seem to be no elegant solutions here :( |
Well, a work around for Mac would definitely be better than nothing. A driver is less than ideal. Is there any chance there could be some client side agent on windows? Also not ideal but getting FOSS drivers to work on Windows is not fun. It seems KB5003637 addressed some HID specific vulnerabilities so I'm not really in a position to roll it back either. Are there any other potential solutions? |
Yes, but not a single one is nice or simple. You could switch to relative mouse motions for screens above 1 in windows and mac but that's less precise, requires additional configuration (screen resolution, os/screen layout), etc. I have a simple idea how to maybe work around all of this for both operating systems, but not having a gazillion-screen setup reduces my options to experiment. |
I can potentially send you some additional monitors if that would help? Your setup would have to support that though. |
Nah, I couldn't take your monitors. I'd have nowhere to put them! I need to find something tiny that could fit on my desk, or use 1-2 cheap usb hdmi capture devices from Amazon. Those seem to be the most promising approach, as they don't take any additional space and you can fake 2 more screens easily. |
Well, alternatively, it is possible to buy ~5-8 inch HDMI LCD's for fairly cheap (usually used with Raspberry Pi's but would work with any other OS as well). |
Looks like commercial projects are struggling with this, too, see https://forum.level1techs.com/t/usb-roaming-mouse-km-switch-monitor-question/203273. |
Yep, it's not an easy problem to solve, especially when your premise is not installing any drivers. I have a few ideas to try, maybe one of them will work OK. |
Came here because I want a kvm solution that doesnt lag, which input director, synergy, barrier, etc all do. (mouse movement latency, not switching latency). I'm ok with a hybrid hw + software solution though, I'm thinking about essentially
|
This looks ... I have no words, probably Space Shuttle is what comes to mind. Man! :) @infosecconsultant since you were the one asking about the Mac, you might be interested to learn I've finally managed to find some time to do a bit of coding and managed to get a Mac workaround to function. Windows one will be a bit uglier once it's done, but might work to a certain degree. Would you be interested to do some testing? |
is there any software solution (workaround, patch etc.) for windows 10 as it currently disables the second monitor when deskhop is connected |
No software solutions are planned - the point of this is to do it in hardware as a self-contained thing. Windows workaround will basically be: for desktop 2 and beyond switch to relative mouse mode. Switching back from win screen 2 to screen 1 will not be very accurate but that's why it's a workaround. Work is crazy these days, so progress is slow... thank you for your patience. |
Ok, so is it possible to disable the instant switch when mouse movement is detected on the monitor edges and instead rely on only shortcut (some keyboard keypresses) and make the switch, but also be able to use 2 monitors on a windows pc? I do not know whether it is related with edge detection or not, but maybe at least we can use deskhop as a regular USB switch with a shortcut instead of an external hardware switch to trigger switching ? |
Thank you very much for the experimental code for multiple monitors @hrvach! I have two secondary screens on each of my Windows-PCs and would like to give some feedback: Sometimes when moving the mouse from the secondary to the primary screen the mouse jumps back to the border where the secondary and the primary screen meet. It seems to occur after a specific time and not on a specific position, so when the mouse is already on the middle of the primary screen it is more obvious than when the mouse is still near the border. It seems that this behaviour is almost every time on the "right PC" (A) and not so often on the "left PC" (B) but it occurs on both. Sometimes it is not possible to move windows from the primary to the secondary screen. Moving windows from the secondary to the primary screen is always possible. It seems there is a link betweent his two behaviours because "after" the mouse jumping to the border the window movement is never possible but when no jump happened the window movement is possible. Is there anything I can help to debug this and improve the multiple monitor feature? |
One thing you can try is turning off the mouse acceleration in windows if possible. Also, if you keep moving the pointer past the screen edge on the secondary windows screen, it will accumulate positioning error which then demonstrates as "mouse jumps back to the border" since the box can't know you're pushing the mouse beyond the screen edge in relative mode. What would potentially help is defining screen resolution and capping the movements past that point. One could make Windows use relative mode on all screens but that would make the experience of jumping FROM windows to another computer a bit worse. I can try that too :) |
Unfortunately turning mouse acceleration off changes nothing. It would be great if you could try your suggested solution :-) |
I'll see what can be done! There will probably be no magic fix that makes Windows behave like Linux, it will be a workaround but it can surely be improved at least a bit. Good thing is at least the initial plan somewhat works, so the effort was not pointless :) |
Dear @hrvach Maybe I am doing something wrong.. but on my setup it behaves like previous FW My setup is: 1 Win10 Laptop (A) with internal + external monitor (which is above the Laptop, but I tried also to reconifgure it to be on the right side on main monitor) and 1 Tizen Smart Monitor (B) On A the mouse remains always on main internal screen.. Should I do something manually to enable the support of the 2nd screen on A? Thanks in advance |
ops.. I missed the instructions at https://github.com/hrvach/deskhop?tab=readme-ov-file#multiple-screens-per-output |
You are magic!! |
There is still room for improvement, hopefully I get it to a usable state... |
Hi,
Excellent idea and implementation.
As of now, does it support multiple monitors with different resolutions connected on each PC ?
Thanks
The text was updated successfully, but these errors were encountered: