Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 19 Nov 2018, 18:55
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
[HOWTO] Suspend or "sleep" a PC
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [11 Posts]  
Author Message
frenchiveruti

Joined: 15 Feb 2017
Posts: 103

PostPosted: Mon 01 Jan 2018, 23:43    Post subject:  [HOWTO] Suspend or "sleep" a PC  

So, many of the users of puppy linux, use puppy for laptops, those are great suspending because the acpi can read the battery and actually work.
But for PC users like me, the solution is just this command line:

Code:
echo -n mem > /sys/power/state


And that's it!
Why that works? Here's the answer:
https://www.kernel.org/doc/Documentation/power/states.txt

I hope this helps!

Credits to the solution where they should be:
http://www.murga-linux.com/puppy/viewtopic.php?p=725802#725802
Back to top
View user's profile Send private message 
Mike Walsh


Joined: 28 Jun 2014
Posts: 4383
Location: King's Lynn, UK.

PostPosted: Fri 05 Jan 2018, 20:33    Post subject:  

@frenchiveruti:-

Sounds easy enough. Just one question, though; how do you 'wake' it up again? Is it as simple as pressing the power-on button?

Just curious, really. I know with a laptop you'd simply open the lid (I think). Or is that the 'sleep' option?

I get muddled up with the two of them, I confess..! Rolling Eyes


Mike. Wink

_________________
MY PUPPY PACKAGES | 'Thanks' are always appreciated!
--------------------------------------

Back to top
View user's profile Send private message Visit poster's website 
slavvo67

Joined: 12 Oct 2012
Posts: 1570
Location: The other Mr. 305

PostPosted: Fri 05 Jan 2018, 22:30    Post subject:  

This works for me. Just move the mouse or touch the keyboard to wake it up.
Code:
sleep 1 && xset dpms force off

BTW, not my own. Someone provided this a while back. I just script it to root/my-applications/bin , make it executable and drag a copy to the desktop. One click and boom....
Back to top
View user's profile Send private message 
nic007


Joined: 13 Nov 2011
Posts: 2677
Location: Cradle of Humankind

PostPosted: Fri 05 Jan 2018, 23:02    Post subject:  

slavvo67 wrote:
This works for me. Just move the mouse or touch the keyboard to wake it up.

sleep 1 && xset dpms force off


BTW, not my own. Someone provided this a while back. I just script it to root/my-applications/bin , make it executable and drag a copy to the desktop. One click and boom....


That command only influences the screen as far as I know and does not put your whole system to sleep (standby). To awake from system standby, you need to press the power button.
Back to top
View user's profile Send private message 
frenchiveruti

Joined: 15 Feb 2017
Posts: 103

PostPosted: Sat 13 Jan 2018, 18:52    Post subject:  

Mike Walsh wrote:
@frenchiveruti:-

Sounds easy enough. Just one question, though; how do you 'wake' it up again? Is it as simple as pressing the power-on button?

Just curious, really. I know with a laptop you'd simply open the lid (I think). Or is that the 'sleep' option?

I get muddled up with the two of them, I confess..! Rolling Eyes


Mike. Wink

Hey mike, as far as my hardware goes. Just pressing the powerbutton works wonders, even pressing a keyboard key on a PS2 Keyboard works also for waking it up.
Back to top
View user's profile Send private message 
Mike Walsh


Joined: 28 Jun 2014
Posts: 4383
Location: King's Lynn, UK.

PostPosted: Sat 13 Jan 2018, 21:14    Post subject:  

@ frenchiveruti:-

Mm. Fair enough! In that case.....thanks for the info. I'll give this a try.

Cheers for the confirmation.


Mike. Wink

_________________
MY PUPPY PACKAGES | 'Thanks' are always appreciated!
--------------------------------------

Back to top
View user's profile Send private message Visit poster's website 
fabrice_035


Joined: 28 Apr 2014
Posts: 535
Location: Bretagne / France

PostPosted: Sun 14 Jan 2018, 05:11    Post subject:  

Hi,

My computer (dell xps 1640) restart immediatly after sleep/hibernate Crying or Very sad

Why ?

Regard.
Back to top
View user's profile Send private message 
nic007


Joined: 13 Nov 2011
Posts: 2677
Location: Cradle of Humankind

PostPosted: Sun 14 Jan 2018, 07:43    Post subject:  

fabrice_035 wrote:
Hi,

My computer (dell xps 1640) restart immediatly after sleep/hibernate Crying or Very sad

Why ?

Regard.

It depends on which sleep mode(s) are available for your system and which you are using. Suspending to RAM does not require a system restart but suspending to HD does.
Back to top
View user's profile Send private message 
soniabu


Joined: 01 Feb 2018
Posts: 30

PostPosted: Thu 07 Jun 2018, 14:43    Post subject: Re: [HOWTO] Suspend or "sleep" a PC  

frenchiveruti wrote:
So, many of the users of puppy linux, use puppy for laptops, those are great suspending because the acpi can read the battery and actually work.
But for PC users like me, the solution is just this command line:

Code:
echo -n mem > /sys/power/state



fantastic !
thx Sonia
Back to top
View user's profile Send private message 
takenp


Joined: 05 Aug 2015
Posts: 66

PostPosted: Wed 04 Jul 2018, 16:11    Post subject:  

BTW

I've been using pm-suspend small program from the pm-utils packadge got from Ubuntu's repo. It worked fine. Still thinking what is better? Or may be pm-suspend does all the same? )

==
UPDATE

It does evidently all the same )

Code:

root# cat /usr/lib/pm-utils/pm-functions | grep state

   if grep -q mem /sys/power/state; then
      do_suspend() { echo -n "mem" >/sys/power/state; }
   elif grep -q standby /sys/power/state; then
      do_suspend() { echo -n "standby" >/sys/power/state; }
   grep -q disk /sys/power/state; then
      echo -n "disk" > /sys/power/state
   grep -q disk /sys/power/state && \


LOL
Back to top
View user's profile Send private message 
frenchiveruti

Joined: 15 Feb 2017
Posts: 103

PostPosted: Sun 08 Jul 2018, 17:01    Post subject:  

takenp wrote:
BTW

I've been using pm-suspend small program from the pm-utils packadge got from Ubuntu's repo. It worked fine. Still thinking what is better? Or may be pm-suspend does all the same? )

==
UPDATE

It does evidently all the same )

Code:

root# cat /usr/lib/pm-utils/pm-functions | grep state

   if grep -q mem /sys/power/state; then
      do_suspend() { echo -n "mem" >/sys/power/state; }
   elif grep -q standby /sys/power/state; then
      do_suspend() { echo -n "standby" >/sys/power/state; }
   grep -q disk /sys/power/state; then
      echo -n "disk" > /sys/power/state
   grep -q disk /sys/power/state && \


LOL


Yeah! This is for the command line interface purist like me, that don't like to have 200 programs for a simple set of commands.
Glad it works!
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [11 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0661s ][ Queries: 11 (0.0065s) ][ GZIP on ]