I recently installed Ubuntu Linux on a Lenovo Yoga Slim 7 Pro, although I had to connect an external keyboard to go through the installation process because the built-in keyboard was completely unresponsive!
Luckily I came across this Stack Overflow answer which did the trick for me.
Once the installation was complete I needed to edit the GRUB config to fix this.
sudo vim /etc/default/grub
Add these parameters to GRUB_CMDLINE_LINUX
like so:
GRUB_CMDLINE_LINUX="atkbd.reset=1 i8042.nomux=1 i8042.reset=1 i8042.nopnp=1 i8042.dumbkbd=1"
Once added, save and exit, then update your grub and reboot, like so:
sudo update-grub && reboot
I’m not sure if all of these paramters were required in my case, but I never bothered to try them one at a time or different combinations. If it works, it works.
The only thing I notice now is the light on the caps-lock key never turns on, but I can live with that 😉