RK3566: keep the rtw88 driver loaded across sleep - #3324
Open
Jacob-Matthew-Cook wants to merge 1 commit into
Open
RK3566: keep the rtw88 driver loaded across sleep#3324Jacob-Matthew-Cook wants to merge 1 commit into
Jacob-Matthew-Cook wants to merge 1 commit into
Conversation
Jacob-Matthew-Cook
marked this pull request as ready for review
September 14, 2026 05:09
This was referenced Sep 14, 2026
The global modules.bad unloads rtw88_8821cs before suspend. On the RK3566 boards the SDIO card keeps power through sleep (keep-power-in- suspend, vcc_wifi always on), so with the driver gone the RTL8821CS sits fully awake for the whole sleep. Measured on an RG353M: ~2.5 %/h over a 10 h deep sleep, three times the SoC's own draw, while the PMIC sleep configuration is exactly as the DT asks. Let a platform or device modules.keep list modules the sleep hook must not unload, and give RK3566 one with rtw88_8821cs so the driver's own suspend path parks the chip in its power-save state. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Jacob-Matthew-Cook
force-pushed
the
rk3566-sleep-wifi
branch
from
September 14, 2026 05:34
81fd30f to
2e5f75c
Compare
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.
Summary
modules.badunloadsrtw88_8821csbefore suspend, but on these boards the SDIO card keeps power through sleep (keep-power-in-suspend,vcc_wifialways on), so the RTL8821CS sits fully awake all night with nothing managing it.sleep.shnow honours a platform/devicemodules.keeplist of modules it must not unload, and RK3566 gets one withrtw88_8821cs, so the driver's own suspend path leaves the chip in its power-save state.Testing
wlan0re-associates 4 s after resume,suspend_statsclean, no rtw/mmc errors. Overnight drain on this build pending.0xb5/0xb6) match the DTregulator-state-memexactly (CPU/GPU/logic/boost/1v8 off; DDR, 3v3 and PMU rails on), so the excess is peripherals on the rails that stay up, dominated by the undriven Wi-Fi/BT module.modules.badoverride yielding the same unload list); themodules.keepform is built and is being re-verified on the same device.Additional Context
modules.badis global; nothing on RK3566 ever needed it, and resume with the driver loaded is clean on 7.0.2.modules.bad: the global list stays the single source of truth. A platform override would silently shadow any module added to the global list later, and the diff should show only what differs — one module on one platform.hci_h5keeps it powered for BT wake) and the status LED.AI Usage
Did you use AI tools to help write this code? YES
🤖 Generated with Claude Code