Xbox 360 Controller not working in retropie

I have setup retropie to autostart not using its own entry (which is number 3) but using the script.
Retropie starts normally but the controller is not working.
When i launch retropie from inside a desktop environment the controller works fine.
What should i do?

just to link the GitHub issue that is open for same case