It could be that your system is powering down your USB ports to save energy.
It might do that in a rather rude and inconvenient way because of BIOS bugs.
The quick hack/check:
To check if the USB ports are powersaved, paste this in a terminal:
cat /sys/bus/usb/devices/*/power/control
'on' means "on"
'auto' means "can be powersaved"
To set all USB powered devices permanently on, paste this in a terminal:
for line in /sys/bus/usb/devices/*/power/control
do
echo 'on' | sudo tee "$line"
done
Now see if your USB is working again.
Changes will not be permanent and are back to default after a reboot.
The comprehensible version:
Alternatively, you can use powertop to check if the USB is set to 'suspendable'
and also to get some more information in a relatively easy way:
To install powertop:
sudo apt install powertop
Then run powertop from a terminal:
sudo powertop
- Use [tab] to Navigate to the tab 'tunables':
- Use cursor [up]+[down] to select a line starting with 'Autosuspend for USB'
- if it says 'good' use spacebar to toggle it to 'bad'
- do this for every line starting with 'Autosuspend for USB'
( In the upper-lefthand corner you'll see the commandline appear that powertop uses to set the tunables every time you toggle an entry. )