Controller does not work in games

I found that if I unplug all of my input devices (all of my keyboards and my controller, and then plug in my controller first, then it works. Anyone has any clue?