USB ports not working in laptop when charger is not connected

Hello,
I have a Vivobook laptop and have setup tumbleweed dual boot on it.
I recently noticed that the USB ports stop working when I remove the charger from the laptop and the problem remains until I restart the Laptop with the charger connected.

I saw a thread with the same problem but no proper solution was provided. I reinstalled tumbleweed thrice to no avail.

cat /sys/bus/usb/devices/*/power/control

on
on
auto
auto
auto
auto
auto
auto
auto
auto
auto

cat /sys/bus/usb/devices/*/power/wakeup

enabled
disabled
disabled
disabled
disabled
disabled
disabled
disabled
disabled

I could not attach output of lsusb as it was above character limit.

Please tell if something more is needed.
Thank You.

Please use the “Pre-formatted text” button, shown as </> in the editor bar, and paste the command line, the output and the trailing prompt.
Does the battery charger connect to an USB-C input/output or similar and if so on which port listed by lsusb?
What does “usb ports stop working” mean, they (all?) stop providing power to connected devices or connected devices are not detected or visible at all?

Does the battery charger connect to an USB-C input
No. The charger is a round thingy. No usb.

What does “usb ports stop working” mean, they (all?)
All the usb devices connected stop working. Pendrive is not shown for mounting,external keyboard and mouse dont work. I think power is still provided because the numlock key on my keyboard is still lit up.

I still could not paste the output of lsusb here with preformatted text button.
I pasted it here: Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Many folks won’t tap on a third party link … you can post to openSuse Paste

https://paste.opensuse.org/

1 Like

Maybe there is a problem with power management / wake-up configuration of USB hubs, but it is difficult to see from your postings what your USB subsystem looks like.
Please post command/output/trailing prompt using pre-formatted text like:

LT-B:~ # lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 8087:8000 Intel Corp. Integrated Rate Matching Hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 003: ID 04f2:b3fd Chicony Electronics Co., Ltd HD WebCam (Asus N-series)
Bus 003 Device 006: ID 13d3:3402 IMC Networks Bluetooth USB Host Controller
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
LT-B:~ # 

Looks like your keyboard, mouse, pendrive are all connected to Bus 001?
KBD and mouse may have wakeup problems, but what happens if you disconnect and re-connect the pendrive to another USB socket?

I would check settings in the BIOS to be sure it’s not influencing the behavior.

2 Likes

This is the output with the charger

zexy@MiWiFi-R4A-srv:~> lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 3434:0351 Keychron Keychron V5
Bus 001 Device 003: ID 046d:c092 Logitech, Inc. G102/G203 LIGHTSYNC Gaming Mouse
Bus 001 Device 005: ID 04f3:0903 Elan Microelectronics Corp. ELAN:Fingerprint
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 002: ID 0781:55a9 SanDisk Corp.  SanDisk 3.2Gen1
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 058f:6366 Alcor Micro Corp. Multi Flash Reader
Bus 003 Device 003: ID 058f:6254 Alcor Micro Corp. USB Hub
Bus 003 Device 004: ID 13d3:56d3 IMC Networks USB2.0 HD UVC WebCam
Bus 003 Device 005: ID 8087:0a2b Intel Corp. Bluetooth wireless interface
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
zexy@MiWiFi-R4A-srv:~> 

After plugging in pendrive in the keyboard port and mouse in the pendrive port, removed the keyboard

zexy@MiWiFi-R4A-srv:~> lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 005: ID 04f3:0903 Elan Microelectronics Corp. ELAN:Fingerprint
Bus 001 Device 007: ID 046d:c092 Logitech, Inc. G102/G203 LIGHTSYNC Gaming Mouse
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 003: ID 0781:55a9 SanDisk Corp.  SanDisk 3.2Gen1
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 058f:6366 Alcor Micro Corp. Multi Flash Reader
Bus 003 Device 003: ID 058f:6254 Alcor Micro Corp. USB Hub
Bus 003 Device 004: ID 13d3:56d3 IMC Networks USB2.0 HD UVC WebCam
Bus 003 Device 005: ID 8087:0a2b Intel Corp. Bluetooth wireless interface
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
zexy@MiWiFi-R4A-srv:~> 

Afrer removing the charger, and connecting everything to original ports

zexy@MiWiFi-R4A-srv:~> lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 005: ID 04f3:0903 Elan Microelectronics Corp. ELAN:Fingerprint
Bus 001 Device 007: ID 046d:c092 Logitech, Inc. G102/G203 LIGHTSYNC Gaming Mouse
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 058f:6366 Alcor Micro Corp. Multi Flash Reader
Bus 003 Device 003: ID 058f:6254 Alcor Micro Corp. USB Hub
Bus 003 Device 004: ID 13d3:56d3 IMC Networks USB2.0 HD UVC WebCam
Bus 003 Device 005: ID 8087:0a2b Intel Corp. Bluetooth wireless interface
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
zexy@MiWiFi-R4A-srv:~> 

There is no change after reconnecting the charger.

I checked the BIOS already. There were no settings related to power saving.

Should I check for something in windows?

That’s strange, usually laptops have this in the BIOS. It might be labeled “Intelligent Power / Cooling” or something along those lines and not mention “USB”. IIRC Lenovo calls it “Always on charging”.

If you have power management tools like tlp and other software installed/enabled, it might be worth checking it out. My default TW install came with TLP installed but disabled and I kept it that way. I hate too much power saving nonsense. If I wanted the laptop to save power I would close the lid to suspend.

@zexy72 Hi, is this dual boot with Windows? If so, boot to windows and in the device manager, check power settings there and disable as required. AFAIK, windows has a new habit of tweaking those on shutdown…

Or maybe TLP is suspending USB hubs and they are not able to wake-up…
(TLP is enabled on my system, don’t recall if by default or not).
You may check and force it to “AC” behaviour with the following sequence:

bruno@LT-B:~> su - <your root password>
LT-B:~ # tlp-stat |grep Mode 
Mode           = AC
  Model      = Samsung SSD 840 EVO 250GB               
LT-B:~ # tlp false
TLP started in AC mode (manual).
LT-B:~ # tlp-stat |grep Mode 
Mode           = AC (manual)
  Model      = Samsung SSD 840 EVO 250GB               
LT-B:~ # 

after that TLP should remain in “AC” mode even if you remove the charger and you can check if anything changes in USB behaviour.

1 Like

In an ASUS box of mine somewhat similar to a Vivobook there is no setting to disable USB under battery power. Maybe you are referring to USB “always on” charging even when the laptop is off or suspended, but that should not prevent operation of USB when the laptop is active.

1 Like

You hit the mark there, I was thinking of the “Always on charging” option to keep the USB always on :person_facepalming:

zexy@MiWiFi-R4A-srv:~> su
Password: 
MiWiFi-R4A-srv:/home/zexy # tlp-stat | grep Mode
Mode           = AC
Error: TLP's power saving will not apply on boot because tlp.service is not enabled --> Invoke 'systemctl enable tlp.service' to ensure the full functionality of TLP.

  Model      = INTEL SSDPEKNW512G8                     
  Model      = USB SanDisk 3.2Gen1
MiWiFi-R4A-srv:/home/zexy # 

Do I need to enable it and set it to AC?

Checked bios again. There is a setting to completely lock or unlock usb. Nothing related to power saving. Laptop does not charge with usb.

I found no relevant settings to tweak in windows. In power settings only sleep and lock options were there(no fast startup, hibernate, etc.). In some inside admin config thingy USB was enabled on charging as well as battery.

No, if TLP is not active it cannot suspend USB hubs and cannot cause that kind of problem.

@zexy72 In the Device Manager and look at the USB hub devices etc

I turned off power management for all USB options in device manager. Issue is still there.

Let’s see if it is indeed an autosuspend problem or not.
You wrote that when you remove the charger all USB devices stop working.
Please issue the following as superuser (root):

echo 600 >/sys/module/usbcore/parameters/autosuspend

then disconnect the pendrive, wait a few seconds and connect again, then remove the charger: with that setting the usb disk should remain visible for at least 10 minutes (600 seconds instead of the default 2 seconds before an inactive device autosuspends).

1 Like
zexy@MiWiFi-R4A-srv:~> su
Password: 
MiWiFi-R4A-srv:/home/zexy # echo 600 >/sys/module/usbcore/parameters/autosuspend
MiWiFi-R4A-srv:/home/zexy # lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 3434:0351 Keychron Keychron V5
Bus 001 Device 003: ID 046d:c092 Logitech, Inc. G102/G203 LIGHTSYNC Gaming Mouse
Bus 001 Device 004: ID 04f3:0903 Elan Microelectronics Corp. ELAN:Fingerprint
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 058f:6366 Alcor Micro Corp. Multi Flash Reader
Bus 003 Device 003: ID 058f:6254 Alcor Micro Corp. USB Hub
Bus 003 Device 004: ID 13d3:56d3 IMC Networks USB2.0 HD UVC WebCam
Bus 003 Device 005: ID 8087:0a2b Intel Corp. Bluetooth wireless interface
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
MiWiFi-R4A-srv:/home/zexy # 

Did not solve it. Issued the command as su. Disconnected the pendrive, reconnected it, then unplugged the charger, replugged it, ran lsusb. Same issue.

BTW, I have a microSD card inserted on the other side. It works whether the charger is plugged in or not.