sleep/suspend & hibernate don't exactly

Each starts out doing as expected, blanking the screen, but instead of quiet (off, no running fans, no lights, black screen), hibernate attempts, whether from tty3 shell prompt (systemctl hibernate) in multi-user or graphical targets, or Plasma session, trigger a virtually immediate reboot that results in restored session. Suspend attempts (systemctl suspend) just blank the screen for several seconds.

This is mailing list thread with no responses except from Carlos, who prompted investigation of /sys/power/state, leading me to bug 1182346, which is about a laptop that “does not hibernate”, and open.

This old desktop PC is my brother’s. I originally installed 24 months ago 15.1. He claims sleep/hibernate used to work before the upgrade to 15.2, which is now 15.3. He wants hibernate/sleep to work again. So far, I haven’t found the secret to success. My search fu on this is apparently fubar. I was sure there was recent discussion about this subject either on a mailing list or on the forums, but I gave up trying to find it.

# cat /sys/power/state
freeze standby mem disk
# inxi -mxxFzy
System:
  Kernel: 5.3.18-59.10-default x86_64 bits: 64 compiler: gcc v: 7.5.0
  Desktop: KDE Plasma 5.18.6 tk: Qt 5.12.7 wm: kwin_x11 dm: SDDM
  Distro: openSUSE Leap 15.3
Machine:
  Type: Desktop Mobo: ASRock model: N68C-GS FX serial: N/A
  BIOS: American Megatrends v: P1.40 date: 10/31/2012
Memory:
  RAM: total: 3.59 GiB used: 767.2 MiB (20.9%)
  Array-1: capacity: 8 GiB slots: 2 EC: None max-module-size: 4 GiB note: est.
  Device-1: DIMM0 size: 2 GiB speed: 266 MT/s type: DDR2 manufacturer: 64
  part-no: N/A
  Device-2: DIMM1 size: 2 GiB speed: 266 MT/s type: DDR2 manufacturer: 64
  part-no: N/A
CPU:
  Info: 6-Core model: AMD Phenom II X6 1055T bits: 64 type: MCP arch: K10
  rev: 0 cache: L1: 768 KiB L2: 3 MiB L3: 6 MiB
  flags: lm nx pae sse sse2 sse3 sse4a svm bogomips: 33756
  Speed: 1398 MHz min/max: 800/2800 MHz boost: enabled Core speeds (MHz):
  1: 1398 2: 1487 3: 1794 4: 804 5: 2041 6: 804
Graphics:
  Device-1: NVIDIA C61 [GeForce 7025 / nForce 630a] vendor: ASRock
  driver: nouveau v: kernel bus-ID: 00:0d.0 chip-ID: 10de:03d6
  Display: x11 server: X.Org 1.20.3 compositor: kwin_x11 driver:
  loaded: modesetting unloaded: fbdev,vesa alternate: nouveau,nv,nvidia
  resolution: 1680x1050~60Hz s-dpi: 120
  OpenGL: renderer: llvmpipe (LLVM 11.0.1 128 bits) v: 4.5 Mesa 20.2.4
  compat-v: 3.1 direct render: Yes
Audio:
  Device-1: NVIDIA MCP61 High Definition Audio vendor: ASRock
  driver: snd_hda_intel v: kernel bus-ID: 00:05.0 chip-ID: 10de:03f0
  Sound Server-1: ALSA v: k5.3.18-59.10-default running: yes
  Sound Server-2: PulseAudio v: 14.2-rebootstrapped running: no
  Sound Server-3: PipeWire v: 0.3.24 running: no
Network:
  Device-1: NVIDIA MCP61 Ethernet vendor: ASRock 939NF6G-VSTA Board
  type: network bridge driver: forcedeth v: kernel port: e080 bus-ID: 00:07.0
  chip-ID: 10de:03ef
  IF: eth0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Drives:
  Local Storage: total: 111.79 GiB used: 204.83 GiB (183.2%)
  ID-1: /dev/sda vendor: A-Data model: SU650 size: 111.79 GiB speed: 1.5 Gb/s
  serial: <filter>
Partition:
  ID-1: / size: 17.18 GiB used: 9.48 GiB (55.2%) fs: ext4 dev: /dev/sda3
  ID-2: /home size: 51.45 GiB used: 14.57 GiB (28.3%) fs: ext4 dev: /dev/sda5
Swap:
  ID-1: swap-1 type: partition size: 4 GiB used: 0 KiB (0.0%) priority: -2
  dev: /dev/sda2
Sensors:
  System Temperatures: cpu: 33.9 C mobo: N/A
  Fan Speeds (RPM): N/A
Info:
  Processes: 183 Uptime: N/A Init: systemd v: 246 runlevel: 5
  target: graphical.target Compilers: gcc: N/A Packages: rpm: 2580 Shell: Bash
  v: 4.4.23 running-in: konsole inxi: 3.3.04
# zypper se -s grub2-systemd-sleep | grep noarch
i+ | grub2-systemd-sleep-plugin | package | 2.04-20.4   | noarch | OSS
v  | grub2-systemd-sleep-plugin | package | 2.04-9.45.2 | noarch | UpdateSLE
# journalctl | grep "handler for vector"
Jun 19 10:15:17 rok68 kernel: do_IRQ: 0.55 No irq handler for vector
Jun 22 17:02:23 rok68 kernel: do_IRQ: 0.55 No irq handler for vector
Jun 23 01:19:21 rok68 kernel: do_IRQ: 0.55 No irq handler for vector
Jun 29 18:14:16 rok68 kernel: do_IRQ: 0.55 No irq handler for vector
Jun 29 18:24:21 rok68 kernel: do_IRQ: 0.55 No irq handler for vector
Jul 01 19:42:41 rok68 kernel: do_IRQ: 0.55 No irq handler for vector
Jul 01 20:13:33 rok68 kernel: do_IRQ: 0.55 No irq handler for vector
Jul 01 20:14:28 rok68 kernel: do_IRQ: 0.55 No irq handler for vector
Jul 01 23:07:53 rok68 kernel: do_IRQ: 0.55 No irq handler for vector
Jul 01 23:12:16 rok68 kernel: do_IRQ: 0.55 No irq handler for vector
Jul 02 00:39:06 rok68 kernel: do_IRQ: 0.55 No irq handler for vector
Jul 02 00:42:24 rok68 kernel: do_IRQ: 0.55 No irq handler for vector
Jul 02 00:49:40 rok68 kernel: do_IRQ: 0.55 No irq handler for vector
Jul 02 14:18:49 rok68 kernel: do_IRQ: 0.55 No irq handler for vector
Jul 02 14:46:34 rok68 kernel: do_IRQ: 0.55 No irq handler for vector
Jul 02 14:55:46 rok68 kernel: do_IRQ: 0.55 No irq handler for vector
Jul 02 15:03:04 rok68 kernel: do_IRQ: 0.55 No irq handler for vector
Jul 02 18:40:14 rok68 kernel: do_IRQ: 0.55 No irq handler for vector
Jul 02 18:42:33 rok68 kernel: do_IRQ: 0.55 No irq handler for vector
Jul 02 18:44:13 rok68 kernel: do_IRQ: 0.55 No irq handler for vector
Jul 02 19:42:20 rok68 kernel: do_IRQ: 0.55 No irq handler for vector
Jul 02 20:05:52 rok68 kernel: do_IRQ: 0.55 No irq handler for vector
Jul 02 20:06:48 rok68 kernel: do_IRQ: 0.55 No irq handler for vector
Jul 02 20:14:37 rok68 kernel: do_IRQ: 0.55 No irq handler for vector
Jul 02 20:30:18 rok68 kernel: do_IRQ: 0.55 No irq handler for vector
Jul 02 20:32:47 rok68 kernel: do_IRQ: 0.55 No irq handler for vector
Jul 02 20:37:00 rok68 kernel: do_IRQ: 0.55 No irq handler for vector
Jul 02 20:38:18 rok68 kernel: do_IRQ: 0.55 No irq handler for vector
Jul 02 20:43:09 rok68 kernel: do_IRQ: 0.55 No irq handler for vector

The do_IRQ: 0.55 No IRQ handler for vector messages briefly show on the screen immediately following executing systemctl hibernate.
The BIOS doesn’t have any setting labeled S1 or S3, but the ACPI setting it does have that Google says equates to S3, “Suspend To RAM”, is set to “Auto”, the only other option being “Disabled”. Resetting BIOS to power saving setup default also does the same. Zypper ve says all installed packages are satisfied.

https://paste.opensuse.org/63094115 is dmesg immediately before systemctl hibernate
https://paste.opensuse.org/53663491 is journalctl -b immediately before systemctl hibernate
https://paste.opensuse.org/43825221 is dmesg immediately after systemctl hibernate recovery
https://paste.opensuse.org/46430266 is journalctl -b immediately after systemctl hibernate recovery

I tried switching to grub2-systemd-sleep-plugin 2.04-9.45.2 from UpdateSLE. It’s unclear which is actually newer. That switch changed nothing WRT hibernate. With sleep/suspend, the screen goes black, but all the machine noises remain.

Should I report a new bug? Add comments to bug 1182346? Provide more info here? Other? Can anyone find a relatively recent thread here that might match this, maybe the one I thought I saw? TIA.

Hi
Check the file /etc/systemd/sleep.conf (and man 5 systemd-sleep.conf) for the defaults, modify as required? Also check the files in /sys/power

Hi
This thread may also bee of interest towards the end… https://forums.opensuse.org/showthread.php/556066-Hibernate-with-Samsung-870-EVO-SSD

I have a Dell Optiplex (older) that reboots on shutdown -h now with 15.3. Have seen that in the past with TW from time to time as well as BSDs. However, can’t help with debugging as I press Power button to resolve…

:stuck_out_tongue:

Does everyone who wants to hibernate need to manually create an /etc/systemd/sleep.conf containing only

[Sleep]
HibernateMode=shutdown

as indicated in that other thread??? It’s hard to fathom that YaST has no way to handle this.

With sleep.conf as modified, replacing a 790 byte template of 25 lines of comments and whitespace, hibernate now can work here.

Due to the customary man page dearth of examples, the systemd-sleep.conf man page wasn’t really much help. I still need to find the magic that enables sleep to convert to hibernate after a period of inactivity. HybridSleepMode=suspend shutdown instead of, or in addition to, HibernateMode=shutdown, doesn’t do it, even though the box is checked to do so in systemsettings5 -> energy saving.

And, there’s an obviously related new problem: In systemsettings:

  • Screen Energy Saving is set to Switch off after 3 min
  • Suspend session is set to Automatically Hibernate after 20 min
    *]While asleep, hibernate after a period of inactivity is selected
    All these settings are now ignored. Now, only manually activated sleep or hibernate work as expected.

Hi
I don’t use so never struck the issue, I wonder since I see platform as the selected option the system/BIOS should take precedence?

All that systemd does is echoing strings into two files under /sys/power. systemd cannot do anything your kernel cannot do. Instead of counting characters in configuration file you should have tested what kernel can do **on your **system. As you have already been advised on mailing list (and now this discussion is split between two places and nobody has full picture). Only after you have determined what kernel is actually capable of does it make sense to start configuring higher level tools. And if kernel fails to do it, nothing else will.

I took the SSD out of my brother’s, put it in one of my own, and found hibernation working as he wants it. So I put it back in his, and it’s working exactly the same as it did in mine. Weird.

Bad connections cause lots of issues:

  • A Logitech Z333 speaker stopped working. The user said he made no changes. Re-plugging power fixed the issue. The failure presumably was caused by the shaky power plug of the monitor.
  • Touching the cables at the back of a ATX Midi Tower case caused memory fail in slot #3. Cleaning and reseating the module would not work several times. Now the module works since weeks. Touching the cables no longer freezes the machine.
  • A HDD made the boot hang. ‘smartctl -t long’ and fsck would hang the machine too. Running ‘dd if=/dev/sda6 of=/dev/null bs=4M’ fixed the issue.

Drives:
Local Storage: total: 111.79 GiB used: 204.83 GiB (183.2%)
ID-1: /dev/sda vendor: A-Data model: SU650 size: 111.79 GiB speed: 1.5 Gb/s
serial: <filter>

Speed 1.5 Gb/s, supposed to be 3.0 Gb/s.
You may find ATA errors with dmesg or journals.

Bad SATA cable + too old SATA controller for SSD.
Change cable, add controller.

Mobo controller isn’t that old: https://www.asrock.com/mb/nvidia/n68c-gs%20fx/

I did find there is a problem with cable and/or its connections. Eventually I found sometimes it wouldn’t even POST until I wiggled everything right. His SSD doesn’t have a mount. It’s just dangling among and from cables and case wiring. I’ve done my part. Now it’s up to brother to deal with his mechanical problem.

After Svyatko highlighted this I reported this thread to the inxi author. He found a bug as a result: nfs mount usage was erroneously included in local storage. The fix is due in a soon to come release, 3.3.05 I expect, but possibly 3.4.0, as soon as tomorrow possibly.

New controllers work faster. But some users don’t care…

]Not all users are into replacing motherboards, or even taking the cover off, or have money to buy add-in parts.]Ignorance is bliss.

Some tests:

i7-6700K (2016), NVME x4 SSD

**erlangen:~ #** hdparm -tT /dev/nvme0n1 

/dev/nvme0n1: 
 Timing cached reads:   38960 MB in  1.99 seconds = 19624.14 MB/sec 
 Timing buffered disk reads: 5766 MB in  3.00 seconds = 1921.71 MB/sec 
**erlangen:~ #**

AMD Athlon 4850e (2009), SATA 3GB/s SSD: cached: 1100 MB/sec , buffered: 220 MB/sec.

SATA2 = Sata 300 limits throughput to 300 MB/s, even less in practice.
SATA SSDs give up to 550 MB/s.
User can achieve this with old mobo + new SATA3 PCIe controller.

**erlangen:~ #** hdparm -tT /dev/sdc 

/dev/sdc: 
 Timing cached reads:   40120 MB in  1.98 seconds = 20212.86 MB/sec 
 Timing buffered disk reads: 1574 MB in  3.00 seconds = 524.16 MB/sec 
**erlangen:~ #**

SATA 3 makes a substantial difference for SSDs. Physical RAM is fastest. Longer uptime results in faster access of disk data. Beware of boot problems with PCIe.