(OLD) (ARCHIVED) Puppy Linux Discussion Forum Forum Index (OLD) (ARCHIVED) Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info

This forum can also be accessed as http://oldforum.puppylinux.com
It is now read-only and serves only as archives.

Please register over the NEW forum
https://forum.puppylinux.com
and continue your work there. Thank you.

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups    
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 05 Dec 2020, 11:20
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
[HOWTO] Suspend or "sleep" a PC
Moderators: Flash, Ian, JohnMurga
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
Page 1 of 1 [14 Posts]  
Author Message
frenchiveruti

Joined: 15 Feb 2017
Posts: 120

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: 6397
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

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

Joined: 12 Oct 2012
Posts: 1625
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: 3444
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: 120

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: 6397
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

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


Joined: 28 Apr 2014
Posts: 768
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: 3444
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: 162
Location: Paris

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: 104
Location: Moskva

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 Visit poster's website AIM Address 
frenchiveruti

Joined: 15 Feb 2017
Posts: 120

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 
jplt3


Joined: 08 Apr 2019
Posts: 118
Location: Planet Earth

PostPosted: Fri 29 May 2020, 16:23    Post subject:  

@frenchiveruti great thanks fantastic

Too bad that we can not wake up the pc with keyboard or mouse ?

_________________
JpLt
Back to top
View user's profile Send private message 
Mike Walsh


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

PostPosted: Fri 29 May 2020, 16:45    Post subject:  

jplt3 wrote:
@frenchiveruti great thanks fantastic

Too bad that we can not wake up the pc with keyboard or mouse ?


@ jplt3:-

If you use the initial command in the first post, that's exactly what happens! In fact, it's a bit of a juggling act if you're using a desktop, and you're trying to carefully switch the mouse off without moving the cursor.....because the slightest cursor movement will "wake" it up again.

I've stuck a wee script with the command in /usr/sbin, and called it simply 'suspend.sh'.

It's also why, although I've integrated "Suspend-to-RAM" into my Pups' Logout GUI - I've replaced the 'Rebuild Menus' entry, 'cos I prefer to run 'fixmenus' & re-start "X" manually - I've also added a key-binding to /etc/xdg/templates/_rox_jwmrc, which lets me run the command via the "Pause/Break" button. Means I can safely switch the mouse off and put it out of the way before suspending via the "Pause" button.....and when I want to resume, I just hit the biggest key I can find. The space bar..!


Mike. Wink

_________________
MY 'PUPPY' PACKAGES

Back to top
View user's profile Send private message 
jplt3


Joined: 08 Apr 2019
Posts: 118
Location: Planet Earth

PostPosted: Fri 29 May 2020, 16:56    Post subject:  

@Mike Walsh

thanks for your explanation.

In my case it does not work maybe i'am using this tiling window manager DWM ?!

Will try with jwm .

i test on
Code:
cat /etc/os-release
NAME=Puppy
VERSION="8.0"
ID=puppy_bionicpup64
VERSION_ID=8.0
PRETTY_NAME="bionicpup64 8.0"
ANSI_COLOR="0;34"
CPE_NAME="cpe:/o:puppy:puppy_linux:8.0"
HOME_URL="http://puppylinux.com/"
SUPPORT_URL="http://www.murga-linux.com/puppy/index.php"
BUG_REPORT_URL="https://github.com/puppylinux-woof-CE/woof-CE"

_________________
JpLt
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [14 Posts]  
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. 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.2356s ][ Queries: 12 (0.0396s) ][ GZIP on ]