You are not logged in.

#1 2021-07-18 02:53:51

Salkay
Member
Registered: 2014-05-22
Posts: 618

[UNSOLVED] USB devices wake laptop up on connect/disconnect

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

#2 2021-08-03 22:52:33

Salkay
Member
Registered: 2014-05-22
Posts: 618

Re: [UNSOLVED] USB devices wake laptop up on connect/disconnect

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

#3 2021-08-04 10:45:06

sabroad
Member
Registered: 2015-05-24
Posts: 242

Re: [UNSOLVED] USB devices wake laptop up on connect/disconnect

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

#4 2021-08-04 11:38:10

Salkay
Member
Registered: 2014-05-22
Posts: 618

Re: [UNSOLVED] USB devices wake laptop up on connect/disconnect

@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

#5 2021-08-04 12:08:39

sabroad
Member
Registered: 2015-05-24
Posts: 242

Re: [UNSOLVED] USB devices wake laptop up on connect/disconnect

Salkay wrote:

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

#6 2021-08-11 07:15:37

Salkay
Member
Registered: 2014-05-22
Posts: 618

Re: [UNSOLVED] USB devices wake laptop up on connect/disconnect

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

Board footer

Powered by FluxBB