Bug 217728 - Asus M3500QA failed to resume by timer (timerfd_settime)
Summary: Asus M3500QA failed to resume by timer (timerfd_settime)
Status: NEW
Alias: None
Product: Power Management
Classification: Unclassified
Component: Hibernation/Suspend (show other bugs)
Hardware: AMD Linux
: P3 normal
Assignee: Rafael J. Wysocki
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-29 18:55 UTC by Alexey Kuznetsov
Modified: 2023-07-29 18:57 UTC (History)
0 users

See Also:
Kernel Version: 6.4.7
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Alexey Kuznetsov 2023-07-29 18:55:47 UTC
Hello!

I'm using Asus Vivobook Laptop. Which fails to resume by timer set by timerfd_settime function call. It simply ignores the timer and keeps sleeping until I press any key. When key pressed notebook wakes up and treating key resume event as timer event.

I tested this using systemd and its HibernateDelaySec option, which allows to wake system during the sleep by timer to switch to hibernate state replacing suspend mode. During suspend notebook simply do nothing when timer hits, and when I press any key it wakes, and went to hibernate (treating key pressing wake event as timer event). Systemd has checks which should prevent hibernating if system wakes by key press, but those checks does not fails. I tested the same suspend / hibernate software on desktop - everything working fine.

This systemd code responsible for suspend / timer / hibernate logic:

tfd = timerfd_create(CLOCK_BOOTTIME_ALARM, TFD_NONBLOCK|TFD_CLOEXEC);
timerfd_settime(tfd, 0, &ts, NULL)
execute(sleep_config, SLEEP_HYBRID_SLEEP, NULL)
fd_wait_for_event(tfd, POLLIN, 0)
woken_by_timer = FLAGS_SET(r, POLLIN)
check_wakeup_type()

Basically it is POSIX calls responsible for setting timer alarms set and reading timer status.

I've tested on recent debian kernel Linux 6.1.0-10-amd64 and stable release from kernel.org  Linux 6.4.7 - same behavior.

It most likely hardware/EFI or kernel issue.

Full logs:

https://linux-hardware.org/?probe=d1a4b2769a

Note You need to log in before you can comment on or make changes to this bug.