How to disable wakeup for a specific USB device ?
#1
Question 
Hi all.

I'm running into trouble trying to disable wakeup from suspend when a particular USB device is plugged/unplugged.

I have a Logitech G930 wireless headset & I swap the USB transmitter dongle between my desktop PC & my LibreELEC HTPC as needed.
I'm trying to configure the power/wakeup settings on the LE HTPC so that (if it's in suspend mode) the system doesn't wakeup if the dongle is plugged in or removed.

I've read through many versions of people setting wakeup flags (mostly for IR remotes) via a number of different shell scripts via ./config/autostart.sh and/or shutdown.sh but I'm geting horribly lost trying to echo a "disabled" flag to the device's /power/wakeup register.
There seem to be multiple access paths to the dongle via /proc/acpi/wakeup, /sys/class & /sys/bus etc. & I'm having trouble knowing which is the more "correct" path to use and which will accept a write to ./power/wakeup

For reference, the details of the dongle device I'm trying to target:-
Code:
# lsusb |grep G930
Bus 003 Device 009: ID 046d:0a1f Logitech, Inc. G930

# grep 0a1f /sys/bus/usb/devices/*/idProduct
/sys/bus/usb/devices/3-2.2/idProduct:0a1f

# dmesg |grep G930
input: Logitech Logitech G930 Headset as /devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2.2/3-2.2:1.3/0003:046D:0A1F.000C/input/input34
hid-generic 0003:046D:0A1F.000C: input,hiddev0,hidraw3: USB HID v1.01 Device [Logitech Logitech G930 Headset] on usb-0000:00:14.0-2.2/input3
So ... now I have the port & location of the device identified a couple of ways but there's no "wakeup" in the ./power dir of the various acesses routes, and I can't seem to find a way to create/write to it.

Can someone please help me out with what exactly I need to be doing ?

Cheers,
--
kurai
Reply
#2
Thumbs Up 
Aha ! Got it sorted.

A mention elsewhere reminded me that lsusb had a -t flag for "tree view", which gave a much more useable interpretation of the info, so I looked at that and saw that the host port for bus3-port2 *did* have a driver-provided wakeup setting.

Set wakeup disabled in that, and things are behaving as I wanted. (I lose the ability to wakeup via the wireless keyboard on that same "spur" as well, but that's not super critical, just nice to have. The IR remote is the important one)

This can be marked Solved/Closed since I can't seem to work out how to set that myself Cool
Reply

Logout Mark Read Team Forum Stats Members Help
How to disable wakeup for a specific USB device ?0