Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

No resume from hibernate (s2disk + swap on lvm + genkernel)

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
2 posts • Page 1 of 1
Author
Message
kingsly
n00b
n00b
User avatar
Posts: 33
Joined: Mon Jul 05, 2004 6:03 pm
Location: Bangalore, INDIA
Contact:
Contact kingsly
Website

No resume from hibernate (s2disk + swap on lvm + genkernel)

  • Quote

Post by kingsly » Thu Dec 12, 2013 12:02 pm

I'm trying to get suspend to disk working on my box

And the machine seems to suspend properly when I run "s2disk" but when I power up the box after, it doesn't resume and does a regular boot instead.

The kernel is unable to find the resume swap (a dedicated lvm volume I setup for hibernating alone.) If I add the "resumewait" kernel option the system just hangs....

Is this the right way to address the volume in the kernel cmdline ?

Code: Select all

resume=/dev/mapper/VG1-hibernate 
Update: I guess the addressing method is correct because /sys/power/resume contains "253:9", which is what udisks --show-info /dev/mapper/VG1-hiberate also shows.



The only thing that shows up in dmesg is

Code: Select all

[    4.087089] PM: Starting manual resume from disk
During the boot process I also see a message that it's invalidating/overwriting the suspend signature while mounting the swap space. ( This message doesn't seem to be logged anywhere, so I'm paraphrasing.)

I'm using genkernel to generate the initramfs ...

but I find that it puts the lvm binary into /bin/lvm but there are dozens of broken symlinks in /sbin (lv* / vg* / pv* etc) which point to a non-existent /sbin/lvm

Is this normal?

Code: Select all

lrwxrwxrwx 1 kingsly users    3 Dec 12 16:27 sbin/lvchange -> lvm
lrwxrwxrwx 1 kingsly users    3 Dec 12 16:27 sbin/lvconvert -> lvm
lrwxrwxrwx 1 kingsly users    3 Dec 12 16:27 sbin/lvcreate -> lvm
lrwxrwxrwx 1 kingsly users    3 Dec 12 16:27 sbin/lvdisplay -> lvm
lrwxrwxrwx 1 kingsly users    3 Dec 12 16:27 sbin/lvextend -> lvm
lrwxrwxrwx 1 kingsly users    3 Dec 12 16:27 sbin/lvmchange -> lvm
Also genkernel seems to always use it's own version of lvm2 even if I have built lvm2 with the static option (And a /sbin/lvm.static is present on my system.)

(I found a similar old post which too hasn't been solved - http://forums.gentoo.org/viewtopic-t-71 ... esume.html )

Anyone have such a setup working? How do I fix this?


Edit: I'm running 3.12.4-gentoo and genkernel 3.4.47 (It was broken with 3.4.45.1, so I tried the unstable one) and sys-power/suspend-1.0
Top
kingsly
n00b
n00b
User avatar
Posts: 33
Joined: Mon Jul 05, 2004 6:03 pm
Location: Bangalore, INDIA
Contact:
Contact kingsly
Website

  • Quote

Post by kingsly » Sun Dec 15, 2013 12:33 pm

I've managed to get my machine to hibernate...

What I have found is that genkernel is horribly broken when it comes to initramfs related things.
(I've been using genkernel for nearly a decade with no problems whatsoever, but until the recent advisory about mounting /usr I didn't have any need for an initramfs.)

The genkernel devs seem have some particular hatred for suspend/hibernate functionality.

There's a bug report dating back to Nov 2006 that is still "IN PROGRESS" - https://bugs.gentoo.org/show_bug.cgi?id=156445

Despite multiple people having submitted patches in that bug report, the genkernel devs have stubbornly refused to incorporate them into genkernel.

They claim that they'll incorporate it in "genkernel 3.5", a mythical next version that they have been talking about since August 2007. (Hopefully no one was holding their breath)

Somewhere in the last 7 years they seem to have pushed some half broken functionality into genkernel for swsusp(supend/hibernate) and they even have a function called swsusp_resume() in the initrd scripts, but that too is broken and will never resume.

Other broken functionality

genkernel will always include it's own version of lvm even if you have a statically built version available on your system.

For some weird reason, genkernel pulls the lvm binary from /sbin/lvm (from their own custom tarball in /var/cache/genkernel/) and move it into /bin and so all the symlinks in /sbin which point to the lvm binary are broken (vg* lv* commands) - There's a year old bug report about this and again nothing has been done to "fix" / remove the dangling symlinks.

If you have no option but to use genkernel to generate the initramfs for swsusp

In /usr/share/genkernel/defaults/initrd.scripts

You need to change the line that reads (it's within swsusp_resume() )

Code: Select all

 [ -f /sys/power/resume ] && echo "${device}" > /sys/power/resume 
to read

Code: Select all

 [ -f /sys/power/resume ] && echo "${device}" > /sys/power/resume && /sbin/resume

And you need to find a way to get /sbin/resume (located at /usr/lib/suspend/resume on your gentoo install) and /etc/suspend.conf into the initramfs.

I just included the commands to copy those files into a part of gen_initramfs.sh that I know gets executed on my machine.(was too lazy to do it the "right way")

But I think it might be possible to use the --initramfs-overlay= option of genkernel to achieve the same results.
Top
Post Reply

2 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic