Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Genkernel and resuming
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
NTwoO
n00b
n00b


Joined: 01 Jun 2007
Posts: 68

PostPosted: Tue Oct 15, 2019 8:03 pm    Post subject: Genkernel and resuming Reply with quote

Hi, I've been looking into hibernation and resuming. The hibernation seems to roll quite smoothly, but resuming is not quite the smooth ride I expected.

For the first time I decided to roll with genkernel with my new machine. It does have its advantages and I do roll with a custom kernel config, so not the bulky standard issue weaponry. The one thing I can't figure out is how to pass the "real_resume" to the initramfs scripting. Can anyone help there? I added a REAL_RESUME=<swaplocation> to /etc/genkernel.conf just below the commented REAL_ROOT=<> field, but to no avail. providing it in the commandline didn't roll either.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7446
Location: almost Mile High in the USA

PostPosted: Tue Oct 15, 2019 10:10 pm    Post subject: Reply with quote

I think sys-kernel/genkernel-3.5.3.3 initramfs has a bug with resume... may need to try it without it.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
NTwoO
n00b
n00b


Joined: 01 Jun 2007
Posts: 68

PostPosted: Wed Oct 16, 2019 4:05 am    Post subject: Reply with quote

I'm rolling with 4.0.0
Back to top
View user's profile Send private message
Marlo
Veteran
Veteran


Joined: 26 Jul 2003
Posts: 1464

PostPosted: Wed Oct 16, 2019 9:21 am    Post subject: Reply with quote

"man genkernel" is your friend

man genkernel wrote:

real_resume=<...>, resume=<...>, noresume
noresume disables any default resume parameters. resume and real_resume specify a device via LABEL or UUID to
use for loading a SWSUSP resume image.

_________________
Thank you for your attention, interest and support.
------------------------------------------------------------------
http://radio.garden/
Back to top
View user's profile Send private message
NTwoO
n00b
n00b


Joined: 01 Jun 2007
Posts: 68

PostPosted: Fri Oct 18, 2019 6:28 am    Post subject: Reply with quote

How does one pass these arguments to genkernel? It gives errors in the command line. Should I add an option in the command line? There is no example in the genkernel wiki page
Back to top
View user's profile Send private message
Marlo
Veteran
Veteran


Joined: 26 Jul 2003
Posts: 1464

PostPosted: Fri Oct 18, 2019 12:39 pm    Post subject: Reply with quote

NTwoO,

man genkernel contains several chapters. There are:

ACTIONS
OPTIONS
RAMDISK OPTIONS
HOOKS
Netbooting
REPORTING
BUGS
AUTHORS

The full text explaining "RAMDISK OPTIONS" is:
Code:
"RAMDISK OPTIONS
       The following options can be passed as kernel parameters from the bootloader, which the ramdisk scripts would recognize."


The developers give here a hint for another configfile. This means, it must in /etc/default/grub an entry into it.

But honestly, it's a bit confusing.
Basically, the following should be noted:

1. There are boot parameters for the kernel
2. There are boot-parameters for the initramfs.

And both parameters are in /etc/default/grub in the
GRUB_CMDLINE_LINUX_DEFAULT=
or
GRUB_CMDLINE_LINUX=
to hand over.
So "root=/dev/xxx" is for the kernel
and "real_root=xxx=xxx" for the initramfs.
The common language only speaks of kernel parameters. This always means: CMDLINE in /etc/default/grub.

But note:
"real_resume =" must be set with the LABEL or UUID.

I have for example:

GRUB_CMDLINE_LINUX_DEFAULT="real_resume=UUID=80512d9a-88c9-48f9-85b4-60ac7eacb2"

Read on here:
https://forums.gentoo.org/viewtopic-p-6869968.html
https://forums.gentoo.org/viewtopic-t-1084166-start-0.html
https://wiki.gentoo.org/wiki/GRUB#Using_LABEL_or_UUID

Ma
_________________
Thank you for your attention, interest and support.
------------------------------------------------------------------
http://radio.garden/
Back to top
View user's profile Send private message
NTwoO
n00b
n00b


Joined: 01 Jun 2007
Posts: 68

PostPosted: Sat Oct 19, 2019 11:31 am    Post subject: Reply with quote

Thanks! So these are not intended in the commandline of genkernel. If I get things working and understand it better, I'll look into updatiing the genkernel wiki.

EDIT: But the kernel can also eat the (PART)UUID labels according to the docs? So the resume can also be a PARTUUID?
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7446
Location: almost Mile High in the USA

PostPosted: Sat Oct 19, 2019 4:39 pm    Post subject: Reply with quote

The initramfs should be able to understand LABEL= or UUID=, but the kernel itself only supports /dev/devices or PARTUUID= at least for rootfs.

I would imagine that the kernel should accept PARTUUID by itself as well for resume.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
NTwoO
n00b
n00b


Joined: 01 Jun 2007
Posts: 68

PostPosted: Sat Oct 19, 2019 8:35 pm    Post subject: Reply with quote

OK, thanks for the tip. It might explain why things were not working as it should yet
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7446
Location: almost Mile High in the USA

PostPosted: Sat Oct 19, 2019 10:11 pm    Post subject: Reply with quote

Not sure if genkernel 4.0 initramfs works for resume yet either, anyone know?

Can you boot without initramfs or are you depending on some feature in it?
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
NTwoO
n00b
n00b


Joined: 01 Jun 2007
Posts: 68

PostPosted: Sun Oct 20, 2019 6:11 am    Post subject: Reply with quote

Yesterday evening I checked the initrd img of genkernel to see if there might be a clue why things are still failing. It only contains the early intel microcode. That I can add to the kernel code and skip initrd.
Back to top
View user's profile Send private message
NTwoO
n00b
n00b


Joined: 01 Jun 2007
Posts: 68

PostPosted: Sun Oct 27, 2019 8:56 pm    Post subject: Reply with quote

The kernel is now starting without the initramfs. root and resume is set to the PARTUUIDs. The progress dialogue during suspend shows the indication that the s2disk is working well. During resume nothing is mentioned. How can I debug the resume trajectory?
Back to top
View user's profile Send private message
Whissi
Developer
Developer


Joined: 12 Jan 2011
Posts: 78

PostPosted: Mon Oct 28, 2019 12:51 am    Post subject: Reply with quote

eccerr0r wrote:
Not sure if genkernel 4.0 initramfs works for resume yet either, anyone know?
Works fine for me. :)
_________________
Regards,
Whissi
Back to top
View user's profile Send private message
NTwoO
n00b
n00b


Joined: 01 Jun 2007
Posts: 68

PostPosted: Tue Oct 29, 2019 8:31 pm    Post subject: Reply with quote

OK, so the current 4.0 genkernel should work. That could still have some config pointers on (PART)UUID setitings for (real_)resume/root sprinkled through various configs and such through etc and other places.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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