How do I enabled wake from sleep with my Logitech keyboard and mouse?

I recently switched from Ubuntu Linux to Fedora Linux on my main desktop. However in so doing you often lose some of the little custom settings that you configured over the years. For the most part the desktop was back up and running within a few hours, however the resume from sleep when I touch the keyboard was not working. I remembered I had done something to convince Ubuntu to work however I could not remember what. Until now...

So a quick look at what was and what wasn't enabled:
[phil@localhost ~]$ cat /proc/acpi/wakeup
Device  S-state   Status   Sysfs node
SMB0      S4    *disabled  pci:0000:00:01.1
USB0      S4    *enabled   pci:0000:00:02.0
USB2      S4    *enabled   pci:0000:00:02.1
US15      S4    *enabled   pci:0000:00:04.0
US12      S4    *enabled   pci:0000:00:04.1
NMAC      S5    *disabled  pci:0000:00:0a.0
P0P1      S4    *disabled  pci:0000:00:08.0
HDAC      S4    *disabled  pci:0000:00:07.0
MXR0      S4    *disabled  pci:0000:00:10.0
BR11      S4    *disabled
BR12      S4    *disabled  pci:0000:00:12.0
BR13      S4    *disabled  pci:0000:00:13.0
BR14      S4    *disabled
BR15      S4    *disabled
BR16      S4    *disabled
BR17      S4    *disabled
Not much to tell me there other than that USB hubs are enabled:
[phil@localhost ~]$ lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 004: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 003: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 002: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Ah, getting warmer. The device is on bus 1 and device 4.

The next bit required a big of detective work but it boils down to this change in the operating system and to how USB works. So now I know that I cannot just enable the USB hub, I've actually got to enable the device and the hub will send it on.
[phil@localhost ~]$ ls -al /sys/bus/usb/devices/
total 0
drwxr-xr-x. 2 root root 0 Nov 16 17:42 .
drwxr-xr-x. 4 root root 0 Nov 16 17:42 ..
lrwxrwxrwx. 1 root root 0 Nov 16 17:42 1-0:1.0 -> ../../../devices/pci0000:00/0000:00:02.1/usb1/1-0:1.0                                                        
lrwxrwxrwx. 1 root root 0 Nov 16 17:42 1-1 -> ../../../devices/pci0000:00/0000:00:02.1/usb1/1-1                                                                
lrwxrwxrwx. 1 root root 0 Nov 16 17:42 1-1:1.0 -> ../../../devices/pci0000:00/0000:00:02.1/usb1/1-1/1-1:1.0
lrwxrwxrwx. 1 root root 0 Nov 16 17:43 1-1.4 -> ../../../devices/pci0000:00/0000:00:02.1/usb1/1-1/1-1.4                                                        
lrwxrwxrwx. 1 root root 0 Nov 16 17:42 1-1.4:1.0 -> ../../../devices/pci0000:00/0000:00:02.1/usb1/1-1/1-1.4/1-1.4:1.0
lrwxrwxrwx. 1 root root 0 Nov 16 17:43 1-1.4.2 -> ../../../devices/pci0000:00/0000:00:02.1/usb1/1-1/1-1.4/1-1.4.2
lrwxrwxrwx. 1 root root 0 Nov 16 17:43 1-1.4.2:1.0 -> ../../../devices/pci0000:00/0000:00:02.1/usb1/1-1/1-1.4/1-1.4.2/1-1.4.2:1.0
lrwxrwxrwx. 1 root root 0 Nov 16 17:43 1-1.4.2:1.1 -> ../../../devices/pci0000:00/0000:00:02.1/usb1/1-1/1-1.4/1-1.4.2/1-1.4.2:1.1
lrwxrwxrwx. 1 root root 0 Nov 16 17:43 1-1.4.2:1.2 -> ../../../devices/pci0000:00/0000:00:02.1/usb1/1-1/1-1.4/1-1.4.2/1-1.4.2:1.2
lrwxrwxrwx. 1 root root 0 Nov 16 17:42 2-0:1.0 -> ../../../devices/pci0000:00/0000:00:04.1/usb2/2-0:1.0                                                        
lrwxrwxrwx. 1 root root 0 Nov 16 17:42 3-0:1.0 -> ../../../devices/pci0000:00/0000:00:02.0/usb3/3-0:1.0                                                        
lrwxrwxrwx. 1 root root 0 Nov 16 17:42 4-0:1.0 -> ../../../devices/pci0000:00/0000:00:04.0/usb4/4-0:1.0                                                        
lrwxrwxrwx. 1 root root 0 Nov 16 17:42 usb1 -> ../../../devices/pci0000:00/0000:00:02.1/usb1                                                                  
lrwxrwxrwx. 1 root root 0 Nov 16 17:42 usb2 -> ../../../devices/pci0000:00/0000:00:04.1/usb2                                                                  
lrwxrwxrwx. 1 root root 0 Nov 16 17:42 usb3 -> ../../../devices/pci0000:00/0000:00:02.0/usb3                                                                  
lrwxrwxrwx. 1 root root 0 Nov 16 17:42 usb4 -> ../../../devices/pci0000:00/0000:00:04.0/usb4                                                             
Now all that might look like gibberish but if you follow the links "->" you'll see numbers relating to a device, so I go on the hunt for more information by listing the folders:
[phil@localhost ~]$ ls /sys/bus/usb/devices/1-1/
1-1:1.0              bDeviceSubClass     descriptors  ltm_capable  speed
1-1.4                bmAttributes        dev          maxchild     subsystem
authorized           bMaxPacketSize0     devnum       port         uevent
avoid_reset_quirk    bMaxPower           devpath      power        urbnum
bcdDevice            bNumConfigurations  driver       product      version
bConfigurationValue  bNumInterfaces      ep_00        quirks
bDeviceClass         busnum              idProduct    removable
bDeviceProtocol      configuration       idVendor     remove
Nope...
[phil@localhost ~]$ ls /sys/bus/usb/devices/1-1/1-1.4
1-1.4:1.0            bDeviceSubClass     descriptors  ltm_capable  speed
1-1.4.2              bmAttributes        dev          maxchild     subsystem
authorized           bMaxPacketSize0     devnum       port         uevent
avoid_reset_quirk    bMaxPower           devpath      power        urbnum
bcdDevice            bNumConfigurations  driver       product      version
bConfigurationValue  bNumInterfaces      ep_00        quirks
bDeviceClass         busnum              idProduct    removable
bDeviceProtocol      configuration       idVendor     remove
Nope...
[phil@localhost ~]$ ls /sys/bus/usb/devices/1-1/1-1.4/1-1.4
1-1.4:1.0/ 1-1.4.2/   
Nope...
[phil@localhost ~]$ ls /sys/bus/usb/devices/1-1/1-1.4/1-1.4.2/
1-1.4.2:1.0          bDeviceProtocol     configuration  idVendor      removable
1-1.4.2:1.1          bDeviceSubClass     descriptors    ltm_capable   remove
1-1.4.2:1.2          bmAttributes        dev            manufacturer  speed
authorized           bMaxPacketSize0     devnum         maxchild      subsystem
avoid_reset_quirk    bMaxPower           devpath        port          uevent
bcdDevice            bNumConfigurations  driver         power         urbnum
bConfigurationValue  bNumInterfaces      ep_00          product       version
bDeviceClass         busnum              idProduct      quirks
Ah, some manufacturer information.
[phil@localhost ~]$ cat /sys/bus/usb/devices/1-1/1-1.4/1-1.4.2/manufacturer
Logitech
Looks like I found my wireless receiver, a quick look at the product:
[phil@localhost phil]# cat /sys/bus/usb/devices/1-1/1-1.4/1-1.4.2/product
USB Receiver
And yes that what I am after, next to check its current power wakeup:
[phil@localhost ~]$ cat /sys/bus/usb/devices/1-1/1-1.4/1-1.4.2/power/wakeup    
disabled
Bingo! So I tried the standard enable:
[phil@localhost ~]$ sudo echo enabled > /sys/bus/usb/devices/1-1/1-1.4/1-1.4.2/power/wakeup                                                                    
bash: /sys/bus/usb/devices/1-1/1-1.4/1-1.4.2/power/wakeup: Permission denied
Bummer....Lets try is a super user:
[phil@localhost ~]$ su                                                        
Password:                                                                      
[root@localhost phil]# echo enabled > /sys/bus/usb/devices/1-1/1-1.4/1-1.4.2/power/wakeup
And to check the change applied:
[root@localhost phil]# cat /sys/bus/usb/devices/1-1/1-1.4/1-1.4.2/power/wakeup
enabled
Excellent!!! However that change isn't permanent, its just for the lifetime of this kernel boot. So I had to put that line in to the standard /etc/rc.local file. That way it gets applied each boot. 

Comments

Popular posts from this blog

Windows Server and the Task Scheduler Error Code 0x3

The living wage failure

IDE's and speed