Hibernate has changed to sleep after mainboard/CPU change

I had an AMD 9800X3D with an RTX 4070 and now I have an Intel Ultra 7 265K without graphics card. Unfortunately hibernate has changed to sleep for me:


image

Can this have something to do with that change? How can I restore the hibernation feature?

You possibly need to tweak c-states in the BIOS of your new board.

Even for hibernation (suspend to disk)? Both mainboards are from ASUS, usually I leave all as it is.

Wait a minute. Did you just take the mainboard and CPU out, then slap the new ones in?

Yes, I changed both mainboard and CPU (AMD to Intel).

Did you do a clean install or just put the hardware in and power it up with the already installed OS from the AMD system?

I just put the hardware in and power it up.

When you perform an install, it automatically detects your hardware during the process so it knows what firmware to install to support that hardware. What you have is a disk that is full of AMD supporting firmware (if you did a clean install when you used that). You need to install the various intel firmware and drivers for your new hardware. That is most likely why you don’t have the hibernate option.

You have two options, go through your hardware manually and install all the packages you need and hope that hibernate functions as it should, or perform a clean install and hope that hibernate functions as it should.

Hmm, but what firmware are we speaking about here? I would think that the Linux kernel would automatically detect the Intel hardware and then automatically enable the drivers.

It does automatically detect the new hardware. But it doesn’t download and install new firmware it might need, nor enable new drivers. You have to do that yourself. It will have the firmware that was installed with your AMD system though.

And that will include the linux-firmware package which has a whole bunch of subpackages to provide enough support to cover most things. Which is why you’ve got most functionality working. But obviously there is something that occurs during the install process, or there is a piece of firmware that is required to provide hibernation for your system. Or it is a case of sleep states being unsupported on that processer in the kernel, which is unlikely given how long it’s been out. Or it may be a BIOS setting that needs changed.

You could try the fwupdmgr tool, but how well that works is entirely dependent on how well Asus play with the LVFS.

Changing a GPU and installing new drivers is one thing, but if I’m changing the entire base system of CPU and motherboard, I back up my important files and do a fresh install.

Edit: I had a look online and Asus seems to keep sleep state settings in the BIOS under the Advanced option and “APM”, advanced power management. Have a look in there. I did find an image showing a BIOS from about six years ago with Deep S4 disabled. S4 is hibernate sleep state. Check your BIOS APM settings to rule that out.

Edit 2: Also look at ErP, energy related products under APM. It’s an EU environment thing. If it’s disabled, that’s why you can’t access hibernate. If it’s S5, that’s the “soft off” sleep state. You want to enable S4+S5 to get hibernate.

I found it and enabled it!

By the way, this is a ASUS B860-I (Intel LGA 1851) mainboard. I wonder if they disabled it over a BIOS update for the ASUS X670E-I (AMD AM5), because suddenly hibernation stopped working (option was available, but black screen after wake-up from hibernation) on AMD even though it was working perfectly before.


1 Like

Ah, sorry, forgot to mention: I found and enabled it, but the hibernation feature is still not back in KDE :see_no_evil_monkey: You’re anyway a genius, I myself would have never had this idea.

Kernel hibernation section.

Hibernation is supported if the CONFIG_HIBERNATION kernel configuration option is set. However, this option can only be set if support for the given CPU architecture includes the low-level code for system resume.

Issue the following command and have a look through the file for “hibernation”.

cat /usr/lib/modules/[kernel]/config > kernel.config

If everything has a “=y” then your kernel is set to work with hibernation. The next question is if everything is set to “=y” where’s the low level code for it in Fedora?

I searched for ‘hiber’ and it seems all is ‘y’:

CONFIG_ARCH_HIBERNATION_POSSIBLE=y
CONFIG_ARCH_HIBERNATION_HEADER=y
CONFIG_HIBERNATE_CALLBACKS=y
CONFIG_HIBERNATION=y
CONFIG_HIBERNATION_SNAPSHOT_DEV=y
CONFIG_HIBERNATION_COMP_LZO=y
# CONFIG_HIBERNATION_COMP_LZ4 is not set
CONFIG_HIBERNATION_DEF_COMP="lzo"

Do you have a swap partition, or zram? lsblk will print your disk partitions.

Yes (and on AMD before hibernation worked):

free -h -m
               total        used        free      shared  buff/cache   available
Mem:            62Gi       8.5Gi        49Gi       2.5Gi       6.8Gi        53Gi
Swap:           71Gi          0B        71Gi

lsblk
NAME                                          MAJ:MIN RM  SIZE RO TYPE  MOUNTPOINTS
sda                                             8:0    1 56.3G  0 disk  
zram0                                         251:0    0    8G  0 disk  [SWAP]
nvme0n1                                       259:0    0  1.8T  0 disk  
├─nvme0n1p1                                   259:1    0  600M  0 part  /boot/efi
├─nvme0n1p2                                   259:2    0    1G  0 part  /boot
├─nvme0n1p3                                   259:3    0  1.6T  0 part  
│ └─home                                      252:2    0  1.6T  0 crypt /home
├─nvme0n1p4                                   259:4    0   64G  0 part  
│ └─luks-50e5f2b6-9845-4805-b174-ac104b8cd949 252:1    0   64G  0 crypt [SWAP]
└─nvme0n1p5                                   259:5    0  120G  0 part  
  └─luks-e438f929-1452-402e-8954-e12a34e63884 252:0    0  120G  0 crypt /

There’s an article from Fedora magazine about hibernation in Fedora and swap partitions. It’s way beyond my understanding though so I can’t give any more advice.

I can’t see why you’d have to make a new swap partition since it already exists, unless mountpoints or UUIDs have changed when you connected the new motherboard and drive, to what’s already stored on the system and just need edited. But as I said, I haven’t a clue, that’s just me assuming.

1 Like