You are not logged in.

#1 2021-03-10 05:38:22

tea_niugnep
Member
Registered: 2021-02-16
Posts: 30

Strange behavior of hibernate

I followed the wiki to use hibernation, and I call

systemctl hibernate

to let my laptop hibernate

But something strange. When my laptop prepare to hibernate, it has following bahavior:

into screen blanking ->  restore screen active -> again into screen blanking ->hibernation

I'm annoyed screen on again in the process, is it possible to into hibernation directly?

I list possible problem source:

* I use a swap partition of disk for hibernation, and the image size of

/sys/power/image_size

is 4gb (total swap space is 16gb)

* I don't use any display manager, only i3 wm, from terminal directly (startx)

Thanks a lot

Offline

#2 2021-03-10 06:45:35

GaKu999
Member
From: US/Eastern
Registered: 2020-06-21
Posts: 696

Re: Strange behavior of hibernate

Does it do the same if you hibernate from the virtual console?

May be the whole sleep state switch so it’s likely there’s no way for it...


My reposSome snippets

Heisenberg might have been here.

Offline

#3 2021-03-10 07:53:20

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,552

Re: Strange behavior of hibernate

Do you activate a screen locker w/ sleep/hibernation?
And does that locker maybe trigger dpms?
Then you probably switch to some VT and then the system power off?

=> delay the locker dpms activation. (Just in case)

Offline

#4 2021-03-11 02:59:32

tea_niugnep
Member
Registered: 2021-02-16
Posts: 30

Re: Strange behavior of hibernate

Yes I use xautolock & i3lock as screen locker.

But even if I stop the xautolock and just run

systemctl hibernate

, the problem is same

I don't know how to see whether trigger dpms..what should I do? VT means the initial six tty terminal? I don't switch to them manually

what can I do to delay the locker dpms? edit the monitor conf file or use xset directly?  where can I find some reference?

Offline

#5 2021-03-11 07:20:42

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,552

Re: Strange behavior of hibernate

The theory was that you're running the locker w/ some sleep hook/service and that its invocation (iirc i3lock doesn't do that automatically anymore) does sth. like "xset dpms force off"
These things wouldn't happen by random chance, but because you configured them to act this way.

When you wake up from hibernation (w/o xautolock), is the screen locked?

Offline

#6 2021-03-11 12:14:50

tea_niugnep
Member
Registered: 2021-02-16
Posts: 30

Re: Strange behavior of hibernate

Yes. i3lock doesn't do that automatically and I used

i3lock && systemctl hibernate

as I expected when wake up the screen is locked.

However, even if without i3lock and xuatolock, just running

systemctl hibernate

, the behavior is same. And when wake up from hibernation, the screen isn't locked.

And I tried to run the command from another VT (tty2) directly, it still did the same

Offline

#7 2021-03-11 12:26:11

tea_niugnep
Member
Registered: 2021-02-16
Posts: 30

Re: Strange behavior of hibernate

I don't know whether it helps, this is log of dmesg|grep PM after one hibernation process:

[    0.000000] efi: TPMFinalLog=0x4ff92000 SMBIOS=0x4f03d000 SMBIOS 3.0=0x4f03a000 ACPI=0x4fffe000 ACPI 2.0=0x4fffe014 MEMATTR=0x49728018 
[    0.022401] ACPI: TPM2 0x000000004FFF1000 000034 (v03 LENOVO TP-N23   00001340 PTEC 00000002)
[    0.064956] ACPI: PM-Timer IO Port: 0x1808
[    0.065104] PM: hibernation: Registered nosave memory: [mem 0x00000000-0x00000fff]
[    0.065108] PM: hibernation: Registered nosave memory: [mem 0x00058000-0x00058fff]
[    0.065111] PM: hibernation: Registered nosave memory: [mem 0x0009d000-0x000fffff]
[    0.065114] PM: hibernation: Registered nosave memory: [mem 0x4401c000-0x4401cfff]
[    0.065115] PM: hibernation: Registered nosave memory: [mem 0x4401d000-0x4401dfff]
[    0.065118] PM: hibernation: Registered nosave memory: [mem 0x49628000-0x49727fff]
[    0.065121] PM: hibernation: Registered nosave memory: [mem 0x4e8da000-0x4e9a8fff]
[    0.065122] PM: hibernation: Registered nosave memory: [mem 0x4e9a9000-0x4ff1afff]
[    0.065123] PM: hibernation: Registered nosave memory: [mem 0x4ff1b000-0x4ff99fff]
[    0.065124] PM: hibernation: Registered nosave memory: [mem 0x4ff9a000-0x4fffefff]
[    0.065127] PM: hibernation: Registered nosave memory: [mem 0x50000000-0x57ffffff]
[    0.065128] PM: hibernation: Registered nosave memory: [mem 0x58000000-0x585fffff]
[    0.065130] PM: hibernation: Registered nosave memory: [mem 0x58600000-0x5c7fffff]
[    0.065131] PM: hibernation: Registered nosave memory: [mem 0x5c800000-0xefffffff]
[    0.065132] PM: hibernation: Registered nosave memory: [mem 0xf0000000-0xf7ffffff]
[    0.065134] PM: hibernation: Registered nosave memory: [mem 0xf8000000-0xfe00ffff]
[    0.065135] PM: hibernation: Registered nosave memory: [mem 0xfe010000-0xfe010fff]
[    0.065136] PM: hibernation: Registered nosave memory: [mem 0xfe011000-0xffffffff]
[    0.194255] Performance Events: PEBS fmt3+, Skylake events, 32-deep LBR, full-width counters, Intel PMU driver.
[    0.195756] NMI watchdog: Enabled. Permanently consumes one hw-PMU counter.
[    0.215349] PM: Registering ACPI NVS region [mem 0x4401c000-0x4401cfff] (4096 bytes)
[    0.215349] PM: Registering ACPI NVS region [mem 0x4ff1b000-0x4ff99fff] (520192 bytes)
[    0.215349] PM: RTC time: 12:19:18, date: 2021-03-11
[    0.217524] ACPI FADT declares the system doesn't support PCIe ASPM, so disable it
[    0.419876] acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI EDR HPX-Type3]
[    0.420157] acpi PNP0A08:00: _OSC: platform does not support [PCIeHotplug SHPCHotplug PME AER PCIeCapability]
[    0.420292] acpi PNP0A08:00: _OSC: OS requested [PCIeHotplug SHPCHotplug PME AER PCIeCapability LTR DPC]
[    0.420297] acpi PNP0A08:00: _OSC failed (AE_SUPPORT); disabling ASPM
[    0.430680] pci 0000:00:14.0: PME# supported from D3hot D3cold
[    0.434232] pci 0000:00:16.0: PME# supported from D3hot
[    0.436030] pci 0000:00:1c.0: PME# supported from D0 D3hot D3cold
[    0.437936] pci 0000:00:1c.4: PME# supported from D0 D3hot D3cold
[    0.439809] pci 0000:00:1d.0: PME# supported from D0 D3hot D3cold
[    0.445211] pci 0000:00:1f.3: PME# supported from D3hot D3cold
[    0.448939] pci 0000:00:1f.6: PME# supported from D0 D3hot D3cold
[    0.451805] pci 0000:02:00.0: PME# supported from D0 D3hot D3cold
[    0.701457] PM:   Magic number: 13:350:329
[    1.031286] PM: Image not found (code -22)
[    1.725125] tpm_tis STM7304:00: 2.0 TPM (device-id 0x0, rev-id 78)
[    1.966981] RAPL PMU: API unit is 2^-32 Joules, 5 fixed counters, 655360 ms ovfl timer
[    1.966985] RAPL PMU: hw unit of domain pp0-core 2^-14 Joules
[    1.966986] RAPL PMU: hw unit of domain package 2^-14 Joules
[    1.966986] RAPL PMU: hw unit of domain dram 2^-14 Joules
[    1.966987] RAPL PMU: hw unit of domain pp1-gpu 2^-14 Joules
[    1.966987] RAPL PMU: hw unit of domain psys 2^-14 Joules
[  256.685872] PM: hibernation: hibernation entry
[  256.696192] PM: hibernation: Marking nosave pages: [mem 0x00000000-0x00000fff]
[  256.696196] PM: hibernation: Marking nosave pages: [mem 0x00058000-0x00058fff]
[  256.696198] PM: hibernation: Marking nosave pages: [mem 0x0009d000-0x000fffff]
[  256.696202] PM: hibernation: Marking nosave pages: [mem 0x4401c000-0x4401dfff]
[  256.696205] PM: hibernation: Marking nosave pages: [mem 0x49628000-0x49727fff]
[  256.696212] PM: hibernation: Marking nosave pages: [mem 0x4e8da000-0x4fffefff]
[  256.696344] PM: hibernation: Marking nosave pages: [mem 0x50000000-0xffffffff]
[  256.699972] PM: hibernation: Basic memory bitmaps created
[  256.699974] PM: hibernation: Preallocating image memory
[  257.017936] PM: hibernation: Allocated 458041 pages for snapshot
[  257.017940] PM: hibernation: Allocated 1832164 kbytes in 0.31 seconds (5910.20 MB/s)
[  257.488366] PM: hibernation: Creating image:
[  257.668514] PM: hibernation: Need to copy 451578 pages
[  257.668515] PM: hibernation: Normal pages needed: 451578 + 1024, available pages: 3680832
[  259.049896] PM: hibernation: Basic memory bitmaps freed
[  259.083588] PM: hibernation: hibernation exit

Offline

#8 2021-03-11 12:56:33

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,552

Re: Strange behavior of hibernate

And I tried to run the command from another VT (tty2) directly, it still did the same

For clarification: without any graphical session running on any other VT? Or did you just move to VT2 while your GUI was still on VT1?

into screen blanking ->  restore screen active -> again into screen blanking ->hibernation

What do you see at those stages, ie. the last thing before the initial deactivate and then when it briefly wakes up?

Offline

#9 2021-03-11 15:22:46

tea_niugnep
Member
Registered: 2021-02-16
Posts: 30

Re: Strange behavior of hibernate

Yes. Two situations are same. I call startx then switch to VT2 and hiberntate,  and I reboot and hibernate from tty1 directly (no wm active), they did same.

I see, after inputting hibernate command, the screen is off (like blanking), then it wakes up about 5 seconds, then it goes into hibernation

Last edited by tea_niugnep (2021-03-11 15:25:40)

Offline

#10 2021-03-11 15:51:11

tea_niugnep
Member
Registered: 2021-02-16
Posts: 30

Re: Strange behavior of hibernate

I tried disable screen blanking and turn off dpms before hibernate, still did same

Is it possible a bios setting problem? My laptop is lenovo thinkpad

Last edited by tea_niugnep (2021-03-11 15:52:30)

Offline

#11 2021-03-11 16:14:35

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,552

Re: Strange behavior of hibernate

then it wakes up about 5 seconds

What *exactly* do you see during this time and is it the same as before you run "systemctl hibernate"?

Offline

#12 2021-03-12 02:09:01

tea_niugnep
Member
Registered: 2021-02-16
Posts: 30

Re: Strange behavior of hibernate

Yes. Totally same as before

Offline

#13 2021-03-12 21:09:59

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,552

Re: Strange behavior of hibernate

So it doesn't seem to relate to some input change either.
Backlight control?

Offline

#14 2021-03-13 01:11:42

tea_niugnep
Member
Registered: 2021-02-16
Posts: 30

Re: Strange behavior of hibernate

My case is intel_backlight, and I just use light to simply control the brightness

Offline

#15 2021-03-13 08:43:17

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,552

Re: Strange behavior of hibernate

If you disable the systemd backlight service? (not the kernel parameter, disable/mask the service and reboot)
https://wiki.archlinux.org/index.php/Ba … ctionality

Offline

#16 2021-03-14 02:01:32

tea_niugnep
Member
Registered: 2021-02-16
Posts: 30

Re: Strange behavior of hibernate

I don't know whether my manipulation is right..
I run

systemctl disable  systemd-backlight@backlight:intel_light.service

then reboot
but when I check status of systemd-backlight@backlight:intel_light.service after reboot, nothing change:

● systemd-backlight@backlight:intel_light.service - Load/Save Screen Backlight Brightness of backlight:intel_light
     Loaded: loaded (/usr/lib/systemd/system/systemd-backlight@.service; static)
     Active: inactive (dead)
       Docs: man:systemd-backlight@.service(8)

And then i try hibernate again, still same

Offline

#17 2021-03-14 07:13:35

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,552

Re: Strange behavior of hibernate

Does it also occur on S3?
If so it would also be rather easy to test this w/ a random live distro…

Offline

#18 2021-03-14 14:19:28

tea_niugnep
Member
Registered: 2021-02-16
Posts: 30

Re: Strange behavior of hibernate

S3 means suspend? in suspend case, it doesn't happen, everything goes normally.

about other distro,  do you mean other linux distro? I used Manjaro for a long time before starting use Arch, the hibernation was normal.

Offline

#19 2021-03-14 14:49:46

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,552

Re: Strange behavior of hibernate

I really don't see why the screen would turn off during a hibernation attempt. Did you add any sleep/hibernation hooks?
https://wiki.archlinux.org/index.php/Po … _hibernate

Offline

#20 2021-03-14 14:59:43

tea_niugnep
Member
Registered: 2021-02-16
Posts: 30

Re: Strange behavior of hibernate

I note one thing
in sleep.conf
I set HibernateMode=shutdown
the total conf as:

#AllowSuspend=yes
#AllowHibernation=yes
#AllowSuspendThenHibernate=yes
#AllowHybridSleep=yes
#SuspendMode=
#SuspendState=mem standby freeze
HibernateMode=shutdown
#HibernateState=disk
#HybridSleepMode=suspend platform shutdown
#HybridSleepState=disk
HibernateDelaySec=120min

any relationship? I don't understand the HibernateMode meaning clearly..

No other hooks to sleep related target, I think

Offline

#21 2021-03-14 15:05:47

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,552

Re: Strange behavior of hibernate

man sleep.conf.d wrote:

       SuspendMode=, HibernateMode=, HybridSleepMode=
           The string to be written to /sys/power/disk by, respectively, systemd-
           suspend.service(8), systemd-hibernate.service(8), systemd-hybrid-sleep.service(8), or
           systemd-suspend-then-hibernate.service(8). More than one value can be specified by
           separating multiple values with whitespace. They will be tried in turn, until one is
           written without error. If neither succeeds, the operation will be aborted.

Defaults to "platform shutdown"
a)

cat /sys/power/disk

b) why did you edit it?

Offline

#22 2021-03-14 15:14:01

tea_niugnep
Member
Registered: 2021-02-16
Posts: 30

Re: Strange behavior of hibernate

output:

[platform] shutdown reboot suspend test_resume

Because i use suspend-then-hibernate on lid close event, I specify the time from suspend to hibernate in the conf file.

Offline

#23 2021-03-14 15:36:53

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,552

Re: Strange behavior of hibernate

How does that relate to HibernateMode?
Esp. since

#HybridSleepMode=suspend platform shutdown

Offline

#24 2021-03-14 23:46:44

tea_niugnep
Member
Registered: 2021-02-16
Posts: 30

Re: Strange behavior of hibernate

Sorry I don't get what you mean.
But I got the reason why i modified the HibernateMode:

in the wiki wrote:

When you hibernate your system, the system should power off (after saving the state on the disk). Sometimes, you might see the power LED is still glowing. If that happens, it might be instructive to set the HibernateMode to shutdown in sleep.conf.d(5).

This modification is important for my laptop hibernation. I tried to set to the default value agian, the screen turn off behavior still, and the battery led had some problems, and also the system would turn on automatically.

Last edited by tea_niugnep (2021-03-14 23:53:08)

Offline

Board footer

Powered by FluxBB