void-linux / void-linux/void-runit

zzz suspend-to-ram default changed to s2idle

Open
#33 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C
Stars
245
Forks
67
Avg merge
2d
Merged PRs (30d)
2

Description

It seems kernel 5.3 changed the default for s2ram to be s2idle, which drains the battery.

To recover the past behaviour, it seems suspend should do

printf deep > /sys/power/mem_sleep

right before it does

printf mem >/sys/power/state

See: https://www.reddit.com/r/voidlinux/comments/drm4nj/severe_battery_drain_in_sleep/
and
https://www.kernel.org/doc/html/v5.3/admin-guide/pm/sleep-states.html#basic-sysfs-interfaces-for-system-suspend-and-hibernation

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the runit suspend entry point that writes mem to /sys/power/state. Check how the suspend command is assembled, then verify that the deep sleep selection occurs before the existing state write and test that suspend uses the intended kernel mode.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.