I found a bug report on this and the only suggestion is the following workaround: Add the Boot Parameter i8042.dumbkbd=1
sudo nano /etc/default/grub
Arrow key to GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
and add the parameter to make it look exactly like:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i8042.dumbkbd=1"
Tap ctrl+x to exit, then y
to say yes to save, then enter
key.
The terminal will revert to normal. Now run
sudo update-grub
Reboot and test...
Source:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1894017