From fa9a43a6905187195c9e86a61a906647726c3e55 Mon Sep 17 00:00:00 2001 From: Mario Limonciello Date: Mon, 9 May 2022 20:16:22 -0500 Subject: Add support to set autosuspend delay via hwdb --- rules.d/60-autosuspend.rules | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'rules.d') diff --git a/rules.d/60-autosuspend.rules b/rules.d/60-autosuspend.rules index 332d052caa..ce31a920ed 100644 --- a/rules.d/60-autosuspend.rules +++ b/rules.d/60-autosuspend.rules @@ -15,4 +15,8 @@ ENV{ID_AUTOSUSPEND}=="1", TEST=="power/control", \ ENV{ID_PERSIST}=="0", TEST=="power/persist", \ ATTR{power/persist}="0" +# Set up an autosuspend delay if hwdb say so +ENV{ID_AUTOSUSPEND_DELAY_MS}!="", TEST=="power/control", \ + ATTR{power/autosuspend_delay_ms}="$env{ID_AUTOSUSPEND_DELAY_MS}" + LABEL="autosuspend_end" -- cgit v1.2.3