View previous topic :: View next topic |
Author |
Message |
Nicias Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 06 Dec 2005 Posts: 446
|
Posted: Sat Jan 03, 2015 7:07 pm Post subject: suspend to file with gentoo-sources |
|
|
I'm having a hard time getting suspend-to-disk working with gentoo-sources without a swap partition.
my / is /dev/sda5 with PARTUUID=4E645182-05
swapfile is /suspend_file with offset 38912 as provided by swap-offset
I have this in my /etc/default/grub: Code: | GRUB_CMDLINE_LINUX="usbcore.autosuspend=1 pcie_aspm=force i915.modeset=1 splash=silent,fadein,theme:natural_gentoo console=tty1 root=PARTUUID=4E645182-05 resume=PARTUUID=4E645182-05 resume_offset=38912" |
s2disk seems to run fine.
when I try to resume however, I get this in dmesg: Code: | [ 2.090612] PM: Hibernation image partition 8:5 present
[ 2.090614] PM: Looking for hibernation image.
[ 2.091287] PM: Image not found (code -22)
[ 2.091290] PM: Hibernation image not present or could not be loaded.
|
Any suggestions? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Nicias Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 06 Dec 2005 Posts: 446
|
Posted: Sat Jan 03, 2015 9:38 pm Post subject: |
|
|
Ok, more info.
It works if I do the "platform" method at
https://www.kernel.org/doc/Documentation/power/swsusp-and-swap-files.txt
as does s2ram. s2both works unless I pull the power after it suspends, in which case it doesn't start back up.
So, I could use both the "echo" method from the kernel docs but it doesn't seem like it can do "both".
Any suggestions? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Nicias Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 06 Dec 2005 Posts: 446
|
Posted: Sat Jan 03, 2015 10:11 pm Post subject: |
|
|
Sorta solved it. I made three scripts: Code: | to_both.sh
---
#!/bin/bash
/bin/echo suspend > /sys/power/disk
/bin/echo disk > /sys/power/state
---------
to_disk.sh
---
#!/bin/bash
/bin/echo platform > /sys/power/disk
/bin/echo disk > /sys/power/state
---------
to_ram.sh
---
#!/bin/bash
/bin/echo platform > /sys/power/disk
/bin/echo mem > /sys/power/state |
And then calling these. This seems to work, but isn't as nice as the prepackaged stuff. Any thoughts why this might works, but the suspend package doesn't? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|