System freezes after sleep / hibernation

Hi there,
after searching and reading quite a lot, I think I really need some help, especially as I’m quite new to Linux / Manjaro and not yet familiar with its terms and handling.

So I installed Manjaro (KDE) besides Windows (both from scratch). As stated in the topic headline, my system always freezes when resuming from sleep (and hibernation).
The keyboard and display light up, I see a mousepointer but can’t move it.
The only solution left is to power off the laptop and boot again.

By now, I tried the following measures:
With my first install I used the proprietary drivers (auto install) - black screen, keyboard lighted up, display black with a white blinking cursor.
There I also tried different kernels (5.10 LTS and the newest 5.16) but it didn’t change anything.
Then I tried a second install but this time with the open source drivers - black screen with a mouse pointer which can’t be moved, keyboard lighted up but unresponsive (no working caps lock / num).

Interestingly, when I just run the live-image (before install) it seems to work and I was able to resume after sleep, although I could wake up with just hitting the space bar (don’t know if it entered another state here).
A while ago I tried Ubuntu on the same machine and there I faced the same issue (wasn’t able to reolve it there), which made me discard my intention to switch from Win to Linux.
This time I would really like to solve the problem and continue with Linux.

So, if anyone could help me to resolve this issue by giving detailed instructions it would be highly appreciated! Without having sleep / hibernation, there’s no sense for me to go on with Manjaro / Linux as a daily driver.

System:
  Kernel: 5.15.12-1-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-5.15-x86_64
    root=UUID=67240561-8d53-415f-9b01-082872cc06dd rw quiet apparmor=1
    security=apparmor udev.log_priority=3
  Desktop: KDE Plasma 5.23.4 tk: Qt 5.15.2 wm: kwin_x11 vt: 1 dm: SDDM
    Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Laptop System: HP product: HP ProBook 440 G7 v: N/A
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: HP model: 869D v: KBC Version 02.37.00 serial: <superuser required>
    UEFI: HP v: S71 Ver. 01.11.00 date: 11/05/2021
Battery:
  ID-1: BAT0 charge: 19.7 Wh (59.2%) condition: 33.3/45.2 Wh (73.6%)
    volts: 10.8 min: 11.6 model: Hewlett-Packard Primary type: Li-ion
    serial: <filter> status: Discharging cycles: 268
Memory:
  RAM: total: 15.47 GiB used: 2.76 GiB (17.9%)
  RAM Report:
    permissions: Unable to run dmidecode. Root privileges required.
CPU:
  Info: model: Intel Core i7-10510U bits: 64 type: MT MCP
    arch: Comet/Whiskey Lake note: check family: 6 model-id: 0x8E (142)
    stepping: 0xC (12) microcode: 0xEA
  Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache:
    L1: 256 KiB desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB desc: 4x256 KiB
    L3: 8 MiB desc: 1x8 MiB
  Speed (MHz): avg: 1154 high: 2000 min/max: 400/4900 scaling:
    driver: intel_pstate governor: powersave cores: 1: 2000 2: 1643 3: 1092
    4: 900 5: 899 6: 901 7: 898 8: 900 bogomips: 36812
  Flags: 3dnowprefetch abm acpi adx aes aperfmperf apic arat
    arch_capabilities arch_perfmon art avx avx2 bmi1 bmi2 bts clflush clflushopt
    cmov constant_tsc cpuid cpuid_fault cx16 cx8 de ds_cpl dtes64 dtherm dts
    epb ept ept_ad erms est f16c flexpriority flush_l1d fma fpu fsgsbase fxsr
    ht hwp hwp_act_window hwp_epp hwp_notify ibpb ibrs ibrs_enhanced ida
    intel_pt invpcid invpcid_single lahf_lm lm mca mce md_clear mmx monitor
    movbe mpx msr mtrr nonstop_tsc nopl nx pae pat pbe pcid pclmulqdq pdcm
    pdpe1gb pebs pge pln pni popcnt pse pse36 pts rdrand rdseed rdtscp
    rep_good sdbg sep smap smep ss ssbd sse sse2 sse4_1 sse4_2 ssse3 stibp
    syscall tm tm2 tpr_shadow tsc tsc_adjust tsc_deadline_timer vme vmx vnmi
    vpid x2apic xgetbv1 xsave xsavec xsaveopt xsaves xtopology xtpr
  Vulnerabilities:
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: spec_store_bypass
    mitigation: Speculative Store Bypass disabled via prctl and seccomp
  Type: spectre_v1
    mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Enhanced IBRS, IBPB: conditional, RSB filling
  Type: srbds mitigation: TSX disabled
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel CometLake-U GT2 [UHD Graphics] vendor: Hewlett-Packard
    driver: i915 v: kernel bus-ID: 00:02.0 chip-ID: 8086:9b41 class-ID: 0300
  Device-2: NVIDIA GP108M [GeForce MX250] vendor: Hewlett-Packard
    driver: nouveau v: kernel bus-ID: 01:00.0 chip-ID: 10de:1d13 class-ID: 0302
  Device-3: Chicony HP HD Camera type: USB driver: uvcvideo bus-ID: 1-2:2
    chip-ID: 04f2:b66a class-ID: 0e02 serial: <filter>
  Display: x11 server: X.org 1.21.1.2 compositor: kwin_x11 driver:
    loaded: modesetting alternate: fbdev,vesa resolution: <missing: xdpyinfo>
  Message: Unable to show advanced data. Required tool glxinfo missing.
Audio:
  Device-1: Intel Comet Lake PCH-LP cAVS vendor: Hewlett-Packard
    driver: sof-audio-pci-intel-cnl
    alternate: snd_hda_intel,snd_soc_skl,snd_sof_pci_intel_cnl bus-ID: 00:1f.3
    chip-ID: 8086:02c8 class-ID: 0401
  Sound Server-1: ALSA v: k5.15.12-1-MANJARO running: yes
  Sound Server-2: JACK v: 1.9.19 running: no
  Sound Server-3: PulseAudio v: 15.0 running: yes
  Sound Server-4: PipeWire v: 0.3.42 running: yes
Network:
  Device-1: Intel Comet Lake PCH-LP CNVi WiFi driver: iwlwifi v: kernel
    bus-ID: 00:14.3 chip-ID: 8086:02f0 class-ID: 0280
  IF: wlp0s20f3 state: up mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: noprefixroute scope: link
  Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Hewlett-Packard driver: r8169 v: kernel port: 3000 bus-ID: 02:00.0
    chip-ID: 10ec:8168 class-ID: 0200
  IF: enp2s0 state: down mac: <filter>
  WAN IP: <filter>
Bluetooth:
  Device-1: Intel AX201 Bluetooth type: USB driver: btusb v: 0.8
    bus-ID: 1-10:5 chip-ID: 8087:0026 class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 0 state: down bt-service: enabled,running
    rfk-block: hardware: no software: yes address: see --recommends
Logical:
  Message: No logical block device data found.
RAID:
  Message: No RAID data found.
Drives:
  Local Storage: total: 727.52 GiB used: 60.7 GiB (8.3%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: KIOXIA model: N/A
    size: 238.47 GiB block-size: physical: 512 B logical: 512 B speed: 15.8 Gb/s
    lanes: 2 type: SSD serial: <filter> rev: ADHA0102 temp: 41.9 C scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 vendor: Crucial model: CT525MX300SSD1
    size: 489.05 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    type: SSD serial: <filter> rev: R060 scheme: GPT
  Message: No optical or floppy data found.
Partition:
  ID-1: / raw-size: 126.95 GiB size: 124.4 GiB (97.99%) used: 9.98 GiB (8.0%)
    fs: ext4 dev: /dev/nvme0n1p6 maj-min: 259:6 label: N/A
    uuid: 67240561-8d53-415f-9b01-082872cc06dd
  ID-2: /boot/efi raw-size: 530 MiB size: 528.9 MiB (99.80%)
    used: 288 KiB (0.1%) fs: vfat dev: /dev/nvme0n1p5 maj-min: 259:5
    label: NO_LABEL uuid: FE52-B4DD
  ID-3: /home raw-size: 244.14 GiB size: 239.25 GiB (98.00%)
    used: 762.5 MiB (0.3%) fs: ext4 dev: /dev/sda1 maj-min: 8:1 label: home
    uuid: 008ecdaa-ad4c-41f6-a2f5-59a10e1ae344
  ID-4: /run/media/nazgul/C8F4D410F4D3FE9E raw-size: 109.88 GiB
    size: 109.88 GiB (100.00%) used: 49.77 GiB (45.3%) fs: ntfs
    dev: /dev/nvme0n1p3 maj-min: 259:3 label: N/A uuid: C8F4D410F4D3FE9E
  ID-5: /run/media/nazgul/Volume1 raw-size: 244.91 GiB
    size: 244.91 GiB (100.00%) used: 218.1 MiB (0.1%) fs: ntfs dev: /dev/sda2
    maj-min: 8:2 label: Volume uuid: E4F8E188F8E158F6
Swap:
  Alert: No swap data was found.
Unmounted:
  ID-1: /dev/nvme0n1p1 maj-min: 259:1 size: 100 MiB fs: vfat label: N/A
    uuid: 2C5C-3D04
  ID-2: /dev/nvme0n1p2 maj-min: 259:2 size: 16 MiB fs: <superuser required>
    label: N/A uuid: N/A
  ID-3: /dev/nvme0n1p4 maj-min: 259:4 size: 1.01 GiB fs: ntfs label: N/A
    uuid: 18FA11B5FA118FDC
USB:
  Hub-1: 1-0:1 info: Hi-speed hub with single TT ports: 12 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Device-1: 1-2:2 info: Chicony HP HD Camera type: Video driver: uvcvideo
    interfaces: 4 rev: 2.0 speed: 480 Mb/s power: 500mA chip-ID: 04f2:b66a
    class-ID: 0e02 serial: <filter>
  Device-2: 1-5:3 info: Logitech Unifying Receiver type: Keyboard,Mouse,HID
    driver: logitech-djreceiver,usbhid interfaces: 3 rev: 2.0 speed: 12 Mb/s
    power: 98mA chip-ID: 046d:c52b class-ID: 0300
  Device-3: 1-7:4 info: Synaptics type: <vendor specific> driver: N/A
    interfaces: 1 rev: 2.0 speed: 12 Mb/s power: 100mA chip-ID: 06cb:00d8
    class-ID: ff00 serial: <filter>
  Device-4: 1-10:5 info: Intel AX201 Bluetooth type: Bluetooth driver: btusb
    interfaces: 2 rev: 2.0 speed: 12 Mb/s power: 100mA chip-ID: 8087:0026
    class-ID: e001
  Hub-2: 2-0:1 info: Super-speed hub ports: 6 rev: 3.1 speed: 10 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
Sensors:
  System Temperatures: cpu: 46.0 C pch: 45.0 C mobo: 43.0 C gpu: nouveau
    temp: 43.0 C
  Fan Speeds (RPM): N/A
Info:
  Processes: 256 Uptime: 20m wakeups: 1 Init: systemd v: 250 tool: systemctl
  Compilers: gcc: 11.1.0 clang: 13.0.0 Packages: pacman: 1212 lib: 331
  flatpak: 0 Shell: Zsh v: 5.8 default: Bash v: 5.1.12 running-in: konsole

If I need to provide more details or more specific information, please let me know.
Thanks a lot.

Hibernation is impossible without using swap. If you dont want to mess with anything too much, just make a swapfile. No partitioning necessary :

Hi,
thanks for your answer and the hint.
I created an 8GB-Swap-file (which was quite easy) , rebooted and tested.

Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: file size: 8 GiB used: 0 KiB (0.0%) priority: -2
    file: /swapfile

Unfortunately it still freezes. No changes.
From all the reading I’ve done so far, I think it is probably because of the graphics-combo (intel / nvidia), although to be honest, I’ve just understood a little.

Further hints, guides, walkthroughs would be welcome.

That’s probably right.

Suspend to RAM (sleep) should work, swap or no swap.
Suspend to disk (hibernate) will need swap.

If you are using a swap file (like you do now) and want to hibernate
then the kernel/boot loader has to be told where on disk that swap file can be found:

Power management/Suspend and hibernate - ArchWiki

Creating the swap file is not enough. You have to modify the kernel/boot parameters so that the system knows where on the disk the Resume location is.

@Nachlese @mithrial
Thanks for your answers. After having a look at the linked Wiki entry (Power management…) the next questions arise:
Am I right with my assumption that I need to edit the following file to add these parametres:

/etc/default/grub

Or where else should I do that?

here’s the output of:

filefrag -v /swapfile
Filesystem type is: ef53
File size of /swapfile is 21333278720 (5208320 blocks of 4096 bytes)
 ext:     logical_offset:        physical_offset: length:   expected: flags:
   0:        0..   10239:     153600..    163839:  10240:            
   1:    10240..   73727:     165888..    229375:  63488:     163840:
   2:    73728..   75775:     231424..    233471:   2048:     229376:
   3:    75776..   79871:     235520..    239615:   4096:     233472:
   4:    79872..   83967:     241664..    245759:   4096:     239616:
   5:    83968..  116735:    1540096..   1572863:  32768:     245760:
   6:   116736..  606207:    1607680..   2097151: 489472:    1572864:
   7:   606208.. 1097727:    2129920..   2621439: 491520:    2097152:
   8:  1097728.. 1587199:    2656256..   3145727: 489472:    2621440:
   9:  1587200.. 1617919:    3180544..   3211263:  30720:    3145728:
  10:  1617920.. 1648639:    3213312..   3244031:  30720:    3211264:
  11:  1648640.. 2072575:    3246080..   3670015: 423936:    3244032:
  12:  2072576.. 2396159:    4395008..   4718591: 323584:    3670016:
  13:  2396160.. 2787327:    4851712..   5242879: 391168:    4718592:
  14:  2787328.. 3014655:    5376000..   5603327: 227328:    5242880:
  15:  3014656.. 3176447:    5605376..   5767167: 161792:    5603328:
  16:  3176448.. 3635199:    5832704..   6291455: 458752:    5767168:
  17:  3635200.. 4028415:    6422528..   6815743: 393216:    6291456:
  18:  4028416.. 4290559:    7077888..   7340031: 262144:    6815744:
  19:  4290560.. 4356095:    7405568..   7471103:  65536:    7340032:
  20:  4356096.. 4419583:    7505920..   7569407:  63488:    7471104:
  21:  4419584.. 4423679:    7614464..   7618559:   4096:    7569408:
  22:  4423680.. 4431871:    7626752..   7634943:   8192:    7618560:
  23:  4431872.. 4659199:    7636992..   7864319: 227328:    7634944:
  24:  4659200.. 4661247:    7927808..   7929855:   2048:    7864320:
  25:  4661248.. 4691967:    7931904..   7962623:  30720:    7929856:
  26:  4691968.. 5115903:    7964672..   8388607: 423936:    7962624:
  27:  5115904.. 5144575:    8458240..   8486911:  28672:    8388608:
  28:  5144576.. 5175295:    8488960..   8519679:  30720:    8486912:
  29:  5175296.. 5206015:    8521728..   8552447:  30720:    8519680:
  30:  5206016.. 5208063:    8554496..   8556543:   2048:    8552448:
  31:  5208064.. 5208319:    8552704..   8552959:    256:    8556544: last,eof

So the offset is 153600

And how do I add resume=swap_device and resume_offset=swap_file_offset, maybe like this?


`GRUB_CMDLINE_LINUX_DEFAULT="resume=/swapfile resume_offset=153600`

Is there anything else I need to do?

not quite - you need to refer to the disk the swap file is on - not to where it is located in the filesystem structure of your / (root) device

for example - mine looks like this:
resume=/dev/disk/by-uuid/57ce341b-6aae-4fb0-a607-1a5d5967c7a2 resume_offset=220889088

in full ( I added it to the options of GRUB_CMDLINE_LINUX_DEFAULT) :
GRUB_CMDLINE_LINUX_DEFAULT="mitigations=off audit=0 resume=/dev/disk/by-uuid/57ce341b-6aae-4fb0-a607-1a5d5967c7a2 resume_offset=220889088"

… yes, it goes into /etc/default/grub

update grub after you made the changes
only regenerating the configuration file will also suffice

Well, ok.
my line now looks like this:

GRUB_DEFAULT=saved
GRUB_TIMEOUT=5
GRUB_TIMEOUT_STYLE=hidden
GRUB_DISTRIBUTOR="Manjaro"
GRUB_CMDLINE_LINUX_DEFAULT="resume=UUID=67240561-8d53-415f-9b01-082872cc06dd resume_offset=153600"
GRUB_CMDLINE_LINUX=""

But still no success.
Going into sleep / hibernation, it still freezes.
I just found the following post…is there anything which can help?

I tested the command

systemctl hibernate 

which I found there. When I tried to resume from hibernation it just restarted (–> boot menu) and wanting to start manjaro again it then crashes.
After powering it off, I was able to boot normally.

I am having the same issue on my netbook. I had an older version of Manjaro xfce on there. I broke the install and decided to do a clean install. Everything works just fine, but the desktop locks after resume from suspend. about 50% of the time, i can switch to tty and reboot gracefully, but the desktop is just locked. Not finding any relevant errors anywhere.

Can anyone still help and point me into the right direction or has some further insights.

What I also tried was to

/etc/mkinitcpio.conf
such that the “resume” hook will not be at the third position

Which I also found in that post here

But it hasn’t changed anything, an it still freezes every single time I try to resume.

Well, I really would like to continue my first steps in the Linux universe, but not being able to sleep or hibernate is a complete no go for daily usage.

Ich erinnere mich daran, daß ich dieses Problem hatte - ist schon lange her.

resume=/dev/disk/by-uuid/57ce341b-6aae-4fb0-a607-1a5d5967c7a2
und
resume=UUID=57ce341b-6aae-4fb0-a607-1a5d5967c7a2

sollten equivalent sein - die referenzieren ja dieselbe Partition, nur auf unterschiedliche Weise

Während das erste funktioniert (bei mir)
hat die Schreibweise der zweiten Variante damals nicht funktioniert.

Versuch:
ändere

resume=UUID=67240561-8d53-415f-9b01-082872cc06dd
in
resume=/dev/disk/by-uuid/67240561-8d53-415f-9b01-082872cc06dd

und schau ob diese andere Schreibweise auch bei Dir einen Unterschied macht.

Was wichtig ist, ist daß der “encrypt” hook vor “filesystems” und “resume” steht
also in der Reihenfolge: erst “encrypt”, danach “filesystems” und zum Schluß “resume”
(wie ich mir das denke: es muß erst entschlüsselt werden
um auf das filesystem zugreifen zu können,
auf dem ja auch die zu benutzende Swap Partition liegt)

It’s been quite a while and for not being able to sleep and hibernate I skipped using Manjaro. Having some time now, I dealt with Manjaro again, as I still want to dive into the Linux world.

  1. First I removed the dual boot setup and wiped everything. I’ve read somewhere that for some people it wasn’t possible to suspend with a dual boot system but with Manjaro only, it worked. Unfortunately, it didn’t solve my problem.
    Also tried a clean install with the open source drivers because I’ve often read that the hybrid graphic-card and nivida-prime are responsible. No success!

  2. I noticed that sleep and hibernation worked with the live-system from a usb-drive using both the open source and proprietary drivers (nvidia-intel-hybrid graphics).
    So I assumed against my former idea, that hybrid graphic is not the culprit.

  3. Somewhere else (think it was the Manjaro /ArchWiki documentation) I’ve read something about problems with nvme-ssds, so I did a clean install on the second sata-ssd. And here we go…hibernation and sleep suddenly work.

So I tested several setups:
1.Only Manjaro on SATA-ssd with open-source and proprietary drivers: sleep / hibernation work
2.Dual boot with Win 11 on NVME-ssd and Manjaro on SATA-ssd with proprietary drivers: sleep / hibernation work

:star_struck:

Maybe my findings will help some people out there.

Her the information regarding nvme-ssd can be found:
https://wiki.archlinux.org/title/Solid_state_drive/NVMe#Troubleshooting

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.