Page 1 of 1

Suspend Option for EasyOS [SOLVED]

Posted: Mon Jun 24, 2024 5:38 am
by pp4mnklinux

Hello everybody:

I wrote a post { viewtopic.php?p=124032#p124032 } asking about the possibility of add a button to suspend easyos, as I are used to use with puppy.

I found the instruction, I created a Script, Include an Icon so, till someone make a better option, you could use it.

You only need to execute this command in terminal:

Code: Select all

echo -n mem >/sys/power/state

The instruction I used is:

Code: Select all

#!/bin/sh
# Set suspend:

echo -n mem >/sys/power/state

Re: Suspend Option for EasyOS

Posted: Mon Jun 24, 2024 8:49 am
by BarryK

With a laptop, you just close the lid.
After opening the lid, press the power button to reactivate.

FeodorF sent me an email.
Very interesting, he achieved the same hibernation on a PC without a lid.

He just ran this: /etc/acpi/lid.sh

-- either in a terminal or click on it.

He brought the PC back to life by a short press on the power button.


Re: Suspend Option for EasyOS

Posted: Mon Jun 24, 2024 9:06 am
by pp4mnklinux

Hi @BarryK :

I tested what you told me about the lid.sh file, and it works at my work pc too.

Only a question, what should I do If I want the computer to ask for a password after suspend?

I ask this because at my pc at work, it would be fantastic because this way there is no problem of security.

It works nice at work.

Now testing with PDI, cams, ... I think the most difficult part could be with tv screens, but I think I could solve this with the included app for multiple monitors.


Re: Suspend Option for EasyOS

Posted: Mon Jun 24, 2024 10:02 am
by FeodorF

@pp4mnklinux , @BarryK
The question is: Only a question, what should I do If I want the computer to ask for a password after suspend?
The answer is: Add xlock to the lid.sh .

Code: Select all

#!/bin/sh
/bin/grep -q open /proc/acpi/button/lid/LID/state && exit 0
/usr/sbin/pm-suspend
xlock

Click on the lock icon at top right screen and setup a password; that's it.

Have fun with EasyOS!


Re: Suspend Option for EasyOS

Posted: Mon Jun 24, 2024 11:01 am
by pp4mnklinux

@FeodorF

Thanks a lot for your help.

Suspend modified with your suggestion.

Now my computer at work, is password protected when suspended.

Have a nice week.- CHEERS.