You are not logged in.

#1 2024-08-07 03:51:13

ReYuki
Member
Registered: 2024-07-30
Posts: 37
Website

[SOLVED] problem with systemd hibernate

Hello everyone, I hope you're doing well smile

So I have NVIDIA driver installed and have configured my system by following the instructions on the Power management/Suspend and hibernate wiki page.

What I've tried to make hibernate work:
Create a swapfile because current swap partition is too small, and add it to fstab with top priority so that it can be used by the kernel:

# Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>
# /dev/nvme1n1p3
UUID=bcea492c-d348-4bf8-848f-f07ddd5b5d2c	/         	ext4      	rw,relatime	0 1

# /dev/nvme1n1p1
UUID=328C-F19A      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2

# /dev/nvme1n1p2
UUID=d029f056-a194-413a-a338-34a4b0d1d1f8	none      	swap      	defaults  	0 0

/swapfile none swap defaults,pri=1 0 0

and ensure it has been activated:

$ swapon -s
Filename                                Type            Size            Used            Priority
/swapfile                               file            20971516        0               1
/dev/nvme1n1p2                          partition       4194300         0               -2

and then I configure the kernel parameter:

$ lsblk
nvme1n1
├─nvme1n1p1 vfat   FAT32       328C-F19A                               466M    54% /boot
├─nvme1n1p2 swap   1           d029f056-a194-413a-a338-34a4b0d1d1f8                [SWAP]
└─nvme1n1p3 ext4   1.0         bcea492c-d348-4bf8-848f-f07ddd5b5d2c  488.1G    43% /
$ sudo filefrag -v /swapfile | awk '$1=="0:" {print substr($4, 1, length($4)-2)}'
32339968
$ bootctl
Default Boot Loader Entry:
         type: Boot Loader Specification Type #1 (.conf)
        title: Arch Linux
           id: archlinux.conf
       source: /boot//loader/entries/archlinux.conf
        linux: /boot//vmlinuz-linux
       initrd: /boot//initramfs-linux.img
      options: root=UUID=bcea492c-d348-4bf8-848f-f07ddd5b5d2c rw nvidia-drm.modeset=1 resume=UUID=d029f056-a194-413a-a338-34a4b0d1d1f8 resume_offset=32339968

and because I use systemd, I think there's no need to add resume to the /etc/mkinitcptio.conf as per wiki says, here's my current mkinitcpio.conf.

I'm not sure if the following information is relevant: I use Xorg with a dual-monitor setup, although the crash also occurs when I use only a single display on the laptop.
Here's the Xorg log if you're interested: .local/share/xorg/Xorg.0.log

I see that nvidia package already done some of the work:

$ cat /usr/lib/modprobe.d/nvidia-utils.conf
blacklist nouveau
$  find /usr/lib/systemd/system -name 10-nvidia-no-freeze-session.conf
/usr/lib/systemd/system/systemd-suspend-then-hibernate.service.d/10-nvidia-no-freeze-session.conf
/usr/lib/systemd/system/systemd-hibernate.service.d/10-nvidia-no-freeze-session.conf
/usr/lib/systemd/system/systemd-hybrid-sleep.service.d/10-nvidia-no-freeze-session.conf
/usr/lib/systemd/system/systemd-homed.service.d/10-nvidia-no-freeze-session.conf
/usr/lib/systemd/system/systemd-suspend.service.d/10-nvidia-no-freeze-session.conf
$ cat /usr/lib/systemd/system/systemd-suspend.service.d/10-nvidia-no-freeze-session.conf
[Service]
Environment="SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=false"

I checked if the Drop-In file is actually used:

$ systemctl status systemd-hibernate
○ systemd-hibernate.service - System Hibernate
     Loaded: loaded (/usr/lib/systemd/system/systemd-hibernate.service; static)
    Drop-In: /usr/lib/systemd/system/systemd-hibernate.service.d
             └─10-nvidia-no-freeze-session.conf
     Active: inactive (dead)
       Docs: man:systemd-hibernate.service(8)
$ journalctl -u systemd-hybrid-sleep.service
Jul 30 12:44:42 ASUS systemd[1]: Starting System Hybrid Suspend+Hibernate...
Jul 30 12:44:42 ASUS systemd-sleep[174618]: Successfully froze unit 'user.slice'.
Jul 30 12:44:42 ASUS systemd-sleep[174618]: Performing sleep operation 'hybrid-sleep'...
Jul 30 12:44:59 ASUS systemd-sleep[174618]: System returned from sleep operation 'hybrid-sleep'.
Jul 30 12:44:59 ASUS systemd-sleep[174618]: Successfully thawed unit 'user.slice'.
Jul 30 12:44:59 ASUS systemd[1]: systemd-hybrid-sleep.service: Deactivated successfully.
Jul 30 12:44:59 ASUS systemd[1]: Finished System Hybrid Suspend+Hibernate.
-- Boot f94d03f1e68c4387bc99b3ac2b7779c2 --
Aug 01 21:32:18 ASUS systemd[1]: Starting System Hybrid Suspend+Hibernate...
Aug 01 21:32:18 ASUS systemd-sleep[13464]: User sessions remain unfrozen on explicit request ($SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=0).
Aug 01 21:32:18 ASUS systemd-sleep[13464]: This is not recommended, and might result in unexpected behavior, particularly
Aug 01 21:32:18 ASUS systemd-sleep[13464]: in suspend-then-hibernate operations or setups with encrypted home directories.
Aug 01 21:32:18 ASUS systemd-sleep[13464]: Performing sleep operation 'hybrid-sleep'...
Aug 01 21:32:29 ASUS systemd-sleep[13464]: System returned from sleep operation 'hybrid-sleep'.
Aug 01 21:32:29 ASUS systemd[1]: systemd-hybrid-sleep.service: Deactivated successfully.
Aug 01 21:32:29 ASUS systemd[1]: Finished System Hybrid Suspend+Hibernate.
-- Boot e97674c7257340888c82a2c3bebbbf56 --
Aug 07 01:54:29 ASUS systemd[1]: Starting System Hybrid Suspend+Hibernate...
Aug 07 01:54:29 ASUS systemd-sleep[792676]: User sessions remain unfrozen on explicit request ($SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=0).
Aug 07 01:54:29 ASUS systemd-sleep[792676]: This is not recommended, and might result in unexpected behavior, particularly
Aug 07 01:54:29 ASUS systemd-sleep[792676]: in suspend-then-hibernate operations or setups with encrypted home directories.
Aug 07 01:54:29 ASUS systemd-sleep[792676]: Performing sleep operation 'hybrid-sleep'...
-- Boot e3fe7bb050e54f2998cc7bfb2f39866c --
Aug 07 02:50:47 ASUS systemd[1]: Starting System Hybrid Suspend+Hibernate...
Aug 07 02:50:47 ASUS systemd-sleep[937]: User sessions remain unfrozen on explicit request ($SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=0).
Aug 07 02:50:47 ASUS systemd-sleep[937]: This is not recommended, and might result in unexpected behavior, particularly
Aug 07 02:50:47 ASUS systemd-sleep[937]: in suspend-then-hibernate operations or setups with encrypted home directories.
Aug 07 02:50:47 ASUS systemd-sleep[937]: Performing sleep operation 'hybrid-sleep'...
Aug 07 02:53:07 ASUS systemd[1]: systemd-hybrid-sleep.service: Deactivated successfully.
Aug 07 02:53:07 ASUS systemd[1]: Finished System Hybrid Suspend+Hibernate.
Aug 07 02:53:07 ASUS systemd[1]: systemd-hybrid-sleep.service: Consumed 1.349s CPU time, 2.4M memory peak.
Aug 07 02:55:30 ASUS systemd[1]: Starting System Hybrid Suspend+Hibernate...
Aug 07 02:55:30 ASUS systemd-sleep[3478]: User sessions remain unfrozen on explicit request ($SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=0).
Aug 07 02:55:30 ASUS systemd-sleep[3478]: This is not recommended, and might result in unexpected behavior, particularly
Aug 07 02:55:30 ASUS systemd-sleep[3478]: in suspend-then-hibernate operations or setups with encrypted home directories.
Aug 07 02:55:30 ASUS systemd-sleep[3478]: Performing sleep operation 'hybrid-sleep'...
Aug 07 03:08:15 ASUS systemd-sleep[3478]: System returned from sleep operation 'hybrid-sleep'.
Aug 07 03:08:15 ASUS systemd[1]: systemd-hybrid-sleep.service: Deactivated successfully.
Aug 07 03:08:15 ASUS systemd[1]: Finished System Hybrid Suspend+Hibernate.
Aug 07 03:08:15 ASUS systemd[1]: systemd-hybrid-sleep.service: Consumed 2.317s CPU time, 2.2M memory peak.
Aug 07 03:20:11 ASUS systemd[1]: Starting System Hybrid Suspend+Hibernate...
Aug 07 03:20:11 ASUS systemd-sleep[12644]: User sessions remain unfrozen on explicit request ($SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=0).
Aug 07 03:20:11 ASUS systemd-sleep[12644]: This is not recommended, and might result in unexpected behavior, particularly
Aug 07 03:20:11 ASUS systemd-sleep[12644]: in suspend-then-hibernate operations or setups with encrypted home directories.
Aug 07 03:20:11 ASUS systemd-sleep[12644]: Performing sleep operation 'hybrid-sleep'...
Aug 07 03:20:32 ASUS systemd[1]: systemd-hybrid-sleep.service: Deactivated successfully.
Aug 07 03:20:32 ASUS systemd[1]: Finished System Hybrid Suspend+Hibernate.
Aug 07 03:20:32 ASUS systemd[1]: systemd-hybrid-sleep.service: Consumed 2.696s CPU time, 2.3M memory peak.

What problem I encounter after configure the system:
System crash and hang, I had to press power button to force shutdown my laptop, and then I turned it back on and checked the log:

Aug 07 09:20:00 ASUS kernel: ------------[ cut here ]------------
Aug 07 09:20:00 ASUS kernel: WARNING: CPU: 11 PID: 228 at include/linux/rwsem.h:80 follow_pte+0x1de/0x200
Aug 07 09:20:00 ASUS kernel: Modules linked in: snd_seq_dummy snd_hrtimer snd_seq snd_seq_device vfat fat intel_rapl_msr amd_atl intel_rapl_common snd_sof_amd_acp63 snd_sof_amd_vangogh snd_sof_amd_rembrandt snd_sof_amd_renoir snd_sof_amd_acp snd_sof_pci snd_sof_xtensa_dsp>
Aug 07 09:20:00 ASUS kernel:  typec_ucsi snd_timer aesni_intel btbcm snd_acp_config realtek platform_profile typec snd videobuf2_common sp5100_tco mdio_devres btmtk libarc4 crypto_simd snd_soc_acpi sparse_keymap hid_multitouch cryptd bluetooth mc cfg80211 mousedev joydev >
Aug 07 09:20:00 ASUS kernel: CPU: 11 PID: 228 Comm: nv_queue Tainted: P        W  OE      6.10.2-arch1-2 #1 bb2ff72914e58b5ee7d8bcebe7876e029bbab5bb
Aug 07 09:20:00 ASUS kernel: Hardware name: ASUSTeK COMPUTER INC. ASUS TUF Gaming A15 FA507XI_FA507XI/FA507XI, BIOS FA507XI.313 03/14/2024
Aug 07 09:20:00 ASUS kernel: RIP: 0010:follow_pte+0x1de/0x200
Aug 07 09:20:00 ASUS kernel: Code: 14 da 00 48 81 e2 00 00 00 c0 48 09 c2 48 f7 d2 48 85 fa 75 20 e8 b2 f5 ff ff 48 8b 35 4b e4 5c 01 48 81 e6 00 00 00 c0 eb 8d <0f> 0b 48 3b 1f 0f 83 50 fe ff ff bd ea ff ff ff eb b6 49 8b 3c 24
Aug 07 09:20:00 ASUS kernel: RSP: 0018:ffffb3c682b47b60 EFLAGS: 00010246
Aug 07 09:20:00 ASUS kernel: RAX: 0000000000000000 RBX: 000078724affd000 RCX: ffffb3c682b47ba0
Aug 07 09:20:00 ASUS kernel: RDX: ffffb3c682b47b98 RSI: 000078724affd000 RDI: ffff96d143b4f140
Aug 07 09:20:00 ASUS kernel: RBP: ffffb3c682b47be0 R08: ffffb3c682b47d38 R09: 0000000000000000
Aug 07 09:20:00 ASUS kernel: R10: 0000000000000200 R11: 0000000000000003 R12: ffffb3c682b47ba0
Aug 07 09:20:00 ASUS kernel: R13: ffffb3c682b47b98 R14: ffff96d15721c780 R15: 0000000000000000
Aug 07 09:20:00 ASUS kernel: FS:  0000000000000000(0000) GS:ffff96d85e980000(0000) knlGS:0000000000000000
Aug 07 09:20:00 ASUS kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Aug 07 09:20:00 ASUS kernel: CR2: 000077d7215fc788 CR3: 0000000220020000 CR4: 0000000000f50ef0
Aug 07 09:20:00 ASUS kernel: PKRU: 55555554
Aug 07 09:20:00 ASUS kernel: Call Trace:
Aug 07 09:20:00 ASUS kernel:  <TASK>
Aug 07 09:20:00 ASUS kernel:  ? follow_pte+0x1de/0x200
Aug 07 09:20:00 ASUS kernel:  ? __warn.cold+0x8e/0xe8
Aug 07 09:20:00 ASUS kernel:  ? follow_pte+0x1de/0x200
Aug 07 09:20:00 ASUS kernel:  ? report_bug+0xff/0x140
Aug 07 09:20:00 ASUS kernel:  ? handle_bug+0x3c/0x80
Aug 07 09:20:00 ASUS kernel:  ? exc_invalid_op+0x17/0x70
Aug 07 09:20:00 ASUS kernel:  ? asm_exc_invalid_op+0x1a/0x20
Aug 07 09:20:00 ASUS kernel:  ? follow_pte+0x1de/0x200
Aug 07 09:20:00 ASUS kernel:  follow_phys+0x49/0x110
Aug 07 09:20:00 ASUS kernel:  untrack_pfn+0x55/0x120
Aug 07 09:20:00 ASUS kernel:  unmap_single_vma+0xa6/0xe0
Aug 07 09:20:00 ASUS kernel:  zap_page_range_single+0x122/0x1d0
Aug 07 09:20:00 ASUS kernel:  unmap_mapping_range+0x116/0x140
Aug 07 09:20:00 ASUS kernel:  ? __pfx__main_loop+0x10/0x10 [nvidia 29519e2c10585cc7bdef537869d791b3b52cc022]
Aug 07 09:20:00 ASUS kernel:  nv_revoke_gpu_mappings+0x67/0xb0 [nvidia 29519e2c10585cc7bdef537869d791b3b52cc022]
Aug 07 09:20:00 ASUS kernel:  _nv000711rm+0x35/0x100 [nvidia 29519e2c10585cc7bdef537869d791b3b52cc022]
Aug 07 09:20:00 ASUS kernel:  rm_execute_work_item+0x110/0x170 [nvidia 29519e2c10585cc7bdef537869d791b3b52cc022]
Aug 07 09:20:00 ASUS kernel:  os_execute_work_item+0x5e/0x80 [nvidia 29519e2c10585cc7bdef537869d791b3b52cc022]
Aug 07 09:20:00 ASUS kernel:  _main_loop+0x95/0x150 [nvidia 29519e2c10585cc7bdef537869d791b3b52cc022]
Aug 07 09:20:00 ASUS kernel:  kthread+0xcf/0x100
Aug 07 09:20:00 ASUS kernel:  ? __pfx_kthread+0x10/0x10
Aug 07 09:20:00 ASUS kernel:  ret_from_fork+0x31/0x50
Aug 07 09:20:00 ASUS kernel:  ? __pfx_kthread+0x10/0x10
Aug 07 09:20:00 ASUS kernel:  ret_from_fork_asm+0x1a/0x30
Aug 07 09:20:00 ASUS kernel:  </TASK>
Aug 07 09:20:00 ASUS kernel: ---[ end trace 0000000000000000 ]---
Aug 07 09:20:09 ASUS systemd[1]: systemd-hostnamed.service: Deactivated successfully.

here's the today version of journalctl log: http://0x0.st/XVe_.txt

Additional information:

$ uname -a
Linux ASUS 6.10.2-arch1-2 #1 SMP PREEMPT_DYNAMIC Sat, 03 Aug 2024 17:56:17 +0000 x86_64 GNU/Linux
$ pacman -Qi nvidia
Name            : nvidia
Version         : 555.58.02-11

Could someone please help me understand why I am encountering this error and how to fix it? Please let me know if you need more information, and thank you in advance for your time and assistance!

Last edited by ReYuki (2024-08-08 01:03:07)


Some felt terror! some felt hatred! some trusted it! some were obsessed with it! The feelings in the hearts of all mankind were what drove them to follow the path of destruction! Just as all who live by the sword must die by it as well.

- Saga of Tanya the Evil: The Movie

Offline

#2 2024-08-07 14:20:57

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

Offline

#3 2024-08-08 01:11:21

ReYuki
Member
Registered: 2024-07-30
Posts: 37
Website

Re: [SOLVED] problem with systemd hibernate

Thanks for the reply, Seth.

Turns out I just didn't read the instructions carefully, which made me misunderstand part 4.3 of the wiki.

The problem was solved by adding resume to HOOKS as the wiki suggests.

Sorry if I made a silly mistake. I need to hone my literacy skills smile


Some felt terror! some felt hatred! some trusted it! some were obsessed with it! The feelings in the hearts of all mankind were what drove them to follow the path of destruction! Just as all who live by the sword must die by it as well.

- Saga of Tanya the Evil: The Movie

Offline

Board footer

Powered by FluxBB