feat(power): implement true s2idle suspend with improved fake-suspend fallback#34
Open
the8055u wants to merge 1 commit into
Open
feat(power): implement true s2idle suspend with improved fake-suspend fallback#34the8055u wants to merge 1 commit into
the8055u wants to merge 1 commit into
Conversation
Owner
|
@the8055u Were you able to test this successfully? My experience has been that s2idle almost never wakes from sleep. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR significantly improves the suspend behavior on SM8550/SM8650/SM8750 devices by introducing support for true
s2idlesuspend while maintaining and enhancing the legacyfake-suspendmechanism.The current
fake-suspendapproach results in higher battery drain because the SoC never truly sleeps. Real suspend (s2idle) is now automatically used if the kernel supports it, falling back to an improvedfake-suspendotherwise.Changes
s2idlesupport infake-suspend: Automatically detected via/sys/power/mem_sleep. When active, it properly freezes tasks and suspends drivers viaecho freeze > /sys/power/state, allowing CPUs to enter hardware idle states.fake-suspendfallback: Offlines all secondary CPU cores via hotplug (echo 0 > /sys/devices/system/cpu/cpu*/online) during sleep to further reduce battery drain whens2idleis unavailable.suspend_mode: Added topower-profiles.confwithauto(default),s2idle, andfakeoptions to allow users to force a specific behavior.README.mdto explain the new behavior.Testing
cat /sys/power/mem_sleepto check ifs2idleis available.s2idlecauses GPU hangs (Adreno 740), users can safely revert to the legacy path by settingsuspend_mode=fakein/etc/armada/power-profiles.conf.