Suspend To Ram working on BionicPup - Not working on FosaPup

New to Puppy and have questions? Start here

Moderator: Forum moderators

Post Reply
ramirezfx
Posts: 2
Joined: Tue Sep 07, 2021 7:13 pm
Has thanked: 1 time

Suspend To Ram working on BionicPup - Not working on FosaPup

Post by ramirezfx »

Hi folks,

I always have my computer turned on and suspend it to ram (Which works great with BionicPup).
I simply execute

echo "mem" > /sys/power/state

When I do this on FossaPup, the computer does not suspend to RAM as I can hear the fan. The monitor is off, but the only way to "turn the computer back" is to Hard-Reboot the computer by pressing the power-button for 5 secs. and turn the pc on again.

Please help me, as I wanna use FossaPup and this is the only thing which stops me from using it.

Any other methods are also welcome :-)

Thx in advance

User avatar
bigpup
Moderator
Posts: 6937
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 898 times
Been thanked: 1511 times

Re: Suspend To Ram working on BionicPup - Not working on FosaPup

Post by bigpup »

What is the computer?
Laptop, desktop, make, model?

I used in a terminal in my install of Fossapup64 9.5 on a desktop computer.

Code: Select all

echo "mem" > /sys/power/state

Seems to work OK for me.
Monitor goes black, fan turns off, keyboard goes inactive, etc.....
Tap on computer power button slightly.
Everything comes back to life and working desktop appears on the monitor.

My install of Fossapup64 9.5, has been fully updated, by using Quickpet->Info->Fossapup updates
Reboot and fossapup64save updated with the changes.

Anything you added, changed, deleted, programs running, etc...... in your Fossapup?

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

ramirezfx
Posts: 2
Joined: Tue Sep 07, 2021 7:13 pm
Has thanked: 1 time

Re: Suspend To Ram working on BionicPup - Not working on FosaPup

Post by ramirezfx »

Thx for the tip :thumbup:

I will try the update and will report if it works now

williams2
Posts: 1061
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 304 times

Re: Suspend To Ram working on BionicPup - Not working on FosaPup

Post by williams2 »

Suspend also works on my laptop. Pressing the power button briefly, or pressing any key on the builtin keyboard, wakes it from suspend.

One difference to BionicPup: fossaPup expects picom (compositor) to be running and kills picom before suspending and restarts picom after waking up.

I did not run echo "mem" > /sys/power/state, I ran the suspend script /etc/acpi/actions/suspend.sh
The suspend.sh script kills picom, and does not suspend if you have a usb drive plugged in and mounted. (which can corrupt the usb drive's file system.)

I would suggest trying the suspend.sh script to see if it works properly.
If it does, you could create a script, named maybe sus like this:

Code: Select all

#!/bin/sh
exec /etc/acpi/actions/suspend.sh

Then you could type sus to suspend.
You could drag sus to the desktop if you want a clickable suspend icon on the desktop.

I disable picom in the file /root/Startup/Picom

User avatar
MochiMoppel
Posts: 1224
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 20 times
Been thanked: 434 times

Re: Suspend To Ram working on BionicPup - Not working on FosaPup

Post by MochiMoppel »

For me Suspend in Fossapup64 kind of works on a laptop, does not work on a my desktop computer. On both machines screen goes blank, HD spins down ... and then the machine wakes up again. Suspends for 1 second :x

On the laptop it only works while the lid is closed. When I run the command
sleep 3 ; echo mem > /sys/power/state
and immediately close the lid the laptop remains suspended.

My desktop is lidless and above trick does not work. I also tried
/etc/acpi/actions/suspend.sh
and this doesn't work either. Produces message rmmod: ERROR: Module ehci_hcd is builtin

On the desktop I also tried echo mem > /sys/power/state from a terminal, i.e after exiting X.
No dice.

User avatar
bigpup
Moderator
Posts: 6937
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 898 times
Been thanked: 1511 times

Re: Suspend To Ram working on BionicPup - Not working on FosaPup

Post by bigpup »

williams2 wrote:

I disable picom in the file /root/Startup/Picom
does not suspend if you have a usb drive plugged in and mounted

Good info :thumbup:
I totally forgot to talk about Picom. :oops:
I too have it not running, as you have done.
That is probably why the original posted command woks for me in Fossapup.

So, williams2 info is probably better than mine :oops:

For others with the issues in Fossapup64 9.5
Have you done the Quickpet->Info->Fossapup updates
Rebooted, updating the save, and now running using the changes?
There is some bug fixes for Picom and other issues, in the update.

Need to know if problems are still there after doing the update.

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
bigpup
Moderator
Posts: 6937
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 898 times
Been thanked: 1511 times

Re: Suspend To Ram working on BionicPup - Not working on FosaPup

Post by bigpup »

Something to check.

in the computers UEFI/BIOS setup.
Check the "ACPI Suspend Type" option.
Make sure it's set to S3 as opposed to S1 or S2.
This will prevent the computer from powering the CPU, RAM, and several other components when it's in sleep mode.

Power state

ACPI state
Sleep -->S1, S2, or S3

Hibernate -->S4

Soft Off -->S5

Mechanical Off -->G3

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

williams2
Posts: 1061
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 304 times

Re: Suspend To Ram working on BionicPup - Not working on FosaPup

Post by williams2 »

@MochiMoppel My laptop would immediately wake up, the same as yours.
I found that disabling items in /proc/acpi/wakeup could prevent that.

I found that on my machine, disabling all the acpi wakeup items seems to work best.

See: viewtopic.php?f=4&t=3904&p=35872#p35872

mow9902
Posts: 195
Joined: Fri Jul 24, 2020 11:57 pm
Has thanked: 15 times
Been thanked: 61 times

Re: Suspend To Ram working on BionicPup - Not working on FosaPup

Post by mow9902 »

I too had this same problem when I moved to fossapup64 back in April this year.

My hardware is an old DELL latitude with 8G RAM. Had been happily running bionic64 for a few years before moving to fossapup.

Here's what I did to fix the 'suspend' problem:

in /etc you will find a directory named "acpi"
Inside /etc/acpi you will find these 2 directories:
actions
LID

Inside /etc/acpi/LID you will find a script named "suspend.sh"

I made some simple edits to the bottom of that script (per the attached screenshots) to resolve this problem.

/etc/acpi
/etc/acpi
acpi.png (45.78 KiB) Viewed 1133 times
/etc/acpi/actions
/etc/acpi/actions
actions.png (37.79 KiB) Viewed 1133 times
/etc/acpi/actions/suspend.sh
/etc/acpi/actions/suspend.sh
suspend.sh.png (116.86 KiB) Viewed 1133 times

After this, make sure that in the directory /etc/acpi/LID there is a link named "00000080" pointing to /etc/acpi/actions/suspend.sh.

Works for me.

User avatar
MochiMoppel
Posts: 1224
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 20 times
Been thanked: 434 times

Re: Suspend To Ram working on BionicPup - Not working on FosaPup

Post by MochiMoppel »

williams2 wrote: Wed Sep 08, 2021 6:18 pm

I found that on my machine, disabling all the acpi wakeup items seems to work best.

See: viewtopic.php?f=4&t=3904&p=35872#p35872

:thumbup: Great! Works for me too!

- I tested with echo mem > /sys/power/state, not the suspend.sh script.. This means picom kept running.
- I tested only on my desktop because unlike for the laptop I hadn't found a workaround
- Before changing the wakeup file I booted BionicPup to verify the OP's claim that the echo mem command "works great with BionicPup". It doesn't for me. Immediately wakes up. Only difference: In Fossapup mouse & keyboard will freeze while in BionicPup they become operational again.
- Before the change the wakeup files in Fossapup and BionicPup are identical on my machine:

Code: Select all

Device	S-state	  Status   Sysfs node
PCI0	  S5	*disabled  no-bus:pci0000:00
USB0	  S5	*enabled   pci:0000:00:13.0
USB1	  S5	*enabled   pci:0000:00:13.1
USB2	  S5	*enabled   pci:0000:00:13.2
USB3	  S5	*enabled   pci:0000:00:13.3
USB4	  S5	*enabled   pci:0000:00:13.4
USB5	  S5	*enabled   pci:0000:00:13.5
AZAL	  S3	*disabled  pci:0000:00:14.2
P2P	  S5	*disabled  pci:0000:00:14.4
PCE2	  S4	*disabled
PCE3	  S4	*disabled
PCE4	  S4	*disabled
PCE5	  S4	*disabled
PCE6	  S4	*disabled
PCE7	  S4	*disabled  pci:0000:00:07.0
PCE8	  S4	*disabled
UAR1	  S5	*disabled  pnp:00:04
UAR2	  S5	*disabled
PS2M	  S5	*disabled
PS2K	  S5	*disabled

After disabling the USB items Fossapup and BionicPup suspend correctly and can only be waken up by shortly pressing the power button. That's the way I expect it to be.

User avatar
bigpup
Moderator
Posts: 6937
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 898 times
Been thanked: 1511 times

Re: Suspend To Ram working on BionicPup - Not working on FosaPup

Post by bigpup »

After disabling the USB items Fossapup and BionicPup suspend correctly and can only be waken up by shortly pressing the power button. That's the way I expect it to be.

Before you made this change.
Was a USB drive plugged in when it did not work?

I still need to know if all of you have done the updates to Fossapup64 9.5 and still had these issues???
Before you did any of this editing of files.

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
MochiMoppel
Posts: 1224
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 20 times
Been thanked: 434 times

Re: Suspend To Ram working on BionicPup - Not working on FosaPup

Post by MochiMoppel »

bigpup wrote: Thu Sep 09, 2021 1:40 pm

Before you made this change.
Was a USB drive plugged in when it did not work?

Yes.
Frugal install from USB stick. Stick kept mounted.
Unmounting and removing the USB stick didn't work either.
And it still didn't work after removing the last remaining USB devices, keyboard and mouse.

I still need to know if all of you have done the updates to Fossapup64 9.5 and still had these issues???
Before you did any of this editing of files.

Yes.

mow9902
Posts: 195
Joined: Fri Jul 24, 2020 11:57 pm
Has thanked: 15 times
Been thanked: 61 times

Re: Suspend To Ram working on BionicPup - Not working on FosaPup

Post by mow9902 »

bigpup wrote: Thu Sep 09, 2021 1:40 pm

After disabling the USB items Fossapup and BionicPup suspend correctly and can only be waken up by shortly pressing the power button. That's the way I expect it to be.

Before you made this change.
Was a USB drive plugged in when it did not work?

I still need to know if all of you have done the updates to Fossapup64 9.5 and still had these issues???
Before you did any of this editing of files.

YES - I apply Fossapup64 updates weekly from the menu item Setup -> quickpet fossa -> fossapup udates

User avatar
bigpup
Moderator
Posts: 6937
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 898 times
Been thanked: 1511 times

Re: Suspend To Ram working on BionicPup - Not working on FosaPup

Post by bigpup »

OK.
Thanks for the asked for info :thumbup:

I guess 666philb still needs to work more on this.

I do wonder why it seems to work on some computers, but not all.
But that is a common Puppy issue :roll: :thumbdown:

Just for more helpfull info.
Any of you check the UEFI/Bios setup?
Check the "ACPI Suspend Type" option.
Make sure it's set to S3 as opposed to S1 or S2.
This will prevent the computer from powering the CPU, RAM, and several other components when it's in sleep mode.

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
MochiMoppel
Posts: 1224
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 20 times
Been thanked: 434 times

Re: Suspend To Ram working on BionicPup - Not working on FosaPup

Post by MochiMoppel »

bigpup wrote: Fri Sep 10, 2021 12:04 pm

I guess 666philb still needs to work more on this.
I do wonder why it seems to work on some computers, but not all.

There is not much 666philb can do about it.
As far as I understand this stuff the ACPI settings are vendor specific and part of the computer's firmware. The OS then reads these settings (e.g. the wakeup file mentioned ealier) and tries to make sense of them. I wouldn't be surprised if vendors optimize the ACPI settings for Windows, the OS they bundle their computers with. This all can lead to a frustrating search for the "right" distro working for a specific computer. One of my laptops is a Fujitsu, and my Slacko5.6, which has no issues on other HW, would only suspend with a 1 min delay after running the echo mem command, while on the same machine Precise would suspend immediately, but then would take 1 min to wake up. Needless to say some of the other distros don't work at all.

And as for the BIOS settings: If - on the same machine - suspend works with one distro but not with another then it can't be a BIOS issue. Mine is set to S1&S3. What puzzles me more is that my wakeup file enables a suspend status "S5". Whatever that is, Fossapup doesn't seem to like it.

williams2
Posts: 1061
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 304 times

Re: Suspend To Ram working on BionicPup - Not working on FosaPup

Post by williams2 »

suspend status "S5". Whatever that is

AFAIK,

s0 = computer is running.

s1, s2, s3 = suspend modes. (ram retains power.)

s4 = hibernate (ram copied to hibernate file, ram not powered.)

s5 = computer is shut down, power button starts a cold boot.

The difference between s4 and s5:
pressing the power button in s4 allows the data in the hibernate file to be copied to ram, allowing the computer to continue running from the sate it was in when it shut down.

pressing the power button in s5 requires a complete cold boot. The computer can't continue running from the state it was in when it shut down.

In other words:
s4 = hibernate
s5 = normal shutdown (power off)

User avatar
bigpup
Moderator
Posts: 6937
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 898 times
Been thanked: 1511 times

Re: Suspend To Ram working on BionicPup - Not working on FosaPup

Post by bigpup »

The different OS versions are not using the exact same software, the exact same Linux kernel.

as for the BIOS settings: If - on the same machine - suspend works with one distro but not with another then it can't be a BIOS issue. Mine is set to S1&S3.

So, what does it do if you have it set to S3?
That is the only setting used?

Make sure it's set to S3 as opposed to S1 or S2.
This will prevent the computer from powering the CPU, RAM, and several other components when it's in sleep mode.

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
MochiMoppel
Posts: 1224
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 20 times
Been thanked: 434 times

Re: Suspend To Ram working on BionicPup - Not working on FosaPup

Post by MochiMoppel »

bigpup wrote: Fri Sep 10, 2021 8:58 pm

So, what does it do if you have it set to S3?

"S1&S3" means it is set to S3 ! (IIRC the 2 other available settings are S1 or S2, never used them)
My problems are solved.

Post Reply

Return to “Beginners Help”