I had this problem, and tried many things... then I found this, which was an instant fix:
1. Connect charger on the keyboard unit with the computer on, and the keyboard attached.
2. Undock the keyboard ("Safely remove hardware and eject media" > "Eject docking station", on my machine)...