You are not logged in.

#1 2024-10-15 21:10:16

BlessedLongsword
Member
Registered: 2024-04-30
Posts: 41

Hibernation not working

Hello, I have been struggling to make hibernation work in my system. I have been following the wiki but I still have not succeeded.

When I try to hibernate, the process is as follows: the screen goes black with the blinking underscore, then screens turn off, just to turn on again to show the blinking underscore, to finally turn off.
When I start the system again, after going through the typical BIOS screen with the logo of the PC, and grub, the blinking underscore appears again and the process where screen turns off and on again to show the blinking underscore happens several times, until it finally reboots and does a normal start (one time I got a CMOS checksum problem which spooked me and makes me wonder if I am compromising my system when doing this).

System information:

Hardware:
Victus by HP Laptop 16-d1xxx
12th Gen Intel(R) Core(TM) i7-12700H (12+8) @ 4.70 GHz
NVIDIA GeForce RTX 3060 Mobile / Max-Q
Intel Iris Xe Graphics @ 1.40 GHz [Integrated]
233.77 GiB / 451.65 GiB (52%) - ext4
2.72 GiB / 15.29 GiB (18%)

Software:
Arch Linux x86_64
Linux 6.11.3-zen1-1-zen

Swap partition information:

swapon -s
Filename                                Type            Size            Used            Priority
/dev/nvme0n1p2                          partition       16777212        0               -2

I suppose my swap partition should be bigger, but this problem happens even after booting so I am not sure about the issue being the swap partition size.

GRUB_CMDLINE_LINUX_DEFAULT value in /etc/default/grub:

GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet splash nvidia-drm.modeset=1 nvidia_drm.fbdev=1 nvidia.NVreg_EnableGpuFirmware=0 nvidia.NVreg_PreserveVideoMemoryAllocations=1 resume=/dev/nvme0n1p2"

Nvidia services:

systemctl status nvidia-suspend.service nvidia-hibernate.service nvidia-resume.service
○ nvidia-suspend.service - NVIDIA system suspend actions
     Loaded: loaded (/usr/lib/systemd/system/nvidia-suspend.service; enabled; preset: disabled)
     Active: inactive (dead)

○ nvidia-hibernate.service - NVIDIA system hibernate actions
     Loaded: loaded (/usr/lib/systemd/system/nvidia-hibernate.service; enabled; preset: disabled)
     Active: inactive (dead)

○ nvidia-resume.service - NVIDIA system resume actions
     Loaded: loaded (/usr/lib/systemd/system/nvidia-resume.service; enabled; preset: disabled)
     Active: inactive (dead)

Nvidia module parameters:

cat /proc/driver/nvidia/params 
ResmanDebugLevel: 4294967295
RmLogonRC: 1
ModifyDeviceFiles: 1
DeviceFileUID: 0
DeviceFileGID: 0
DeviceFileMode: 438
InitializeSystemMemoryAllocations: 1
UsePageAttributeTable: 1
EnableMSI: 1
EnablePCIeGen3: 0
MemoryPoolSize: 0
KMallocHeapMaxSize: 0
VMallocHeapMaxSize: 0
IgnoreMMIOCheck: 0
TCEBypassMode: 0
EnableStreamMemOPs: 0
EnableUserNUMAManagement: 1
NvLinkDisable: 0
RmProfilingAdminOnly: 1
PreserveVideoMemoryAllocations: 1
EnableS0ixPowerManagement: 0
S0ixPowerManagementVideoMemoryThreshold: 256
DynamicPowerManagement: 3
DynamicPowerManagementVideoMemoryThreshold: 200
RegisterPCIDriver: 1
EnablePCIERelaxedOrderingMode: 0
EnableResizableBar: 0
EnableGpuFirmware: 0
EnableGpuFirmwareLogs: 2
EnableDbgBreakpoint: 0
OpenRmEnableUnsupportedGpus: 1
DmaRemapPeerMmio: 1
ImexChannelCount: 2048
CreateImexChannel0: 0
RegistryDwords: ""
RegistryDwordsPerDevice: ""
RmMsg: ""
GpuBlacklist: ""
TemporaryFilePath: "/var/tmp"
ExcludedGpus: ""

The only thing I see in dmesg is this:

[    0.027213] PM: hibernation: Registered nosave memory: [mem 0x00000000-0x00000fff]
[    0.027214] PM: hibernation: Registered nosave memory: [mem 0x0009e000-0x0009efff]
[    0.027215] PM: hibernation: Registered nosave memory: [mem 0x000a0000-0x000fffff]
[    0.027216] PM: hibernation: Registered nosave memory: [mem 0x65c17000-0x66205fff]
[    0.027216] PM: hibernation: Registered nosave memory: [mem 0x66ee3000-0x66ee3fff]
[    0.027217] PM: hibernation: Registered nosave memory: [mem 0x66ef2000-0x66ef2fff]
[    0.027218] PM: hibernation: Registered nosave memory: [mem 0x6a340000-0x6a340fff]
[    0.027219] PM: hibernation: Registered nosave memory: [mem 0x6b908000-0x6ea07fff]
[    0.027219] PM: hibernation: Registered nosave memory: [mem 0x6ea08000-0x6eb10fff]
[    0.027219] PM: hibernation: Registered nosave memory: [mem 0x6eb11000-0x6ec7afff]
[    0.027220] PM: hibernation: Registered nosave memory: [mem 0x6ec7b000-0x73efefff]
[    0.027220] PM: hibernation: Registered nosave memory: [mem 0x73f00000-0x79ffffff]
[    0.027221] PM: hibernation: Registered nosave memory: [mem 0x7a000000-0x7a9fffff]
[    0.027221] PM: hibernation: Registered nosave memory: [mem 0x7aa00000-0x7abfffff]
[    0.027221] PM: hibernation: Registered nosave memory: [mem 0x7ac00000-0x7affffff]
[    0.027222] PM: hibernation: Registered nosave memory: [mem 0x7b000000-0x803fffff]
[    0.027222] PM: hibernation: Registered nosave memory: [mem 0x80400000-0xfdffffff]
[    0.027222] PM: hibernation: Registered nosave memory: [mem 0xfe000000-0xfe010fff]
[    0.027223] PM: hibernation: Registered nosave memory: [mem 0xfe011000-0xfebfffff]
[    0.027223] PM: hibernation: Registered nosave memory: [mem 0xfec00000-0xfec00fff]
[    0.027223] PM: hibernation: Registered nosave memory: [mem 0xfec01000-0xfecfffff]
[    0.027224] PM: hibernation: Registered nosave memory: [mem 0xfed00000-0xfed00fff]
[    0.027224] PM: hibernation: Registered nosave memory: [mem 0xfed01000-0xfed1ffff]
[    0.027224] PM: hibernation: Registered nosave memory: [mem 0xfed20000-0xfed7ffff]
[    0.027225] PM: hibernation: Registered nosave memory: [mem 0xfed80000-0xfedfffff]
[    0.027225] PM: hibernation: Registered nosave memory: [mem 0xfee00000-0xfee00fff]
[    0.027225] PM: hibernation: Registered nosave memory: [mem 0xfee01000-0xffffffff]

Any help is appreciated, I'm probably missing some information but I'll gladly provide it.

Offline

#2 2024-10-16 22:19:32

BlessedLongsword
Member
Registered: 2024-04-30
Posts: 41

Re: Hibernation not working

I have been trying out stuff.

I use optimus manager and have it set up to use only iGPU (intel) when not connected to external monitors, and only dGPU (nvidia) otherwise, on boot. I don't know if that is messing with things, but I tried hibernating when using my laptop on battery and without external monitors connected, and it seems to be working well, the problem comes when running on dGPU.

The logs when hibernating that I extracted from the journal are the following:

Oct 16 20:28:10 Antonio systemd-logind[671]: The system will hibernate now!
Oct 16 20:28:11 Antonio systemd[1]: Starting NVIDIA system hibernate actions...
Oct 16 20:28:11 Antonio hibernate[3284]: nvidia-hibernate.service
Oct 16 20:28:11 Antonio logger[3284]: <13>Oct 16 20:28:11 hibernate: nvidia-hibernate.service
Oct 16 20:28:13 Antonio systemd[1]: nvidia-hibernate.service: Deactivated successfully.
Oct 16 20:28:13 Antonio systemd[1]: Finished NVIDIA system hibernate actions.
Oct 16 20:28:13 Antonio systemd[1]: nvidia-hibernate.service: Consumed 1.056s CPU time, 919.4M memory peak.
Oct 16 20:28:13 Antonio systemd-sleep[3294]: User sessions remain unfrozen on explicit request ($SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=0).
Oct 16 20:28:13 Antonio systemd-sleep[3294]: This is not recommended, and might result in unexpected behavior, particularly
Oct 16 20:28:13 Antonio systemd-sleep[3294]: in suspend-then-hibernate operations or setups with encrypted home directories.
Oct 16 20:28:13 Antonio systemd-sleep[3297]: [6] INFO: # Pre-suspend hook
Oct 16 20:28:13 Antonio systemd-sleep[3297]: [6] INFO: Previous state was: {'type': 'done', 'switch_id': '20241016T202709', 'current_mode': 'nvidia'}
Oct 16 20:28:13 Antonio systemd-sleep[3297]: [7] INFO: Switching option: none
Oct 16 20:28:13 Antonio systemd-sleep[3297]: [7] INFO: Nothing to do
Oct 16 20:28:13 Antonio systemd-sleep[3297]: [7] INFO: Writing state {'type': 'pending_post_resume', 'switch_id': '20241016T202709', 'current_mode': 'nvidia'}
Oct 16 20:28:13 Antonio systemd-sleep[3297]: [7] INFO: Pre-suspend hook completed successfully.
Oct 16 20:28:13 Antonio kernel: PM: hibernation: hibernation entry
Oct 16 20:28:13 Antonio systemd-sleep[3294]: Performing sleep operation 'hibernate'...

However, there are no resume logs. The next logs in the journal are the ones from the normal boot that happens after the resume fails, so I can't really debug what's going on there.

Offline

#3 2024-10-17 08:33:46

yataro
Member
Registered: 2024-03-09
Posts: 84

Re: Hibernation not working

use persistent block device naming instead of resume=/dev/nvme0n1p2 (resume=UUID=xxxx is good)
try nvidia-open driver, will work just fine for your card
make sure you have resume hook in initramfs (assuming your initramfs is configured as default), and don't forget to regenerate it if anything is changed

Offline

#4 2024-10-17 14:05:18

seth
Member
Registered: 2012-09-03
Posts: 60,080

Re: Hibernation not working

I tried hibernating when using my laptop on battery and without external monitors connected, and it seems to be working well, the problem comes when running on dGPU.

Also try to "systemctl disable nvidia-resume.service" and make sure you don't have the nvidia modules in the initramfs, https://bbs.archlinux.org/viewtopic.php?id=285508

Offline

#5 2024-10-17 15:19:47

BlessedLongsword
Member
Registered: 2024-04-30
Posts: 41

Re: Hibernation not working

yataro wrote:

use persistent block device naming instead of resume=/dev/nvme0n1p2 (resume=UUID=xxxx is good)
make sure you have resume hook in initramfs (assuming your initramfs is configured as default), and don't forget to regenerate it if anything is changed

I also tried that by my second post, sorry for not specifying. It did not do the trick, seems like it's an nvidia issue

yataro wrote:

try nvidia-open driver, will work just fine for your card

seth wrote:

Also try to "systemctl disable nvidia-resume.service" and make sure you don't have the nvidia modules in the initramfs

I will try it out, thanks. I suppose the nvidia-open modules are a substitute of the nvidia_drm modules? I had the nvidia_drm modules in because I followed this guide  a long time ago.
Thank you again for your help, I'll post once I get the results.

Offline

#6 2024-10-17 16:21:29

BlessedLongsword
Member
Registered: 2024-04-30
Posts: 41

Re: Hibernation not working

I have been trying somethings. I first removed all nvidia modules from the mkinitcpio.conf, removed the environment variables for GBM_BACKEND, and removed the kernel parameters related to the nvidia and nvidia-drm modules (except for NVreg_PreserveVideoMemoryAllocations=1) from /etc/default/grub

I then installed nvidia-open, added back kms to the mkinitcpio.conf HOOKS, regenerated the initramfs. Upon reboot, I got booted into the iGPU, dGPU was not working correctly and Optimus Manager wasn't opening either.
I installed bakc nvidia-dkms and rebooted, everything works as before, so I guess all the setup in the wayland+nvidia guide is not necessary, or at least crucial.

I then tried to hibernate again, to see if removing all that setup had any effect. Upon resuming, something different than before happens, I get a log saying "report hibernation image" and some uuid, it is very fast so I couldn't read it. This did not happen before, except when I did it successfully with the iGPU. However, it still fails to boot, and after some time with the blinking underscore it reboots itself (also got the CMOS checksum problem again). I tried this both with the nvidia-resume.service enabled and disable, no noticeable differences.

There are no journal logs from this failed boot either.

I should also mention (since maybe it is related?) that sleep is also kind of faulty, it sometimes fails, and if a long time passes from when I send it to sleep, it also fails. It does the same thing, blinking underscore, until it gives up and reboots.

I tried everything the wiki says except for changing to lts kernel, but that is not an option for me unfortunately.

Offline

#7 2024-10-17 18:59:25

seth
Member
Registered: 2012-09-03
Posts: 60,080

Re: Hibernation not working

Don't try everything at the same time wink

"nvidia-drm.modeset=1 nvidia_drm.fbdev=0 nvidia.NVreg_EnableGpuFirmware=0 nvidia.NVreg_PreserveVideoMemoryAllocations=0"
fbdev and NVreg_PreserveVideoMemoryAllocations currently default to 1, but fbdev has always been hit and miss (if your system boots w/o, scrap it for the moment) and we'll try w/o the VRAM preservation. Therefore also disable all the services, not only the resume one.
Try this w/ the binary-only nvidia driver, afair nvidia-open has open issues w/ sleep/hibernation anyway.

it is very fast so I couldn't read it

Do you have a camera (smartphone?)
pro-tip: use a tripod, if you don't have a tripod, wedge the phone between two books to point it at the screen: =\_
And try to record at a high fps.

Offline

#8 2024-10-17 21:50:22

BlessedLongsword
Member
Registered: 2024-04-30
Posts: 41

Re: Hibernation not working

seth wrote:

"nvidia-drm.modeset=1 nvidia_drm.fbdev=0 nvidia.NVreg_EnableGpuFirmware=0 nvidia.NVreg_PreserveVideoMemoryAllocations=0"
also disable all the services

With fbdev=0 it boots and runs smoothly. Tried it with what you said in the quote, but suspend did not work. This, however, generated some logs before rebooting:  https://0x0.st/XI9H.txt

I tried changing nvidia.NVreg_PreserveVideoMemoryAllocations to "1" but the problem is the same, and the logs are: https://0x0.st/XI98.txt

I also made attempts to hibernate when nvidia.NVreg_PreserveVideoMemoryAllocations=0, and the first time it actually worked, but I tried it a second time just in case and it failed, so that is inconsistant.

About the nvidia services, turns out that trying to start suspend or hibernate will cause an oops, or an endless blinking underscore. The laptop will only hibernate or go to sleep if the actions are triggered by KDE menu options, which I assume are systemd?

Thanks for the help so far!

Offline

#9 2024-10-17 21:58:26

BlessedLongsword
Member
Registered: 2024-04-30
Posts: 41

Re: Hibernation not working

Now sleep is working, without changing anything, I suppose it is just inconsistant too (with nvidia.NVreg_PreserveVideoMemoryAllocations=1). But I haven't tried waking up from a long sleep, which is something that has never worked...

Offline

#10 2024-10-18 05:55:32

seth
Member
Registered: 2012-09-03
Posts: 60,080

Re: Hibernation not working

Tried it with what you said in the quote, but suspend did not work.

Oct 17 23:19:16 Antonio kernel: CPU: 6 UID: 0 PID: 6464 Comm: nvidia-sleep.sh Tainted: P      D W  OE      6.11.3-zen1-1-zen #1 1400000003000000474e5500d4154c511b9cdca1

That's the nvidia-resume.service, so the services were not disabled (or still running)


About the nvidia services, turns out that trying to start suspend or hibernate will cause an oops, or an endless blinking underscore.

You'll have to set "nvidia.NVreg_PreserveVideoMemoryAllocations=0", stop and disable them (ideally disable them and reboot for a cleant slate) and test.

Offline

#11 2024-10-18 14:39:25

BlessedLongsword
Member
Registered: 2024-04-30
Posts: 41

Re: Hibernation not working

Alright, this is the result of my tests following your advice so far

  • Suspend:

    • nvidia.NVreg_PreserveVideoMemoryAllocations=0 did not work, wakeup logs: https://0x0.st/XI66.txt

    • nvidia.NVreg_PreserveVideoMemoryAllocations=1 worked

    Tried up to 15 minutes of sleep and it worked fine, should test longer intervals though

  • Hibernate:

    • nvidia.NVreg_PreserveVideoMemoryAllocations=0 did not work, hibernation logs: https://0x0.st/XI6U.txt
      no boot logs

    • nvidia.NVreg_PreserveVideoMemoryAllocations=1 did not work, hibernation logs: https://0x0.st/XI60.txt
      no boot logs either

    Everything was tested with nvidia services disabled and using systemctl suspend/hibernate.

Thanks for the help

Offline

#12 2024-10-18 15:17:01

BlessedLongsword
Member
Registered: 2024-04-30
Posts: 41

Re: Hibernation not working

Some updates after further testing, I switched to hybrid with optimus manager to see if things change. If I try to suspend or hibernate, it will try to sleep and then wakes up instantly. I suppose that hibernate fails because it first sleeps, then hibernates, but sleep fails, instantly waking it up.

Right now the only way sleep has worked is with iGPU or with dGPU with  nvidia.NVreg_PreserveVideoMemoryAllocations=1. And hibernate with iGPU only
nvidia services just do not work, trying to do anything with them enabled will cause a crash.

Logs of failed suspend: https://0x0.st/XIIq.txt

Last edited by BlessedLongsword (2024-10-18 16:46:38)

Offline

#13 2024-10-18 18:02:27

seth
Member
Registered: 2012-09-03
Posts: 60,080

Re: Hibernation not working

"nvidia.NVreg_PreserveVideoMemoryAllocations=1" is the default setting anyway and afaik inert unless you activate the systemd services and this most likely lead to the failure

Oct 18 17:10:59 Antonio kernel: NVRM: GPU 0000:01:00.0: PreserveVideoMemoryAllocations module parameter is set. System Power Management attempted without driver procfs suspend interface. Please refer to the 'Configuring Power Management Support' section in the driver README.

in the #12 suspend attempt.

Both hibernation attempts in #11 actually seem to have worked, what then will have failed is the wakeup - can you record those faiures w/ a camera (see #7)

Offline

#14 2024-10-18 18:45:58

BlessedLongsword
Member
Registered: 2024-04-30
Posts: 41

Re: Hibernation not working

Sure! https://streamable.com/ss8h6e

This is actually the most common boot after hibernate that I get, no matter what I tweak.

Offline

#15 2024-10-18 20:16:12

seth
Member
Registered: 2012-09-03
Posts: 60,080

Re: Hibernation not working

Seems the backlight comes up but, I guess plymouth? doesn't post anything and then there's a reboot?
Disable plymouth (or whatever bootsplash you're using) and remove the quiet parameter and instead add https://wiki.archlinux.org/title/Genera … l_messages so we hopefully get to see something.

(The ones you see are a filesystem cleanup because of the unclean reboot)

Offline

#16 2024-10-18 21:06:59

BlessedLongsword
Member
Registered: 2024-04-30
Posts: 41

Re: Hibernation not working

Offline

#17 2024-10-19 07:56:05

seth
Member
Registered: 2012-09-03
Posts: 60,080

Re: Hibernation not working

That's really just black in black, is it?

Make sure to test this w/ nvidia.NVreg_PreserveVideoMemoryAllocations=0 and the services disabled and the nvidia modules not in the initramfs
Usually™ failed hibernations result in some error and then the system just boots "normally" instead of loading the hibernation image and continue the previous boot. There's no reboot involving the firmware (the victus logo and I guess also that city outline?)

This would suggest either some memory corruption (and if it's tied to nvidia, the VRAM preservation as the likely culprit) or undervolting (which could just happen from an immediate power spike of the nvidia GPU)
Does it make a difference whether you're doing this on battery or the wall outlet?

Offline

#18 2024-10-19 08:52:26

BlessedLongsword
Member
Registered: 2024-04-30
Posts: 41

Re: Hibernation not working

The city outline is my GRUB background image, I have it setup to boot into zen automatically, unless i esc.

[antonio@Antonio ~]$ sudo systemctl status nvidia-resume
[sudo] password for antonio: 
○ nvidia-resume.service - NVIDIA system resume actions
     Loaded: loaded (/usr/lib/systemd/system/nvidia-resume.service; disabled; preset: disabled)
     Active: inactive (dead)
[antonio@Antonio ~]$ sudo systemctl status nvidia-hibernate
○ nvidia-hibernate.service - NVIDIA system hibernate actions
     Loaded: loaded (/usr/lib/systemd/system/nvidia-hibernate.service; disabled; preset: disabled)
     Active: inactive (dead)
[antonio@Antonio ~]$ sudo systemctl status nvidia-suspend
○ nvidia-suspend.service - NVIDIA system suspend actions
     Loaded: loaded (/usr/lib/systemd/system/nvidia-suspend.service; disabled; preset: disabled)
     Active: inactive (dead)
[antonio@Antonio ~]$ 
/etc/grub/default
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 pr_debug nvidia_drm.modeset=1 nvidia_drm.fbdev=0 nvidia.NVreg_EnableGpuFirmware=0 nvidia.NVreg_PreserveVideoMemoryAllocations=0 resume=UUID=0b8e3b8a-1b12-4ccc-8359-067a7421bc0a"
/etc/mkinitcpio.conf
HOOKS=(base udev autodetect microcode modconf kms keyboard keymap consolefont block filesystems resume fsck)
(no modules are loaded)

(Added kms and regenerated initramfs. Without kms, suspend attempts will fail like in #12)

If I list the journals, I do not get a boot when it fails, hence the 1'30'' between the two boots
-1 a2746b62fcec4aa993e544e3aa457c3c Sat 2024-10-19 10:14:34 CEST Sat 2024-10-19 10:19:58 CEST
  0 33de7d0c899b4fc89f66aeea34e08fad Sat 2024-10-19 10:21:28 CEST Sat 2024-10-19 10:30:37 CEST

I tried to suspend with this setup, and sometimes, on wakeup, my external monitors do not display anything (except for the mouse), I have to logout and login again to the KDE Wayland session for them to display anything.

Could Optimus Manager be a culprit in any way, should I use prime instead, or nothing at all?

Here is the video of the hibernation boot attempt: https://streamable.com/hzvz1g

Does it make a difference whether you're doing this on battery or the wall outlet?

No difference, I had a successful hibernation running on iGPU and battery once, but I haven't managed to succeed again.

Last edited by BlessedLongsword (2024-10-19 09:43:59)

Offline

#19 2024-10-19 13:12:15

seth
Member
Registered: 2012-09-03
Posts: 60,080

Re: Hibernation not working

(Added kms and regenerated initramfs. Without kms, suspend attempts will fail like in #12)

Remove the kms hook and add i915 to the MODULES, still a problem?

sometimes, on wakeup, my external monitors do not display anything (except for the mouse)

The KWin compositor lost the texture or a problem w/ the kscreenlocker GL scene
GL errors are somewhat expectable w/o VRAM preservation. You can ignore that for the moment (a we're trying to figure why hibernation doesn't work)
Ycou can kill kscreenlocker from a different VT or on X11 SHIFT+Alt+F12 will suspend the compositor. Wayland isn't very robust in that sense.

Could Optimus Manager be a culprit in any way, should I use prime instead, or nothing at all?

Hold on, I think the problem is exclusive to running on the nvidia chip anyway, isn't?
prime is the regular setup and the generally suggested way to use optimus systems, but that's unrelated to the matter at hand, isn't?

Do you actively reboot away from the blinking underscore or does the system reboot by itself?
What if you restrict your attempts to the mulit-user.target (hibernate from there)?

Offline

#20 2024-10-19 13:47:50

BlessedLongsword
Member
Registered: 2024-04-30
Posts: 41

Re: Hibernation not working

Remove the kms hook and add i915 to the MODULES, still a problem?

Not a problem anymore, but I had to remove optimus manager. Now suspend works quite well. Hibernation still fails.

Do you actively reboot away from the blinking underscore or does the system reboot by itself?

The system reboots by itself. I'm starting to think it's a BIOS problem, but I have no clue on how to debug that.

What if you restrict your attempts to the mulit-user.target (hibernate from there)?

I will try that.

Update: it failed in multi-user.target too

Last edited by BlessedLongsword (2024-10-19 13:53:03)

Offline

#21 2024-10-20 07:12:12

seth
Member
Registered: 2012-09-03
Posts: 60,080

Re: Hibernation not working

https://wiki.archlinux.org/title/Genera … l_messages
If it wasn't tied to the nvidia gpu, i'd suggest nomodeset - maybe it helps if you https://wiki.archlinux.org/title/GRUB/T … ramebuffer ?
Otherwise you'll need a serial console to wire out the debug messages…

Are there any MCE errors logged in boots after failed hibernation wakeups?

Sanity check:
1. this only happens when running the system on the dGPU (exclusively)?
2. running the system on the dGPU (exclusively) is desired? Why?

Offline

#22 2024-10-20 08:41:26

BlessedLongsword
Member
Registered: 2024-04-30
Posts: 41

Re: Hibernation not working

Full hibernation process video: https://www.youtube.com/watch?v=P4w1S7A9I4k
It looks as if it was kernel panicking during the boot, but the hibernation image loads fine?

Are there any MCE errors logged in boots after failed hibernation wakeups?

There are some errors, but I am not sure if they relate to hibernation failures.
Boot logs after failed hibernation: https://0x0.st/XlLg.txt

Sanity check:
1. this only happens when running the system on the dGPU (exclusively)?
2. running the system on the dGPU (exclusively) is desired? Why?

No, it happens on the three modes, dGPU exc, iGPU exc, hybrid. Even when using the multi-user.target from boot (as default) and running on battery.
I used only dGPU because there were some bugs in nvidia https://forums.developer.nvidia.com/t/e … 265406/197
That froze the external monitors and even caused some kernel panics. This happened to me when playing certain games.
Now it seems that is working fine with hybrid so no, I don't really need to run exclusively on the dGPU (for now...) and I'm not doing so, I run on hybrid right now, but issues persist.

Last edited by BlessedLongsword (2024-10-20 08:58:18)

Offline

#23 2024-10-20 19:25:15

seth
Member
Registered: 2012-09-03
Posts: 60,080

Re: Hibernation not working

The system properly wakes from the hibernation and returns to the previous state, but doesn't recover from the sleep?
Then it restarts.

cat /sys/power/mem_sleep # does this sit on "deep"?
echo s2idle | sudo tee /sys/power/mem_sleep

Then try again.

Oct 20 10:21:06 Antonio kernel: RIP: 0010:__kvmalloc_node_noprof+0xc5/0xd0
Oct 20 10:21:06 Antonio kernel: Code: ef 68 00 04 00 00 48 8d 4c 02 ff e8 f5 df 05 00 48 83 c4 18 eb 8b b8 01 00 00 00 48 c1 e0 2d eb cb 80 e7 20 0f 85 77 ff ff ff <0f> 0b e9 70 ff ff ff 0f 1f 40 00 90 90 90 90 90 90 90 90 90 90 90
Oct 20 10:21:06 Antonio kernel: RSP: 0000:ffffc1d5048b75b8 EFLAGS: 00010246
Oct 20 10:21:06 Antonio kernel: RAX: 0000000000000000 RBX: 00000000000000c0 RCX: 0000000000000033
Oct 20 10:21:06 Antonio kernel: RDX: 0000000000000000 RSI: ffffffff83456572 RDI: 0000000000052dc0
Oct 20 10:21:06 Antonio kernel: RBP: ffffffffffffffff R08: 0000000000000060 R09: ffffa02825330a80
Oct 20 10:21:06 Antonio kernel: R10: ffffc1d5048b75b8 R11: 0000000000000800 R12: 00000000ffffffff
Oct 20 10:21:06 Antonio kernel: R13: ffffc1d507200000 R14: ffffffffffffffff R15: ffffa02825330a80
Oct 20 10:21:06 Antonio kernel: FS:  00007a009d633740(0000) GS:ffffa02b6f300000(0000) knlGS:0000000000000000
Oct 20 10:21:06 Antonio kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Oct 20 10:21:06 Antonio kernel: CR2: 00007fe4e13ba057 CR3: 0000000124dea000 CR4: 0000000000f50ef0
Oct 20 10:21:06 Antonio kernel: PKRU: 55555554
Oct 20 10:21:06 Antonio kernel: Call Trace:
Oct 20 10:21:06 Antonio kernel:  <TASK>
Oct 20 10:21:06 Antonio kernel:  ? __kvmalloc_node_noprof+0xc5/0xd0
Oct 20 10:21:06 Antonio kernel:  ? __warn.cold+0x8e/0xf5
Oct 20 10:21:06 Antonio kernel:  ? __kvmalloc_node_noprof+0xc5/0xd0
Oct 20 10:21:06 Antonio kernel:  ? report_bug+0xe7/0x210
Oct 20 10:21:06 Antonio kernel:  ? handle_bug+0x3c/0x80
Oct 20 10:21:06 Antonio kernel:  ? exc_invalid_op+0x19/0xc0
Oct 20 10:21:06 Antonio kernel:  ? asm_exc_invalid_op+0x1a/0x20
Oct 20 10:21:06 Antonio kernel:  ? __kmalloc_node_noprof+0x382/0x460
Oct 20 10:21:06 Antonio kernel:  ? __kvmalloc_node_noprof+0xc5/0xd0
Oct 20 10:21:06 Antonio kernel:  ? __kvmalloc_node_noprof+0x37/0xd0
Oct 20 10:21:06 Antonio kernel:  persistent_ram_save_old+0x163/0x180 [ramoops 1400000003000000474e5500fa40972d7098f951]

Just a hunch, try https://aur.archlinux.org/packages/nvidia-535xx-dkms

Oct 20 10:21:06 Antonio systemd[1]: Reached target Graphical Interface.

This wasn't a hibernation from the  multi-user.target?
Try to not complicate things w/ GUI related modeswitches that will end up eating debug messages.

Oct 20 10:21:06 Antonio kernel: Hardware name: HP Victus by HP Laptop 16-d1xxx/8A25, BIOS F.04 03/10/2022

Are there BIOS updates available for the system?

I tried everything the wiki says except for changing to lts kernel, but that is not an option for me unfortunately.

Why exactly? What about the non-zen kernel?

Offline

#24 2024-10-20 20:41:39

BlessedLongsword
Member
Registered: 2024-04-30
Posts: 41

Re: Hibernation not working

Why exactly? What about the non-zen kernel?

I use waydroid and zen is required to use it, it's that or I have to build a kernel myself, or use binder which are less desirable than not having the option to hibernate, for my use case of this system at least.
Non-zen does not work either, it was part of my early tests before coming to the forums.

I tried the lts kernel now, and it works (should have tried it sooner, sorry for my stubborness...). In fact, if I hibernate with lts, and boot from hibernate on zen, it works too. If the hibernation is done from zen/linux and booted into any kernel, even lts, it won't work. So the problem is how the hibernation is done?

Are there BIOS updates available for the system?

Yes, https://support.hp.com/us-en/drivers/vi … 5CD212K6HS
But I looked into how to do it in the wiki for HP products and the guides specify putting certain files from the extracted .exe for windows in a USB that do not appear in my case, and this is more of a problem for a different thread I suppose. Since it works for lts it could probably be discarded? I'm not sure.

This wasn't a hibernation from the  multi-user.target?
Try to not complicate things w/ GUI related modeswitches that will end up eating debug messages.

Ah yes, sorry, I stopped using multi-user when I saw it didn't help, it didn't occur to me that it was also easier to debug with that.

Knowing it works for lts, should we continue with this testing to figure out the problem in the newer kernels or has this been enough?

Thank you for all your help seth smile

Offline

#25 2024-10-21 19:13:10

seth
Member
Registered: 2012-09-03
Posts: 60,080

Re: Hibernation not working

In fact, if I hibernate with lts, and boot from hibernate on zen, it works too. If the hibernation is done from zen/linux and booted into any kernel, even lts, it won't work. So the problem is how the hibernation is done?

cross-kernel hibernation cannot be expected to work anyway.

Knowing it works for lts, should we continue with this testing to figure out the problem in the newer kernels or has this been enough?

I'd try to narrow down the compromising version, try a non-custom, non-zen regular-ass 6.11 kernel and (assuming that fails as well) 6.10.10
https://wiki.archlinux.org/title/Arch_Linux_Archive - you can usually downgrade the kernel in isolation w/o causing any issues (but since you'll have multiple parallel kernels anyway, it doesn't matter)

There's a pleathora of issues regarding the framebuffer stack in 6.11, so if only those kernels are affected there's a chance this gets cleaned up "automatically" at some point.

Offline

Board footer

Powered by FluxBB