From mboxrd@z Thu Jan 1 00:00:00 1970 From: Harald Judt Date: Mon, 29 Jul 2013 02:47:06 +0000 Subject: Re: [lm-sensors] w83627ehf: Wrong values reported after resuming from suspend/hibernation Message-Id: <51F5D7AA.7080304@gmx.at> MIME-Version: 1 Content-Type: multipart/mixed; boundary="------------060607020303090603070001" List-Id: References: <50856051.5070803@gmx.at> In-Reply-To: <50856051.5070803@gmx.at> To: lm-sensors@vger.kernel.org This is a multi-part message in MIME format. --------------060607020303090603070001 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Am 29.07.2013 04:24, schrieb Harald Judt: > Am 29.07.2013 00:28, schrieb Guenter Roeck: >> On 07/28/2013 01:43 PM, Harald Judt wrote: >>> Hi, >>> >>> Am 22.10.2012 23:40, schrieb Guenter Roeck: >>>> On Mon, Oct 22, 2012 at 05:03:45PM +0200, Harald Judt wrote: >>>>> Hi, >>>>> >>>>> After resuming from suspend or hibernation, the Vbat value is >>>>> reported to be 0.0. Before that, it reported the correct value. >>>>> Min/max values are wrong too. >>>>> >>>>> Linux-3.6.2, ASRock Z77 Extreme4 BIOS v1.80. >>>>> >>>>> Before suspend: >>>>> nct6776-isa-0290 >>>>> Adapter: ISA adapter >>>>> Vcore: +0.97 V (min =3D +0.00 V, max =3D +1.74 V) >>>>> in1: +1.84 V (min =3D +0.00 V, max =3D +0.00 V) ALARM >>>>> AVCC: +3.34 V (min =3D +2.98 V, max =3D +3.63 V) >>>>> +3.3V: +3.34 V (min =3D +2.98 V, max =3D +3.63 V) >>>>> in4: +1.04 V (min =3D +0.00 V, max =3D +0.00 V) ALARM >>>>> in5: +1.68 V (min =3D +0.00 V, max =3D +0.00 V) ALARM >>>>> 3VSB: +3.47 V (min =3D +2.98 V, max =3D +3.63 V) >>>>> Vbat: +3.31 V (min =3D +2.70 V, max =3D +3.63 V) >>>>> fan1: 0 RPM (min =3D 0 RPM) ALARM >>>>> fan2: 1289 RPM (min =3D 0 RPM) ALARM >>>>> fan3: 724 RPM (min =3D 0 RPM) ALARM >>>>> fan4: 661 RPM (min =3D 0 RPM) ALARM >>>>> fan5: 1076 RPM (min =3D 0 RPM) ALARM >>>>> SYSTIN: +37.0=B0C (high =3D +0.0=B0C, hyst =3D +0.0=B0C) A= LARM >>>>> sensor =3D thermistor >>>>> CPUTIN: +28.0=B0C (high =3D +80.0=B0C, hyst =3D +75.0=B0C) s= ensor =3D >>>>> thermistor >>>>> AUXTIN: +33.0=B0C (high =3D +80.0=B0C, hyst =3D +75.0=B0C) s= ensor =3D >>>>> thermistor >>>>> PECI Agent 0: +32.0=B0C >>>>> cpu0_vid: +0.000 V >>>>> intrusion0: ALARM >>>>> intrusion1: ALARM >>>>> >>>>> After resuming: >>>>> nct6776-isa-0290 >>>>> Adapter: ISA adapter >>>>> Vcore: +0.97 V (min =3D +0.00 V, max =3D +1.74 V) >>>>> in1: +1.84 V (min =3D +0.00 V, max =3D +0.00 V) ALARM >>>>> AVCC: +3.34 V (min =3D +0.00 V, max =3D +0.00 V) ALARM >>>>> +3.3V: +3.34 V (min =3D +0.00 V, max =3D +0.00 V) ALARM >>>>> in4: +1.03 V (min =3D +0.00 V, max =3D +0.00 V) ALARM >>>>> in5: +1.68 V (min =3D +0.00 V, max =3D +0.00 V) ALARM >>>>> 3VSB: +3.47 V (min =3D +0.00 V, max =3D +0.00 V) ALARM >>>>> Vbat: +0.00 V (min =3D +0.00 V, max =3D +0.00 V) >>>>> fan1: 0 RPM (min =3D 0 RPM) ALARM >>>>> fan2: 1271 RPM (min =3D 0 RPM) ALARM >>>>> fan3: 734 RPM (min =3D 0 RPM) ALARM >>>>> fan4: 673 RPM (min =3D 0 RPM) ALARM >>>>> fan5: 1093 RPM (min =3D 0 RPM) ALARM >>>>> SYSTIN: +36.0=B0C (high =3D +0.0=B0C, hyst =3D +0.0=B0C) A= LARM >>>>> sensor =3D thermistor >>>>> CPUTIN: +26.5=B0C (high =3D +80.0=B0C, hyst =3D +75.0=B0C) s= ensor =3D >>>>> thermistor >>>>> AUXTIN: +33.0=B0C (high =3D +80.0=B0C, hyst =3D +75.0=B0C) s= ensor =3D >>>>> thermistor >>>>> PECI Agent 0: +30.0=B0C >>>>> cpu0_vid: +0.000 V >>>>> intrusion0: ALARM >>>>> intrusion1: ALARM >>>>> >>>>> Reloading the module helps. Of course, a fresh boot too ;-) >>>>> >>>> The driver doesn't implement suspend/resume support, so it is not very >>>> surprising that the limits get lost - and it looks like vbat monitoring >>>> is disabled by default, so that gets lost as well. >>>> >>>> Someone would have to submit a patch to add suspend/resume support to >>>> the driver ... any takers out there ? >>>> >>>> Thanks, >>>> Guenter >>> >>> A while ago, support for suspend/resume has been added and this issue >>> was fixed and values are now preserved during suspend/resume. >>> >>> 3300fb4f88688029fff8dfb9ec0734f6e4cba3e7 hwmon: (w83627ehf) Force >>> initial bank selection >>> 7e630bb55a52cfaa35011c0ebc2efc96f13e5135 hwmon: (w83627ehf) Add support >>> for suspend >>> >>> But now with kernel 3.11-rc2, I noticed it only works in case of >>> suspend/resume, not hibernate/resume. I'm not sure this worked properly >>> with kernel 3.6.2 with the patch applied, though I think it did, but I >>> don't have that version available for verification at the moment. Of >>> course, I could test if necessary. Perhaps there is more to do for >>> hibernate/resume than for suspend/resume? >>> >> It should not require anything special, and at first glance the code >> seems to be ok. Maybe hibernate (now) results in some secondary changes >> which we don't take into account. >> >> It would be great if you can download >> http://roeck-us.net/linux/bin/superiotool >> and run "sudo ./superiotool -d -e" before hibernation and after resume >> and send me the results. >> >> Thanks, >> Guenter >=20 > Ok, I've switched to the nct6775 driver, didn't know there was a new one > ;-) Unfortunately, the same behaviour. I have installed superiotool-6637 > from the gentoo repository, I hope that does the job too. I compiled > nct6775, did modprobe -r w83627ehf, modprobe nct6775. > Sensors output: >=20 > Before hibernation: > ------------------------------------------------------------------- > nct6776-isa-0290 > Adapter: ISA adapter > Vcore: +0.97 V (min =3D +0.00 V, max =3D +1.74 V) > in1: +1.82 V (min =3D +1.71 V, max =3D +1.89 V) > AVCC: +3.34 V (min =3D +2.98 V, max =3D +3.63 V) > +3.3V: +3.33 V (min =3D +2.98 V, max =3D +3.63 V) > in4: +1.07 V (min =3D +1.00 V, max =3D +1.50 V) > in5: +1.68 V (min =3D +1.50 V, max =3D +1.89 V) > in6: +0.92 V (min =3D +0.00 V, max =3D +0.00 V) ALARM > 3VSB: +3.47 V (min =3D +2.98 V, max =3D +3.63 V) > Vbat: +3.31 V (min =3D +2.70 V, max =3D +3.63 V) > fan1: 0 RPM (min =3D 0 RPM) > fan2: 1337 RPM (min =3D 0 RPM) > fan3: 742 RPM (min =3D 0 RPM) > fan4: 661 RPM (min =3D 0 RPM) > fan5: 1077 RPM (min =3D 0 RPM) > SYSTIN: +42.0=B0C (high =3D +0.0=B0C, hyst =3D +0.0=B0C) ALAR= M sensor > =3D thermistor > CPUTIN: +35.5=B0C (high =3D +80.0=B0C, hyst =3D +75.0=B0C) sens= or =3D > thermistor > AUXTIN: +32.0=B0C (high =3D +80.0=B0C, hyst =3D +75.0=B0C) sens= or =3D > thermistor > PECI Agent 0: +37.0=B0C (high =3D +80.0=B0C, hyst =3D +75.0=B0C) > (crit =3D +98.0=B0C) > PCH_CHIP_TEMP: +0.0=B0C > PCH_CPU_TEMP: +0.0=B0C > PCH_MCH_TEMP: +0.0=B0C > intrusion0: ALARM > intrusion1: OK > ------------------------------------------------------------------- >=20 > After resuming from hibernation: > ------------------------------------------------------------------- > nct6776-isa-0290 > Adapter: ISA adapter > Vcore: +1.24 V (min =3D +0.00 V, max =3D +1.74 V) > in1: +1.82 V (min =3D +0.00 V, max =3D +0.00 V) ALARM > AVCC: +3.33 V (min =3D +0.00 V, max =3D +0.00 V) ALARM > +3.3V: +3.33 V (min =3D +0.00 V, max =3D +0.00 V) ALARM > in4: +1.09 V (min =3D +0.00 V, max =3D +0.00 V) ALARM > in5: +1.67 V (min =3D +0.00 V, max =3D +0.00 V) ALARM > in6: +0.93 V (min =3D +0.00 V, max =3D +0.00 V) ALARM > 3VSB: +3.47 V (min =3D +0.00 V, max =3D +0.00 V) ALARM > Vbat: +0.00 V (min =3D +0.00 V, max =3D +0.00 V) > fan1: 0 RPM (min =3D 0 RPM) ALARM > fan2: 1339 RPM (min =3D 0 RPM) ALARM > fan3: 744 RPM (min =3D 0 RPM) ALARM > fan4: 657 RPM (min =3D 0 RPM) ALARM > fan5: 1100 RPM (min =3D 0 RPM) ALARM > SYSTIN: +43.0=B0C (high =3D +0.0=B0C, hyst =3D +0.0=B0C) ALAR= M sensor > =3D thermistor > CPUTIN: +37.5=B0C (high =3D +80.0=B0C, hyst =3D +75.0=B0C) sens= or =3D > thermistor > AUXTIN: +32.0=B0C (high =3D +80.0=B0C, hyst =3D +75.0=B0C) sens= or =3D > thermistor > PECI Agent 0: +43.0=B0C (high =3D +80.0=B0C, hyst =3D +75.0=B0C) > (crit =3D +98.0=B0C) > PCH_CHIP_TEMP: +0.0=B0C > PCH_CPU_TEMP: +0.0=B0C > PCH_MCH_TEMP: +0.0=B0C > intrusion0: ALARM > intrusion1: OK > ------------------------------------------------------------------- >=20 >=20 > modprobe -r nct6775, modprobe nct6775, sensors -s to restore functionalit= y. >=20 > Before suspending: > ------------------------------------------------------------------- > nct6776-isa-0290 > Adapter: ISA adapter > Vcore: +0.97 V (min =3D +0.00 V, max =3D +1.74 V) > in1: +1.82 V (min =3D +1.71 V, max =3D +1.89 V) > AVCC: +3.34 V (min =3D +2.98 V, max =3D +3.63 V) > +3.3V: +3.33 V (min =3D +2.98 V, max =3D +3.63 V) > in4: +1.10 V (min =3D +1.00 V, max =3D +1.50 V) > in5: +1.68 V (min =3D +1.50 V, max =3D +1.89 V) > in6: +0.94 V (min =3D +0.00 V, max =3D +0.00 V) ALARM > 3VSB: +3.47 V (min =3D +2.98 V, max =3D +3.63 V) > Vbat: +3.33 V (min =3D +2.70 V, max =3D +3.63 V) > fan1: 0 RPM (min =3D 0 RPM) > fan2: 1345 RPM (min =3D 0 RPM) > fan3: 731 RPM (min =3D 0 RPM) > fan4: 655 RPM (min =3D 0 RPM) > fan5: 1083 RPM (min =3D 0 RPM) > SYSTIN: +45.0=B0C (high =3D +0.0=B0C, hyst =3D +0.0=B0C) ALAR= M sensor > =3D thermistor > CPUTIN: +36.0=B0C (high =3D +80.0=B0C, hyst =3D +75.0=B0C) sens= or =3D > thermistor > AUXTIN: +31.0=B0C (high =3D +80.0=B0C, hyst =3D +75.0=B0C) sens= or =3D > thermistor > PECI Agent 0: +38.0=B0C (high =3D +80.0=B0C, hyst =3D +75.0=B0C) > (crit =3D +98.0=B0C) > PCH_CHIP_TEMP: +0.0=B0C > PCH_CPU_TEMP: +0.0=B0C > PCH_MCH_TEMP: +0.0=B0C > intrusion0: ALARM > intrusion1: OK > ------------------------------------------------------------------- >=20 > After resuming from S3: > ------------------------------------------------------------------- > nct6776-isa-0290 > Adapter: ISA adapter > Vcore: +0.97 V (min =3D +0.00 V, max =3D +1.74 V) > in1: +1.82 V (min =3D +1.71 V, max =3D +1.89 V) > AVCC: +3.33 V (min =3D +2.98 V, max =3D +3.63 V) > +3.3V: +3.33 V (min =3D +2.98 V, max =3D +3.63 V) > in4: +1.10 V (min =3D +1.00 V, max =3D +1.50 V) > in5: +1.67 V (min =3D +1.50 V, max =3D +1.89 V) > in6: +0.94 V (min =3D +0.00 V, max =3D +0.00 V) ALARM > 3VSB: +3.47 V (min =3D +2.98 V, max =3D +3.63 V) > Vbat: +3.33 V (min =3D +2.70 V, max =3D +3.63 V) > fan1: 0 RPM (min =3D 0 RPM) > fan2: 1336 RPM (min =3D 0 RPM) > fan3: 744 RPM (min =3D 0 RPM) > fan4: 656 RPM (min =3D 0 RPM) > fan5: 1103 RPM (min =3D 0 RPM) > SYSTIN: +45.0=B0C (high =3D +0.0=B0C, hyst =3D +0.0=B0C) ALAR= M sensor > =3D thermistor > CPUTIN: +36.0=B0C (high =3D +80.0=B0C, hyst =3D +75.0=B0C) sens= or =3D > thermistor > AUXTIN: +31.0=B0C (high =3D +80.0=B0C, hyst =3D +75.0=B0C) sens= or =3D > thermistor > PECI Agent 0: +45.0=B0C (high =3D +80.0=B0C, hyst =3D +75.0=B0C) > (crit =3D +98.0=B0C) > PCH_CHIP_TEMP: +0.0=B0C > PCH_CPU_TEMP: +0.0=B0C > PCH_MCH_TEMP: +0.0=B0C > intrusion0: ALARM > intrusion1: OK > ------------------------------------------------------------------- >=20 >=20 > Superiotool output is attached. >=20 > Note that I can do "sensors -s", but that won't reset/reenable some > values like vbat. The only way to get it back working is rmmod/modprobe. > It seems like the code that runs properly at resume after suspend simply > is not executed after resuming from hibernation. Maybe I should put some > debug output in there to verify... And indeed, the resume code is not run on hibernate/resume. I've place two lines in there for debugging (see the small patch attached). The lines are printed at suspend/resume, but not at hibernate/resume. I guess this is not a problem with the nct6775 driver then? Harald --=20 `Experience is the best teacher.' PGP Key ID: 0xB29C7F8F --------------060607020303090603070001 Content-Type: text/x-patch; name="nct6775-resume-debug.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="nct6775-resume-debug.patch" diff --git a/drivers/hwmon/nct6775.c b/drivers/hwmon/nct6775.c index 99cec18..a7a0b07 100644 --- a/drivers/hwmon/nct6775.c +++ b/drivers/hwmon/nct6775.c @@ -4007,6 +4007,7 @@ static int nct6775_resume(struct device *dev) struct nct6775_sio_data *sio_data = dev->platform_data; int i, j; + printk(KERN_INFO "nct6776: resuming...\n"); mutex_lock(&data->update_lock); data->bank = 0xff; /* Force initial bank selection */ @@ -4050,6 +4051,7 @@ static int nct6775_resume(struct device *dev) data->valid = false; mutex_unlock(&data->update_lock); + printk(KERN_INFO "nct6776: resume complete.\n"); return 0; } --------------060607020303090603070001 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ lm-sensors mailing list lm-sensors@lm-sensors.org http://lists.lm-sensors.org/mailman/listinfo/lm-sensors --------------060607020303090603070001--