how to do nothing when I open laptop lid

On my laptop with leap 42.3, DE=plasma 5.13.2, KDE frameworks 5.47.0, KDE applications 18.4.2, Kernel 4.4.138-59-default, when I open the lid the laptop resume from ram (becouse I sleeped it), I would like to do nothing leaving the laptop off, in energy saving module there is the only option “when laptop lid is closed”, is it possible to do nothing when I open the laptop lid?

If you do not want instant resume, choose Shut-down, Hibernate or Lock-screen instead of Suspend as the lid close event.

If you want to Suspend the laptop with the lid open, get a small magnet to trigger the sensor.

See if this helps…

Events which cause the system to resume from power states can be regulated in /proc/acpi/wakeup. Writing an entry from the Device column toggles the status from enabled to disabled, or vice-versa.
For example, to disable waking from suspend (S3) on opening the lid, run:

echo LID > /proc/acpi/wakeup

https://wiki.archlinux.org/index.php/laptop#Modify_wake_events

If you need help making this persistent, let us know.

manythanks eng, but I wanto to do nothing or suspend as the lid close event or suspend with lid open and then close the lid, and this is ok.
I want to do nothing as the lid open event, and this I cannot find how to do.
if I use a small magnet it trigger always closed lid, and this is not what i want.

You may have missed my previous reply.

@Pier
I cannot conceive of any rationale for the behaviour you are describing. Presumably I just do not understand what you want to achieve.

@Deano
If the open-lid event is disabled and the machine is in a suspended state, how is normal behaviour to be resumed without power-off and power-on?

By using another trigger to resume eg the power button.

maaaaanythanks, yes I missed probably answering to eng at the same time :slight_smile:
it works, created

this file:
/etc/tmpfiles.d/disable-lid-wakeup.conf
with into this:
w /proc/acpi/wakeup - - - - LID

and now when I open the lid nothing happans :slight_smile: :slight_smile:

eng-int 	 	 		 			 			@Pier
I cannot conceive of any rationale for the behaviour you are describing.   Presumably I just do not understand what you want to achieve.

it helps me in at least this two cases:
I leave sometimes the laptop closed, my son open it and leave opened, so the laptop resume and it remains on for hours running out the battery,
I usually put some paper sheet used to remember to do something between the lid and the keyboard, when I want to read this paper sheet, I have to open the lid, the laptop resume and I have to login and to suspend again,
and yes, as deano said I use power button to resume, the same as when I suspend manually leaving the lid open.

I think I’ll file a bug to add this option to power saving module :slight_smile: