void-linux / void-linux/void-runit
zzz suspend-to-ram default changed to s2idle
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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