You are not logged in.
My USB devices wake my laptop up when I press a key. However, when I disconnect or connect the device, it also wakes up the laptop.
This is a problem, because when I leave my desk, I generally close the laptop (triggering suspend), then disconnect all wires to pack up the laptop. However, disconnecting the USB devices wakes the laptop up again. Because the laptop is closed, it's very very hard to realise it's woken up again.
Similarly, I might be sitting on the couch with the laptop, close it up, then plug it into a USB-C cable to charge. This also wakes it up.
Is it possible to still have a keypress on an external USB keyboard wake the laptop up, but a disconnect and connect not wake it up? Or is it all or nothing?
Last edited by Salkay (2022-06-04 10:54:47)
Offline
I'm still interested in finding a solution to this. I could potentially disable certain ports I guess? I find this a bit fiddly though. Also, the charging port (at home) is the same as the Thunderbolt dock port (at work), so this is not ideal. I would want this to be disabled at home, but able to wake up the system with a key-press at work.
Offline
https://wiki.archlinux.org/title/Udev#W … USB_device - can be used as a template to perform other actions, like disabling the wakeup functionality for example.
--
saint_abroad
Offline
@sabroad my understanding is that these rules allow users to set the power/wakeup attribute, but (I think) this attribute will allow the device to trigger wakeup for both connecting/disconnecting and keypress. I was wondering if there were some way of making all USB devices wake the system up for keypress, but not for connecting/disconnecting. For example, I'd like my USB keyboard to wake up the system when I press a key, but not when I unplug it.
Offline
attribute will allow the device to trigger wakeup for both connecting/disconnecting and keypress.
USB hubs will send wakeup for connect/disconnect events. All USB ports are connected to USB hubs (or built-in root hubs).
So, rather than the USB keyboard sending wakeup for keypress, it's very likely the USB hub sending wakeup for connect/disconnect.
Last edited by sabroad (2021-08-04 12:19:08)
--
saint_abroad
Offline
Thanks @sabroad. Sorry for the delay; lockdown is playing havoc with getting into work regularly.
I had a look at lsusb, and I can certainly see my dock there. In fact, there are six entries with similar names. I was going to start testing them all, but I thought I might try plugging in a USB-C power cable directly, which is another situation that I don't want waking up my computer. This doesn't actually show up in lsusb at all! Hence, I'm not sure how I could disable the wakeup functionality for this cable.
Offline