general/other My mouse does not work as expected when FreeBSD is virtualized on Linux with virt-manager

Hello to everyone.

I've configured Linux Ubuntu 22.04 to be ready to pass thru my nvidia gpu to a guest OS. This time FreeBSD 13.1 is the guest OS. Inside the VM I have installed Xorg and xfce4. The problem is that the mouse does not move at all or it does not work as expected and I would like to understand why. For example,adding this code (called ps2 mouse) to virt-manager :

Code:
<input type="mouse" bus="ps2">
  <alias name="input1"/>
</input>

or this code,called "graphic tablet EvTouch USB,absolute movements":

Code:
<input type="tablet" bus="usb">
  <alias name="input4"/>
  <address type="usb" bus="0" port="3"/>
</input>

my mouse does not move at all inside the xfce4 desktop env. of FreeBSD. Instead,adding the code below :

Code:
<input type="mouse" bus="usb">
  <alias name="input3"/>
  <address type="usb" bus="0" port="2"/>
</input>

my mouse is moving,but its movements are relative. It means that everytime I need to release the mouse because I need it on the host system,I should press CTRL+ALT again and again and this is very annoying. In both cases it is not comfortable. Someone found a workaround for this problem ? I think that it's a wasting of resources to pass a whole USB controller only for passing thru a mouse,even because I think that I would not have the absolute movements (inside it and inside out the VM without pressing keys).
 
If you added a PS/2 mouse to FreeBSD's VM, you need to add moused_enable="YES" to /etc/rc.conf. A USB mouse automatically loads moused(8) through devd(8).
 
It would have worked if I needed relative movements,but I need absolute movements. In virt-manager the absolute movements are expressed by this code :

Code:
<input type="tablet" bus="virtio">
  <alias name="input2"/>
  <address type="pci" domain="0x0000" bus="0x0d" slot="0x00" function="0x0"/>
</input>

so,I think that I should add some parameters on /etc/rc.conf that automatically loads the virtio tablet instead of the ps2 mouse. Is this correct ? Take also in consideration that I can't remove the PS2 mouse from the Virt-manager graphical interface.
 
Back
Top