USB inputs don't work after suspend

I’m new to Manjaro, I just downloaded it this week and I am using an HP OMEN laptop.

I tried to edit the tlp usb settings in etc/tlp.conf, I’ve manually set it to “USB_AUTOSUSPEND=0”, and I also downloaded the tlpui tool to adjust settings there, yet every time I keep waking up from sleep, no USB inputs work, only when I reboot my system.

It’s getting frustrating to have to reboot every time I use my laptop every time I set it to sleep. Any help is much appreciated.

Hello @pinkfloofx :wink:

Could you check if the usb devices all set to “on”?

cat /sys/bus/usb/devices/usb[0-9]/power/control

Maybe skip TLP and use udev rule instead:

file: /etc/udev/rules.d/50-usb_power_save.rules

ACTION=="add", SUBSYSTEM=="usb", TEST=="power/control", ATTR{power/control}="on"

Then all USB ports will never suspend.

Maybe the reason for this behavior is because of it is running in battery mode? Try it with the power supply plugged-in.

2 Likes

Hello, thank you for reaching out

When I used cat /sys/bus/usb/devices/usb[0-9]/power/control they were all set to auto. I edited the files to “on”, but every time I reboot they revert to auto.

So after TLP I tried udev, I couldn’t find a file in the /etc/udev/rules.d/ directory named “50-usb_power_save.rules”, though I did find one named “90-mhwd-prime-powermanagement.rules” which appears to have some USB options:

# Remove NVIDIA USB xHCI Host Controller devices, if present
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{remove}="1"

# Remove NVIDIA USB Type-C UCSI devices, if present
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c8000", ATTR{remove}="1"

It looks very similar to the option you laid out above, but I don’t know how I should change the settings here, or if I can also copy-paste the options you laid out as well, I did try setting the ATTR{remove} to “0” without success.

@pinkfloofx

This is the dir for custom rules: /etc/udev/rules.d/

Here are the predefined rules: /usr/lib/udev/rules.d/

So pease create the file: /etc/udev/rules.d/50-usb_power_save.rules

I created the 50-usb_power_save.rules file in the /etc/udev/rules.d/ directory and inserted:

ACTION=="add", SUBSYSTEM=="usb", TEST=="power/control", ATTR{power/control}="on"

yet I still can’t use USB inputs after waking up from suspend… I also tried manually loading new rules using # udevadm control --reload .

Thanks for the help again, really appreciate it.

Maybe this?

ACTION=="add", SUBSYSTEM=="usb", TEST=="power/control", ATTR{power/control}="on"
ACTION=="add", SUBSYSTEM=="usb", TEST=="power/level", ATTR{power/control}="on"

Also try to add this parameter to the linux kernel:

usbcore.autosuspend=-1

file: /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="<parameters already here> usbcore.autosuspend=-1"

:arrow_down:

sudo update-grub

I’m still unable to, even after adding the parameter to the kernel and updating grub.

also, here’s my hardware and software info, I should’ve provided this earlier on but could be of use

System:    Kernel: 5.13.13-1-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0 Desktop: KDE Plasma 5.22.5 tk: Qt 5.15.2 
           wm: kwin_x11 vt: 1 dm: SDDM Distro: Manjaro Linux base: Arch Linux 
Machine:   Type: Laptop System: HP product: OMEN by HP Laptop 15z-en100 v: N/A serial: <filter> Chassis: type: 10 
           serial: <filter> 
           Mobo: HP model: 88D1 v: 75.31 serial: <filter> UEFI: AMI v: F.06 date: 05/05/2021 
Battery:   ID-1: BAT0 charge: 65.0 Wh (93.0%) condition: 69.9/69.9 Wh (100.0%) volts: 13.2 min: 11.6 model: HP Primary 
           type: Li-ion serial: <filter> status: Charging cycles: 93 
Memory:    RAM: total: 15 GiB used: 2.56 GiB (17.1%) 
           RAM Report: permissions: Unable to run dmidecode. Root privileges required. 
CPU:       Info: 8-Core model: AMD Ryzen 7 5800H with Radeon Graphics bits: 64 type: MT MCP arch: Zen 3 rev: 0 cache: 
           L2: 4 MiB bogomips: 102241 
           Speed: 2070 MHz min/max: 1200/3200 MHz boost: enabled Core speeds (MHz): 1: 2070 2: 3131 3: 1197 4: 1454 5: 2504 
           6: 1197 7: 1574 8: 2539 9: 2090 10: 1727 11: 2072 12: 1332 13: 3184 14: 2032 15: 1578 16: 3084 
           Flags: 3dnowprefetch abm adx aes aperfmperf apic arat avic avx avx2 bmi1 bmi2 bpext cat_l3 cdp_l3 clflush 
           clflushopt clwb clzero cmov cmp_legacy constant_tsc cpb cpuid cqm cqm_llc cqm_mbm_local cqm_mbm_total cqm_occup_llc 
           cr8_legacy cx16 cx8 de decodeassists erms extapic extd_apicid f16c flushbyasid fma fpu fsgsbase fsrm fxsr fxsr_opt 
           ht hw_pstate ibpb ibrs ibs invpcid irperf lahf_lm lbrv lm mba mca mce misalignsse mmx mmxext monitor movbe msr mtrr 
           mwaitx nonstop_tsc nopl npt nrip_save nx ospke osvw overflow_recov pae pat pausefilter pclmulqdq pdpe1gb 
           perfctr_core perfctr_llc perfctr_nb pfthreshold pge pku pni popcnt pse pse36 rdpid rdpru rdrand rdseed rdt_a rdtscp 
           rep_good sep sha_ni skinit smap smca smep ssbd sse sse2 sse4_1 sse4_2 sse4a ssse3 stibp succor svm svm_lock syscall 
           tce topoext tsc tsc_scale umip v_spec_ctrl v_vmsave_vmload vaes vgif vmcb_clean vme vmmcall vpclmulqdq wbnoinvd wdt 
           xgetbv1 xsave xsavec xsaveerptr xsaveopt xsaves 
Graphics:  Device-1: NVIDIA GA106M [GeForce RTX 3060 Mobile / Max-Q] vendor: Hewlett-Packard driver: nvidia v: 470.63.01 
           bus-ID: 01:00.0 chip-ID: 10de:2520 class-ID: 0300 
           Device-2: Advanced Micro Devices [AMD/ATI] Cezanne vendor: Hewlett-Packard driver: amdgpu v: kernel bus-ID: 06:00.0 
           chip-ID: 1002:1638 class-ID: 0300 
           Device-3: Quanta HP Wide Vision HD Camera type: USB driver: uvcvideo bus-ID: 1-3:3 chip-ID: 0408:5425 
           class-ID: fe01 serial: <filter> 
           Display: x11 server: X.Org 1.20.13 compositor: kwin_x11 driver: loaded: modesetting,nvidia 
           resolution: 2560x1440~165Hz s-dpi: 96 
           OpenGL: renderer: NVIDIA GeForce RTX 3060 Laptop GPU/PCIe/SSE2 v: 4.6.0 NVIDIA 470.63.01 direct render: Yes 
Audio:     Device-1: NVIDIA vendor: Hewlett-Packard driver: snd_hda_intel v: kernel bus-ID: 01:00.1 chip-ID: 10de:228e 
           class-ID: 0403 
           Device-2: Advanced Micro Devices [AMD] Raven/Raven2/FireFlight/Renoir Audio Processor vendor: Hewlett-Packard 
           driver: snd_rn_pci_acp3x v: kernel bus-ID: 06:00.5 chip-ID: 1022:15e2 class-ID: 0480 
           Device-3: Advanced Micro Devices [AMD] Family 17h HD Audio vendor: Hewlett-Packard driver: snd_hda_intel v: kernel 
           bus-ID: 06:00.6 chip-ID: 1022:15e3 class-ID: 0403 
           Sound Server-1: ALSA v: k5.13.13-1-MANJARO running: yes 
           Sound Server-2: sndio v: N/A running: no 
           Sound Server-3: JACK v: 1.9.19 running: no 
           Sound Server-4: PulseAudio v: 15.0 running: yes 
           Sound Server-5: PipeWire v: 0.3.34 running: yes 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Hewlett-Packard driver: r8169 v: kernel 
           port: e000 bus-ID: 02:00.0 chip-ID: 10ec:8168 class-ID: 0200 
           IF: eno1 state: down mac: <filter> 
           Device-2: Intel Wi-Fi 6 AX200 driver: iwlwifi v: kernel port: e000 bus-ID: 03:00.0 chip-ID: 8086:2723 
           class-ID: 0280 
           IF: wlo1 state: up mac: <filter> 
           IP v4: <filter> type: dynamic noprefixroute scope: global broadcast: <filter> 
           IP v6: <filter> type: noprefixroute scope: link 
           WAN IP: <filter> 
Bluetooth: Device-1: Intel AX200 Bluetooth type: USB driver: btusb v: 0.8 bus-ID: 1-4:5 chip-ID: 8087:0029 class-ID: e001 
           Report: rfkill ID: hci0 rfk-id: 0 state: down bt-service: enabled,running rfk-block: hardware: no software: yes 
           address: see --recommends 
Logical:   Message: No logical block device data found. 
RAID:      Message: No RAID data found. 
Drives:    Local Storage: total: 506.66 GiB used: 196.31 GiB (38.7%) 
           ID-1: /dev/mmcblk0 model: SB32G size: 29.72 GiB type: SSD serial: <filter> scheme: MBR 
           ID-2: /dev/nvme0n1 vendor: Micron model: MTFDHBA512TDV-1AZ1AABHA size: 476.94 GiB speed: 31.6 Gb/s lanes: 4 
           type: SSD serial: <filter> rev: HPS0032 temp: 37.9 C scheme: GPT 
           Message: No optical or floppy data found. 
Partition: ID-1: / size: 468.09 GiB used: 174.85 GiB (37.4%) fs: ext4 dev: /dev/nvme0n1p2 label: N/A 
           uuid: f58d186c-787a-44a3-9672-63cd926737b6 
           ID-2: /boot/efi size: 299.4 MiB used: 288 KiB (0.1%) fs: vfat dev: /dev/nvme0n1p1 label: NO_LABEL uuid: 76CB-9079 
           ID-3: /run/media/alisonkit/6238-3563 size: 29.71 GiB used: 21.46 GiB (72.2%) fs: vfat dev: /dev/mmcblk0p1 
           label: N/A uuid: 6238-3563 
Swap:      Alert: No swap data was found. 
Unmounted: Message: No unmounted partitions found. 
USB:       Hub-1: 1-0:1 info: Full speed (or root) Hub ports: 4 rev: 2.0 speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900 
           Hub-2: 1-2:2 info: Genesys Logic Hub ports: 4 rev: 2.0 speed: 480 Mb/s power: 100mA chip-ID: 05e3:0608 
           class-ID: 0900 
           Device-1: 1-2.1:4 info: XP-Pen 15.6 inch PenDisplay type: Mouse,HID driver: hid-generic,usbfs,usbhid interfaces: 3 
           rev: 1.1 speed: 12 Mb/s power: 70mA chip-ID: 28bd:090d class-ID: 0300 
           Device-2: 1-2.2:6 info: Logitech Keyboard K120 type: Keyboard,HID driver: hid-generic,usbhid interfaces: 2 rev: 1.1 
           speed: 1.5 Mb/s power: 90mA chip-ID: 046d:c31c class-ID: 0300 
           Device-3: 1-2.4:7 info: Microsoft Basic Optical Mouse type: Mouse driver: hid-generic,usbhid interfaces: 1 rev: 1.1 
           speed: 1.5 Mb/s power: 100mA chip-ID: 045e:0084 class-ID: 0301 
           Device-4: 1-3:3 info: Quanta HP Wide Vision HD Camera type: Video driver: uvcvideo interfaces: 3 rev: 2.0 
           speed: 480 Mb/s power: 500mA chip-ID: 0408:5425 class-ID: fe01 serial: <filter> 
           Device-5: 1-4:5 info: Intel AX200 Bluetooth type: Bluetooth driver: btusb interfaces: 2 rev: 2.0 speed: 12 Mb/s 
           power: 100mA chip-ID: 8087:0029 class-ID: e001 
           Hub-3: 2-0:1 info: Full speed (or root) Hub ports: 2 rev: 3.1 speed: 10 Gb/s chip-ID: 1d6b:0003 class-ID: 0900 
           Hub-4: 3-0:1 info: Full speed (or root) Hub ports: 4 rev: 2.0 speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900 
           Hub-5: 4-0:1 info: Full speed (or root) Hub ports: 2 rev: 3.1 speed: 10 Gb/s chip-ID: 1d6b:0003 class-ID: 0900 
Sensors:   System Temperatures: cpu: 60.0 C mobo: N/A 
           Fan Speeds (RPM): N/A 
           GPU: device: nvidia screen: :0.0 temp: 46 C device: amdgpu temp: 47.0 C 
Info:      Processes: 392 Uptime: 12m wakeups: 1 Init: systemd v: 248 Compilers: gcc: 11.1.0 clang: 12.0.1 Packages: 1562 
           pacman: 1547 flatpak: 11 snap: 4 Shell: Zsh v: 5.8 default: Bash v: 5.1.8 running-in: yakuake inxi: 3.3.06

Hi All,

Same problem on HP Omen 15-en1000ur laptop with Ryzen 9 5900HX and NVIDIA GA104M [GeForce RTX 3070 Mobile] running Fedora Workstation 34 Linux 5.13.13-200.fc34.x86_64.

These are almost exactly the same specs as OP has

Found an interesting unusual workaround for the problem: if I move my mouse during resume all USB ports seem to work normally. I have a wireless Logitec mouse with USB receiver:

/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 10000M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
    |__ Port 2: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 2: Dev 4, If 1, Class=Human Interface Device, Driver=usbhid, 12M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 10000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
    |__ Port 3: Dev 6, If 0, Class=Video, Driver=uvcvideo, 480M
    |__ Port 3: Dev 6, If 1, Class=Video, Driver=uvcvideo, 480M
    |__ Port 4: Dev 7, If 1, Class=Wireless, Driver=btusb, 12M
    |__ Port 4: Dev 7, If 0, Class=Wireless, Driver=btusb, 12M

in dmesg during ‘bad’ resume:

...snip...
34260.540547] PM: resume devices took 2.421 seconds
[34260.540644] OOM killer enabled.
[34260.540645] Restarting tasks ... 
[34260.540730] usb 1-3: USB disconnect, device number 2
[34260.540730] usb 3-2: USB disconnect, device number 2
[34260.546354] done.
[34260.555763] PM: suspend exit
[34260.608705] usb 1-4: USB disconnect, device number 3

‘good’ resume:

[37981.614829] PM: resume devices took 0.340 seconds
[37981.614889] OOM killer enabled.
[37981.614890] Restarting tasks ... done.
[37981.634136] PM: suspend exit
[37981.731684] usb 1-3: new high-speed USB device number 4 using xhci_hcd
[37981.731684] usb 3-2: new full-speed USB device number 3 using xhci_hcd
[37981.883620] usb 3-2: New USB device found, idVendor=046d, idProduct=c52f, bcdDevice=30.00
[37981.883625] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[37981.883626] usb 3-2: Product: USB Receiver
[37981.883627] usb 3-2: Manufacturer: Logitech
[37981.898783] logitech-djreceiver 0003:046D:C52F.0005: hidraw0: USB HID v1.11 Mouse [Logitech USB Receiver] on usb-0000:06:00.4-2/input0
[37981.954341] logitech-djreceiver 0003:046D:C52F.0006: hiddev96,hidraw1: USB HID v1.11 Device [Logitech USB Receiver] on usb-0000:06:00.4-2/input1
[37981.975612] usb 1-3: New USB device found, idVendor=04f2, idProduct=b6bb, bcdDevice= 0.05
[37981.975617] usb 1-3: New USB device strings: Mfr=3, Product=1, SerialNumber=2
[37981.975619] usb 1-3: Product: HP Wide Vision HD Camera
[37981.975620] usb 1-3: Manufacturer: Chicony Electronics Co.,Ltd.
[37981.975621] usb 1-3: SerialNumber: 0001
[37982.010940] usb 1-3: Found UVC 1.00 device HP Wide Vision HD Camera (04f2:b6bb)
[37982.012553] logitech-djreceiver 0003:046D:C52F.0006: device of type eQUAD step 4 DJ (0x04) connected on slot 1
[37982.103938] logitech-hidpp-device 0003:046D:4057.0007: HID++ 4.5 device connected.
[37982.119877] input: HP Wide Vision HD Camera: HP Wi as /devices/pci0000:00/0000:00:08.1/0000:06:00.3/usb1/1-3/1-3:1.0/input/input32
[37982.179327] Generic FE-GE Realtek PHY r8169-0-200:00: attached PHY driver (mii_bus:phy_addr=r8169-0-200:00, irq=MAC)
[37982.233891] usb 1-4: new full-speed USB device number 5 using xhci_hcd
[37982.393755] usb 1-4: New USB device found, idVendor=8087, idProduct=0029, bcdDevice= 0.01
[37982.393762] usb 1-4: New USB device strings: Mfr=0, Product=0, SerialNumber=0

Hope that helps.

Hello,
is there any update to this topic.
Since a few days I have the same problem.
My Kernel version was something with: 5.13.xy

Now I update the kernel to the following version, but the problem is the same
Kernel: 5.14.10-1-MANJARO

After waking up my laptop all USB devices are not working…

Hello,

I have exactly the same hardware (HP omen 15, Ryzen 5800), running PopOS 20.04 (kernel 5.13.x). I have tried all possible solutions and still cannot get the usb devices to work. My problem is even more weird:
All keyboard/mouse variations, wireless or not stop working after suspend. In addition, the integrated webcam also stops working. The only things working are external HDDs that I plug, but they only have power, no I/O is possible

Since this appears in other distros, it looks like a kernel bug. Hope it can be fixed soon…

Hi,
I’m facing the exact same issues on a HP Pavilion (AMD Ryzen 5 5600H) laptop. My OS is 5.11.0-41-generic #45~20.04.1-Ubuntu.

Do you know any way to manually revive the usb ports after suspend? To me the only thing that works is a reboot…