You are not logged in.

#1 2020-08-04 15:20:55

leomp12
Member
Registered: 2019-01-02
Posts: 16

Enable USB keyboard/mouse wake up but prevent immediate wake up

Hey,

I'm having some troubles to enable wake up from Logitech USB keyboard, it was disabled by default but I can enable it normally running:

# echo enabled > /sys/bus/usb/devices/usb1/power/wakeup

The problem is that when wake up from USB is enabled the computer is waking up immediately after suspend, even when I turn off both mouse and keyboard hmm

$ uname -r
5.7.11-arch1-1
$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 04f2:b5ee Chicony Electronics Co., Ltd HP HD Camera
Bus 001 Device 003: ID 8087:0a2b Intel Corp. Bluetooth wireless interface
Bus 001 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Does anyone know how to enable USB wake up but only when there is actually a click on the keyboard?

Last edited by leomp12 (2020-08-04 15:50:23)

Offline

#2 2020-08-04 15:24:48

leomp12
Member
Registered: 2019-01-02
Posts: 16

Re: Enable USB keyboard/mouse wake up but prevent immediate wake up

Just a note, I've opened another topic closed with the answer:

Manjaro is not Arch Linux.  Please ask on their forums.

I don't know why the admin thought I use Manjaro, I use Arch (since always I think), I never used Manjaro, so if you can keep this topic open, please tongue

Last edited by leomp12 (2020-08-04 15:25:12)

Offline

#3 2020-08-04 15:42:31

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,409

Re: Enable USB keyboard/mouse wake up but prevent immediate wake up

The thread was closed because it was necrobumped by a manjaro user, not because you are using Manjaro

What is weird here is that you are on such a outdated kernel, is there a particular reason for this ? If you generally intend to keep the system that outdated Arch really isn't a good fit for this. And for resolving the issue i'd first suggest you try updating your system, if the kernel is anything to base on you are 1  1/2 years out of date.

...

And you are in fact so out of date that it's likely easier to just reinstall the system with an up to date ISO. Otherwise you will have to follow all of the news items, with one of the more impactful ones being https://www.archlinux.org/news/required … ibarchive/ which mandates that your pacman is currently broken, and maybe even some more of the transitional news items that happened in between. You might have to employ the ALA for incremental updates.

Last edited by V1del (2020-08-04 15:54:34)

Offline

#4 2020-08-04 15:50:00

leomp12
Member
Registered: 2019-01-02
Posts: 16

Re: Enable USB keyboard/mouse wake up but prevent immediate wake up

@V1del sorry, actually I'm using kernel 5.7.11:

$ uname -r
5.7.11-arch1-1

I've copied this part from the other topic to get the code indentation, because I've tried markdown here and it doesn't work and I haven't seen the BBCode link yet, and had forgotten to correct the uname -r
output...

Offline

#5 2020-08-04 15:58:29

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,409

Re: Enable USB keyboard/mouse wake up but prevent immediate wake up

Ah that makes more sense tongue unifying receiver is for wireless devices iirc, so this might be a bit cumbersome to get working, if not outright impossible.

FWIW what happens if you set this on the receiver device node and not the usb port?

Last edited by V1del (2020-08-04 16:03:42)

Offline

#6 2020-08-04 16:03:58

leomp12
Member
Registered: 2019-01-02
Posts: 16

Re: Enable USB keyboard/mouse wake up but prevent immediate wake up

Ah, sad history hmm
But that's okay then, thanks @V1del

Offline

#7 2020-08-04 16:12:38

leomp12
Member
Registered: 2019-01-02
Posts: 16

Re: Enable USB keyboard/mouse wake up but prevent immediate wake up

V1del wrote:

FWIW what happens if you set this on the receiver device node and not the usb port?

Not sure if I understand what you mean here, do you have an example?

Offline

#8 2020-08-04 19:03:14

seth
Member
Registered: 2012-09-03
Posts: 49,947

Re: Enable USB keyboard/mouse wake up but prevent immediate wake up

Not sure there's one:
What's the output of "lsusb -tv"

Online

#9 2020-08-05 00:31:25

leomp12
Member
Registered: 2019-01-02
Posts: 16

Re: Enable USB keyboard/mouse wake up but prevent immediate wake up

Hey @seth , here:

$ lsusb -tv
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/12p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 1: Dev 2, If 1, Class=Human Interface Device, Driver=usbhid, 12M
        ID 046d:c52b Logitech, Inc. Unifying Receiver
    |__ Port 1: Dev 2, If 2, Class=Human Interface Device, Driver=usbhid, 12M
        ID 046d:c52b Logitech, Inc. Unifying Receiver
    |__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 12M
        ID 046d:c52b Logitech, Inc. Unifying Receiver
    |__ Port 7: Dev 3, If 0, Class=Wireless, Driver=btusb, 12M
        ID 8087:0a2b Intel Corp. Bluetooth wireless interface
    |__ Port 7: Dev 3, If 1, Class=Wireless, Driver=btusb, 12M
        ID 8087:0a2b Intel Corp. Bluetooth wireless interface
    |__ Port 9: Dev 4, If 0, Class=Video, Driver=uvcvideo, 480M
        ID 04f2:b5ee Chicony Electronics Co., Ltd 
    |__ Port 9: Dev 4, If 1, Class=Video, Driver=uvcvideo, 480M
        ID 04f2:b5ee Chicony Electronics Co., Ltd

Offline

#10 2020-08-05 07:00:56

seth
Member
Registered: 2012-09-03
Posts: 49,947

Re: Enable USB keyboard/mouse wake up but prevent immediate wake up

    |__ Port 1: Dev 2, If 1, Class=Human Interface Device, Driver=usbhid, 12M
        ID 046d:c52b Logitech, Inc. Unifying Receiver
    |__ Port 1: Dev 2, If 2, Class=Human Interface Device, Driver=usbhid, 12M
        ID 046d:c52b Logitech, Inc. Unifying Receiver
    |__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 12M
        ID 046d:c52b Logitech, Inc. Unifying Receiver

There're three interfaces, cleverly all named "Logitech, Inc. Unifying Receiver" - one is the receiver, one the mouse and one the keyboard.

Run "dmesg -w" and re-attach the keyboard. Maybe there's some identifyable output.

Online

#11 2020-08-12 14:36:55

leomp12
Member
Registered: 2019-01-02
Posts: 16

Re: Enable USB keyboard/mouse wake up but prevent immediate wake up

Hello again @seth,
Sorry for the delay, i was using the laptop without the external keyboard these last few days.
But "lsusb -tv" has exactly the same output with keyboard and mouse turned off, with the same 3 "Logitech, Inc. Unifying Receiver" interfaces.
Nothing new on "dmesg -w" when keyboard is turned on/off hmm

Offline

#12 2020-08-12 14:41:57

seth
Member
Registered: 2012-09-03
Posts: 49,947

Re: Enable USB keyboard/mouse wake up but prevent immediate wake up

You'll probably have to re-plug it (or wait some time) to trigger re-pairing.

Online

#13 2020-08-13 15:26:53

leomp12
Member
Registered: 2019-01-02
Posts: 16

Re: Enable USB keyboard/mouse wake up but prevent immediate wake up

Even waiting some minutes to turn keyboard on again, nothing changes on "dmesg -w".

Repluging the receiver with keyboard on and mouse off, then turning on the mouse:

[ 4253.495163] usb 1-1: USB disconnect, device number 2
[ 4293.250204] usb 1-1: new full-speed USB device number 5 using xhci_hcd
[ 4293.393599] usb 1-1: New USB device found, idVendor=046d, idProduct=c52b, bcdDevice=12.11
[ 4293.393605] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 4293.393608] usb 1-1: Product: USB Receiver
[ 4293.393611] usb 1-1: Manufacturer: Logitech
[ 4293.403727] logitech-djreceiver 0003:046D:C52B.0009: hiddev0,hidraw1: USB HID v1.11 Device [Logitech USB Receiver] on usb-0000:00:14.0-1/input2
[ 4293.529219] input: Logitech Wireless Mouse as /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.2/0003:046D:C52B.0009/0003:046D:4055.000A/input/input49
[ 4293.529401] logitech-hidpp-device 0003:046D:4055.000A: input,hidraw2: USB HID v1.11 Mouse [Logitech Wireless Mouse] on usb-0000:00:14.0-1/input2:1
[ 4293.535245] input: Logitech K540/K545 as /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.2/0003:046D:C52B.0009/0003:046D:4076.000B/input/input50
[ 4293.535399] logitech-hidpp-device 0003:046D:4076.000B: input,hidraw3: USB HID v1.11 Keyboard [Logitech K540/K545] on usb-0000:00:14.0-1/input2:2
[ 4312.561362] logitech-hidpp-device 0003:046D:4055.000A: HID++ 4.5 device connected.
[ 4331.769027] logitech-hidpp-device 0003:046D:4076.000B: HID++ 4.1 device connected.

Keyboard identifier:

[ 4293.535245] input: Logitech K540/K545 as /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.2/0003:046D:C52B.0009/0003:046D:4076.000B/input/input50

Last edited by leomp12 (2020-08-13 15:27:12)

Offline

#14 2020-08-13 19:14:46

seth
Member
Registered: 2012-09-03
Posts: 49,947

Re: Enable USB keyboard/mouse wake up but prevent immediate wake up

Same path and you probably don't have "/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.2/0003:046D:C52B.0009/0003:046D:4076.000B/input/input*/wakeup"?

Online

Board footer

Powered by FluxBB