[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Laptop resumes each 1h13 after suspend-to-ram



On 19/09/2025 05:02, Max Nikulin wrote:
On 17/09/2025 18:17, Eugen Dedu wrote:
On 17/09/2025 04:40, Max Nikulin wrote:
Perhaps you may change s2idle to another power state for "sleep".

Unfortunately, my laptop does not support it:
root@snoopy:~# echo deep >/sys/power/mem_sleep
-bash: echo: write error: Invalid argument

In my case
cat /sys/power/mem_sleep
s2idle [deep]

I hope, you did not disable S3 state in firmware setup trying Jeffrey's suggestion. (It seems, his problem was opposite to yours: "unsolicited" suspends, no wake ups.)

I tried removing S3 state from UEFI, but the laptop did not sleep anymore. So I added it back in UEFI.

In my case, deep is not shown in /sys/power/mem_sleep, even if S3 is available in UEFI.

If the CPU supports S3 there might be ACPI-related errors or warnings in "sudo journalctl -b" report.

There *are* some ACPI errors (shown in red), during booting:
Sep 17 08:26:08 snoopy kernel: ACPI BIOS Error (bug): Failure creating named object [\_SB.PC00.XHCI.RHUB.HS03._> Sep 17 08:26:08 snoopy kernel: ACPI Error: AE_ALREADY_EXISTS, During name lookup/catalog (20240827/psobject-220) Sep 17 08:26:08 snoopy kernel: ACPI: Skipping parse of AML opcode: OpcodeName unavailable (0x0014) Sep 17 08:26:08 snoopy kernel: ACPI BIOS Error (bug): Failure creating named object [\_SB.PC00.XHCI.RHUB.HS03._> Sep 17 08:26:08 snoopy kernel: ACPI Error: AE_ALREADY_EXISTS, During name lookup/catalog (20240827/psobject-220)

I have no clue on how to interpret them. The full log is at https://dedu.fr/boot.txt.

root@snoopy:~# cat /sys/power/state  # no deep string here:
freeze mem

It is expected.

On 17/09/2025 21:34, Eugen Dedu wrote:
On 16/09/2025 05:13, Max Nikulin wrote:
On 15/09/2025 19:35, Eugen Dedu wrote:

On 15/09/2025 04:29, Max Nikulin wrote:
What you have posted so far tells that there is no difference of lid switch and sleep button as they are handled by Linux. Maybe it is firmware that prevents wake ups when the lid is closed. (By the way, what happens if you suspend the machine using the sleep button and close the lid afterwards?)

Power button pressed at around 14:51:47, around 5 secs later close lid, around 10 secs later open lid (<14:52:10) and awake the laptop.

The log shows that closing lid does not add any info in the log. Interesting information, however we made no progress.

It seems, I failed to describe the test clear enough. Suspend the laptop using the sleep button, close the lid and leave for > 2.5 hours. If you are patient enough then you may open lid afterward and leave the laptop for another couple of hours (resume on lid open should be disabled). The question is whether closed lid may prevent wake ups.

So: I disabled sleep button from /etc/systemd/logind.conf:
  HandleLidSwitch=ignore
  #######HandleLidSwitch=suspend
  and restarted service:
  systemctl restart systemd-logind.service
  Now, closing lid does not suspend laptop.

I get quickly the answer:
Press power button => suspend
After 10 secs, close lid
After 10 secs, open lid
=> laptop awakes. So even if lid switch is ignored, when closing lid it does nothing indeed, but when opening lid it resumes the laptop!

Is this test enough? Note that I cannot test the second part of your test, because when I open the lid the laptop awakes anyway.

Should I test after disabling lid action in UEFI too?

I do not expect any log entries due to lid events in idle state.

Is 1h13m the interval since initial suspend? Or does first resume occur at certain wall clock time?

It is clock time (wall time), no matter when I suspend.

Tired to see that there is no success so far :o(  I hoped to get a method to discover the program requesting awake up.

I would read the laptop manual that might be a source of inspiration. The setting might be behind some marketing title.

If our system administrator, who received the laptop, still has it...

You may try to search for developer docs how to setup a timer active in CPU idle state. You may ask in another Linux-related community, not specific to Debian. Perhaps there is one more close to kernel developers.

Perhaps I have missed it, but have you confirmed that there are no power on/off schedule in firmware/BIOS setup?

There is none, I disabled this option (laptop is always on).

<https://www.kernel.org/doc/html/latest/admin-guide/pm/sleep- states.html>
<https://www.kernel.org/doc/html/latest/power/basic-pm-debugging.html>

Looked over them, nothing interesting except debugging at the end of the page, and looking at /sys/kernel/debug/wakeup_sources, but it is too verbose and only numbers.

In my case non-zero entries are for AC and LNXPWRBN:00, so I find it informative.

In my case several lines has non null value in active_count, I put the output at https://dedu.fr/wakeup_sources.


Reply to: