Gamepad stops working on retroarch

Im having a problem while using a android 7.1 tv box.

I have manually set all the keys for the controller so it works fine when retroach finds it.

Using DragonRise Inc. Generic USB Joystick

autoconf file: https://pastebin.com/uRzdUd2C

1 - Open Retroarch.

2 - Controler autoconf message pops up in the bottom of the screen. At this point everything is working great.

3 - Load a game from any core, the game works normally. but the autoconf message does not pop in the bottom of the screen. So the controller does not work.

4 - So now i have to unplug the controller and plug it back in. After plugging the controller back in, the autoconf message pops up at the bottom of the screen. and the controller works again.

It happens all the time, when changing shadders, when exiting a game, while opening a game. So I have to keep unplugging and plugging the controller back in for the autoconf message to appear at the bottom of the screen.

Sorry for my bad english.