How to disable wakeup for a specific USB device ?

  • 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:-

    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

    Edited once, last by kurai (March 29, 2017 at 9:29 AM).

  • Unfortunately that targets the entire USB hub, rather than a specific device.
    I have a USB IR remote receiver that I *do* want to be able to resume with, so blanket turning off the USB hub doesn't really help :)

    (Unless you are trying to tell me a way specifically target a sub-device, and I'm missing the point. If so, please clarify with enough detail that I can wrap my confused brain around it)

  • Sure.


    Bus 003 Device 005: ID 0471:0815 Philips (or NXP) eHome Infrared Receiver is the one I *definitely* need to keep available for wakeup.

    Bus 003 Device 008: ID 046d:c150 Logitech, Inc. is another USB receiver for a wireless keyboard, different device from the G930 dongle below it.

  • Aha ! Got it sorted.

    The links you provided helped ... indirectly :P

    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)

    Thanks for getting my brain moving in the right direction :idea:

    Edited once, last by kurai (March 29, 2017 at 11:10 AM).