Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
problem with suspend
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
sumati
Apprentice
Apprentice


Joined: 10 Nov 2019
Posts: 184

PostPosted: Tue Aug 29, 2023 6:09 pm    Post subject: Reply with quote

logrusx wrote:
Can you boot with a live distribution, for example Ubuntu and see if it works there?

As I mentioned, another distribution, i.e., Void Linux is installed on the same compuber. When I boot from Void, I have no problem with Suspend.
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2398

PostPosted: Tue Aug 29, 2023 6:13 pm    Post subject: Reply with quote

sumati wrote:
logrusx wrote:
Can you boot with a live distribution, for example Ubuntu and see if it works there?

As I mentioned, another distribution, i.e., Void Linux is installed on the same compuber. When I boot from Void, I have no problem with Suspend.


So it must be a configuration problem. One thing you could try is copy the kernel config from Void and see if ti works.

Best Regards,
Georgi
Back to top
View user's profile Send private message
sumati
Apprentice
Apprentice


Joined: 10 Nov 2019
Posts: 184

PostPosted: Tue Aug 29, 2023 7:05 pm    Post subject: Reply with quote

I have no idea how this works, but this really works: I just tested the command found in Google
Code:
echo freeze | sudo tee /sys/power/state

after resuming from suspend, everything runs smoothly as before suspend.
Thanks to all who help me, your help encouraged me to solve the issue. I will write a script to run this command more easy.
Back to top
View user's profile Send private message
sumati
Apprentice
Apprentice


Joined: 10 Nov 2019
Posts: 184

PostPosted: Wed Aug 30, 2023 7:12 am    Post subject: Reply with quote

Now I realize why suspend works in Void, not in Gentoo (before installing Gentoo I installed Arch, there suspend did not work either), this is because in Void it uses the command zzz which is also a kind of script for the effect of suspending the system. So the normal suspend does not work at all on my computer, probably because of a kind of special setting in BIOS of the HP computer, which I cannot change. I learned a lot from the article: https://www.kernel.org/doc/Documentation/power/states.txt.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22613

PostPosted: Wed Aug 30, 2023 2:56 pm    Post subject: Reply with quote

What does the script zzz do? It should be possible to replicate those steps on Gentoo.
Back to top
View user's profile Send private message
sumati
Apprentice
Apprentice


Joined: 10 Nov 2019
Posts: 184

PostPosted: Wed Aug 30, 2023 6:37 pm    Post subject: Reply with quote

Hu wrote:
What does the script zzz do? It should be possible to replicate those steps on Gentoo.

I am not an expert of Void. On the man page (https://man.voidlinux.org/zzz.8) it says:
Code:
zzz is a simple script to suspend or hibernate your computer. It supports hooks before and after suspending.
-n
dry-run mode. Instead of performing an ACPI action, zzz will just sleep for a few seconds.
-S
Enter low-power idle mode (ACPI S1, kernel name "freeze").
-z
Enter suspend to RAM mode (ACPI S3, kernel name "mem"). This is the default for zzz.
-Z
Enter hibernate to disk mode (ACPI S4, kernel name "disk") and power off. This is the default for ZZZ.
-R
Enter hibernate to disk mode and reboot. This can be used to switch operating systems.
-H
Enter hibernate to disk mode and suspend. This is also know as suspend-hybrid.
FILES
Before suspending, zzz runs the executable files in /etc/zzz.d/suspend in alphanumeric order. After suspending, zzz runs the executable files in /etc/zzz.d/resume in alphanumeric order (not in reverse order!).
The environment variable ZZZ_MODE can be used in these hooks to differentiate between standby, suspend, and resume.

It can be installed on Arch and some other distros. It requires a linux system with /sys/power/state and optionally /sys/power/disk, cf. https://github.com/jirutka/zzz. I hope, one day it will also be available on Gentoo system.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
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