Bug 247306 - [acpi_ibm] [patch] add cpu fan full-speed level
Summary: [acpi_ibm] [patch] add cpu fan full-speed level
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: amd64 Any
: --- Affects Some People
Assignee: Mark Johnston
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-16 12:21 UTC by Ali Abdallah
Modified: 2020-07-06 13:55 UTC (History)
3 users (show)

See Also:


Attachments
Add support for running fan in full-speed mode (2.68 KB, patch)
2020-06-16 12:21 UTC, Ali Abdallah
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ali Abdallah 2020-06-16 12:21:33 UTC
Created attachment 215613 [details]
Add support for running fan in full-speed mode

My x220 sometimes runs hot on FreeBSD (when pushing it to its limit). And I start receiving coretemp messages:

> coretemp0: critical temperature detected, suggest system shutdown

Unfortunately auto mode never sets the fan to spin fast enough to cool down the cpu, neither level 7 (max currently supported by the driver). The driver does not support full-speed (disengaged mode). Attached is a patch to implement that, with documentation updates. Tested on x220, x230, T430 and T61.

(Since I submitted many patches in the past to improve acpi support for Thinkpads, I added my name, but feel free to strip it off).
Comment 1 Mark Johnston freebsd_committer freebsd_triage 2020-06-19 15:30:53 UTC
This looks reasonable to me, thanks.

I think having your copyright in the code is fine.
Comment 2 Mark Johnston freebsd_committer freebsd_triage 2020-06-19 17:15:30 UTC
Does ACPI_IBM_METHOD_FANSPEED do the right thing when the fan is disengaged?
Comment 3 Ali Abdallah 2020-06-22 06:56:09 UTC
(In reply to Mark Johnston from comment #2)

Yes it does on all tested models, for instance on my x220, when the fan is disengaged
$ sysctl dev.acpi_ibm.0.fan_speed
dev.acpi_ibm.0.fan_speed: 6895

the max before the patch was around 4900 RPM.
Comment 4 Mark Johnston freebsd_committer freebsd_triage 2020-06-22 12:30:28 UTC
(In reply to Ali Abdallah from comment #3)
Thanks Ali.
Comment 5 commit-hook freebsd_committer freebsd_triage 2020-06-22 12:36:40 UTC
A commit references this bug:

Author: markj
Date: Mon Jun 22 12:36:06 UTC 2020
New revision: 362496
URL: https://svnweb.freebsd.org/changeset/base/362496

Log:
  acpi_ibm(4): Add support for putting fans in disengaged mode.

  PR:		247306
  Submitted by:	Ali Abdallah <ali.abdallah@suse.com>
  MFC after:	2 weeks

Changes:
  head/share/man/man4/acpi_ibm.4
  head/sys/dev/acpi_support/acpi_ibm.c
Comment 6 commit-hook freebsd_committer freebsd_triage 2020-06-24 19:51:58 UTC
A commit references this bug:

Author: markj
Date: Wed Jun 24 19:51:04 UTC 2020
New revision: 362592
URL: https://svnweb.freebsd.org/changeset/base/362592

Log:
  acpi_ibm(4): Rename disengaged mode to unthrottled mode.

  This mode was added in r362496.  Rename it to make the meaning more
  clear.

  PR:		247306
  Suggested by:	rpokala
  Submitted by:	Ali Abdallah <ali.abdallah@suse.com>
  MFC with:	r362496

Changes:
  head/share/man/man4/acpi_ibm.4
  head/sys/dev/acpi_support/acpi_ibm.c
Comment 7 commit-hook freebsd_committer freebsd_triage 2020-07-06 13:54:43 UTC
A commit references this bug:

Author: markj
Date: Mon Jul  6 13:54:18 UTC 2020
New revision: 362959
URL: https://svnweb.freebsd.org/changeset/base/362959

Log:
  MFC r362496, r362592:
  acpi_ibm(4): Add support for putting fans in disengaged mode.

  PR:	247306

Changes:
_U  stable/12/
  stable/12/share/man/man4/acpi_ibm.4
  stable/12/sys/dev/acpi_support/acpi_ibm.c
Comment 8 Mark Johnston freebsd_committer freebsd_triage 2020-07-06 13:55:05 UTC
Thanks for the patches, Ali.