only detect USB ports when laptop is charging

These days I have been testing this wonderful distribution on my laptop, but I have been having a problem with the USB ports, what happens is that when I turn on the laptop without connecting it to the power it does not detect the USB ports, but when I turn it on charging if it detects them, but if I disconnect it it stops detecting them, please help,

Sounds to me like a problem with power management. Try installing tlpui and have a look at the USB settings when power saving is active. If the ports are disabled, change it and then try again. Maybe a reboot is needed after changes are applied, or at least restart tlp.service.