You are not logged in.

#1 2022-04-06 09:08:22

bartoszw
Member
Registered: 2020-02-25
Posts: 10

Disable wake up from for group of devices connected to USB hub at once

Hi

I am trying to disable wake up from suspend by devices connected to one USB hub.

Result of

lsusb -t -v
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 10000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/10p, 10000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
    |__ Port 9: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
        ID 0bda:0411 Realtek Semiconductor Corp. Hub
        |__ Port 4: Dev 3, If 0, Class=Hub, Driver=hub/4p, 5000M
            ID 0bda:0411 Realtek Semiconductor Corp. Hub
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/16p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 6: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
        ID 05e3:0610 Genesys Logic, Inc. Hub
    |__ Port 9: Dev 3, If 0, Class=Hub, Driver=hub/4p, 480M
        ID 0bda:5411 Realtek Semiconductor Corp. RTS5411 Hub           <---------------------------- this guy
        |__ Port 1: Dev 4, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
            ID 046d:c517 Logitech, Inc. LX710 Cordless Desktop Laser
        |__ Port 1: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
            ID 046d:c517 Logitech, Inc. LX710 Cordless Desktop Laser
        |__ Port 2: Dev 5, If 1, Class=Human Interface Device, Driver=usbhid, 12M
            ID 1ea7:0066 SHARKOON Technologies GmbH [Mediatrack Edge Mini Keyboard]
        |__ Port 2: Dev 5, If 0, Class=Human Interface Device, Driver=usbhid, 12M
            ID 1ea7:0066 SHARKOON Technologies GmbH [Mediatrack Edge Mini Keyboard]
        |__ Port 3: Dev 6, If 0, Class=Wireless, Driver=btusb, 12M
            ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
        |__ Port 3: Dev 6, If 1, Class=Wireless, Driver=btusb, 12M
            ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
        |__ Port 4: Dev 7, If 0, Class=Hub, Driver=hub/4p, 480M
            ID 0bda:5411 Realtek Semiconductor Corp. RTS5411 Hub

note

<---------------------------- this guy

device, it is the hub that I would like to disable wake up from all devices that are connected to it.

as described in: wiki page i tried to create disabling udev rules.

grep 5411 /sys/bus/usb/devices/*/idProduct

results in:

/sys/bus/usb/devices/1-9.4/idProduct:5411
/sys/bus/usb/devices/1-9/idProduct:5411

so I tried two udev rules:

ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="5411", ATTR{power/wakeup}="disabled", ATTR{driver/1-9/power/wakeup}="disabled"

and

ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="5411", ATTR{power/wakeup}="disabled", ATTR{driver/1-9.4/power/wakeup}="disabled"

(driver version [? I am not sure what this number is] changed)

unfortunately I still can wake up machine by devices connected to this hub.
Is it even possible to disable wake up by group of devices connected to one hub?
If it is possible what I am doing wrong?

Offline

#2 2022-04-06 11:27:18

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,097

Re: Disable wake up from for group of devices connected to USB hub at once

You could either write a script that loops over all the connected devices, or possibly make a rule that matches on the path (you can use ranges in udev rules like "1-9.[0-4])


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

Board footer

Powered by FluxBB