Preventing laptop wake up when opening the lid on linux

7

4

My laptop is broken and the lid does not lock. So I want it not to wake up when the lid is open. I use ubuntu, but gnome-power-preferences does not have any option like that (only to close the lid).

Is there any way to do this? I'm afraid next time it opens on the case it will get burned.

chmeee

Posted 2009-11-09T07:06:40.780

Reputation: 296

Answers

5

I found a way after googleing a bit smarter (it was difficult to find the correct search keys).

In short, the file /proc/acpi/wakeup has a line for LID which is enabled.

$ cat /proc/acpi/wakeup 
Device  S-state   Status   Sysfs node
PCIB      S4     disabled  pci:0000:00:1e.0
USB1      S3     disabled  pci:0000:00:1d.0
USB2      S3     disabled  pci:0000:00:1d.1
USB3      S3     disabled  pci:0000:00:1d.2
USB4      S3     disabled  pci:0000:00:1d.3
USB7      S3     disabled  pci:0000:00:1d.7
MODM      S3     disabled  
HDEF      S3     disabled  pci:0000:00:1b.0
PXS1      S4     disabled  pci:0000:02:00.0
LID       S4    *enabled   

If you echo " LID" > /proc/acpi/wakeup it will change to disable and the computer won't wake up on lid open.

Follow the instructions on the already mentioned link to set it permanent on your computer.

chmeee

Posted 2009-11-09T07:06:40.780

Reputation: 296

What if that file doesn't have that line? Can I just add it? – tim687 – 2015-03-11T12:50:53.277

1I'm getting bash: /proc/acpi/wakeup: Permission denied. What to do? (This is in LinuxMint 8.3) – Kanchu – 2017-12-08T08:28:22.937

0

Usually wake is not triggered once lid is open. If you get running system once you open lid, your system was probably not in S3 sleep as it should have been. Probably there is something preventing full sleep.

Additionally you can look in BIOS for wake-up events and turn off those that you don't want (maybe lid wake is among them).

Josip Medved

Posted 2009-11-09T07:06:40.780

Reputation: 8 582

This is a fujitsu lifebook, I don't see nothing like this on the BIOS. I use the 'normal' suspend command from gnome-power-cmd. – chmeee – 2009-11-09T18:11:46.153