public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Dell Latitude E6440 & i8k
@ 2014-05-16 18:37 Pali Rohár
  2014-05-16 19:11 ` Jean Delvare
  0 siblings, 1 reply; 11+ messages in thread
From: Pali Rohár @ 2014-05-16 18:37 UTC (permalink / raw)
  To: Guenter Roeck, Jean Delvare; +Cc: linux-kernel

[-- Attachment #1: Type: Text/Plain, Size: 710 bytes --]

Hello,

on Dell Latitude E6440 driver i8k reporting total nonsense values

$ sensors
i8k-virtual-0
Adapter: Virtual device
Right Fan:   93450 RPM
CPU:          +57.0°C  
temp2:        +57.0°C  
temp3:        +40.0°C  
temp4:       +127.0°C

Right Fan and temp4 are for sure incorrect.

Value temp4 is always 127 and is never changing, but value for 
Right Fan is increasing when fan is more noisy. So it looks like 
value for Right Fan is not correctly normalized or multiplier is 
incorrect.

And name "Right" is incorrect too. Fan is on left side of this 
notebook, not right as reported by driver.

It is possible to fix these problems?

-- 
Pali Rohár
pali.rohar@gmail.com

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Dell Latitude E6440 & i8k
  2014-05-16 18:37 Pali Rohár
@ 2014-05-16 19:11 ` Jean Delvare
  2014-05-16 19:23   ` Pali Rohár
  2014-05-17 15:25   ` Guenter Roeck
  0 siblings, 2 replies; 11+ messages in thread
From: Jean Delvare @ 2014-05-16 19:11 UTC (permalink / raw)
  To: Pali Rohár; +Cc: Guenter Roeck, linux-kernel

Hi Pali,

On Fri, 16 May 2014 20:37:41 +0200, Pali Rohár wrote:
> Hello,
> 
> on Dell Latitude E6440 driver i8k reporting total nonsense values

That's kind of excessive wording, the output isn't that bad.

> $ sensors
> i8k-virtual-0
> Adapter: Virtual device
> Right Fan:   93450 RPM
> CPU:          +57.0°C  
> temp2:        +57.0°C  
> temp3:        +40.0°C  
> temp4:       +127.0°C
> 
> Right Fan and temp4 are for sure incorrect.

Driver is reverse-engineered so this is best effort and some tweaking
may be needed.

> Value temp4 is always 127 and is never changing, but value for 
> Right Fan is increasing when fan is more noisy. So it looks like 
> value for Right Fan is not correctly normalized or multiplier is 
> incorrect.
> 
> And name "Right" is incorrect too. Fan is on left side of this 
> notebook, not right as reported by driver.
> 
> It is possible to fix these problems?

Load the i8k driver with fan_mult=1.

Add the following to /etc/sensors.d/i8k.conf:

chip "i8k-virtual-0"

   label fan2 "Left Fan"
   ignore temp4

-- 
Jean Delvare
SUSE L3 Support

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Dell Latitude E6440 & i8k
  2014-05-16 19:11 ` Jean Delvare
@ 2014-05-16 19:23   ` Pali Rohár
  2014-05-17  9:44     ` Jean Delvare
  2014-05-17 15:34     ` Guenter Roeck
  2014-05-17 15:25   ` Guenter Roeck
  1 sibling, 2 replies; 11+ messages in thread
From: Pali Rohár @ 2014-05-16 19:23 UTC (permalink / raw)
  To: Jean Delvare; +Cc: Guenter Roeck, linux-kernel

[-- Attachment #1: Type: Text/Plain, Size: 2347 bytes --]

On Friday 16 May 2014 21:11:17 Jean Delvare wrote:
> Hi Pali,
> 
> On Fri, 16 May 2014 20:37:41 +0200, Pali Rohár wrote:
> > Hello,
> > 
> > on Dell Latitude E6440 driver i8k reporting total nonsense
> > values
> 
> That's kind of excessive wording, the output isn't that bad.
> 

I mean fan RPM & temp4. Those are for sure incorrect.

> > $ sensors
> > i8k-virtual-0
> > Adapter: Virtual device
> > Right Fan:   93450 RPM
> > CPU:          +57.0°C
> > temp2:        +57.0°C
> > temp3:        +40.0°C
> > temp4:       +127.0°C
> > 
> > Right Fan and temp4 are for sure incorrect.
> 
> Driver is reverse-engineered so this is best effort and some
> tweaking may be needed.
> 

Ok, if driver is developed without any documentation, then it 
make sense that not working correctly on new machines...

So is not there any documentation? I think that Dell released 
some SMM/BIOS code... But I'm not sure about it.

> > Value temp4 is always 127 and is never changing, but value
> > for Right Fan is increasing when fan is more noisy. So it
> > looks like value for Right Fan is not correctly normalized
> > or multiplier is incorrect.
> > 
> > And name "Right" is incorrect too. Fan is on left side of
> > this notebook, not right as reported by driver.
> > 
> > It is possible to fix these problems?
> 
> Load the i8k driver with fan_mult=1.
> 

Looks like now it reports more plausible value for fan. When fan 
is at low it reporting between 3000 - 3100 RPM.

> Add the following to /etc/sensors.d/i8k.conf:
> 
> chip "i8k-virtual-0"
> 
>    label fan2 "Left Fan"
>    ignore temp4

And this fixing output from sensors program.

$ sensors
i8k-virtual-0
Adapter: Virtual device
Left Fan:    3088 RPM
CPU:          +54.0°C  
temp2:        +57.0°C  
temp3:        +40.0°C

But Right Fan name is still present in kernel sysfs:

$ grep "" /sys/class/hwmon/hwmon1/*
/sys/class/hwmon/hwmon1/fan2_input:3091
/sys/class/hwmon/hwmon1/fan2_label:Right Fan
/sys/class/hwmon/hwmon1/name:i8k
/sys/class/hwmon/hwmon1/pwm2:128
/sys/class/hwmon/hwmon1/temp1_input:56000
/sys/class/hwmon/hwmon1/temp1_label:CPU
/sys/class/hwmon/hwmon1/temp2_input:57000
/sys/class/hwmon/hwmon1/temp3_input:40000
/sys/class/hwmon/hwmon1/temp4_input:127000

-- 
Pali Rohár
pali.rohar@gmail.com

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Dell Latitude E6440 & i8k
  2014-05-16 19:23   ` Pali Rohár
@ 2014-05-17  9:44     ` Jean Delvare
  2014-05-17 15:34     ` Guenter Roeck
  1 sibling, 0 replies; 11+ messages in thread
From: Jean Delvare @ 2014-05-17  9:44 UTC (permalink / raw)
  To: Pali Rohár; +Cc: Guenter Roeck, linux-kernel

On Fri, 16 May 2014 21:23:02 +0200, Pali Rohár wrote:
> So is not there any documentation? I think that Dell released 
> some SMM/BIOS code... But I'm not sure about it.

I don't know either. But even with some SMM/BIOS code, it doesn't tell
you which sensors are present on which machines, nor what they
correspond to, nor what scaling factors need to be applied.

> > (...)
> > Load the i8k driver with fan_mult=1.
> 
> Looks like now it reports more plausible value for fan. When fan 
> is at low it reporting between 3000 - 3100 RPM.
> 
> > Add the following to /etc/sensors.d/i8k.conf:
> > 
> > chip "i8k-virtual-0"
> > 
> >    label fan2 "Left Fan"
> >    ignore temp4
> 
> And this fixing output from sensors program.
> 
> $ sensors
> i8k-virtual-0
> Adapter: Virtual device
> Left Fan:    3088 RPM
> CPU:          +54.0°C  
> temp2:        +57.0°C  
> temp3:        +40.0°C
> 
> But Right Fan name is still present in kernel sysfs:
> 
> $ grep "" /sys/class/hwmon/hwmon1/*
> /sys/class/hwmon/hwmon1/fan2_input:3091
> /sys/class/hwmon/hwmon1/fan2_label:Right Fan
> /sys/class/hwmon/hwmon1/name:i8k
> /sys/class/hwmon/hwmon1/pwm2:128
> /sys/class/hwmon/hwmon1/temp1_input:56000
> /sys/class/hwmon/hwmon1/temp1_label:CPU
> /sys/class/hwmon/hwmon1/temp2_input:57000
> /sys/class/hwmon/hwmon1/temp3_input:40000
> /sys/class/hwmon/hwmon1/temp4_input:127000

The drivers sets default labels in sysfs, the libsensors configuration
files lets you override these defaults with your own labels.

-- 
Jean Delvare
SUSE L3 Support

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Dell Latitude E6440 & i8k
  2014-05-16 19:11 ` Jean Delvare
  2014-05-16 19:23   ` Pali Rohár
@ 2014-05-17 15:25   ` Guenter Roeck
  2014-05-17 21:09     ` Jean Delvare
  1 sibling, 1 reply; 11+ messages in thread
From: Guenter Roeck @ 2014-05-17 15:25 UTC (permalink / raw)
  To: Jean Delvare, Pali Rohár; +Cc: linux-kernel

On 05/16/2014 12:11 PM, Jean Delvare wrote:
> Hi Pali,
>
> On Fri, 16 May 2014 20:37:41 +0200, Pali Rohár wrote:
>> Hello,
>>
>> on Dell Latitude E6440 driver i8k reporting total nonsense values
>
> That's kind of excessive wording, the output isn't that bad.
>
>> $ sensors
>> i8k-virtual-0
>> Adapter: Virtual device
>> Right Fan:   93450 RPM
>> CPU:          +57.0°C
>> temp2:        +57.0°C
>> temp3:        +40.0°C
>> temp4:       +127.0°C
>>
>> Right Fan and temp4 are for sure incorrect.
>
> Driver is reverse-engineered so this is best effort and some tweaking
> may be needed.
>
>> Value temp4 is always 127 and is never changing, but value for
>> Right Fan is increasing when fan is more noisy. So it looks like
>> value for Right Fan is not correctly normalized or multiplier is
>> incorrect.
>>
>> And name "Right" is incorrect too. Fan is on left side of this
>> notebook, not right as reported by driver.
>>
>> It is possible to fix these problems?
>
> Load the i8k driver with fan_mult=1.
>

Would it make sense to change the default multiplier to 1 ?
Lots of people have problems with it, and trying to figure out
affected machines one by one would be an all but impossible task.

Guenter



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Dell Latitude E6440 & i8k
  2014-05-16 19:23   ` Pali Rohár
  2014-05-17  9:44     ` Jean Delvare
@ 2014-05-17 15:34     ` Guenter Roeck
  2014-05-17 23:01       ` Pali Rohár
  1 sibling, 1 reply; 11+ messages in thread
From: Guenter Roeck @ 2014-05-17 15:34 UTC (permalink / raw)
  To: Pali Rohár, Jean Delvare; +Cc: linux-kernel

On 05/16/2014 12:23 PM, Pali Rohár wrote:
> On Friday 16 May 2014 21:11:17 Jean Delvare wrote:
>> Hi Pali,
>>
>> On Fri, 16 May 2014 20:37:41 +0200, Pali Rohár wrote:
>>> Hello,
>>>
>>> on Dell Latitude E6440 driver i8k reporting total nonsense
>>> values
>>
>> That's kind of excessive wording, the output isn't that bad.
>>
>
> I mean fan RPM & temp4. Those are for sure incorrect.
>
>>> $ sensors
>>> i8k-virtual-0
>>> Adapter: Virtual device
>>> Right Fan:   93450 RPM
>>> CPU:          +57.0°C
>>> temp2:        +57.0°C
>>> temp3:        +40.0°C
>>> temp4:       +127.0°C
>>>
>>> Right Fan and temp4 are for sure incorrect.
>>
>> Driver is reverse-engineered so this is best effort and some
>> tweaking may be needed.
>>
>
> Ok, if driver is developed without any documentation, then it
> make sense that not working correctly on new machines...
>
> So is not there any documentation? I think that Dell released
> some SMM/BIOS code... But I'm not sure about it.
>

If you find it, please let us know.

Guenter



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Dell Latitude E6440 & i8k
  2014-05-17 15:25   ` Guenter Roeck
@ 2014-05-17 21:09     ` Jean Delvare
  2014-05-17 22:18       ` Guenter Roeck
  0 siblings, 1 reply; 11+ messages in thread
From: Jean Delvare @ 2014-05-17 21:09 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: Pali Rohár, linux-kernel

On Sat, 17 May 2014 08:25:38 -0700, Guenter Roeck wrote:
> On 05/16/2014 12:11 PM, Jean Delvare wrote:
> > Load the i8k driver with fan_mult=1.
> 
> Would it make sense to change the default multiplier to 1 ?
> Lots of people have problems with it, and trying to figure out
> affected machines one by one would be an all but impossible task.

That would cause a regression on many (presumably older) machines. I
doubt this is acceptable. One option would be to use the ACPI year to
change the default, if indeed all new machines need fan_mult=1. I don't
know if this is the case.

One this I had in mind was auto-detecting the scaling factor. AFAIK
only 30 and 1 are possible values, so any value above ~300 would imply
scaling factor of 1 (30 would make it > 9000 RPM which is unrealistic.)
But I don't know if we can actually do that, as such a simple heuristic
could easily fail is the fan is stopped (30 * 0 == 1 * 0) or if the
returned raw speed is temporarily unreliable for whatever reason.

I have to admit that working on a reverse engineered driver for
hardware I don't even have isn't quite at the top of my to-do list.

-- 
Jean Delvare
SUSE L3 Support

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Dell Latitude E6440 & i8k
  2014-05-17 21:09     ` Jean Delvare
@ 2014-05-17 22:18       ` Guenter Roeck
  0 siblings, 0 replies; 11+ messages in thread
From: Guenter Roeck @ 2014-05-17 22:18 UTC (permalink / raw)
  To: Jean Delvare; +Cc: Pali Rohár, linux-kernel

On 05/17/2014 02:09 PM, Jean Delvare wrote:
> On Sat, 17 May 2014 08:25:38 -0700, Guenter Roeck wrote:
>> On 05/16/2014 12:11 PM, Jean Delvare wrote:
>>> Load the i8k driver with fan_mult=1.
>>
>> Would it make sense to change the default multiplier to 1 ?
>> Lots of people have problems with it, and trying to figure out
>> affected machines one by one would be an all but impossible task.
>
> That would cause a regression on many (presumably older) machines. I
> doubt this is acceptable. One option would be to use the ACPI year to
> change the default, if indeed all new machines need fan_mult=1. I don't
> know if this is the case.
>
> One this I had in mind was auto-detecting the scaling factor. AFAIK
> only 30 and 1 are possible values, so any value above ~300 would imply
> scaling factor of 1 (30 would make it > 9000 RPM which is unrealistic.)
> But I don't know if we can actually do that, as such a simple heuristic
> could easily fail is the fan is stopped (30 * 0 == 1 * 0) or if the
> returned raw speed is temporarily unreliable for whatever reason.
>
Sounds like an idea. We could make the cutoff higher, such as 500 or
even 1000. I am not much concerned about 0 rpm - the code could simply check
the returned rpm and adjust the scaling factor to 1 if the reading is too
high. Since 30*0 is still 0, there is no problem if the fan is stopped.

> I have to admit that working on a reverse engineered driver for
> hardware I don't even have isn't quite at the top of my to-do list.
>

;-). We have several of those systems, so there is at least some interest
on my side. If I have time, I'll play around with it. The driver does need
major cleanup, though, so that may take a while.

Guenter


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Dell Latitude E6440 & i8k
@ 2014-05-17 22:54 Pali Rohár
  0 siblings, 0 replies; 11+ messages in thread
From: Pali Rohár @ 2014-05-17 22:54 UTC (permalink / raw)
  To: Guenter Roeck, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1688 bytes --]

On Friday 16 May 2014 21:11:17 you wrote:
> Hi Pali,
> 
> On Fri, 16 May 2014 20:37:41 +0200, Pali Rohár wrote:
> > Hello,
> > 
> > on Dell Latitude E6440 driver i8k reporting total nonsense
> > values
> 
> That's kind of excessive wording, the output isn't that bad.
> 
> > $ sensors
> > i8k-virtual-0
> > Adapter: Virtual device
> > Right Fan:   93450 RPM
> > CPU:          +57.0°C
> > temp2:        +57.0°C
> > temp3:        +40.0°C
> > temp4:       +127.0°C
> > 
> > Right Fan and temp4 are for sure incorrect.
> 
> Driver is reverse-engineered so this is best effort and some
> tweaking may be needed.
> 
> > Value temp4 is always 127 and is never changing, but value
> > for Right Fan is increasing when fan is more noisy. So it
> > looks like value for Right Fan is not correctly normalized
> > or multiplier is incorrect.
> > 
> > And name "Right" is incorrect too. Fan is on left side of
> > this notebook, not right as reported by driver.
> > 
> > It is possible to fix these problems?
> 
> Load the i8k driver with fan_mult=1.
> 
> Add the following to /etc/sensors.d/i8k.conf:
> 
> chip "i8k-virtual-0"
> 
>    label fan2 "Left Fan"
>    ignore temp4

I have some new info about temp4.

When I read value from temp4 for first time it reports (possible) 
correct value:

$ cat /sys/class/hwmon/hwmon2/temp4_input
49000

But every next call it returns 127000 which is incorrect.

So this looks like bug in BIOS or incorrect usage of SMM call...

Do you know if there is any way to extract BIOS SMM code? Or it 
is something which is not possible to do from OS/kernel side?

-- 
Pali Rohár
pali.rohar@gmail.com

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Dell Latitude E6440 & i8k
  2014-05-17 15:34     ` Guenter Roeck
@ 2014-05-17 23:01       ` Pali Rohár
  2014-05-18  8:23         ` Jean Delvare
  0 siblings, 1 reply; 11+ messages in thread
From: Pali Rohár @ 2014-05-17 23:01 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: Jean Delvare, linux-kernel

[-- Attachment #1: Type: Text/Plain, Size: 1693 bytes --]

On Saturday 17 May 2014 17:34:34 Guenter Roeck wrote:
> On 05/16/2014 12:23 PM, Pali Rohár wrote:
> > On Friday 16 May 2014 21:11:17 Jean Delvare wrote:
> >> Hi Pali,
> >> 
> >> On Fri, 16 May 2014 20:37:41 +0200, Pali Rohár wrote:
> >>> Hello,
> >>> 
> >>> on Dell Latitude E6440 driver i8k reporting total nonsense
> >>> values
> >> 
> >> That's kind of excessive wording, the output isn't that
> >> bad.
> > 
> > I mean fan RPM & temp4. Those are for sure incorrect.
> > 
> >>> $ sensors
> >>> i8k-virtual-0
> >>> Adapter: Virtual device
> >>> Right Fan:   93450 RPM
> >>> CPU:          +57.0°C
> >>> temp2:        +57.0°C
> >>> temp3:        +40.0°C
> >>> temp4:       +127.0°C
> >>> 
> >>> Right Fan and temp4 are for sure incorrect.
> >> 
> >> Driver is reverse-engineered so this is best effort and
> >> some tweaking may be needed.
> > 
> > Ok, if driver is developed without any documentation, then
> > it make sense that not working correctly on new machines...
> > 
> > So is not there any documentation? I think that Dell
> > released some SMM/BIOS code... But I'm not sure about it.
> 
> If you find it, please let us know.
> 
> Guenter

Now I remembered... Dell has released info about their smbios
extensions with example programs at:

https://linux.dell.com/libsmbios/main/
https://linux.dell.com/cgi-bin/gitweb/gitweb.cgi?p=libsmbios.git;a=summary

But there is nothing about fan control or temperature.


Also I found smbios specification:

http://www.dmtf.org/standards/smbios

There is something written about fan and temp, but no idea if it
is usefull for something...

-- 
Pali Rohár
pali.rohar@gmail.com

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Dell Latitude E6440 & i8k
  2014-05-17 23:01       ` Pali Rohár
@ 2014-05-18  8:23         ` Jean Delvare
  0 siblings, 0 replies; 11+ messages in thread
From: Jean Delvare @ 2014-05-18  8:23 UTC (permalink / raw)
  To: Pali Rohár; +Cc: Guenter Roeck, linux-kernel

On Sun, 18 May 2014 01:01:09 +0200, Pali Rohár wrote:
> Now I remembered... Dell has released info about their smbios
> extensions with example programs at:
> 
> https://linux.dell.com/libsmbios/main/
> https://linux.dell.com/cgi-bin/gitweb/gitweb.cgi?p=libsmbios.git;a=summary
> 
> But there is nothing about fan control or temperature.
> 
> 
> Also I found smbios specification:
> 
> http://www.dmtf.org/standards/smbios
> 
> There is something written about fan and temp, but no idea if it
> is usefull for something...

No, it's not useful to solve your problem.

-- 
Jean Delvare
SUSE L3 Support

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-05-18  8:23 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-17 22:54 Dell Latitude E6440 & i8k Pali Rohár
  -- strict thread matches above, loose matches on Subject: below --
2014-05-16 18:37 Pali Rohár
2014-05-16 19:11 ` Jean Delvare
2014-05-16 19:23   ` Pali Rohár
2014-05-17  9:44     ` Jean Delvare
2014-05-17 15:34     ` Guenter Roeck
2014-05-17 23:01       ` Pali Rohár
2014-05-18  8:23         ` Jean Delvare
2014-05-17 15:25   ` Guenter Roeck
2014-05-17 21:09     ` Jean Delvare
2014-05-17 22:18       ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox