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

Windows App-VM/HVM dual screen [almost] working, need to solve "ghost clicks" and second screen deadness #3480

Open
tonsimple opened this Issue Jan 19, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@tonsimple

tonsimple commented Jan 19, 2018

Qubes OS version:

R 3.2

Affected TemplateVMs:

Windows 7 HVMs, windows-based App-VMs


Steps to reproduce the behavior:

Use the "run in debug mode" trick to force windows into spawning two proper windows, each of which will be able to display windows desktop (even icons/links/folders etc., folders can be dragged to secondary screen with some luck, see below)

With proper resolution settings the secondary (debug-window) monitor window can be forced to go fullscreen on the second monitor

Folders can be dragged to the secondary monitor's desktop (if windows is set to extend desktop there) making it almost usable

However, a problem remains

Expected behavior:

Using the now fullscreened secondary windows "window" as full featured windows second monitor, thus allowing to run proper dual-head windows setup from Qubes

Actual behavior:

odd "mouse confusion behavior" prevents normal use of second monitor in windows VM

When one tries to click a "settled" element on the secondary desktop, odd "ghost click" is registered on first desktop, resulting in un-wanted elements being clicked on "main" screen instead of, or simultaneously with, elements on the "secondary" screen's desktop.

Most obvious if you do a right-click, and, in most cases, the right-click menu will spawn on main monitor and/or will quickly flash on the secondary one and then properly appear on main one.

It is as if windows HID driver Qubes uses gets confused by the presence of "second monitor" and treats them as one.

General notes:

After workaround(s) for "qga.exe" lag was found here windows usability in Qubes improved greatly for me.
Like, by an order of magnitude.

Now if someone could suggest a way of getting dual-head working (other than "drag a single Qubes VM window across two screens), that would be awesome.
Stretched-single-window approach is all kinds of gauche and uncomfortable.


Related issues:

Might be related to another odd Qubes Windows HID bug (both seem to deal with it being somehow confused about "normal", entirely expected inputs)
#3018

@Reapette

This comment has been minimized.

Show comment
Hide comment
@Reapette

Reapette Feb 14, 2018

Can confirm reproducing all this stuff on both intel integrated graphics (a desktop with 2 screens and a notebook with external monitor attached) and a Radeon. Would have done on Nvidia too but I never succeeded on getting Qubes+recent Nvidias off the ground.

It would be really great if someone found a solution (maybe a dirty hack :) ) to make Qubes input work adequately with "second debug display" in Windows.

I don't mind starting the VM in "debug mode" every time, but the "ghost clicks" thing is really killing it for me.

P.S.: my displays typically have different resolution so "just stretch one window over two screens" lifehack doesn't work quite well for me

Can confirm reproducing all this stuff on both intel integrated graphics (a desktop with 2 screens and a notebook with external monitor attached) and a Radeon. Would have done on Nvidia too but I never succeeded on getting Qubes+recent Nvidias off the ground.

It would be really great if someone found a solution (maybe a dirty hack :) ) to make Qubes input work adequately with "second debug display" in Windows.

I don't mind starting the VM in "debug mode" every time, but the "ghost clicks" thing is really killing it for me.

P.S.: my displays typically have different resolution so "just stretch one window over two screens" lifehack doesn't work quite well for me

@tonsimple

This comment has been minimized.

Show comment
Hide comment
@tonsimple

tonsimple Mar 23, 2018

Found a workaround but it's terribly "involved" and hacky.

Basically, the Qubes HID driver is to blame, it treats both displays as a singular display, so any click gets "cloned" across two fields.

The solution is to get a proper mouse inside the Windows VM and use it instead.

Of course, with USB passthrough not working and pice-e passthrough for windows being finnicky it may be a bit of a challenge.

My solution:

  1. Get a FitPC (small, fanless unit that can run windows 7 or something like that)

  2. get one of the USB network forwarding softwares (I use the USB Redirector from incentivespro, but there are probably several of options, including linux ones - I just couldn't get free USBIp work reliably on windows, it's just too finnicky)

3a) do PCIe passthrough of LAN network card to Windows VM

3b) do PCIe passthrough of a LAN network card to linux VM and do a proper port forwarding between the "LANhost-VM" and Windows VM. I failed with this version of config, for reasons I still don't quite understand (it works if I attach the network card to my "main" proxy VM, but [windows]-[proxyvm]-[LANhostVM] arrangement fails to work. Maybe I will re-test it one day, it should be doable.)

  1. connect the FitPC with your LAN card and configure relevant network settings. Configure the network USB sharing software in the fitpc.

  2. shut down windows VM and start up windows template VM (assuming you use template based VM for windows), with the LAN controller passed through to it.

In the windows VM's template modify QGA's registry settings:
https://www.qubes-os.org/doc/windows-tools-3/

The DisableCursor setting should be disabled, so that you'll actually see your new mouse's cursor

N.B., there appears to be one more setting there, undocumented one, and it seems surprisingly useful, I'll talk more about it in the postscript

Set up the client side of USB sharing software in the Windows Template

Shut down the template and restart main Windows VM

  1. repeat steps in original issue (above, first post :) ) to make a dual-screen config work

  2. connect a mouse to your fitpc and pass through a mouse to the windows VM

  3. use the passed-through mouse and enjoy honest dual-screen with no ghost-clicks

P.S.:

The QGA registry settings seems to have MaxFPS registry setting.

Configuring it below the formal refresh rate ("60hz") of the virtual screen connected to the driver seems to massively improve stability and QGA processor load for me, even after hours have passed and the notorious "QGA lag bug" manifests.

Currently running at MaxFPS 40 and very satisfied

P.P.S.:
I think if I buy one of the fancy gamer mice with a ton of buttons that can be configured to replicate keyboard presses, I can also work around my "Photoshop in Qubes" bug using this.

tonsimple commented Mar 23, 2018

Found a workaround but it's terribly "involved" and hacky.

Basically, the Qubes HID driver is to blame, it treats both displays as a singular display, so any click gets "cloned" across two fields.

The solution is to get a proper mouse inside the Windows VM and use it instead.

Of course, with USB passthrough not working and pice-e passthrough for windows being finnicky it may be a bit of a challenge.

My solution:

  1. Get a FitPC (small, fanless unit that can run windows 7 or something like that)

  2. get one of the USB network forwarding softwares (I use the USB Redirector from incentivespro, but there are probably several of options, including linux ones - I just couldn't get free USBIp work reliably on windows, it's just too finnicky)

3a) do PCIe passthrough of LAN network card to Windows VM

3b) do PCIe passthrough of a LAN network card to linux VM and do a proper port forwarding between the "LANhost-VM" and Windows VM. I failed with this version of config, for reasons I still don't quite understand (it works if I attach the network card to my "main" proxy VM, but [windows]-[proxyvm]-[LANhostVM] arrangement fails to work. Maybe I will re-test it one day, it should be doable.)

  1. connect the FitPC with your LAN card and configure relevant network settings. Configure the network USB sharing software in the fitpc.

  2. shut down windows VM and start up windows template VM (assuming you use template based VM for windows), with the LAN controller passed through to it.

In the windows VM's template modify QGA's registry settings:
https://www.qubes-os.org/doc/windows-tools-3/

The DisableCursor setting should be disabled, so that you'll actually see your new mouse's cursor

N.B., there appears to be one more setting there, undocumented one, and it seems surprisingly useful, I'll talk more about it in the postscript

Set up the client side of USB sharing software in the Windows Template

Shut down the template and restart main Windows VM

  1. repeat steps in original issue (above, first post :) ) to make a dual-screen config work

  2. connect a mouse to your fitpc and pass through a mouse to the windows VM

  3. use the passed-through mouse and enjoy honest dual-screen with no ghost-clicks

P.S.:

The QGA registry settings seems to have MaxFPS registry setting.

Configuring it below the formal refresh rate ("60hz") of the virtual screen connected to the driver seems to massively improve stability and QGA processor load for me, even after hours have passed and the notorious "QGA lag bug" manifests.

Currently running at MaxFPS 40 and very satisfied

P.P.S.:
I think if I buy one of the fancy gamer mice with a ton of buttons that can be configured to replicate keyboard presses, I can also work around my "Photoshop in Qubes" bug using this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment