Using an initramfs created by sys-kernel/genkernel-3.4.10_pre10 to resume a tuxonice kernel now requires not only resume= but also real_resume= to be present on kernel-cmdline. I just noticed this as system did not resume but boot normal after creating a new initramfs. So why do we need to use real_resume, as not its value is checked for tuxonice-resume, but only its pure existance? As the comment says this is to stop resume be active on livecd boots. Couldn't the code check on resume= to be present only. Even real_resume is not documented anywhere - at least nowhere I have looked at. I need the initramfs as my root-partition is on lvm, so I cannot just delete it from my grub entry. Reproducible: Always Steps to Reproduce: 1. Have a tuxonice kernel 2. Create a initramfs with genkernel 3. Add it to grub.conf with just resume=swap:/dev/sda15 (for me) in kernel-cmdline 3. Do suspend. 4. Try to resume Actual Results: System will boot up ignoring the suspended image Expected Results: System should resume from swap partition into the formerly suspended system
Got a patch? I don't use tuxonice and don't really know much of anything on how it works. Nearly all of that code is contributed by others, so patches are definitely welcome.
I got a patch. Tuxonice code is completly broken. Consider real_resume is something like swap:/dev/sda4:0x44078 (swap file). Becouse "swsusp_resume" is always called before "tuxonice_resume", it may fail to interpret the device string and output an error something like "ls: no such file...". Further on, "tuxonice_resume" doesn't actually do anything with real_resume, while it should configure resuming from it. With my patch, resuming can be done as follows: If you have a regular kernel, use real_resume=/dev/<swap>. If you have a tuxonice kernel, use an appropriate device in real_resume, as understood by tuxonice (swap:/dev/<swap> or file:/dev/<root>:0xXXXXX or swap:/dev/<root>:0xXXXXX or probably even /dev/<swap>) If you have a tuxonice kernel but want regular swsusp (regardless you chose in the kernel to override swsusp by default or not), add real_resume=/dev/<swap> use_swsusp. Looking at the code, I also noticed the initrd tries to provide the kernel with a tuxonice user interface. However I have no idea of why that code is there, as the user interface would have to be included initrd.
Created attachment 159353 [details, diff] unbreak resuming
Using your patch I dropped resume= from cmdline leaving only real_resume= and it seems to works well here With the latest genkernel I also notice that text messages overlap the splash image but I don't know if it's related with tuxonice.
The text overlapping can be fixed by adding "console=tty1 quiet" to the kernel command line.
And perhaps genkernel itself should add a real_resume= entry if it finds a resume= so non-technical folks can still use tuxonice.
Created attachment 159510 [details, diff] unbreak resuming With this patch, 'resume' is treated the same way as 'real_resume'. (note the specification of the resume device is redundant in case of 'resume' as the kernel already configures it, but is there for simlicity.) Also, this patch removes checking for 'noresume' as it prevents suspending from being configured (e.g. if you used noresume you were not be able suspend during that boot). 'noresume' is handled by the kernel itself. It will not resume if it finds it, regardless if we ordered it to resume. However, I can only confirm that behaviour with tuxonice as I don't have place for a swap partition. Could someone please test it for swsusp? (e.g. save all your data, hibernate with swsusp, and when resuming, add 'noresume' to the cmdline, and the system should clean boot)
(In reply to comment #5) > The text overlapping can be fixed by adding "console=tty1 quiet" to the kernel > command line. I already have them in my cmdline (console must be upper-case) but it doesn't work anymore, the text overlaps background image during boot in silent mode
Created attachment 159514 [details, diff] fix console=... ? (In reply to comment #8) > I already have them in my cmdline (console must be upper-case) but it doesn't > work anymore, the text overlaps background image during boot in silent mode Try this patch (along with the tuxonice patch).
console=... probably works anyway. the previous patch should fix CONSOLE=...
Both your patches work fine here (tuxonice2.patch and console.patch)
I was able to test swsusp, and yes, it does work properly, both using resume=, real_resume=, and noresume also work. The tuxonice patch is well tested and is ready to be merged. Also, the last patch fixes an obvious bug that prevents CONSOLE= from being interpreted properly (while console= works).
There is, however, still a minor 'inconsistency' concerned swsusp, that is when using resume= itself (not real_resume), unlike tuxonice, the kernel will try to resume immediately, before starting the initrd. But this is actually good, as the system will resume faster if the disk driver is built into the kernel; otherwise, it will still resume during the initrd.
Maintainers please? My patch has been tested and also reported to work; it would be nice if you merged it.
Don't do that. We get the bugmail for genkernel. We see the patch. Bugging us like this just makes us want to put this particular bug at the bottom of our respective long lists of things to do. Did it ever occur to you that we might have lives and/or just be busy with other things? We'll get to this eventually. Both of the maintainers are members of releng, and we just finished putting out the 2008.0 release, which we're still trying to "clean up" from.
We'll want to look into fixing this for 3.4.11's release.
Created attachment 192581 [details, diff] fix resume for tuxonice This patch works against latest git-version of genkernel (and with small change against genkernel-3.4.10.904).
Created attachment 203107 [details, diff] fix resume for tuxonice on genkernel-3.4.10.906 This is an updated patch for genkernel-3.4.10.906. It works for me with tuxonice-sources-2.6.30-r5 with root and swap on lvm2 with this kernel command line: kernel /vmlinuz dolvm real_root=/dev/vg2/slash video=vesafb:ywrap,mtrr vga=0x315 resume=/dev/sda15
This patch has been applied in git. I have no way to test it, but I'll be sure to blame you if it breaks ;)
works as it should :)
(In reply to comment #19) > This patch has been applied in git. Due to the date of the last comment on this bug I assume that feature to be included in 3.4.10.907 or an earlier release of genkernel. Therefore, I remove this bug from tracker bug #245389 "Features for inclusion by 3.4.11".