Try using an old toothbrush to clean the docking pins on the keyboard and also where it docks to the tablet.
open