I was trying to get f.lux working (Redshift/F.lux not working on Ubuntu 16.04 with Intel HD Graphics), and tried running:
sudo apt-get update
sudo apt-get install --reinstall xserver-xorg-video-intel xserver-xorg-core
sudo dpkg-reconfigure xserver-xorg
from here (16.04 - How To Purge Intel Default Drivers & Reinstall Intel Graphic Drivers). After rebooting, my inbuilt keyboard and touchpad aren't working any more; neither are my external wireless mounse & keyboard. I think the mouse works for a second or two while the programs in startup programs are opening, but afterwards there's no response. My external wireless mouse and keyboard don't work either. The keyboard works in grub.
I'n new to linux, and fairly out of my depth, so would really appreciate your help, especially if it means I don't have to reinstall ubuntu!