Skip to content

Commit

Permalink
PM: sleep: Don't allow s2idle to be used
Browse files Browse the repository at this point in the history
Unfortunately, s2idle is only somewhat functional. Although commit
70441d36af58 ("cpuidle: lpm_levels: add soft watchdog for s2idle") makes
s2idle usable, there are still CPU stalls caused by s2idle's buggy
behavior, and the aforementioned hack doesn't address them. Therefore,
let's stop userspace from enabling s2idle and instead enforce the
default deep sleep mode.

Signed-off-by: Sultan Alsawaf <[email protected]>
  • Loading branch information
kerneltoast authored and pascua28 committed Feb 20, 2025
1 parent 4dbcc04 commit a348c42
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kernel/power/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ static ssize_t mem_sleep_store(struct kobject *kobj, struct kobj_attribute *attr
suspend_state_t state;
int error;

/* Don't allow userspace to select s2idle */
return n;
error = pm_autosleep_lock();
if (error)
return error;
Expand Down

0 comments on commit a348c42

Please sign in to comment.