Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
suspend to file with gentoo-sources
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Nicias
Guru
Guru


Joined: 06 Dec 2005
Posts: 444

PostPosted: Sat Jan 03, 2015 7:07 pm    Post subject: suspend to file with gentoo-sources Reply with quote

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
View user's profile Send private message
Nicias
Guru
Guru


Joined: 06 Dec 2005
Posts: 444

PostPosted: Sat Jan 03, 2015 9:38 pm    Post subject: Reply with quote

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
View user's profile Send private message
Nicias
Guru
Guru


Joined: 06 Dec 2005
Posts: 444

PostPosted: Sat Jan 03, 2015 10:11 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
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