cursor not working in Ubuntu desktop vm (TrueNAS Core VM)

Avion

Dabbler
Joined
Dec 16, 2023
Messages
16
Hey,

i finally got everything setup for VMs on my TrueNAS Core installation and went ahead and installed a ubuntu desktop image on a standard settings vm.
1 cpu, 1 core 1 thread 8gb memory 200gb hdd space ubuntu desktop image.

All installs fine BUT when it boots up I can not move the cursor or click anything.
I can log-in via keyboard but actually the keyboard layout that I have setup in the install seems not to be right.
And the cursor is not working at all.

What am I missing? What is wrong? Is it a noVNC issue?
Is there an alternative to noVNC?
Where may i change the keyboard mapping to at least work right?

Any help with this is greatly appreciated. The SF results in a bunch of threads form 2020 where changing the amount of cores and threads and cpu is the solution but that seems to be no longer the case. I tried and tried for hours, re-installed the vm thrice and now I am reaching out to you.

Thank you very much for any help or guidance.
I am completely green in terms of TrueNAS and the architecture, so be candit and don't hold back. It might be something super obvious that I am missing.

1702855104483.png
 

Avion

Dabbler
Joined
Dec 16, 2023
Messages
16
Hey, after a night of trying to fix this i am not any further. Here is what I tried:

  1. According to a couple of posts in this forum the issue rests on the amount of cpu/cores. So I tried a lot of combinations, even and odd from up to 8 CPU, Cores and Threads. (not all possible combinations but a wide range to test)
  2. Changed nic, network devices etc. to virtual and back
  3. Updated and upgraded everything (TrueNAS, new Ubuntu Image, ubuntu inside the vm)
  4. replaced the image to an older one
  5. reboot trueNas and the workstation/server running it
  6. rezised vnc and tried all options I could

issues remain:
1. keymapping is completely wrong
2. curser is not working on the vm

What could possibly be the cause? The next try would be different distros from linux but that defies the purpose of setting up the VM exactly how it runs on other machines from me.

Any help or ideas is greatly appreciated. I am out of my depth with it.
 

murdok610

Cadet
Joined
Nov 22, 2019
Messages
2
Hey, after a night of trying to fix this i am not any further. Here is what I tried:

  1. According to a couple of posts in this forum the issue rests on the amount of cpu/cores. So I tried a lot of combinations, even and odd from up to 8 CPU, Cores and Threads. (not all possible combinations but a wide range to test)
  2. Changed nic, network devices etc. to virtual and back
  3. Updated and upgraded everything (TrueNAS, new Ubuntu Image, ubuntu inside the vm)
  4. replaced the image to an older one
  5. reboot trueNas and the workstation/server running it
  6. rezised vnc and tried all options I could

issues remain:
1. keymapping is completely wrong
2. curser is not working on the vm

What could possibly be the cause? The next try would be different distros from linux but that defies the purpose of setting up the VM exactly how it runs on other machines from me.

Any help or ideas is greatly appreciated. I am out of my depth with it.

I too have this issue. It happened on an older Ubuntu jellyfish VM. All was well until last week. Lots of googling reveals that this issue happened back in 2020 and folks simply changed I/O to VirtIO drivers AND flipped CPU's to an odd number. But that isn't working for me this last week. What the bleep is going on this time?

Hopefully somebody will come back back with an easy solution maybe you and I missed.....
 

Avion

Dabbler
Joined
Dec 16, 2023
Messages
16
I too have this issue. It happened on an older Ubuntu jellyfish VM. All was well until last week. Lots of googling reveals that this issue happened back in 2020 and folks simply changed I/O to VirtIO drivers AND flipped CPU's to an odd number. But that isn't working for me this last week. What the bleep is going on this time?

Hopefully somebody will come back back with an easy solution maybe you and I missed.....
Hey @Murdock610 Indeed! That is exactly what I found as well and tried as well but did not resolve anything actually. Also I like to mention, I did have a working cursor during installation ;).
 

gwav8or

Cadet
Joined
Sep 15, 2014
Messages
4
I have the exact same issue. Mouse cursor during installation but after installation, no mouse cursor. It's very frustrating. Hope someone finds a fix soon.
 

Hutchca

Cadet
Joined
Dec 19, 2023
Messages
8
Same here.
I tried re-installing an older version of Ubuntu 22.04 and the mouse works fine during the installation but stops working as soon as Ubuntu boots from disk.
I tried reverting TrueNAS from 13.0-U6.1 back to 13.0-U6 but that didn't help either.

To clarify, I'm using the integrated VNC console connection to the TrueNAS server, not VNC direct to the Ubuntu VM.

I can work using Remote Desktop direct to the Ubuntu VM but even in RDP, the mouse does stop working any time I open the 'Show Apps' menu.
It starts working again if I disconnect and re-connect to RDP.
 

Avion

Dabbler
Joined
Dec 16, 2023
Messages
16
Hey @gwav8or, indeed. Please do pm me the instant you find a solution. I would be super happ as I now switched to ubuntu server just to have any VM running.
 

Geigo

Cadet
Joined
Dec 21, 2023
Messages
1
Same problem after runnin update in the Ubuntu VM.
I am running truenas 13.0-U6.1 and Ubuntu 22.04.02 for the last six months without problem.
Yesterday I updated Ubuntu (from within the VM) after the obligatory restart the mouse stopped working.
Power off/on the VM made no difference so I decided to recreate the VM with Ubuntu 22.04.03, no luck but an
error message at startup:
1703166944534.png

Reinstalled with Ubuntu 22.04.02, no change same error message and mouse working halways i.e. cursor moves
but no effect of clicking any button.
Tried to read any post related to the problem but alas... The only possible clue is that all this happened after upgrade
to 13.0-U6 or to 13.0-U6.1

Anty ideas would be most welcome
 

Avion

Dabbler
Joined
Dec 16, 2023
Messages
16
Hey @Geigo, thanks for your post. Jupp, I got the same error message and I researched it for hours but could not really get to the bottom of it. I also did that update but did not have an VM installed beforehand, thus can not compare.
BUT I thought maybe it has to do something with the usb port settings. On the workstation it is a USB 3.1 port but it enumerates USB2? Maybe?

Does anyeone know if I would change the VNC settings maybe?
Also i am looking into using anything else then VNC but did not really got into it that much as every post If find ends with "this error, that error .... use VNC"

Maybe @HoneyBadger would have an idea about this? We would love to hear your insight, if you have the time. Really appreciated.
 

Hutchca

Cadet
Joined
Dec 19, 2023
Messages
8
Same problem after runnin update in the Ubuntu VM.
I am running truenas 13.0-U6.1 and Ubuntu 22.04.02 for the last six months without problem.
Yesterday I updated Ubuntu (from within the VM) after the obligatory restart the mouse stopped working.
Power off/on the VM made no difference so I decided to recreate the VM with Ubuntu 22.04.03, no luck but an
error message at startup:
View attachment 73665
Reinstalled with Ubuntu 22.04.02, no change same error message and mouse working halways i.e. cursor moves
but no effect of clicking any button.
Tried to read any post related to the problem but alas... The only possible clue is that all this happened after upgrade
to 13.0-U6 or to 13.0-U6.1

Anty ideas would be most welcome
I get the same error message at startup. Started thinking it's emulating a USB mouse and the virtual USB port isn't working.
I tried booting under U6 but that didn't fix it. Mouse works fine in the Ubuntu installer but not after it's installed.
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
Maybe @HoneyBadger would have an idea about this? We would love to hear your insight, if you have the time. Really appreciated.
I haven't booted up a VM under CORE in a long time; you'll have to give me a bit to sand the rust off my brain for this one, but I'll take a stab at it.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
I run quite a few productive VMs on CORE. General approach:

- Unix (FreeBSD or Linux) systems don't need a VGA/VNC device - delete it, activate serial console instead and use SSH generally
- Windows Systems won't boot without VGA/VNC but don't use it after initial installation - there's RDP, after all

So why precisely do you need a graphical console for a Linux VM? Maybe we can find/suggest a better mechanism/protocol.
 

Hutchca

Cadet
Joined
Dec 19, 2023
Messages
8
So why precisely do you need a graphical console for a Linux VM? Maybe we can find/suggest a better mechanism/protocol.
To be able to use the GUI, obv. Running Ubuntu desktop, mostly for jump host and admin tasks.
Many local device admin interfaces are web gui.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
I manage all of my Linux (actually 100% Ubuntu) VMs with ssh only. For your requirement: doesn't Linux offer some remote desktop protocol similar to RDP that runs in the VM itself instead of relying on some VGA emulation? I remember using X11vnc or some such, but probably there are better solutions today.
 

Hutchca

Cadet
Joined
Dec 19, 2023
Messages
8
doesn't Linux offer some remote desktop protocol similar to RDP that runs in the VM itself instead of relying on some VGA emulation?
Yes. That's the workaround for now, but it's a lot easier IMO to use VNC as it used to work fine and should work.
Even in RDP I lose the mouse when I open the show apps menu.
 

_dev

Cadet
Joined
Dec 23, 2023
Messages
1
I also encountered this problem, seemingly out of nowhere as I was working on a Xubuntu 18 virtual machine. The same issue occurred when I used a Xubuntu 22 virtual machine. I did have keyboard access, so in order to fix the problem I set up tightvncserver on the vm and connected that way. The cursor now works.
 

dilacerated

Dabbler
Joined
Aug 30, 2011
Messages
21
Same issue here. Began after my 20.04.6 VM's updated to linux-image-5.4.0-169-generic. Tried the latest 5.15 and 5.19 with the same result. Booting back to linux-image-5.4.0-167-generic fixed this.

I had not updated my NAS in a longtime due to a plugin my wife and I still used but I decided at the start of my vacation to remove the old legacy jail and get current. This happens with the same VM's and mentioned kernels on 11.2-U8 -> 11.3-U5 -> 12.0-U8.1 -> 13.0-U6.1. That said this isn't a FreeNAS/TrueNAS problem.

I think this is tied to the fix for CVE-2023-37453:

It was discovered that the USB subsystem in the Linux kernel contained a
race condition while handling device descriptors in certain situations,
leading to a out-of-bounds read vulnerability. A local attacker could
possibly use this to cause a denial of service (system crash).

linux-image-5.4.0-169-generic dmesg log:

[ 0.269304] usbcore: registered new interface driver usbfs
[ 0.269304] usbcore: registered new interface driver hub
[ 0.269304] usbcore: registered new device driver usb
[ 0.779575] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.04
[ 0.779576] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 0.779578] usb usb1: Product: xHCI Host Controller
[ 0.779578] usb usb1: Manufacturer: Linux 5.4.0-169-generic xhci-hcd
[ 0.779579] usb usb1: SerialNumber: 0000:00:1e.0
[ 0.779939] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[ 0.779957] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.04
[ 0.779957] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 0.779958] usb usb2: Product: xHCI Host Controller
[ 0.779959] usb usb2: Manufacturer: Linux 5.4.0-169-generic xhci-hcd
[ 0.779960] usb usb2: SerialNumber: 0000:00:1e.0
[ 1.009814] usb 2-1: new SuperSpeed Gen 1 USB device number 2 using xhci_hcd
[ 1.029057] usb 2-1: Invalid ep0 maxpacket: 8
[ 1.165543] usb 2-1: new SuperSpeed Gen 1 USB device number 3 using xhci_hcd
[ 1.186222] usb 2-1: Invalid ep0 maxpacket: 8
[ 1.195194] usb usb2-port1: attempt power cycle
[ 1.652043] usb 2-1: new SuperSpeed Gen 1 USB device number 4 using xhci_hcd
[ 1.670275] usb 2-1: Invalid ep0 maxpacket: 8
[ 1.936838] usb 2-1: new SuperSpeed Gen 1 USB device number 5 using xhci_hcd
[ 1.958853] usb 2-1: Invalid ep0 maxpacket: 8
[ 2.100176] usb usb2-port1: unable to enumerate USB device
[ 5.242333] audit: type=1400 audit(1702746231.940:9): apparmor="STATUS" operation="profile_load" profile="unconfined" name="ippusbxd" pid=453 comm="apparmor_parser"

linux-image-5.4.0-167-generic dmesg log:

[ 0.264226] usbcore: registered new interface driver usbfs
[ 0.264231] usbcore: registered new interface driver hub
[ 0.264238] usbcore: registered new device driver usb
[ 0.779474] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.04
[ 0.779475] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 0.779475] usb usb1: Product: xHCI Host Controller
[ 0.779476] usb usb1: Manufacturer: Linux 5.4.0-167-generic xhci-hcd
[ 0.779477] usb usb1: SerialNumber: 0000:00:1e.0
[ 0.779820] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[ 0.779836] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.04
[ 0.779837] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 0.779838] usb usb2: Product: xHCI Host Controller
[ 0.779838] usb usb2: Manufacturer: Linux 5.4.0-167-generic xhci-hcd
[ 0.779839] usb usb2: SerialNumber: 0000:00:1e.0
[ 1.010184] usb 2-1: new SuperSpeed Gen 1 USB device number 2 using xhci_hcd
[ 1.029693] usb 2-1: New USB device found, idVendor=fb5d, idProduct=0001, bcdDevice= 0.00
[ 1.029695] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1.029696] usb 2-1: Product: HID Tablet
[ 1.029697] usb 2-1: Manufacturer: BHYVE
[ 1.029697] usb 2-1: SerialNumber: 01
[ 1.035659] usbcore: registered new interface driver usbhid
[ 1.035659] usbhid: USB HID core driver
[ 1.038036] input: BHYVE HID Tablet as /devices/pci0000:00/0000:00:1e.0/usb2/2-1/2-1:1.0/0003:FB5D:0001.0001/input/input4
[ 1.038402] hid-generic 0003:FB5D:0001.0001: input,hidraw0: USB HID v10.01 Mouse [BHYVE HID Tablet] on usb-0000:00:1e.0-1/input0

Another Ubuntu based OS suffers this problem (tried Pop_OS!). Am testing out things I use in these VM's with AlmaLinux and transitioning to such.
 
Last edited:

Yangorang

Cadet
Joined
Sep 17, 2015
Messages
7
I am experiencing this same issue after updating to TrueNAS-13.0-U6.1 with an Ubuntu 20.04 desktop VM as of yesterday. The keyboard inputs still seem to work, but the mouse input does not via VNC. Has anyone found a temporary workaround or fix?

I've am able to control the mouse cursor just fine if I use TeamViewer.
 
Last edited:

sisente

Cadet
Joined
Dec 28, 2023
Messages
1
I have run into the same issue. I only have one vm, I randomly use for testing things. Have had it running for a few months. The last change I made was updating to TrueNAS-13.0-U6.1. Just tried my Ubuntu machine, and the cursor no longer works in vnc. Keyboard works, but no mouse Annoying
 
Top