This started occurring yesterday. My laptop (Windows 10 Pro 64 bit) was running slower than usual and the mouse cursor was constantly flickering. I checked the recently installed programs and uninstalled suspicious looking ones. I also tried restarting the system, ending Windows Explorer from Task Manager, running it again and even ran a Malwarebytes scan.
Today, I used the Reset feature from the recovery options, opting to keep personal files. All the third-party apps were uninstalled yet the problem still persists. I ran a Windows Security quick scan and found 1 threat, which was removed. But the flickering hasn't stopped and the system still runs slow. I'm out of ideas now.
UPDATE: Things almost always return to normal when I switch to tablet orientation, where the keyboard and touchpad stop working.