DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 20th October 2023
unicorn unicorn is offline
Port Guard
 
Join Date: Apr 2020
Posts: 33
Default How to suspend?

AMD Ryzen CPU, how to suspend the system in the terminal? Which command should I run?
Reply With Quote
  #2   (View Single Post)  
Old 20th October 2023
jmccue jmccue is offline
Real Name: John McCue
Package Pilot
 
Join Date: Aug 2012
Location: here
Posts: 170
Default

I know nothing about a "AMD Ryzen CPU", but the command is zzz(8).
__________________
[t]csh(1) - "An elegant shell, for a more... civilized age."
- Paraphrasing Star Wars (tvtropes.org)
Reply With Quote
  #3   (View Single Post)  
Old 20th October 2023
unicorn unicorn is offline
Port Guard
 
Join Date: Apr 2020
Posts: 33
Default

Quote:
Originally Posted by jmccue View Post
I know nothing about a "AMD Ryzen CPU", but the command is zzz(8).
I think APM is for Intel CPUs, zzz or ZZZ can't be executed in my system.
Reply With Quote
  #4   (View Single Post)  
Old 20th October 2023
Maxnix's Avatar
Maxnix Maxnix is offline
Port Guard
 
Join Date: Feb 2016
Posts: 28
Default

Quote:
Originally Posted by unicorn View Post
I think APM is for Intel CPUs, zzz or ZZZ can't be executed in my system.
Did you executed it as root (directly or with doas(1))? Suspending, rebooting and shutting down require admin prviledges.
__________________
The world doesn't live off jam and fancy perfumes - it lives off bread and meat and potatoes. Nothing changes. All the big fancy stuff is sloppy stuff that crashes. I don't need dancing baloney - I need stuff that works. -- Theo de Raadt
Reply With Quote
  #5   (View Single Post)  
Old 20th October 2023
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,984
Default

Hello and welcome!

The use of apm(8)/zzz(8)/ZZZ(8) requires that the apmd(8) daemon be running, and apmd(8) is NOT started by default.

Enable it for automatic start, set any optional flags, and start it immediately with:
  1. # rcctl enable apmd
  2. # rcctl set apmd flags <the flags you want to set>
  3. # rcctl start apmd
There's an example of provisioning apmd(8) in the rcctl(8) man page, which may help.
Reply With Quote
  #6   (View Single Post)  
Old 21st October 2023
unicorn unicorn is offline
Port Guard
 
Join Date: Apr 2020
Posts: 33
Default

thanks. After zzz system is still running. How to wake up from hibernation? What do the flags mean?

Last edited by unicorn; 21st October 2023 at 04:34 AM.
Reply With Quote
  #7   (View Single Post)  
Old 21st October 2023
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,984
Default

Quote:
Originally Posted by unicorn View Post
After zzz system is still running.
I interpret that to mean, "suspend isn't working." A dmesg(8) might help. Might.
Quote:
How to wake up from hibernation?
Hibernation (ZZZ) stores RAM and other states into swap space and then powers down. If hibernation is successful, on power-up the bootloader and kernel will jointly recognize that it had previously been hibernated and will restore RAM and other states from swap, then continue running.
Quote:
What do the flags mean?
See the apmd(8) man page for its complete list of flags, from -A to -z.
Reply With Quote
  #8   (View Single Post)  
Old 21st October 2023
unicorn unicorn is offline
Port Guard
 
Join Date: Apr 2020
Posts: 33
Default

thanks, my dmesg
Reply With Quote
  #9   (View Single Post)  
Old 21st October 2023
unicorn unicorn is offline
Port Guard
 
Join Date: Apr 2020
Posts: 33
Default

there are no S1, S2, and S3 sleep states in my acpi , why?
Reply With Quote
Old 21st October 2023
Head_on_a_Stick's Avatar
Head_on_a_Stick Head_on_a_Stick is offline
Real Name: Matthew
Bitchy Nerd Elitist
 
Join Date: Dec 2015
Location: London
Posts: 467
Default

The kernel might require a product-specific ACPI driver for your hardware to provide full functionality. The official ACPI specification is not followed by most manufacturers so quirks and special drivers are sometimes needed.

Last edited by Head_on_a_Stick; 21st October 2023 at 03:28 PM. Reason: s/s2ram/full/
Reply With Quote
Old 22nd October 2023
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,984
Default

Quote:
Originally Posted by unicorn View Post
there are no S1, S2, and S3 sleep states in my acpi , why?
There might be something you can configure in your BIOS. Looking at other Ryzen 7 users who have posted dmesg(8) output to the misc@ mailing list, I see they have S3 state. A typical Ryzen 7 dmesg(8) includes:
Code:
acpi0: sleep states S0 S3 S4 S5
Reply With Quote
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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
suspend not working hd77 OpenBSD General 8 8th March 2022 11:10 PM
nfs and suspend Scarletts OpenBSD General 3 16th August 2015 01:50 PM
Suspend to ram not working in 10.2 acampbell FreeBSD General 0 15th August 2015 08:51 AM
suspend phill OpenBSD General 3 2nd February 2011 07:49 AM
USB not working after suspend stukov Other BSD and UNIX/UNIX-like 5 11th August 2008 06:48 PM


All times are GMT. The time now is 04:42 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick