On Fri, 08 Jun 2012, Uwe Bonnes wrote: > when running Win7 and the lenovo tools on a new T520, I noticed that Win7 > had a display for the AC Power input when running with the AC Adapter > active. Actually the "ac-power" is the dc-power at the yellow plug, > normally coming from a AC Adapter. Yeah. > After installing Linux (Opensuse 12.1) and carefully looking at the > dump of the embedded controller memory, the value at offset 0xcc looked > suspicious like this "ac-power" in units of 100 mW. The value tracks well > the value measured with an AC power meter on the AC side, with some losses > for the AC adapter. Ac-power is measured as 0 with the AC-Adapter off. > > Appended patch against recent > git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > exposes this value like > > # cat /proc/acpi/ibm/ac_power > ac_power: 14100 Hmm, can you send me (privately) the dmidecode information and the output of a recent acpidump? I wonder if we can get that information out of ACPI, without the need to mess directly with the EC registers. Knowning which EC register has the info makes it trivial to track it down in the ACPI DSDT and SSDTs. > http://repo.or.cz/w/linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git seems hopeless > out of date, so I hope this is the right place to discuss. I tested the > patch on an old R50, where the ac-power is not yet measured. In that case, > the embedded memory reads 0, so I think this patch doesn't do any harm in > the case when the ac-power is not yet measured in the model. However I don't > see any chance to programmatically find out, if some thinkpad model has or > has not this ac-power measurement. The returned ac-power "0" in the case > with no power measurement available for the given model is undistiguishable > from the case "ac-adapter off, running from battery". I'd blacklist all IBM, and older Lenovos just in case. Thanks for tracking down this feature. FYI, the latest code for the driver can be found at Linus' main tree. I update the ibm-acpi-2.6 repository only I am actively doing something, and I've been short of time lately. However, I'll have some time to catch up and flush the patch backlock in two or three weeks. -- "One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ ibm-acpi-devel mailing list ibm-acpi-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel