- Experimental: embedded controller register dump
- LCD brightness control
- Volume control
- - Experimental: fan speed, fan enable/disable
+ - Fan control and monitoring: fan speed, fan enable/disable
- Experimental: WAN enable and disable
A compatibility table by model and feature is maintained on the web
up or down command (the level command will not unmute the volume).
The current volume level and mute state is shown in the file.
-EXPERIMENTAL: fan speed, fan enable/disable
--------------------------------------------
+Fan control and monitoring: fan speed, fan enable/disable
+---------------------------------------------------------
procfs: /proc/acpi/ibm/fan
sysfs device attributes: (hwmon) fan_input, pwm1, pwm1_enable
-This feature is marked EXPERIMENTAL because the implementation
-directly accesses hardware registers and may not work as expected. USE
-WITH CAUTION! To use this feature, you need to supply the
-experimental=1 parameter when loading the module.
+NOTE NOTE NOTE: fan control operations are disabled by default for
+safety reasons. To enable them, the module parameter "fan_control=1"
+must be given to thinkpad-acpi.
This feature attempts to show the current fan speed, control mode and
other fan data that might be available. The speed is read directly
from the hardware registers of the embedded controller. This is known
-to work on later R, T and X series ThinkPads but may show a bogus
+to work on later R, T, X and Z series ThinkPads but may show a bogus
value on other models.
Fan levels:
if (parse_strtoul(buf, 120, &t))
return -EINVAL;
+ if (!fan_control_allowed)
+ return -EPERM;
+
fan_watchdog_maxinterval = t;
fan_watchdog_reset();
fan_control_access_mode != TPACPI_FAN_WR_NONE),
fan_status_access_mode, fan_control_access_mode);
+ /* fan control master switch */
+ if (!fan_control_allowed) {
+ fan_control_access_mode = TPACPI_FAN_WR_NONE;
+ fan_control_commands = 0;
+ dbg_printk(TPACPI_DBG_INIT,
+ "fan control features disabled by parameter\n");
+ }
+
/* update fan_control_desired_level */
if (fan_status_access_mode != TPACPI_FAN_NONE)
fan_get_status_safe(NULL);
static int fan_set_level(int level)
{
+ if (!fan_control_allowed)
+ return -EPERM;
+
switch (fan_control_access_mode) {
case TPACPI_FAN_WR_ACPI_SFAN:
if (level >= 0 && level <= 7) {
{
int rc;
+ if (!fan_control_allowed)
+ return -EPERM;
+
rc = mutex_lock_interruptible(&fan_mutex);
if (rc < 0)
return rc;
u8 s;
int rc;
+ if (!fan_control_allowed)
+ return -EPERM;
+
rc = mutex_lock_interruptible(&fan_mutex);
if (rc < 0)
return rc;
{
int rc;
+ if (!fan_control_allowed)
+ return -EPERM;
+
rc = mutex_lock_interruptible(&fan_mutex);
if (rc < 0)
return rc;
{
int rc;
+ if (!fan_control_allowed)
+ return -EPERM;
+
rc = mutex_lock_interruptible(&fan_mutex);
if (rc < 0)
return rc;
.read = fan_read,
.write = fan_write,
.exit = fan_exit,
- .flags.experimental = 1,
};
/****************************************************************************
static int force_load;
module_param(force_load, int, 0);
+static int fan_control_allowed;
+module_param_named(fan_control, fan_control_allowed, int, 0);
+
#define IBM_PARAM(feature) \
module_param_call(feature, set_ibm_param, NULL, NULL, 0)