USB working only once in a while

Hello people.
I am being cursed with a problem in my laptop for a few months and I have been unable to solve it so far.

My usb ports work only once in a while. In other words, they always work when I reboot and then after some time, they stop working.
If I have a usb thumb drive, it disapears from the system or if it is a mouse, it stops working after a few moments.

What have I done so far?

  • Have upgraded from 22.04 to 22.10
  • Have tried xset -dpms and also back on and everything is the same
  • Tried the very same devices and ports in windows, since this is a dual boot machine and YES, they work just fine in Windows, so it is a ubuntu or ubuntu mate thing, not a computer thing.
  • I never experienced this problem with any of my desktops or previous laptops.

Everything unsucessfull so far.

I should also mention that for some reason, it works some times, as if by magic.

My gear: Aspire A3 a314 with an amd ryzen 5 3500U

Any suggestions would be much appreciated, thank you.

It looks like this model was first released early in 2019. Based on personal experience, I'm thinking that since the problem is intermittent, this may be a hardware issue. I've seen this kind of issue when a lithium ion battery gets old and begins to swell. It presses against the internal components of the laptop. If it's pressing against the USB port, it may be causing temporary issues with the connection.

It may not be the cause of your problems but it might be worth checking. If the laptop battery is swelling it needs to be replaced quickly. If there is nothing wrong with the battery, at least with the laptop cover off you can blow out any dust that has collected over the years to prevent overheating.


1 Like

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
         echo 'on' | sudo tee "$line"

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
  1. Use [tab] to Navigate to the tab 'tunables':
  2. Use cursor [up]+[down] to select a line starting with 'Autosuspend for USB'
  3. if it says 'good' use spacebar to toggle it to 'bad'
  4. 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. )