Suspend Option for EasyOS [SOLVED]

Moderator: BarryK

Post Reply
User avatar
pp4mnklinux
Posts: 915
Joined: Wed Aug 19, 2020 5:43 pm
Location: Edinburgh
Has thanked: 560 times
Been thanked: 243 times
Contact:

Suspend Option for EasyOS [SOLVED]

Post 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
Attachments
This is the icon I used to identify the script
This is the icon I used to identify the script
systemsuspendhibernate_pp4mnkeasyos.png (44.65 KiB) Viewed 187 times
Last edited by pp4mnklinux on Mon Jun 24, 2024 12:03 pm, edited 1 time in total.
User avatar
BarryK
Posts: 2389
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 104 times
Been thanked: 614 times

Re: Suspend Option for EasyOS

Post 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.

User avatar
pp4mnklinux
Posts: 915
Joined: Wed Aug 19, 2020 5:43 pm
Location: Edinburgh
Has thanked: 560 times
Been thanked: 243 times
Contact:

Re: Suspend Option for EasyOS

Post 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.

Attachments
WhatsApp Image 2024-06-24 at 11.22.27.jpeg
WhatsApp Image 2024-06-24 at 11.22.27.jpeg (60.79 KiB) Viewed 139 times
WhatsApp Image 2024-06-24 at 11.02.23 (1).jpeg
WhatsApp Image 2024-06-24 at 11.02.23 (1).jpeg (40.24 KiB) Viewed 149 times
FeodorF
Posts: 173
Joined: Tue Jul 14, 2020 7:52 pm
Has thanked: 8 times
Been thanked: 24 times

Re: Suspend Option for EasyOS

Post 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!

User avatar
pp4mnklinux
Posts: 915
Joined: Wed Aug 19, 2020 5:43 pm
Location: Edinburgh
Has thanked: 560 times
Been thanked: 243 times
Contact:

Re: Suspend Option for EasyOS

Post 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.

Attachments
screenshot(2).jpg
screenshot(2).jpg (33.31 KiB) Viewed 97 times
Post Reply

Return to “EasyOS”