USB ports not working on battery power

Using a HP Envy 13 (Skylake), Ubuntu Mate 16.04.1.

All USB ports work fine when I’m on AC power.

When I’m on battery, USB storage devices don’t get recognised at all when I plug them in. It’s not just that they don’t get automounted, but even doing something like “fdisk -l” or “lsusb” won’t list the storage device.

Found a solution: After I disabled USB_AUTOSUSPEND in /etc/default/tlp, everything now works perfectly!