I have two laptops (and two Raspberry pi's) connected to a 4-way usb switche, with one keyboard and mouse connected as input devices for all four.
When I suspend the laptops (one is ubuntu, the other xubuntu), I cant wake them up with either keyboard or mouse.
I have tried enabling wakeup on all devices found with grep . /sys/bus/usb/devices/*/power/wakeup
as explained here @Pavlos Theodorou's questionand found that this will work for the device most recently suspended, but then if I press the button on the switcher to change it to a different device, the suspended device will wake up.
has anyone had any experience of this with USB switchers?
edited to show output of
grep . /sys/bus/usb/devices/*/power/wakeup
lsusb
grep . /sys/bus/usb/devices/*/power/wakeup | cut -d: -f1 | cut -d/ -f1-6 | xargs -I{} sh -c 'echo {}:; cat {}/product 2>/dev/null'
matt@zakk-jr:~$ grep . /sys/bus/usb/devices/*/power/wakeup
/sys/bus/usb/devices/1-1.1/power/wakeup:disabled
/sys/bus/usb/devices/1-1/power/wakeup:disabled
/sys/bus/usb/devices/2-1/power/wakeup:disabled
/sys/bus/usb/devices/3-2.2/power/wakeup:disabled
/sys/bus/usb/devices/3-2.3.2/power/wakeup:enabled
/sys/bus/usb/devices/3-2.3/power/wakeup:disabled
/sys/bus/usb/devices/3-2/power/wakeup:disabled
/sys/bus/usb/devices/usb1/power/wakeup:disabled
/sys/bus/usb/devices/usb2/power/wakeup:disabled
/sys/bus/usb/devices/usb3/power/wakeup:enabled
/sys/bus/usb/devices/usb4/power/wakeup:disabled
matt@zakk-jr:~$ lsusb
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 005: ID 04f2:b307 Chicony Electronics Co., Ltd TOSHIBA Web Camera - HD
Bus 001 Device 004: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
Bus 001 Device 003: ID 0bda:0138 Realtek Semiconductor Corp. RTS5138 Card Reader Controller
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 152d:0562 JMicron Technology Corp. / JMicron USA Technology Corp. JMS567 SATA 6Gb/s bridge
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 050: ID 195d:2030 Itron Technology iONE Func KB-460 Gaming Keyboard
Bus 003 Device 049: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 003 Device 048: ID 1c4f:0054 SiGma Micro Usb Mouse
Bus 003 Device 047: ID 05e3:0610 Genesys Logic, Inc. Hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
matt@zakk-jr:~$ grep . /sys/bus/usb/devices/*/power/wakeup | cut -d: -f1 | cut -d/ -f1-6 | xargs -I{} sh -c 'echo {}:; cat {}/product 2>/dev/null'
/sys/bus/usb/devices/1-1.1:
USB2.0-CRW
/sys/bus/usb/devices/1-1:
/sys/bus/usb/devices/2-1:
/sys/bus/usb/devices/3-2.2:
Usb Mouse
/sys/bus/usb/devices/3-2.3.2:
RUSH Mechanical Keyboard
/sys/bus/usb/devices/3-2.3:
USB2.0 Hub
/sys/bus/usb/devices/3-2:
USB2.1 Hub
/sys/bus/usb/devices/usb1:
EHCI Host Controller
/sys/bus/usb/devices/usb2:
EHCI Host Controller
/sys/bus/usb/devices/usb3:
xHCI Host Controller
/sys/bus/usb/devices/usb4:
xHCI Host Controller
matt@zakk-jr:~$
grep . /sys/bus/usb/devices/*/power/wakeup | cut -d: -f1 | cut -d/ -f1-6 | xargs -I{} sh -c 'echo {}:; cat $(ls {}/product 2>/dev/null)'
give? – jarno Aug 13 '22 at 17:55grep . /sys/bus/usb/devices/*/product
shows `/sys/bus/usb/devices/1-1.1/product:USB2.0-CRW/sys/bus/usb/devices/1-1.3/product:TOSHIBA Web Camera - HD
/sys/bus/usb/devices/3-2.1/product:DataTraveler 2.0
/sys/bus/usb/devices/3-2.2/product:Usb Mouse /sys/bus/usb/devices/3-2.3.2/product:RUSH Mechanical Keyboard /sys/bus/usb/devices/3-2.3/product:USB2.0 Hub /sys/bus/usb/devices/3-2/product:USB2.1 Hub` when I plug in a usb thumb drive.
– matt cooper Aug 17 '22 at 09:07