Waking from Sleep with Lid Closed?

Hey, just wondering if anyone else has had this issue: when I close my laptop it will sleep, but when its in my bag sometimes it will just wake from sleep at random (with the lid closed). Since its in my bag I’m scared to put it to sleep because fires and heat damage so I’ve always just hibernated it every time I need to save my work and power off quickly. Any ideas why/ how to fix?

Mine does the same thing, and when it wakes from sleep I find random characters typed into the Linux command line (or whatever program I was running last, but that’s usually the command line for me). What’s happening in my case is that the screen is pressing on the keyboard just enough to press on random keys: the first one wakes the laptop up from sleep mode, and the others then get typed.

Try opening an empty file in Notepad sometime before putting the laptop to sleep. Then close the lid, put it in your bag for a few minutes, jostle it around a bit by picking it up and putting it down (gently, just handle it as you would when you’re traveling) and then open the lid. See if you get random letters typed into Notepad after doing that. If you see that, then you know the keyboard is being pressed by the closed lid and you’ve taken the first step towards a solution: knowing what the problem actually is. And if you never see any random keystrokes in Notepad, then you know your problem is different from mine and my advice won’t help you.

If it turns out that you do see random keys being pressed in sleep mode, you might want to look at [SOLVED] Laptop waking from sleep in backpack or other related discussions to see if any solutions found in those threads will work for you.

Hi,

This has been discussed at length on various threads in the past.
This is what I use. Place the script as filename “keyboard-mouse-disable-sleep” in /usr/lib/systemd/system-sleep
Then the only thing to wake from sleep is the power button.
This works on a FW16, a slightly different script is needed for a FW13

#!/bin/sh
# This file should be placed in: /usr/lib/systemd/system-sleep

PATH=/sbin:/usr/sbin:/bin:/usr/bin

case "$1" in
	pre)	#echo AMDI0010:03 >/sys/bus/platform/drivers/i2c_designware/unbind
		#echo 1-4 >/sys/bus/usb/drivers/usb/unbind
		# rmmod atlantic
		echo disabled > /sys/devices/pci0000:00/0000:00:08.1/0000:c1:00.3/usb1/1-4/1-4.3/power/wakeup
		echo disabled > /sys/devices/platform/AMDI0010:03/i2c-1/i2c-PIXA3854:00/power/wakeup
		echo disabled >/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:4b/PNP0C09:00/PNP0C0D:00/power/wakeup
		exit 0
		;;
	post)	#echo AMDI0010:03 >/sys/bus/platform/drivers/i2c_designware/bind
		#echo 1-4 >/sys/bus/usb/drivers/usb/bind
		# modprobe atlantic
		exit 0
		;;
 	*)	exit 1
		;;
esac
1 Like