Spice with Windows 10 - Mouse Does Not Work

shadrich

New Member
May 8, 2020
4
2
3
48
I have been using Proxmox for several years, mostly to host VMs that I use to connect to various VPNs without breaking my local desktop networking. I tried using Windows 8 and Windows 10 with Spice several years ago, and it was a total mess at the time. I fell back to Windows 7, which worked great. With Windows 7 being out of mainline support, I decided to try Windows 10 again. It's gotten somewhat better, but I am having issues with my mouse working in one VM over Spice.

I basically followed the directions in the Windows 10 best practices guide, using the latest Virtio drivers, QEMU agent, etc.

Spice connects, and the keyboard works, but the mouse will not work at all in one of my VMs. I've reinstalled Windows 10 numerous times, trying different drivers...changed power settings, updated Proxmox, updated virt-viewer, etc. All without any luck.

I have another VM with pretty much the same setup. Plain Windows 10, followed the best practices guide, and it works as expected.

If I RDP into the "bad" VM, the mouse works. If I use VNC, the mouse works.

Has anyone else run into mouse issues like this with Windows 10 and Spice? Any tips or workarounds?

Versions, being used:

Proxmox: Virtual Environment 6.1-11
Virtio: virtio-win-0.1.173.iso
VirtViewer: 9.0-256
Windows 10, latest patches applied.

Other than this Windows 10 mouse business, I really do like Proxmox and Spice. I'd be using Linux VMs for this if the VPN clients were Linux-compatible. (I have not had these issues with Linux VM desktops + Spice...)

Thanks in advance for any help the community is able to provide.

--Shad
 
To circle back to this, I *think* I sorted out a workaround for the mouse issue.

While following the Windows 10 best practices guide, only install the "Red Hat VirtIO SCSI pass-through controller" in order to recognize the hard drive during the Windows 10 installation. The network will be inoperable, but that is OK. Complete the Windows 10 installation and then execute the virtio-win-gt-x64.msi installer from the mounted CD-ROM drive to complete the VirtIO driver installation. (I also skipped installing the "Qemu Guest Agent", and the system still appears to work as expected.)

After the VirtIO drivers have installed and the network card is working, run Windows Update to update the system.

At least the steps above seem to have resolved the mouse issue for the time being...
 
The issue came back after a Windows update rebooted the VM. After doing more research, the issue turns out to be the Citrix Workspace client installed shortly after creating the VM breaks the SPICE Agent (vd_agent).

https://gitlab.freedesktop.org/spice/win32/vd_agent/-/issues/8

I uninstalled Citrix Workspace, and the issue went away. Now to find a feasible workaround, since the whole purpose of the VM is to establish a VPN connection and then connect to a Citrix Desktop...
 
The issue came back after a Windows update rebooted the VM. After doing more research, the issue turns out to be the Citrix Workspace client installed shortly after creating the VM breaks the SPICE Agent (vd_agent).

https://gitlab.freedesktop.org/spice/win32/vd_agent/-/issues/8

I uninstalled Citrix Workspace, and the issue went away. Now to find a feasible workaround, since the whole purpose of the VM is to establish a VPN connection and then connect to a Citrix Desktop...
Hey bro
I got a exactly same problem, and I also have Citrix workspace installed. After remove that app, the mouse works.

Much appreciated.
 
Hey bro
I got a exactly same problem, and I also have Citrix workspace installed. After remove that app, the mouse works.

Much appreciated.

Hi @gy6221 ,

If you do need Citrix Workspace on the VDI, you can scroll through the bug report. The developer provided an updated vdagent.exe file that works around the issue, and it has been working for me so far.

--Shad
 
Hi @gy6221 ,

If you do need Citrix Workspace on the VDI, you can scroll through the bug report. The developer provided an updated vdagent.exe file that works around the issue, and it has been working for me so far.

--Shad

Why is this still an issue ?

I stumbled on this issue a few days ago and if there was a fix created to solve the conflict between Spice vdagent and Citrix close to 4 years ago, one could imagine the virt driver iso having a working driver.

Removing Citrix might not be a solution for everyone.

Sorry to revive an old thread.
 
I think a found a solution for this and it works consistently in my environment. It also explains why it doesn't work for a lot of people.

Brand new windows VM, with default video.I connect to the console via usual proxmox novnc way and... I can't change the resolution.
I switch the video to SPICE and power off/on the machine. Now the resolution can be changed but mouse is not synced.
Under options, Use tablet for pointer is set to yes. Disable it! Then re-enable it. Mouse is synced and survives reboots, etc.

I suspect this is a bug. Here's what's going on and why it seemed to work for some and not others.

When you create a new Win VM with default display and start it, it by default starts with tablet support (for mouse sync). This is reflected in the options screen. Use tablet is listed as yes. If you inspect the kvm process that proxmox started and the parameters it pased this is confirmed:
/usr/bin/kvm -id .... -device usb-tablet,id=tablet,bus=ehci.0,port=1

If you look at the config file for the VM under /etc/pve/qemu-server/<id>.conf you see no mention of tablet: 1 in that config file. It's omitted but proxmox is launching the VM with it because it is the default option.

NOW! Change the display from Default to SPICE and start the VM. Proxmox DOES NOT start it with the -device usb-tablet,id=tablet,bus=ehci.0,port=1 option!!! Even though it claims that it's on under Options!

When you turn the tablet support off in options, proxmox modifies the config file for the VM and inserts this:
tablet: 0
Then you re-enable tablet support but proxmox does not delete this line, it changes it to:
tablet: 1
And when proxmox sees tablet: 1 in the config, it starts the VM with the tablet support even if the display is set to spice.

Instead of toggling the tablet support of and on in Options you can simply add:
tablet: 1
to the config and start the VM. Problem solved! I did not need any additional drivers for this to work! I usually install the virtio-win-guest-tools.exe from the virtio ISO but even that is not necessary to get SPICE video with mouse sync to work. My trouble was all because Proxmox says tablet support is enabled but then it doesn't actually enable it on VMs with SPICE video if it's not explicitly defined as tablet: 1 in the config.

Hope this helps someone!
 
  • Like
Reactions: Ozy311
I think a found a solution for this and it works consistently in my environment. It also explains why it doesn't work for a lot of people.

Brand new windows VM, with default video.I connect to the console via usual proxmox novnc way and... I can't change the resolution.
I switch the video to SPICE and power off/on the machine. Now the resolution can be changed but mouse is not synced.
Under options, Use tablet for pointer is set to yes. Disable it! Then re-enable it. Mouse is synced and survives reboots, etc.

I suspect this is a bug. Here's what's going on and why it seemed to work for some and not others.

When you create a new Win VM with default display and start it, it by default starts with tablet support (for mouse sync). This is reflected in the options screen. Use tablet is listed as yes. If you inspect the kvm process that proxmox started and the parameters it pased this is confirmed:
/usr/bin/kvm -id .... -device usb-tablet,id=tablet,bus=ehci.0,port=1

If you look at the config file for the VM under /etc/pve/qemu-server/<id>.conf you see no mention of tablet: 1 in that config file. It's omitted but proxmox is launching the VM with it because it is the default option.

NOW! Change the display from Default to SPICE and start the VM. Proxmox DOES NOT start it with the -device usb-tablet,id=tablet,bus=ehci.0,port=1 option!!! Even though it claims that it's on under Options!

When you turn the tablet support off in options, proxmox modifies the config file for the VM and inserts this:
tablet: 0
Then you re-enable tablet support but proxmox does not delete this line, it changes it to:
tablet: 1
And when proxmox sees tablet: 1 in the config, it starts the VM with the tablet support even if the display is set to spice.

Instead of toggling the tablet support of and on in Options you can simply add:
tablet: 1
to the config and start the VM. Problem solved! I did not need any additional drivers for this to work! I usually install the virtio-win-guest-tools.exe from the virtio ISO but even that is not necessary to get SPICE video with mouse sync to work. My trouble was all because Proxmox says tablet support is enabled but then it doesn't actually enable it on VMs with SPICE video if it's not explicitly defined as tablet: 1 in the config.

Hope this helps someone!
I registered just to tell you that this solved my problem. Thank you for taking the time to post fixes like this. It is greatly appreciated!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!