Wake Computer by Mouse or Keyboard?

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post please read how to get help
Post Reply
User avatar
eatenimpinia
Level 3
Level 3
Posts: 146
Joined: Thu Sep 10, 2015 9:29 pm

Wake Computer by Mouse or Keyboard?

Post by eatenimpinia »

I'm using Mint 17.3 Cinnamon (x64). One of the trivial things that I really miss from the Windows side of things is waking my computer from Sleep by simply moving my mouse or hitting a key on the keyboard (Logitech wireless with receiver in a USB port). With Mint, I have to hit the power button on the computer instead. Looking around, the only thing I've found is this:

Code: Select all

((echo '#!/bin/sh' && sed -rn 's/^.*(USB[0-9E]+|EUSB).*$/echo \1 > \/proc\/acpi\/wakeup/pg' /proc/acpi/wakeup) | sudo tee /etc/pm/sleep.d/05_usb && sudo chmod +x /etc/pm/sleep.d/05_usb)
I've got several problems with that. First, the thread I found it in is very old (2011). Second, it was for LMDE and I'm using Cinnamon. Third, I can't figure out what that command is doing. I THINK it's creating a script and putting it in the /etc/pm/sleep.d/05_us file (but, I don't know how that file/script gets used). I think the command is doing that by looking in /proc/acpi/wakeup for any lines with USB or EUSB in them (though I really can't figure out anything from the .$/echo on) and copying those into the script file. But, my /proc/acpi/wakeup doesn't seem to contain any USB references:

Code: Select all

dave@dave-mint17-3 ~ $ cat /proc/acpi/wakeup
Device	S-state	  Status   Sysfs node
PEG0	  S4	*disabled  pci:0000:00:01.0
PEGP	  S4	*disabled  pci:0000:01:00.0
PEG1	  S4	*disabled
PEGP	  S4	*disabled
PEG2	  S4	*disabled
PEGP	  S4	*disabled
PS2K	  S4	*disabled
RP01	  S4	*disabled
PXSX	  S4	*disabled
RP02	  S4	*disabled
PXSX	  S4	*disabled
RP03	  S4	*disabled
PXSX	  S4	*disabled
RP04	  S4	*disabled
PXSX	  S4	*disabled
RP05	  S4	*disabled
PXSX	  S4	*disabled
RP06	  S4	*disabled
PXSX	  S4	*disabled
RP07	  S4	*disabled
PXSX	  S4	*disabled
RP08	  S4	*disabled
PXSX	  S4	*disabled
GLAN	  S4	*enabled   pci:0000:00:19.0
EHC1	  S4	*enabled   pci:0000:00:1d.0
EHC2	  S4	*enabled   pci:0000:00:1a.0
XHC	  S4	*enabled   pci:0000:00:14.0
HDEF	  S4	*disabled  pci:0000:00:1b.0
So, is there no simple setting somewhere that I can use to wake my computer via mouse or keyboard? Failing that, is the above command still valid and valid for Mint 17.3 Cinnamon? And finally, could someone please break that command down into its chunks and parse it for me?
Distro: (back to) Linux Mint 17.3 Rosa, Kernel: 4.4.0-51-generic x86_64 (64 bit), Desktop: Cinnamon 2.8.8

User avatar
Amii_Leigh
Level 5
Level 5
Posts: 681
Joined: Fri Mar 25, 2016 10:58 pm
Location: Somewhere in the middle of nowhere, Missouri

Re: Wake Computer by Mouse or Keyboard?

Post by Amii_Leigh »

I'm using exactly the same OS and Desktop as you, and I wake up my computer by moving my mouse and/or keyboard. Check your settings in System Settings/Hardware and /Administration/Login Window.
Namaste.
नमस्ते = Namaste
I honor the place in you in which the entire universe dwells.
I honor the place in you in which is of love, of truth, of light, and of peace.
When you are in that place in you, and I am in that place in me, we are one.

User avatar
eatenimpinia
Level 3
Level 3
Posts: 146
Joined: Thu Sep 10, 2015 9:29 pm

Re: Wake Computer by Mouse or Keyboard?

Post by eatenimpinia »

I went through those settings again and still see nothing that sets the mouse/keyboard to wake the computer from sleep. I'm amazed it works that way on your system. Over the course of Mint 17.x and even 18, I've clean-installed the OS about 4 or 5 times. Yet, I've never had the ability to wake the computer by moving the mouse or using the keyboard (or even seen the options to do so). Do you happen to remember if yours did so out of the box? Or, did you have to change something?
Distro: (back to) Linux Mint 17.3 Rosa, Kernel: 4.4.0-51-generic x86_64 (64 bit), Desktop: Cinnamon 2.8.8

User avatar
eatenimpinia
Level 3
Level 3
Posts: 146
Joined: Thu Sep 10, 2015 9:29 pm

Re: Wake Computer by Mouse or Keyboard?

Post by eatenimpinia »

Here's a bit more information from my system:

Code: Select all

lsusb
Bus 002 Device 002: ID 8087:8001 Intel Corp. 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8009 Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 004: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 003 Device 003: ID 18d1:4ee1 Google Inc. Nexus 4 / 10
Bus 003 Device 002: ID 08bb:2704 Texas Instruments Audio Codec
Bus 003 Device 005: ID 0d8c:013c C-Media Electronics, Inc. CM108 Audio Controller
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
and

Code: Select all

lsusb -t
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/14p, 480M
    |__ Port 5: Dev 2, If 0, Class=Audio, Driver=snd-usb-audio, 12M
    |__ Port 5: Dev 2, If 1, Class=Audio, Driver=snd-usb-audio, 12M
    |__ Port 5: Dev 2, If 2, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 6: Dev 3, If 0, Class=Vendor Specific Class, Driver=usbfs, 480M
    |__ Port 8: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 8: Dev 4, If 1, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 8: Dev 4, If 2, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 14: Dev 5, If 0, Class=Audio, Driver=snd-usb-audio, 12M
    |__ Port 14: Dev 5, If 1, Class=Audio, Driver=snd-usb-audio, 12M
    |__ Port 14: Dev 5, If 2, Class=Audio, Driver=snd-usb-audio, 12M
    |__ Port 14: Dev 5, If 3, Class=Human Interface Device, Driver=usbhid, 12M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/8p, 480M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M
Distro: (back to) Linux Mint 17.3 Rosa, Kernel: 4.4.0-51-generic x86_64 (64 bit), Desktop: Cinnamon 2.8.8

User avatar
Amii_Leigh
Level 5
Level 5
Posts: 681
Joined: Fri Mar 25, 2016 10:58 pm
Location: Somewhere in the middle of nowhere, Missouri

Re: Wake Computer by Mouse or Keyboard?

Post by Amii_Leigh »

I neglected to mention that I don't use suspend at all.*Oops*. I lock the screen when I leave my computer by pressing the power button, so I can instantly see my current screensaver.I'm a very long-time winxp user that had *lots* of screensavers, and I still love screensavers :) You might want to read this and this in reference to your issue, or you can read through all these links in my search.You can also read this to find out what the heck this "Lock Screen" stuff is...
Anyhow, Namaste and good luck...
नमस्ते = Namaste
I honor the place in you in which the entire universe dwells.
I honor the place in you in which is of love, of truth, of light, and of peace.
When you are in that place in you, and I am in that place in me, we are one.

User avatar
eatenimpinia
Level 3
Level 3
Posts: 146
Joined: Thu Sep 10, 2015 9:29 pm

Re: Wake Computer by Mouse or Keyboard?

Post by eatenimpinia »

Amii_Leigh: Thanks for those links, but I don't see anything there that helps. A lot of it is for trouble actually getting the computer to go to sleep/hibernate. I've got no issues there: it suspends just fine. A lot of it is for trouble getting the computer to come out of sleep/hibernate. Again, no trouble there except that I can't get it to happen with just a mouse movement or key press. I've got to use the power button on the computer.

Anyone else: Does ANYONE who read this far have a Mint 17.3 Cinnamon install that will wake from sleep (suspend) with either a mouse gesture or key press? Or, how about with ANY Mint install?

And, since no one's replied about that terminal command in my OP, can anyone point me in the right direction for where this is controlled? I've seen older references to /etc/rc.local, /proc/acpi/wakeup, and rules in /etc/udev/rules.d/90-keyboardwakeup.rules. But, those are ancient references. I've also seen references approaching the problem from the other direction:

https://www.enigma14.eu/wiki/Disable_mo ... er_kernels

claiming that since the 3.x versions of the kernel, the /proc/acpi/wakeup stuff no longer works and we have to make changes in things like /sys/devices/pci0000:00/0000.... Heck, I can't even report this as a bug or suggestion on Github because I don't know the area responsible for it.
Distro: (back to) Linux Mint 17.3 Rosa, Kernel: 4.4.0-51-generic x86_64 (64 bit), Desktop: Cinnamon 2.8.8

FreedomTruth
Level 4
Level 4
Posts: 431
Joined: Fri Sep 23, 2016 10:19 am

Re: Wake Computer by Mouse or Keyboard?

Post by FreedomTruth »

eatenimpinia wrote:Anyone else: Does ANYONE who read this far have a Mint 17.3 Cinnamon install that will wake from sleep (suspend) with either a mouse gesture or key press? Or, how about with ANY Mint install?
Well since you generalized this to any mint install ... I run 18 MATE.
I recently came from Windows 7. In Windows my computer would startup from suspend by keypress, but the keyboard would then be unreponsive and I would have to physically unplug it and plug it back in to login. It's a USB keyboard. So, I quickly got used to using the power button to wake back up.
Now, after installing LM 18, I have powered back on from the keyboard a couple times successfully. However, the last two times I tried it, it was unresponsive and didn't wake up. I haven't tried mouse-click. I think I have wake-on-mouse disabled in my BIOS, though. Too often I'd bump the mouse after suspend and immediately wake back up. :oops: So, yes, for me it has worked some times in LM18. Personally I'm not too concerned with it, since I'm used to using the power button anyway, but I can see it being an issue for others. Unfortunately, I don't know what direction to point you to troubleshoot this -- maybe google (if you haven't already)? I guess, make sure your BIOS is set to wake on keypress, if that's an option there.
If you abide in My word, you are My disciples indeed. And you shall know the truth, and the truth shall make you free... Most assuredly, I say to you, whoever commits sin is a slave of sin... Therefore if the Son makes you free, you shall be free indeed.

User avatar
eatenimpinia
Level 3
Level 3
Posts: 146
Joined: Thu Sep 10, 2015 9:29 pm

Re: Wake Computer by Mouse or Keyboard?

Post by eatenimpinia »

I'm dual booting Windows 10 and have never had a problem getting the computer to wake from Sleep (Suspend) there. It's not a big issue. It's just an irritation. I know some versions of Linux have this capability because I've found quite a few posts around the internet where people are trying to get it to stop.

Thanks for the reply about Mate.
Distro: (back to) Linux Mint 17.3 Rosa, Kernel: 4.4.0-51-generic x86_64 (64 bit), Desktop: Cinnamon 2.8.8

User avatar
TooMuchTime
Level 4
Level 4
Posts: 407
Joined: Fri Mar 11, 2016 10:30 pm

Re: Wake Computer by Mouse or Keyboard?

Post by TooMuchTime »

Logitech wireless with receiver in a USB port
Have you tried this with a wired USB mouse and keyboard?

User avatar
eatenimpinia
Level 3
Level 3
Posts: 146
Joined: Thu Sep 10, 2015 9:29 pm

Re: Wake Computer by Mouse or Keyboard?

Post by eatenimpinia »

I was thinking about the wired vs wireless issue. But, I don't have a wired keyboard or mouse in the house.
Distro: (back to) Linux Mint 17.3 Rosa, Kernel: 4.4.0-51-generic x86_64 (64 bit), Desktop: Cinnamon 2.8.8

Post Reply

Return to “Other topics”