2

That can happen after a few seconds like many people have described, or after a few minutes or hours. The display remains turned off, only when I press keyboard or move the mouse it gets turned on.

What can be the reason?

I'm using a bluetooth mouse, maybe it gets connected to it when it's asleep because I put them in a bag close to each other? However, I think even if it is, it's not the only reason.'

UPDATE:

$ cat /proc/acpi/wakeup
Device  S-state   Status   Sysfs node
LID       S3    *enabled   platform:PNP0C0D:00
IGBE      S4    *enabled   pci:0000:00:19.0
EXP3      S4    *disabled  pci:0000:00:1c.2
XHCI      S3    *enabled   pci:0000:00:14.0
EHC1      S3    *enabled   pci:0000:00:1d.0

What should I disable to allow waking up only by pressing a key on the keyboard?

7
4

I suppose LID is your laptop's lid, so leave that on so you can wake it up by opening the lid. IGBE is the network card, so it doesn't seem relevant to your problem. I don't know what EXP3 is but it doesn't matter because it's disabled. This leaves us with XHCI and EHCI. These two are the USB hubs (one is USB 2.0 the other 3.0).

To disable wakeup from any USB device, just add the following to /etc/rc.local:

echo "XHCI" > /proc/acpi/wakeup
echo "EHC1" > /proc/acpi/wakeup

You can also execute the commands as root and then put the laptop to sleep and see if it stops from waking up by itself. Try moving the mouse before and after you make this change to see if it helps.

8
  • why not to change "enabled" to "disabled"? – アレックス Oct 2 '15 at 13:04
  • That's not a "real" file, you cannot edit it. The entire /proc filesystem is just an interface to the kernel. Each time you write "XHCI" etc in it, it will toggle the value. – o9000 Oct 2 '15 at 19:02
  • I don't understand. There're 2 types of values there: enabled and disabled. Why not change enabled to disabled for a certain device? Or is it just a "copy" (link) of the state of the devices? – アレックス Oct 3 '15 at 0:49
  • I told you, that's not a file, it's an interface to the kernel. You cannot edit it. But try and see if you don't believe me. – o9000 Oct 3 '15 at 8:10
  • More about procfs tldp.org/LDP/Linux-Filesystem-Hierarchy/html/proc.html – o9000 Oct 3 '15 at 8:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.