This post is quite old, but I found a way to fix the problem after trying for a while.
I will describe the problem itself, so maybe it will help other people with the same problem.
I started noticing the problem while using text editors, all of the sudden Zoom was happening while scrolling, and Key Function actions where happening, like if I was pressing the ctrl or alt key, it was getting really frustrating cause I wasn’t able to work as fast as I would normally do.
The problem happened on an HP Notebook, referenced as HP 15 ab-110la, but the problem can happen on certain computers that have a chip related to the i8042 controller.
To fix it, I tried a bunch of stuff by reading the documentation, and as you can see, took me about a month of pure reading.
Finally, after getting to understand the way the laptop’s keyboard interacts with the trackpad, I discovered that on certain models, the chip mentioned above, tries to update the status from the keyboard, so, I found out a way to avoid the system from trying to modify the keyboard status.
If you have the same problem, all you have to do is this:
Open a terminal and execute
sudo gedit /etc/default/grub
We use the sudo command because we need to save what we edit.
Once in there, you will see a line that says something like
GRUB_CMDLINE_LINUX_DEFAULT="quiet iommu=soft resume=UUID=7f3b359d-7d89-4b38-8dd7-03376b86d986"
Or something similar, at the end of that specific line, add the following
a function from the i8042 controller that -As said by the i8042.c file-
static bool i8042_dumbkbd;
module_param_named(dumbkbd, i8042_dumbkbd, bool, 0);
MODULE_PARM_DESC(dumbkbd, "Pretend that controller can only read data from keyboard");
that being said, what the function does, is to force the controller to only read what the keyboard sends, and not try to update the keyboard status itself, the bad side to it is that now, none of the signal LEDs work, so, if you turn the caps lock and it has a LED, you won’t be able to see it.
Now, save the document you just edited, and run the following command
sudo grub-mkconfig -o /boot/grub/grub.cfg
what this does, is generate a new grub.cfg file, so the boot parameters will work from start.
I hope this helps anyone with the same problem.