3

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?

Incerteza
  • 1,470

1 Answers1

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.

o9000
  • 695
  • 5
  • 12
  • why not to change "enabled" to "disabled"? – Incerteza Oct 02 '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 02 '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? – Incerteza Oct 03 '15 at 00: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 03 '15 at 08:10
  • More about procfs http://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/proc.html – o9000 Oct 03 '15 at 08:11
  • what does "interface to kernel" mean? moreover, that doohickey which I plug in into USB to connect to the mouse via blue-tooth still makes the laptop to wake up when I suspend the laptop and them move the mouse. – Incerteza Oct 06 '15 at 09:58
  • what does "interface to kernel" mean? – Incerteza Nov 08 '15 at 08:23
  • It's explained on the page I linked to. – o9000 Nov 08 '15 at 12:41