LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 01-08-2022, 03:50 PM   #1
AugustGene
LQ Newbie
 
Registered: Jan 2022
Distribution: Ubuntu
Posts: 1

Rep: Reputation: 0
Command line for 'Suspend' in Ubuntu Desktop Power Off


I would like to learn the process for determining the command line for Suspend in the Power Off section of Ubuntu desktop.
 
Old 01-08-2022, 06:21 PM   #2
Mike_Walsh
Member
 
Registered: Jul 2017
Location: King's Lynn, UK
Distribution: Nowt but Puppies....
Posts: 660

Rep: Reputation: 362Reputation: 362Reputation: 362Reputation: 362
I don't have a clue as to how the command that enables suspend was determined OR arrived at. All I can tell you is that the same command has been doing exactly this for many, many years:-

Code:
echo -n mem > /sys/power/state
Don't ask me how or why it works; I suspect some of LQ's veterans may be able to. All I know is that it does....and that's all I'm concerned about.

Mike.

Last edited by Mike_Walsh; 01-08-2022 at 06:23 PM.
 
Old 01-08-2022, 08:14 PM   #3
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,363
Blog Entries: 28

Rep: Reputation: 6149Reputation: 6149Reputation: 6149Reputation: 6149Reputation: 6149Reputation: 6149Reputation: 6149Reputation: 6149Reputation: 6149Reputation: 6149Reputation: 6149
I have used

Code:
pm-suspend
in the past.

This should help: https://www.cyberciti.biz/faq/linux-...op-netbook-pc/
 
Old 01-09-2022, 05:35 AM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by AugustGene View Post
I would like to learn the process for determining the command line for Suspend in the Power Off section of Ubuntu desktop.
Try
Code:
systemctl suspend
 
Old 06-04-2022, 03:18 PM   #5
clcaev
LQ Newbie
 
Registered: Jun 2022
Posts: 1

Rep: Reputation: 0
Quote:
Originally Posted by frankbell View Post
I have used

Code:
pm-suspend
in the past.
The past works. The future doesn't. I'll use `pm-suspend` thank you very much.

The documentation and help for `systemctl suspend` is lacking, debugging is a challenge. The lack of error reports may signal a choice to give up on it rather than a signal that it's working properly.

Last edited by clcaev; 06-04-2022 at 03:19 PM.
 
Old 06-04-2022, 04:09 PM   #6
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,147
Blog Entries: 6

Rep: Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834
Quote:
The documentation and help for `systemctl suspend` is lacking,
Code:
man systemctl
https://man.archlinux.org/man/systemctl.1
Code:
poweroff

Shut down and power-off the system. This is mostly equivalent to systemctl start poweroff.target --job-mode=replace-irreversibly --no-block, but also prints a wall message to all users. This command is asynchronous; it will return after the power-off operation is enqueued, without waiting for it to complete.
If combined with --force, shutdown of all running services is skipped, however all processes are killed and all file systems are unmounted or mounted read-only, immediately followed by the powering off. If --force is specified twice, the operation is immediately executed without terminating any processes or unmounting any file systems. This may result in data loss. Note that when --force is specified twice the power-off operation is executed by systemctl itself, and the system manager is not contacted. This means the command should succeed even when the system manager has crashed.

...

suspend

Suspend the system. This will trigger activation of the special target unit suspend.target. This command is asynchronous, and will return after the suspend operation is successfully enqueued. It will not wait for the suspend/resume cycle to complete.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Screen power off doesn't power off GPU Geremia Slackware 8 04-27-2021 07:39 PM
Need permanent fix for suspend. Suspend doesn't work in Ubuntu 18.04 larrymeditates Linux - Newbie 10 09-15-2020 02:30 PM
dell inspiron 3541, issues with wlan card power off and window responsiveness after suspend only technoticsonic0001 Linux - Hardware 0 06-13-2016 09:44 AM
How to turn off Xserver in the gui and turn it off in the command line geminiviper Linux - Newbie 8 08-20-2004 08:05 AM
apmd power/off system suspend knight-rider Linux - Hardware 0 02-17-2004 07:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 03:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration