Re: [PATCH] hwmon: (nct6683) Restore manual fan control after resume

From: Guenter Roeck

Date: Mon Nov 09 2026 - 12:20:27 EST


On Mon, Nov 09, 2026 at 05:33:28PM +0100, Tomasz Bojanowski wrote:
> On MSI boards with NCT6687D-R, the BIOS restores automatic fan control
> on resume from S3. The manual mode and duty cycle set through
> pwmN_enable and pwmN are lost, and pwmN_enable reports 2.
>
> Remember the channels switched to manual mode through sysfs and their
> duty cycle, and restore them on resume if the EC switched them back to
> automatic mode. Other channels are not touched.
>
> Tested on an MSI MAG B850M MORTAR WIFI (MS-7E61): with pwm16_enable set
> to 1 and pwm16 to 153, pwm16_enable reads 2 after resume from S3 without
> this patch. With this patch it stays 1 and the fan returns to the manual
> duty cycle.
>
> Fixes: 5410a1257e26 ("hwmon: (nct6683) Add fan control support for MSI boards with NCT6687D-R")
> Signed-off-by: Tomasz Bojanowski <tomasz@xxxxxxxxxxxxx>

Applied.

Thanks,
Guenter