Laptop Keyboard Won't Respond at Login Screen

The biggest issue is that after lock screen the keyboard is unresponsive or does not appear to be working. It also happened if the OS goes to suspend after a while, then I am greeted by the log-in screen. To workaround the issue I hit change user, then select the onscreen keyboard and as soon as I hit a key then the laptop keyboard starts working again. The other workaround is choosing to reboot the system as it has never happened after booting.
I’ve made a lot of search on this issue and have tried many recommended solutions with similar issues:

sudo apt remove fwupd did not worked.
and another "fix"involving the grub but couldn’t find it again to paste here.
Any help appreciated. thanks

Laptop: Sony Vaio Model: sve15125cxs
OS: Ubuntu Mate. Previously: Ubuntu 16.04