Skip to contentSkip to conversation

i8k: increase fan limit to 3

PATCH In review Flavio Leitner 4 participants 14 messages May 22, 2014 – May 25, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i8k: increase fan limit to 3

From: Flavio Leitner <[email protected]>

It is possible to increase left fan speed on a
DELL Precision 490n system up to 3.

    value    fan rpm
      1      35460
      2      64740
      3      78510
---
 drivers/char/i8k.c       | 4 ++--
 include/uapi/linux/i8k.h | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)
drivers/char/i8k.c +2 -2
index d915707..99180f0 100644
@@ -519,7 +519,7 @@ static ssize_t i8k_hwmon_show_pwm(struct device *dev,
 	status = i8k_get_fan_status(index);
 	if (status < 0)
 		return -EIO;
-	return sprintf(buf, "%d\n", clamp_val(status * 128, 0, 255));
+	return sprintf(buf, "%d\n", clamp_val(status * 128, 0, 384));
 }
 
 static ssize_t i8k_hwmon_set_pwm(struct device *dev,
@@ -533,7 +533,7 @@ static ssize_t i8k_hwmon_set_pwm(struct device *dev,
 	err = kstrtoul(buf, 10, &val);
 	if (err)
 		return err;
-	val = clamp_val(DIV_ROUND_CLOSEST(val, 128), 0, 2);
+	val = clamp_val(DIV_ROUND_CLOSEST(val, 128), 0, 3);
 
 	mutex_lock(&i8k_mutex);
 	err = i8k_set_fan(index, val);
include/uapi/linux/i8k.h +2 -1
index 1c45ba5..133d02f 100644
@@ -34,7 +34,8 @@
 #define I8K_FAN_OFF		0
 #define I8K_FAN_LOW		1
 #define I8K_FAN_HIGH		2
-#define I8K_FAN_MAX		I8K_FAN_HIGH
+#define I8K_FAN_TURBO		3
+#define I8K_FAN_MAX		I8K_FAN_TURBO
 
 #define I8K_VOL_UP		1
 #define I8K_VOL_DOWN		2
Signature · 1 line
1.9.0
#1 lore raw
Quoted 10 lines · Flavio Leitner

From: Flavio Leitner <[email protected]>

It is possible to increase left fan speed on a
DELL Precision 490n system up to 3.

     value    fan rpm
       1      35460
       2      64740
       3      78510

Guess the speed factor 30 doesn't apply here.

Quoted 34 lines
---
  drivers/char/i8k.c       | 4 ++--
  include/uapi/linux/i8k.h | 3 ++-
  2 files changed, 4 insertions(+), 3 deletions(-)
drivers/char/i8k.c +2 -2
index d915707..99180f0 100644
@@ -519,7 +519,7 @@ static ssize_t i8k_hwmon_show_pwm(struct device *dev,
  	status = i8k_get_fan_status(index);
  	if (status < 0)
  		return -EIO;
-	return sprintf(buf, "%d\n", clamp_val(status * 128, 0, 255));
+	return sprintf(buf, "%d\n", clamp_val(status * 128, 0, 384));
  }
 
  static ssize_t i8k_hwmon_set_pwm(struct device *dev,
@@ -533,7 +533,7 @@ static ssize_t i8k_hwmon_set_pwm(struct device *dev,
  	err = kstrtoul(buf, 10, &val);
  	if (err)
  		return err;
-	val = clamp_val(DIV_ROUND_CLOSEST(val, 128), 0, 2);
+	val = clamp_val(DIV_ROUND_CLOSEST(val, 128), 0, 3);
 
  	mutex_lock(&i8k_mutex);
  	err = i8k_set_fan(index, val);
include/uapi/linux/i8k.h +0 -0
index 1c45ba5..133d02f 100644

include/uapi/linux/i8k.h line 41

Quoted 9 lines
include/uapi/linux/i8k.h +2 -1
@@ -34,7 +34,8 @@
  #define I8K_FAN_OFF		0
  #define I8K_FAN_LOW		1
  #define I8K_FAN_HIGH		2
-#define I8K_FAN_MAX		I8K_FAN_HIGH
+#define I8K_FAN_TURBO		3
+#define I8K_FAN_MAX		I8K_FAN_TURBO
 
  #define I8K_VOL_UP		1
  #define I8K_VOL_DOWN		2

I'll have to test this on older systems to make sure it doesn't cause problems there.

Guenter

#2 lore raw
Quoted 6 lines · Guenter Roeck
Quoted 5 lines · Flavio Leitner

From: Flavio Leitner <[email protected]>

It is possible to increase left fan speed on a
DELL Precision 490n system up to 3.

Quoted 6 lines
Quoted 5 lines
    value    fan rpm
      1      35460
      2      64740
      3      78510

Guess the speed factor 30 doesn't apply here.

Those are actual rpms, not just a multiplied rpm. What I mean is that you can hear the fan spinning up or down and the temperature going up or down accordingly.

But even setting it to 3 is not enough to spin at maximum speed. Anyway, now I can load the system without the FBDIMM going above 75oC.

[...]

Quoted 1 line

I'll have to test this on older systems to make sure it doesn't cause problems there.

Sure, let me know your findings. In meanwhile, I am using the patch here. Thanks,
fbl

#3 lore raw
Quoted 12 lines · Flavio Leitner
Quoted 11 lines · Guenter Roeck
Quoted 10 lines · Flavio Leitner

From: Flavio Leitner <[email protected]>

It is possible to increase left fan speed on a
DELL Precision 490n system up to 3.

     value    fan rpm
       1      35460
       2      64740
       3      78510
Quoted 6 lines
Quoted 1 line

Guess the speed factor 30 doesn't apply here.

Those are actual rpms, not just a multiplied rpm. What I mean is that you can hear the fan spinning up or down and the temperature going up or down accordingly.

I don't think there are any fans running at 78k rpm. The real speed is 78,510 / 30 or 2,617 rpm. You should set the fan_mult module parameter to 1 for your system.

Quoted 4 lines

But even setting it to 3 is not enough to spin at maximum speed. Anyway, now I can load the system without the FBDIMM going above 75oC.

Did you try to set higher values ?

Guenter

#4 lore raw
Quoted 15 lines · Guenter Roeck
Quoted 14 lines · Flavio Leitner
Quoted 12 lines · Guenter Roeck
Quoted 10 lines · Flavio Leitner

From: Flavio Leitner <[email protected]>

It is possible to increase left fan speed on a
DELL Precision 490n system up to 3.

    value    fan rpm
      1      35460
      2      64740
      3      78510

Guess the speed factor 30 doesn't apply here.

Quoted 7 lines
Quoted 4 lines

Those are actual rpms, not just a multiplied rpm. What I mean is that you can hear the fan spinning up or down and the temperature going up or down accordingly.

I don't think there are any fans running at 78k rpm. The real speed is 78,510 / 30 or 2,617 rpm. You should set the fan_mult module parameter to 1 for your system.

Sure. I will do that. I didn't want to change anything else besides the speed level and that is what sensors reports by default.

Quoted 5 lines
Quoted 4 lines

But even setting it to 3 is not enough to spin at maximum speed. Anyway, now I can load the system without the FBDIMM going above 75oC.

Did you try to set higher values ?

Up to 4 which did nothing that I could notice.
No difference regarding to noise or temp or rpm.

fbl

#5 lore raw
In reply to Guenter Roeck
Quoted 6 lines · Guenter Roeck
Quoted 5 lines · Flavio Leitner

From: Flavio Leitner <[email protected]>

It is possible to increase left fan speed on a
DELL Precision 490n system up to 3.

Quoted 6 lines
Quoted 5 lines
    value    fan rpm
      1      35460
      2      64740
      3      78510

Guess the speed factor 30 doesn't apply here.

on my vostro 1720 value 3 is default value and it looks like it's sort of an auto mode.

BTW. the only fan in the system is on the left side, but shows up as RigthFan. Wouldn't it be better to simply number the fans and let the "real" labeling be done via sensors.conf ?

Thomas.

Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]
#6 lore raw
Quoted 12 lines · Thomas Bogendoerfer
Quoted 11 lines · Guenter Roeck
Quoted 10 lines · Flavio Leitner

From: Flavio Leitner <[email protected]>

It is possible to increase left fan speed on a
DELL Precision 490n system up to 3.

    value    fan rpm
      1      35460
      2      64740
      3      78510
Quoted 9 lines
Quoted 1 line

Guess the speed factor 30 doesn't apply here.

on my vostro 1720 value 3 is default value and it looks like it's sort of an auto mode.

BTW. the only fan in the system is on the left side, but shows up as RigthFan. Wouldn't it be better to simply number the fans and let the "real" labeling be done via sensors.conf ?

I agree. Jean, any comments ? Is it ok to drop the fan labels ?

Guenter

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#7 lore raw
Quoted 15 lines · Guenter Roeck
Quoted 14 lines · Thomas Bogendoerfer
Quoted 12 lines · Guenter Roeck
Quoted 10 lines · Flavio Leitner

From: Flavio Leitner <[email protected]>

It is possible to increase left fan speed on a
DELL Precision 490n system up to 3.

    value    fan rpm
      1      35460
      2      64740
      3      78510

Guess the speed factor 30 doesn't apply here.

Quoted 8 lines
Quoted 7 lines

on my vostro 1720 value 3 is default value and it looks like it's sort of an auto mode.

BTW. the only fan in the system is on the left side, but shows up as RigthFan. Wouldn't it be better to simply number the fans and let the "real" labeling be done via sensors.conf ?

I agree. Jean, any comments ? Is it ok to drop the fan labels ?

Yes it is, I had that it mind already, just I don't have the time to do it.

Signature · 7 lines
Jean Delvare
SUSE L3 Support

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#8 lore raw
In reply to Flavio Leitner
Quoted 21 lines · Flavio Leitner

From: Flavio Leitner <[email protected]>

It is possible to increase left fan speed on a
DELL Precision 490n system up to 3.

    value    fan rpm
      1      35460
      2      64740
      3      78510
---
 drivers/char/i8k.c       | 4 ++--
 include/uapi/linux/i8k.h | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)
drivers/char/i8k.c +0 -0
index d915707..99180f0 100644

drivers/char/i8k.c static ssize_t i8k_hwmon_show_pwm(struct device *dev, · line 522

Quoted 5 lines
drivers/char/i8k.c +1 -1
@@ -519,7 +519,7 @@ static ssize_t i8k_hwmon_show_pwm(struct device *dev,
 	status = i8k_get_fan_status(index);
 	if (status < 0)
 		return -EIO;
-	return sprintf(buf, "%d\n", clamp_val(status * 128, 0, 255));
+	return sprintf(buf, "%d\n", clamp_val(status * 128, 0, 384));

pwm value range is limited to (0, 255), so we'll have to find another solution. I think we'll have to define a per-system data structure which holds the fan speed range and the fan multiplier, and attach it to the dmi data. Currently, .driver_data is used directly to override the fan multiplier; it will have to point to a configuration data structure with both fan multiplier and maximum fan speed value. Unless someone has a better idea, of course.

Guenter

#9 lore raw
Quoted 17 lines · Guenter Roeck
Quoted 16 lines · Flavio Leitner

From: Flavio Leitner <[email protected]>

It is possible to increase left fan speed on a
DELL Precision 490n system up to 3.

    value    fan rpm
      1      35460
      2      64740
      3      78510
---
 drivers/char/i8k.c       | 4 ++--
 include/uapi/linux/i8k.h | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)
Quoted 13 lines

drivers/char/i8k.c static ssize_t i8k_hwmon_show_pwm(struct device *dev, · line 522

Quoted 10 lines
drivers/char/i8k.c +1 -1
index d915707..99180f0 100644
@@ -519,7 +519,7 @@ static ssize_t i8k_hwmon_show_pwm(struct device *dev,
 	status = i8k_get_fan_status(index);
 	if (status < 0)
 		return -EIO;
-	return sprintf(buf, "%d\n", clamp_val(status * 128, 0, 255));
+	return sprintf(buf, "%d\n", clamp_val(status * 128, 0, 384));

pwm value range is limited to (0, 255), so we'll have to find another solution.

You mean in the hw? Because the code today just multiply by 128 so you have 0, 128 and 256 as possible pwm values. See below.

Quoted 6 lines

I think we'll have to define a per-system data structure which holds the fan speed range and the fan multiplier, and attach it to the dmi data. Currently, .driver_data is used directly to override the fan multiplier; it will have to point to a configuration data structure with both fan multiplier and maximum fan speed value. Unless someone has a better idea, of course.

Sounds good to me. It could provide a generic one that works as today in case there is no specific per-system data structure.

It could also include the status multiplier so that for systems with levels off, minimum and maximum then use x128 and systems with more states can use another multiplier.

I volunteer to test on precision 490n and on latitude D520.

fbl

#10 lore raw
Quoted 32 lines · Flavio Leitner
Quoted 17 lines · Guenter Roeck
Quoted 16 lines · Flavio Leitner

From: Flavio Leitner <[email protected]>

It is possible to increase left fan speed on a
DELL Precision 490n system up to 3.

    value    fan rpm
      1      35460
      2      64740
      3      78510
---
 drivers/char/i8k.c       | 4 ++--
 include/uapi/linux/i8k.h | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)
Quoted 13 lines

drivers/char/i8k.c static ssize_t i8k_hwmon_show_pwm(struct device *dev, · line 522

Quoted 10 lines
drivers/char/i8k.c +1 -1
index d915707..99180f0 100644
@@ -519,7 +519,7 @@ static ssize_t i8k_hwmon_show_pwm(struct device *dev,
 	status = i8k_get_fan_status(index);
 	if (status < 0)
 		return -EIO;
-	return sprintf(buf, "%d\n", clamp_val(status * 128, 0, 255));
+	return sprintf(buf, "%d\n", clamp_val(status * 128, 0, 384));

pwm value range is limited to (0, 255), so we'll have to find another solution.

Quoted 3 lines

You mean in the hw? Because the code today just multiply by 128 so you have 0, 128 and 256 as possible pwm values. See below.

No, in the hwmon sysfs ABI.

pwm[1-*] Pulse width modulation fan control.
Integer value in the range 0 to 255 RW
255 is max or 100%.

Quoted 7 lines
Quoted 6 lines

I think we'll have to define a per-system data structure which holds the fan speed range and the fan multiplier, and attach it to the dmi data. Currently, .driver_data is used directly to override the fan multiplier; it will have to point to a configuration data structure with both fan multiplier and maximum fan speed value. Unless someone has a better idea, of course.

Quoted 7 lines

Sounds good to me. It could provide a generic one that works as today in case there is no specific per-system data structure.

It could also include the status multiplier so that for systems with levels off, minimum and maximum then use x128 and systems with more states can use another multiplier.

More likely the maximum accepted value to write into the hw, but pretty much along that line, correct.

Quoted 2 lines

I volunteer to test on precision 490n and on latitude D520.

Can you send me dmi information for those systems ? The output of "grep . /sys/class/dmi/id/*" should do.

Guenter

#11 lore raw
Quoted 8 lines · Guenter Roeck
Quoted 5 lines · Flavio Leitner
Quoted 2 lines · Guenter Roeck
Quoted 1 line · Flavio Leitner

From: Flavio Leitner <[email protected]>

I volunteer to test on precision 490n and on latitude D520.

Can you send me dmi information for those systems ? The output of "grep . /sys/class/dmi/id/*" should do.

490n:

# grep . /sys/class/dmi/id/*
/sys/class/dmi/id/bios_date:05/24/2007
/sys/class/dmi/id/bios_vendor:Dell Inc.                
/sys/class/dmi/id/bios_version:A05
/sys/class/dmi/id/board_name:0GU083
/sys/class/dmi/id/board_serial:..CN1374075H003N.
/sys/class/dmi/id/board_vendor:Dell Inc.          
/sys/class/dmi/id/board_version:A00
/sys/class/dmi/id/chassis_asset_tag:        
/sys/class/dmi/id/chassis_serial:69FS6D1
/sys/class/dmi/id/chassis_type:7
/sys/class/dmi/id/chassis_vendor:Dell Inc.                
/sys/class/dmi/id/modalias:dmi:bvnDellInc.:bvrA05:bd05/24/2007:svnDellInc.:pnPrecisionWorkStation490:pvr:rvnDellInc.:rn0GU083:rvrA00:cvnDellInc.:ct7:cvr:
grep: /sys/class/dmi/id/power: Is a directory
/sys/class/dmi/id/product_name:Precision WorkStation 490    
/sys/class/dmi/id/product_serial:69FS6D1
/sys/class/dmi/id/product_uuid:44454C4C-3900-1046-8053-B6C04F364431
grep: /sys/class/dmi/id/subsystem: Is a directory
/sys/class/dmi/id/sys_vendor:Dell Inc.                
/sys/class/dmi/id/uevent:MODALIAS=dmi:bvnDellInc.:bvrA05:bd05/24/2007:svnDellInc.:pnPrecisionWorkStation490:pvr:rvnDellInc.:rn0GU083:rvrA00:cvnDellInc.:ct7:cvr:

d520:
# grep . /sys/class/dmi/id/*
/sys/class/dmi/id/bios_date:10/13/2006
/sys/class/dmi/id/bios_vendor:Dell Inc.
/sys/class/dmi/id/bios_version:A02
/sys/class/dmi/id/board_asset_tag:
/sys/class/dmi/id/board_name:0NF744
/sys/class/dmi/id/board_serial:.JYCM0C1.CN4864368I4174.
/sys/class/dmi/id/board_vendor:Dell Inc.
/sys/class/dmi/id/board_version:
/sys/class/dmi/id/chassis_serial:JYCM0C1
/sys/class/dmi/id/chassis_type:8
/sys/class/dmi/id/chassis_vendor:Dell Inc. /sys/class/dmi/id/modalias:dmi:bvnDellInc.:bvrA02:bd10/13/2006:svnDellInc.:pnLatitudeD520:pvr:rvnDellInc.:rn0NF744:rvr:cvnDellInc.:ct8:cvr:
grep: /sys/class/dmi/id/power: Is a directory
/sys/class/dmi/id/product_name:Latitude D520
/sys/class/dmi/id/product_serial:JYCM0C1
/sys/class/dmi/id/product_uuid:44454C4C-5900-1043-804D-CAC04F304331
grep: /sys/class/dmi/id/subsystem: Is a directory
/sys/class/dmi/id/sys_vendor:Dell Inc. /sys/class/dmi/id/uevent:MODALIAS=dmi:bvnDellInc.:bvrA02:bd10/13/2006:svnDellInc.:pnLatitudeD520:pvr:rvnDellInc.:rn0NF744:rvr:cvnDellInc.:ct8:cvr:

fbl

#12 lore raw
Quoted 5 lines · Flavio Leitner
Quoted 4 lines · Guenter Roeck
Quoted 3 lines · Flavio Leitner
Quoted 2 lines · Guenter Roeck
Quoted 1 line · Flavio Leitner

From: Flavio Leitner <[email protected]>

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

I volunteer to test on precision 490n and on latitude D520.

Can you send me dmi information for those systems ? The output of "grep . /sys/class/dmi/id/*" should do.

/sys/class/dmi/id/chassis_vendor:Dell Inc.
/sys/class/dmi/id/product_name:Latitude D520

What is the maximum speed value for the D520 ?

Thanks,
Guenter

#13 lore raw
Quoted 8 lines · Guenter Roeck
Quoted 7 lines · Flavio Leitner
Quoted 6 lines · Guenter Roeck
Quoted 5 lines · Flavio Leitner
Quoted 2 lines · Guenter Roeck
Quoted 1 line · Flavio Leitner

From: Flavio Leitner <[email protected]>

I volunteer to test on precision 490n and on latitude D520.

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

Can you send me dmi information for those systems ? The output of "grep . /sys/class/dmi/id/*" should do.

/sys/class/dmi/id/chassis_vendor:Dell Inc.
/sys/class/dmi/id/product_name:Latitude D520

What is the maximum speed value for the D520 ?

D520, with no factor change:

   i8kfan     i8kctl
*  -   0      1.0 A02 JYCM0C1 31 -1 0 27660 0 0 -1
   -   0      1.0 A02 JYCM0C1 28 -1 0 27660 0 0 -1
   -   1      1.0 A02 JYCM0C1 29 -1 1 27660 97050 0 -1
   -   2      1.0 A02 JYCM0C1 28 -1 2 27660 153660 0 -1
   -   3      1.0 A02 JYCM0C1 28 -1 2 27660 155280 0 -1
   0   -      1.0 A02 JYCM0C1 28 -1 0 27660 0 0 -1
   1   -      1.0 A02 JYCM0C1 28 -1 0 27660 0 0 -1
   2   -      1.0 A02 JYCM0C1 29 -1 0 27660 0 0 -1
   3   -      1.0 A02 JYCM0C1 29 -1 0 27660 0 0 -1

[*] default after boot.

The level 3 doesn't change anything. Actually i8kfan reports -1 then.

fbl