Solved mouse disappeared on Debian guest after kernel update in it

Hi everyone!
Just updated kernel in Debian 12 VM (to 6.1.0-13-amd64).
After VM's reboot, mouse dissapeared in it.
bhyve VM startup script:
Bash:
sudo bhyve -c 8,sockets=2,cores=2,threads=2 -m 16G -H -w -S  \
  -s 0,hostbridge \
  -s 4,ahci-hd,/uvero/bsd2/vms/deb12.img \
  -s 5,virtio-net,tap0 \
  -s 7,passthru,94/0/0 \
  -s 8,hda,play=/dev/dsp,rec=/dev/dsp \
  -s 29,fbuf,tcp=0.0.0.0:5900,w=1920,h=1200,wait \
  -s 30,xhci,tablet \
  -s 31,lpc \
  -l com1,stdio \
  -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \
  deb12

Code:
$ uname -aKU
FreeBSD freebsd2 13.2-RELEASE-p4 FreeBSD 13.2-RELEASE-p4 GENERIC amd64 1302001 1302001

Tried to add '-A' option, no success.

Has anyone encountered a similar problem?
 
As a temporary solution, I use:
Bash:
xhci2@pci0:94:0:0: class=0x0c0330 rev=0x03 hdr=0x00 vendor=0x1912 device=0x0014 subvendor=0x1912 subdevice=0x0014
vendor = 'Renesas Technology Corp.'
device = 'uPD720201 USB 3.0 Host Controller'
class = serial bus
subclass = USB
which I passed through to VM.
Mouse worked with it.
But this is terrible :what:
 
Hmm, I've got the same issue with Debian 11 VM when update its kernel to 5.10.0-26-amd64
today. The VM startup script is similar to that given in the first post.

Edit. I use TigerVNC.
 
yes, for some linux kernel i've some trouble. i use vm package for managment bhyve vm and when i remove from conf file string xhci_mouse="yes" resolve the trouble
 
  • Thanks
Reactions: _al
I didn't bother to solve the problem. I have no time for this. The solution in post 2 is suitable for me. And I'm not going to switch from bhyve to vm-bhyve or anything like that , so I'm marking this as 'solved'.
 
I'm probably just adding noise:
Is gpm running?
service gpm status
Enable:
sudo apt install gpm
sudo systemctl enable gpm
sudo systemctl start gpm


(similar to moused_enable in FreeBSD)
 
  • Thanks
Reactions: _al
Thanks, but it didn't help
deb11_VM_bhyve.png


Edit. The solution from post 2 is suitable for me. When I go to FreeBSD 14, then instead of bhyve I will try vm-bhyve.
Edit2. This problem is only on Linux VM. There is no this problem on Windows 10 VM (the FreeBSD's host mouse works there).
 
xinput()

FYI:
 
  • Thanks
Reactions: _al
CuatroTorres, thank you!
I read everything from the links.
I'll experiment:
1) with pci=nomsi in grub.cfg (I think this is a bad idea, I think there will be problems with xhci-usb in the VM),
2) with the number of processors in the VM,
3) with changing the HDD mode from AHCI to VirtIO ....
But not right now. I'll post the results...
 
3) with changing the HDD mode from AHCI to VirtIO ....

bhyve's nvme storage is _A LOT_ faster than virtIO! It also doesn't need any special drivers on windows, as nvme is supported OOTB even by microsoft nowadays.

We're using nvme for almost all our bhyve guests, except for some (old) linux-based appliances that won't play well with it...
 
The results:

pci=nomsi in grub.cfg:
yeah, bad idea: no mouse, no keyboard in VM

changing the HDD mode from AHCI to VirtIO (ahci-hd --> virtio-blk)
doesn't help (no mouse)

changing the number of processors in the VM (according to discussion by links)
doesn't help (no mouse)

xinput
1) when I disconnect keyboard and mouse (which are connected to my 'passthru 94/0/0' device, 'uPD720201 USB 3.0 Host Controller' ), I have no mouse in VM
2) if keyboard and mouse are connected to my 'passthru 94/0/0' device (using ATEN CS62KM), xinput prints:
xinput_devices_in_deb11_VM.png

no another one mouse is in use

I intuitively understand that this has something to do with MSI/MSI-X and per-CPU affinity, ...but I'm not an expert in this area, so I'll leave everything as it is for now

PS. I left ahci-hd in the VM configuration.
 
Please stop posting pictures of text. Just copy/paste the text, preferably in a [code]...[/code] block.
 
  • Thanks
Reactions: _al
Sorry.
The virtual machine and host do not share a buffer.
But, yes, I can copy the text output via nfs.
 
Thanks. Pictures make it impossible to copy/paste information from (for quoting or testing locally for example). Also, 60 KB for a picture showing maybe 30 bytes worth of text, that's not very efficient.
 
I read the forum, including threads
and https://forums.freebsd.org/threads/bhyve-framebuffer-atkbd-data-buffer-full.60752/
Then I removed the line '-s 30,xhci,tablet' from the bhyve launch command and the mouse started working!
 
Hmm, I've got the same issue with Debian 11 VM when update its kernel to 5.10.0-26-amd64
today. The VM startup script is similar to that given in the first post.

Edit. I use TigerVNC.

The same here with FreeBSD 14 aarch64 (ARM) + GNOME as VMs in VMWare Fusion or UTM (QEMU) running on an M1 MacMini.
 
Back
Top