I have a surface pro 4.
I had various devices missing in device manager and couldn't install the latest drivers. Also, I was unable to use my surface keyboard or the usb input. I tried various techniques to clean the connection between the surface keyboard, ordered a Bluetooth keyboard, reset the computer by wiping everything, and tried pretty much every solution I could find. Nothing worked. I believe my devices stopped working after a firmware update, and read that there was no way to revert back to my original version of windows, or the original firmware version.
So I ordered a usb flash drive (32gb) and followed the following instructions to boot windows from a recovery drive using a recovery image (the one that came pre-installed with my machine before all of the windows updates screwed everything up).
I went here to find the right recovery image - use serial number on the back of your surface:
https://support.microsoft.com/en-us/surfacerecoveryimage
Follow these instructions after you have the recovery zip file:
https://www.windowscentral.com/how-recovery-surface-laptop-and-reinstall-windows-10-s
After reinstalling the recovery image my surface keyboard, usb, bluetooth, and everything works again.