Skip to content

v1.4.2

Latest

Choose a tag to compare

@github-actions github-actions released this 09 Oct 19:37

Changes to sleep and resume, prompted by #24 (a machine that wakes and
sleeps several times before it stays asleep). No state-file or permission
changes; restart the daemon after upgrading:

systemctl --user restart z13ctl
  • A machine on a custom fan curve no longer wakes straight back up after
    suspending
    (#24). Before each suspend the daemon hands the fans back to the
    firmware, so they stop while the machine sleeps. Doing that makes the
    firmware re-apply its fan and power settings, and a suspend that started
    within a moment of it was often woken again by the embedded controller a
    second or two later. With the lid closed the machine then went back to sleep,
    the daemon had meanwhile turned your fan curve back on, the next suspend
    released it again, and the machine woke again: several sleep/wake rounds
    before it stayed asleep. In testing, 7 of 15 such suspends woke early. The
    daemon now waits 3 seconds after releasing the fans before letting the
    suspend go ahead, and none of the 11 suspends tested that way woke early. The
    wait applies only when a custom fan curve was released, and is shortened if
    your system allows less than 5 seconds for it.

  • The daemon now logs what woke the machine. After every resume it logs
    how long the machine slept, how much of that time the hardware spent in its
    low-power state, and which wakeup sources the kernel counted: the embedded
    controller, the charger, the lid, the keyboard cover, the touchscreen, and so
    on. Before each suspend it also logs whether it had just written the fans or
    power limits. If your machine will not stay asleep, these lines say
    whether z13ctl is involved:

    journalctl --user -u z13ctl -b | grep -E "entering sleep|held the suspend|handing the suspend|wake report"
  • Putting the machine back to sleep straight after it wakes no longer
    restores your custom profile into the suspend.
    After a resume the daemon
    waits a few seconds for the embedded controller before restoring the fan
    curve and power limits. A suspend requested during that wait used to queue
    behind it. The system's suspend timeout would then expire and the machine
    would go back to sleep just as the custom fan curve was being turned back on,
    so the fans could keep running while it slept. A suspend in that window now
    cancels the pending restore, and a brief wake writes nothing to the fans or
    power limits.

Changelog

  • e105753 chore: update metadata
  • 1621c0b fix: fix for sleep cycles waking early, and fans not spinning down