Completely turn off usb port when suspending laptop

I have a Dell monitor with an integrated USB hub connected via USB to a laptop port. A led stripe is connected to a port of the monitor USB hub. When I turn on the laptop, the monitor USB hub is activated and the led stripe turns on.

When I put the monitor to sleep I would like the led stripe to turn off (USB hub goes to sleep). Given that the USB port of the laptop is active while the laptop is sleeping, the led stripe won’t turn off.

Is there a way to turn completely turn off a specific USB port when the laptop is suspended (using some kernel setting or similar)?

I have an HP Elite Elitebook G4 and a G7 and I could not find any settings in the BIOS to control this behavior.

Operating System: Manjaro Linux
KDE Plasma Version: 5.22.4
KDE Frameworks Version: 5.84.0
Qt Version: 5.15.2
Kernel Version: 5.10.52-1-MANJARO (64-bit)
Graphics Platform: X11
Processors: 4 × Intel® Core™ i5-7200U CPU @ 2.50GHz
Memory: 15.5 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 620

Hello @simgunz :wink:

You need these variables at /etc/tlp.conf:

#enable the hub explicitly:

Get the chipid from here: lsusb -vt

Keep sure tlp service is running:

sudo systemctl enable --now tlp.service
sudo systemctl status tlp.service

Check the stats:

sudo tlp-stat --usb

More information here: TLP - ArchWiki
and here: USB — TLP 1.3.1 documentation

1 Like

I have tried what you suggested but the situation did not change.
tlp was already enabled on my system, I just added the hub port to the whitelist.

Does tlp also autosuspend in the AC power is plugged in?

I noticed the following:

If I put the notebook to sleep while on AC the USB port is active (led stripe on). If I unplug the AC then the port is turned off (led stripe off). This behavior does not seem to be affected by tlp, indeed I tried to set USB_AUTOSUSPEND=0 and the result is the same.

Did you restart the tlp service or reboot the laptop after changing settings?

Had this behavior also on my older laptop with intel chipset. USB was just not working in BAT Mode. Disabling USB_AUTOSUSPEND solved it. So yes… autosuspend is working in battery mode usually.