Problem connecting switch pro controller

I am having issues with the switch pro controller getting recognized as a controller.
What i mean is that when i type lsusb it shows up but when i type xinput it doesn’t.
Funny thing is that it worked yesterday and i played games on steam with it but today it just stopped working and i don’t know what i did or what to do to make it work again.