Re: [coreboot] Lenovo X200 running Coreboot drains 3-4W more power than with Vendor BIOS
Daniel Kulesz via coreboot wrote: > my X60 supports C4 although it also seems to consume way too much power. That platform has at least one significant power saving issue open, which I think is no longer too well understood by the active folks. It also involves power saving states, but I don't know exactly what it is. Daniel Kulesz via coreboot wrote: > I .. wonder why I didn't read or hear about any complaints about > running Libreboot/Coreboot on a X200 I guess that anyone who retrofits open source firmware feels that the advantages outweigh such problems. The X60 runs much hotter with coreboot than with vendor BIOS. Some of that can probably be attributed to coreboot being worse at power saving, but there are still differences under full load. I would not be at all surprised if one reason is that the vendor BIOS aritificially restricts the performance in order to meet thermal design requirements. In other words: I can very easily imagine that robust operation and good-looking mechanical design was more important for the vendor than getting top performance out of CPU+chipset and that they implemented this policy in the BIOS, but coreboot doesn't, because noone in coreboot knows what the appropriate thresholds are. This is an intrinsic problem for anything that is retrofitted. //Peter -- coreboot mailing list: coreboot@coreboot.org https://www.coreboot.org/mailman/listinfo/coreboot
Re: [coreboot] Lenovo X200 running Coreboot drains 3-4W more power than with Vendor BIOS
On Sat, 7 May 2016 15:53:47 +0200 Zoran Stojsavljevicwrote: > > @Zoran: I also have an X220 (2nd gen Core I5) on which I did not > undertake any Coreboot experiments yet. But I > > suppose you are rather asking for much newer CPUs from the 6th and 7th > generation? > > > > Cheers, Daniel > > Hello Daniel, > > Second generation CORE is SNB. CPUID something like 0x20xyz. CORE 2nd gen. > was released Y2011. > Third generation CORE is IVB. CPUID something like 0x30xyz. Core 3rd gen. > was released Y2012. > > What I am talking/pointing ot about is the following: > *Fourth generation CORE is HSW. CPUID something like 0x40651 (i5 4300U) - > HP 840 G1 - one of my laptops. Released Y2013.* > *Sixth generation CORE is SKL. CPUID something like 0x606E3 (i5 6200U) - HP > 450 G3 - another of my laptops. Released Y2015.* > > 4th (HSW-U) and 6th (SKL-U) generations of CPUs in laptops: these are ones > I am talking about/pointing to (don't think CORE 5th gen. is important). > > Sorry I am late with Re:. Hi Zoran, You are welcome! But I don't have any of these newer laptops and afaik Coreboot does not support many of them, either. Especially the newer Thinkpads (T/X240+) are not supported. But sure, if anybody has one of these machines doing similar experiments would really make sense. I still wonder why I didn't read or hear about any complaints about running Libreboot/Coreboot on a X200 since the difference of the missing C4 mode (by default at least) is so striking. Cheers, Daniel -- coreboot mailing list: coreboot@coreboot.org https://www.coreboot.org/mailman/listinfo/coreboot
Re: [coreboot] Lenovo X200 running Coreboot drains 3-4W more power than with Vendor BIOS
> @Zoran: I also have an X220 (2nd gen Core I5) on which I did not undertake any Coreboot experiments yet. But I > suppose you are rather asking for much newer CPUs from the 6th and 7th generation? > > Cheers, Daniel Hello Daniel, Second generation CORE is SNB. CPUID something like 0x20xyz. CORE 2nd gen. was released Y2011. Third generation CORE is IVB. CPUID something like 0x30xyz. Core 3rd gen. was released Y2012. What I am talking/pointing ot about is the following: *Fourth generation CORE is HSW. CPUID something like 0x40651 (i5 4300U) - HP 840 G1 - one of my laptops. Released Y2013.* *Sixth generation CORE is SKL. CPUID something like 0x606E3 (i5 6200U) - HP 450 G3 - another of my laptops. Released Y2015.* 4th (HSW-U) and 6th (SKL-U) generations of CPUs in laptops: these are ones I am talking about/pointing to (don't think CORE 5th gen. is important). Sorry I am late with Re:. Thank you, Zoran ___ On Tue, May 3, 2016 at 12:47 AM, Daniel Kulesz via coreboot < coreboot@coreboot.org> wrote: > Hi all, > > On Mon, 2 May 2016 13:16:15 +0200 > Nico Huberwrote: > > > On 02.05.2016 01:06, Daniel Kulesz wrote: > > >>> - disabling "cpu power management" makes the idle consumption raise > to 12,8W > > >> Is this 12.8W compared to 7.5W (i.e. with lowest backlight)? > > >> > > > > > > Nope, I am only comparing with highest backlight now, so it is 12.8W > versus 10.0W here. > > Hmmm, 2.8W... whatever that option does it confuses me. > > > Well, I assume it disables C3 and C4. > > > >>> Any ideas which could solve this mystery? > > >>> > > >> One more thing you can test, in case your Linux uses the intel_idle > > >> driver: There is a kernel parameter intel_idle.max_cstate, if you boot > > >> the vendor BIOS with defaults and Linux with intel_idle.max_cstate=2 > it > > >> should use C1/C2 but not C3/C4 and thus behave more like coreboot. > > >> > > > Okay. I was just aware of the generic "processor.max_cstate=2" > > > parameter. I tried with both parameters using the vendor BIOS and here > > > are the results: > > > > > > intel_idle.max_cstate=2: 10W in idle at full brightness (no effect) > > > processor.max_cstate=2: 12.6W in idle at full brightness > > > > > > So it seems plausible that this issue is related to Coreboot not > > > (properly?) supporting C3/C4. So this is a known issue then? If yes, > > > imho it should be *definitely* documented on the wiki page since it > > > could be a "showstopper" for many adopters who need the maximum battery > > > life the X200 is able to deliver only with the vendor BIOS at this > point > > > in time ... > > Well, let's see what we got: > > o 10.0W with "cpu power management" > > o 12.6W with "cpu power management" but max_cstate=2 > > o 12.8W without "cpu power management" > > FWIW, C2 usually saves more power. So I wonder how good your measuring > > at the wall plug works. Another easy option to measure the power > > consumption is looking at what the battery reports (usually > > /sys/class/power_supply/BAT0/power_now). > > > > Well sure, the power consumption is not always 100% steady so sometimes it > "flakes" around 0.1 - 0.2W, depending on e.g. whether the fan is running or > not or what some background processes do. So I just took the values that > were reported by my external meter most of the time, and these could be > slightly off. > > Of course, using "power_now" would be more accurate, but I would have to > take like 100 measurements and then take the median or something like that. > Imho a bit too much in this case since the difference is so big that it's > visible at first sight. > > > > Regarding C3/C4 support, AFAIK, we implemented it fully but it just > > didn't work on the system we originally ported coreboot for (Roda/RK9). > > The system kept resetting whenever it should enter (or maybe exit) C3, > > IIRC. You could give it a try on your X200 though. Whatever the issue > > on the RK9 was, it might be board specific. > > > > If you want to try it, in src/mainboard/lenovo/x200/cstates.c add: > > { > > /* acpi C3 / cpu C3 */ > > 3, 0x02, 300, > > { ACPI_ADDRESS_SPACE_FIXED, 1, 2, { 1 }, 0x20, 0 } > > }, > > for C3 or > > { > > /* acpi C3 / cpu C4 */ > > 3, 0x02, 300, > > { ACPI_ADDRESS_SPACE_FIXED, 1, 2, { 1 }, 0x30, 0 } > > }, > > for C4. You can not have all of them, as ACPI only supports three > > C-states. > > Indeed this was a *VERY GOOD* hint! I added the line with the C4 states > and idle power consumption dropped to about 11.5W running my regular OS and > with Wifi on. So I again disassembled the keyboard/palmrest, removed the > wifi card and did exactly the same measurements as before. And here are the > results: > > Benchmark results: almost like before (not crappy like with vendor BIOS!), > a little worse because it probably takes a few ms for the CPU to wake up > from C4
Re: [coreboot] Lenovo X200 running Coreboot drains 3-4W more power than with Vendor BIOS
> > Sounds stupid, but I'm really impressed now! But... is there a reason > > C4 is not enabled by default then? I mean, if it makes trouble, you > > can always disable it (at least on Linux) with the command line > > parameters as discussed previously. Imho, it should be at least > > configurable using the regular config mechanism. > > > I guess, just nobody tried it before on a ThinkPad. The entries for > C1/C2 are most probably copy-pasted from Roda/RK9. Thanks for testing > this through! If you don't want to go further (https://coreboot.org/Git) > somebody else will likely write a patch ;) Okay, but that's strange, because e.g. my X60 supports C4 although it also seems to consume way too much power. Will have to investigate that as well. I also have this other X200 with P8600 and CCFL backlight, but one can assume that the patch will work there as well. But if I find the time I can test it there as well if nobody else wants to do that. I assume once it gets in git, we will automatically get more testers anyways. ;-) And yes, I can submit the patch but not today, it's already 1:40am over here. Cheers, Daniel -- coreboot mailing list: coreboot@coreboot.org https://www.coreboot.org/mailman/listinfo/coreboot
Re: [coreboot] Lenovo X200 running Coreboot drains 3-4W more power than with Vendor BIOS
Hi Daniel, On 03.05.2016 00:47, Daniel Kulesz via coreboot wrote: > Hi all, > > On Mon, 2 May 2016 13:16:15 +0200 > Nico Huberwrote: >> Regarding C3/C4 support, AFAIK, we implemented it fully but it just >> didn't work on the system we originally ported coreboot for (Roda/RK9). >> The system kept resetting whenever it should enter (or maybe exit) C3, >> IIRC. You could give it a try on your X200 though. Whatever the issue >> on the RK9 was, it might be board specific. >> >> If you want to try it, in src/mainboard/lenovo/x200/cstates.c add: >> { >> /* acpi C3 / cpu C3 */ >> 3, 0x02, 300, >> { ACPI_ADDRESS_SPACE_FIXED, 1, 2, { 1 }, 0x20, 0 } >> }, >> for C3 or >> { >> /* acpi C3 / cpu C4 */ >> 3, 0x02, 300, >> { ACPI_ADDRESS_SPACE_FIXED, 1, 2, { 1 }, 0x30, 0 } >> }, >> for C4. You can not have all of them, as ACPI only supports three >> C-states. > > Indeed this was a *VERY GOOD* hint! I added the line with the C4 > states and idle power consumption dropped to about 11.5W running my > regular OS and with Wifi on. So I again disassembled the > keyboard/palmrest, removed the wifi card and did exactly the same > measurements as before. And here are the results: > > Benchmark results: almost like before (not crappy like with vendor > BIOS!), a little worse because it probably takes a few ms for the CPU > to wake up from C4 first. Stress test: >37.2W (as before) > > Idle, max brightness: 10.8W (!!) > Idle, lowest brightness: 7.8W (!!) > > ...and after running "powertop --auto-tune": > Idle, max brightness: 9.9W > Idle, lowest brightness: 6.9W > Screen off:6.4W > Very NICE! > Sounds stupid, but I'm really impressed now! But... is there a reason > C4 is not enabled by default then? I mean, if it makes trouble, you > can always disable it (at least on Linux) with the command line > parameters as discussed previously. Imho, it should be at least > configurable using the regular config mechanism. > I guess, just nobody tried it before on a ThinkPad. The entries for C1/C2 are most probably copy-pasted from Roda/RK9. Thanks for testing this through! If you don't want to go further (https://coreboot.org/Git) somebody else will likely write a patch ;) Nico -- coreboot mailing list: coreboot@coreboot.org https://www.coreboot.org/mailman/listinfo/coreboot
Re: [coreboot] Lenovo X200 running Coreboot drains 3-4W more power than with Vendor BIOS
Hi all, On Mon, 2 May 2016 13:16:15 +0200 Nico Huberwrote: > On 02.05.2016 01:06, Daniel Kulesz wrote: > >>> - disabling "cpu power management" makes the idle consumption raise to > >>> 12,8W > >> Is this 12.8W compared to 7.5W (i.e. with lowest backlight)? > >> > > > > Nope, I am only comparing with highest backlight now, so it is 12.8W versus > > 10.0W here. > Hmmm, 2.8W... whatever that option does it confuses me. > Well, I assume it disables C3 and C4. > >>> Any ideas which could solve this mystery? > >>> > >> One more thing you can test, in case your Linux uses the intel_idle > >> driver: There is a kernel parameter intel_idle.max_cstate, if you boot > >> the vendor BIOS with defaults and Linux with intel_idle.max_cstate=2 it > >> should use C1/C2 but not C3/C4 and thus behave more like coreboot. > >> > > Okay. I was just aware of the generic "processor.max_cstate=2" > > parameter. I tried with both parameters using the vendor BIOS and here > > are the results: > > > > intel_idle.max_cstate=2: 10W in idle at full brightness (no effect) > > processor.max_cstate=2: 12.6W in idle at full brightness > > > > So it seems plausible that this issue is related to Coreboot not > > (properly?) supporting C3/C4. So this is a known issue then? If yes, > > imho it should be *definitely* documented on the wiki page since it > > could be a "showstopper" for many adopters who need the maximum battery > > life the X200 is able to deliver only with the vendor BIOS at this point > > in time ... > Well, let's see what we got: > o 10.0W with "cpu power management" > o 12.6W with "cpu power management" but max_cstate=2 > o 12.8W without "cpu power management" > FWIW, C2 usually saves more power. So I wonder how good your measuring > at the wall plug works. Another easy option to measure the power > consumption is looking at what the battery reports (usually > /sys/class/power_supply/BAT0/power_now). > Well sure, the power consumption is not always 100% steady so sometimes it "flakes" around 0.1 - 0.2W, depending on e.g. whether the fan is running or not or what some background processes do. So I just took the values that were reported by my external meter most of the time, and these could be slightly off. Of course, using "power_now" would be more accurate, but I would have to take like 100 measurements and then take the median or something like that. Imho a bit too much in this case since the difference is so big that it's visible at first sight. > Regarding C3/C4 support, AFAIK, we implemented it fully but it just > didn't work on the system we originally ported coreboot for (Roda/RK9). > The system kept resetting whenever it should enter (or maybe exit) C3, > IIRC. You could give it a try on your X200 though. Whatever the issue > on the RK9 was, it might be board specific. > > If you want to try it, in src/mainboard/lenovo/x200/cstates.c add: > { > /* acpi C3 / cpu C3 */ > 3, 0x02, 300, > { ACPI_ADDRESS_SPACE_FIXED, 1, 2, { 1 }, 0x20, 0 } > }, > for C3 or > { > /* acpi C3 / cpu C4 */ > 3, 0x02, 300, > { ACPI_ADDRESS_SPACE_FIXED, 1, 2, { 1 }, 0x30, 0 } > }, > for C4. You can not have all of them, as ACPI only supports three > C-states. Indeed this was a *VERY GOOD* hint! I added the line with the C4 states and idle power consumption dropped to about 11.5W running my regular OS and with Wifi on. So I again disassembled the keyboard/palmrest, removed the wifi card and did exactly the same measurements as before. And here are the results: Benchmark results: almost like before (not crappy like with vendor BIOS!), a little worse because it probably takes a few ms for the CPU to wake up from C4 first. Stress test: >37.2W (as before) Idle, max brightness: 10.8W (!!) Idle, lowest brightness: 7.8W (!!) ...and after running "powertop --auto-tune": Idle, max brightness: 9.9W Idle, lowest brightness: 6.9W Screen off:6.4W Sounds stupid, but I'm really impressed now! But... is there a reason C4 is not enabled by default then? I mean, if it makes trouble, you can always disable it (at least on Linux) with the command line parameters as discussed previously. Imho, it should be at least configurable using the regular config mechanism. @Zoran: I also have an X220 (2nd gen Core I5) on which I did not undertake any Coreboot experiments yet. But I suppose you are rather asking for much newer CPUs from the 6th and 7th generation? Cheers, Daniel -- coreboot mailing list: coreboot@coreboot.org https://www.coreboot.org/mailman/listinfo/coreboot
Re: [coreboot] Lenovo X200 running Coreboot drains 3-4W more power than with Vendor BIOS
Just to add one more detail to this... From ark.intel.com: http://ark.intel.com/products/37006/Intel-Core2-Duo-Processor-P8700-3M-Cache-2_53-GHz-1066-MHz-FSB Seems that this one (P8700) is variance of Core 1 Penryn, Came to existence Q4/2008, embedded support just ran out of time. The 8Y span is too large to get fixed it from INTEL resources. Back far (Y2008) PM probably was not so versatile, and it runs up to C6 state (my best guess). And One only knows how ACPI tables are implemented in legacy BIOSes for Penryn, and if these were correctly moved/ported to Coreboot. My two cent worth (pure rhetorical) opinion. ;-) Would be cool (facultative/optional, when opportunity strikes) if anybody does the same (measurements) for BDW-DE and/or HSW BIOSes/FSPs (much more value to newer CORE 4/CORE 5 CPUs). Thank you, Zoran ___ On Mon, May 2, 2016 at 1:16 PM, Nico Huberwrote: > On 02.05.2016 01:06, Daniel Kulesz wrote: > >>> - disabling "cpu power management" makes the idle consumption raise to > 12,8W > >> Is this 12.8W compared to 7.5W (i.e. with lowest backlight)? > >> > > > > Nope, I am only comparing with highest backlight now, so it is 12.8W > versus 10.0W here. > Hmmm, 2.8W... whatever that option does it confuses me. > > >>> Any ideas which could solve this mystery? > >>> > >> One more thing you can test, in case your Linux uses the intel_idle > >> driver: There is a kernel parameter intel_idle.max_cstate, if you boot > >> the vendor BIOS with defaults and Linux with intel_idle.max_cstate=2 it > >> should use C1/C2 but not C3/C4 and thus behave more like coreboot. > >> > > Okay. I was just aware of the generic "processor.max_cstate=2" > > parameter. I tried with both parameters using the vendor BIOS and here > > are the results: > > > > intel_idle.max_cstate=2: 10W in idle at full brightness (no effect) > > processor.max_cstate=2: 12.6W in idle at full brightness > > > > So it seems plausible that this issue is related to Coreboot not > > (properly?) supporting C3/C4. So this is a known issue then? If yes, > > imho it should be *definitely* documented on the wiki page since it > > could be a "showstopper" for many adopters who need the maximum battery > > life the X200 is able to deliver only with the vendor BIOS at this point > > in time ... > Well, let's see what we got: > o 10.0W with "cpu power management" > o 12.6W with "cpu power management" but max_cstate=2 > o 12.8W without "cpu power management" > FWIW, C2 usually saves more power. So I wonder how good your measuring > at the wall plug works. Another easy option to measure the power > consumption is looking at what the battery reports (usually > /sys/class/power_supply/BAT0/power_now). > > Regarding C3/C4 support, AFAIK, we implemented it fully but it just > didn't work on the system we originally ported coreboot for (Roda/RK9). > The system kept resetting whenever it should enter (or maybe exit) C3, > IIRC. You could give it a try on your X200 though. Whatever the issue > on the RK9 was, it might be board specific. > > If you want to try it, in src/mainboard/lenovo/x200/cstates.c add: > { > /* acpi C3 / cpu C3 */ > 3, 0x02, 300, > { ACPI_ADDRESS_SPACE_FIXED, 1, 2, { 1 }, 0x20, 0 } > }, > for C3 or > { > /* acpi C3 / cpu C4 */ > 3, 0x02, 300, > { ACPI_ADDRESS_SPACE_FIXED, 1, 2, { 1 }, 0x30, 0 } > }, > for C4. You can not have all of them, as ACPI only supports three > C-states. > > Nico > > -- > M. Sc. Nico Huber > Senior Berater SINA-Softwareentwicklung > Netzwerk- & Client-Sicherheit / Network & Client Security > Division Öffentliche Auftraggeber / Public Authorities > secunet Security Networks AG > > Tel.: +49-201-5454-3635, Fax: +49-201-5454-1325 > E-Mail: nico.hu...@secunet.com > Mergenthalerallee 77, 65760 Eschborn, Deutschland > www.secunet.com > __ > > Sitz: Kurfürstenstraße 58, 45138 Essen, Deutschland > Amtsgericht Essen HRB 13615 > Vorstand: Dr. Rainer Baumgart (Vors.), Thomas Pleines > Aufsichtsratsvorsitzender: Dr. Peter Zattler > __ > > -- > coreboot mailing list: coreboot@coreboot.org > https://www.coreboot.org/mailman/listinfo/coreboot > -- coreboot mailing list: coreboot@coreboot.org https://www.coreboot.org/mailman/listinfo/coreboot
Re: [coreboot] Lenovo X200 running Coreboot drains 3-4W more power than with Vendor BIOS
On 02.05.2016 01:06, Daniel Kulesz wrote: >>> - disabling "cpu power management" makes the idle consumption raise to 12,8W >> Is this 12.8W compared to 7.5W (i.e. with lowest backlight)? >> > > Nope, I am only comparing with highest backlight now, so it is 12.8W versus > 10.0W here. Hmmm, 2.8W... whatever that option does it confuses me. >>> Any ideas which could solve this mystery? >>> >> One more thing you can test, in case your Linux uses the intel_idle >> driver: There is a kernel parameter intel_idle.max_cstate, if you boot >> the vendor BIOS with defaults and Linux with intel_idle.max_cstate=2 it >> should use C1/C2 but not C3/C4 and thus behave more like coreboot. >> > Okay. I was just aware of the generic "processor.max_cstate=2" > parameter. I tried with both parameters using the vendor BIOS and here > are the results: > > intel_idle.max_cstate=2: 10W in idle at full brightness (no effect) > processor.max_cstate=2: 12.6W in idle at full brightness > > So it seems plausible that this issue is related to Coreboot not > (properly?) supporting C3/C4. So this is a known issue then? If yes, > imho it should be *definitely* documented on the wiki page since it > could be a "showstopper" for many adopters who need the maximum battery > life the X200 is able to deliver only with the vendor BIOS at this point > in time ... Well, let's see what we got: o 10.0W with "cpu power management" o 12.6W with "cpu power management" but max_cstate=2 o 12.8W without "cpu power management" FWIW, C2 usually saves more power. So I wonder how good your measuring at the wall plug works. Another easy option to measure the power consumption is looking at what the battery reports (usually /sys/class/power_supply/BAT0/power_now). Regarding C3/C4 support, AFAIK, we implemented it fully but it just didn't work on the system we originally ported coreboot for (Roda/RK9). The system kept resetting whenever it should enter (or maybe exit) C3, IIRC. You could give it a try on your X200 though. Whatever the issue on the RK9 was, it might be board specific. If you want to try it, in src/mainboard/lenovo/x200/cstates.c add: { /* acpi C3 / cpu C3 */ 3, 0x02, 300, { ACPI_ADDRESS_SPACE_FIXED, 1, 2, { 1 }, 0x20, 0 } }, for C3 or { /* acpi C3 / cpu C4 */ 3, 0x02, 300, { ACPI_ADDRESS_SPACE_FIXED, 1, 2, { 1 }, 0x30, 0 } }, for C4. You can not have all of them, as ACPI only supports three C-states. Nico -- M. Sc. Nico Huber Senior Berater SINA-Softwareentwicklung Netzwerk- & Client-Sicherheit / Network & Client Security Division Öffentliche Auftraggeber / Public Authorities secunet Security Networks AG Tel.: +49-201-5454-3635, Fax: +49-201-5454-1325 E-Mail: nico.hu...@secunet.com Mergenthalerallee 77, 65760 Eschborn, Deutschland www.secunet.com __ Sitz: Kurfürstenstraße 58, 45138 Essen, Deutschland Amtsgericht Essen HRB 13615 Vorstand: Dr. Rainer Baumgart (Vors.), Thomas Pleines Aufsichtsratsvorsitzender: Dr. Peter Zattler __ -- coreboot mailing list: coreboot@coreboot.org https://www.coreboot.org/mailman/listinfo/coreboot
Re: [coreboot] Lenovo X200 running Coreboot drains 3-4W more power than with Vendor BIOS
> > Okay. I was just aware of the generic "processor.max_cstate=2" > > parameter. I tried with both parameters using the vendor BIOS and > > here are the results: > > Can you do a test run with closed devices? This would ensure, you're > not measurring a brightness difference. Okay, you mean with the display turned off? I did this now using xrandr and here are the results: Coreboot: 9.0W vendor BIOS: 6.9W Cheers, Daniel -- coreboot mailing list: coreboot@coreboot.org https://www.coreboot.org/mailman/listinfo/coreboot
Re: [coreboot] Lenovo X200 running Coreboot drains 3-4W more power than with Vendor BIOS
On Mon, 2 May 2016 01:06:10 +0200 Daniel Kuleszwrote: > Okay. I was just aware of the generic "processor.max_cstate=2" > parameter. I tried with both parameters using the vendor BIOS and > here are the results: Can you do a test run with closed devices? This would ensure, you're not measurring a brightness difference. best, lynxis -- Alexander Couzens mail: lyn...@fe80.eu jabber: lyn...@fe80.eu mobile: +4915123277221 gpg: 390D CF78 8BF9 AA50 4F8F F1E2 C29E 9DA6 A0DF 8604 pgpVK1IakYQG5.pgp Description: OpenPGP digital signature -- coreboot mailing list: coreboot@coreboot.org https://www.coreboot.org/mailman/listinfo/coreboot
Re: [coreboot] Lenovo X200 running Coreboot drains 3-4W more power than with Vendor BIOS
> > - disabling "cpu power management" makes the idle consumption raise to 12,8W > Is this 12.8W compared to 7.5W (i.e. with lowest backlight)? > Nope, I am only comparing with highest backlight now, so it is 12.8W versus 10.0W here. > > - disabling "PCI Bus power management" and "PCI express power management" > > makes the idle consumption raise to 13,3W > > - disabling the AMT firmware had no effect > > - running the stress test still drains only 24,2W > > - performance is the same as before > > > > I still don't understand the whole performance issue. Therefore, I took > > another X200 with a P8600, CCFL screen and an older vendor BIOS and > > re-ran the benchmark there --- with almost identical results. > > > > So in the end I'm just confused. This would mean that running Coreboot > > makes the X200 *much* faster at the expense of battery life, both in > > idle and under stress conditions. > > > Maybe Lenovo limited the processor clock on purpose to get a better > battery life. Maybe it's just an unexpected side effect of running > Linux (not Windows, what Lenovo tested against). Anyway, I wouldn't care > about the power consumption under load, it might even result in a longer > battery life: Being faster means shorter periods in higher performance > states. The idle power consumption is what really matters. > Yes I agree, I am almost never putting high load on the machine anyways, so even if it would make an impact I would not care too much. And then you can still limit the max. frequency or something and be performance-wise probably still comparable to the vendor BIOS. > > Any ideas which could solve this mystery? > > > One more thing you can test, in case your Linux uses the intel_idle > driver: There is a kernel parameter intel_idle.max_cstate, if you boot > the vendor BIOS with defaults and Linux with > intel_idle.max_cstate=2 > it should use C1/C2 but not C3/C4 and thus behave more like coreboot. > Okay. I was just aware of the generic "processor.max_cstate=2" parameter. I tried with both parameters using the vendor BIOS and here are the results: intel_idle.max_cstate=2: 10W in idle at full brightness (no effect) processor.max_cstate=2: 12.6W in idle at full brightness So it seems plausible that this issue is related to Coreboot not (properly?) supporting C3/C4. So this is a known issue then? If yes, imho it should be *definitely* documented on the wiki page since it could be a "showstopper" for many adopters who need the maximum battery life the X200 is able to deliver only with the vendor BIOS at this point in time ... Cheers, Daniel -- coreboot mailing list: coreboot@coreboot.org https://www.coreboot.org/mailman/listinfo/coreboot
Re: [coreboot] Lenovo X200 running Coreboot drains 3-4W more power than with Vendor BIOS
On 01.05.2016 21:40, Daniel Kulesz wrote: > Hi again, > > I did some more experiments with the vendor BIOS and made the following > observations: > > - disabling "cpu power management" makes the idle consumption raise to 12,8W Is this 12.8W compared to 7.5W (i.e. with lowest backlight)? > - disabling "PCI Bus power management" and "PCI express power management" > makes the idle consumption raise to 13,3W > - disabling the AMT firmware had no effect > - running the stress test still drains only 24,2W > - performance is the same as before > > I still don't understand the whole performance issue. Therefore, I took > another X200 with a P8600, CCFL screen and an older vendor BIOS and > re-ran the benchmark there --- with almost identical results. > > So in the end I'm just confused. This would mean that running Coreboot > makes the X200 *much* faster at the expense of battery life, both in > idle and under stress conditions. > Maybe Lenovo limited the processor clock on purpose to get a better battery life. Maybe it's just an unexpected side effect of running Linux (not Windows, what Lenovo tested against). Anyway, I wouldn't care about the power consumption under load, it might even result in a longer battery life: Being faster means shorter periods in higher performance states. The idle power consumption is what really matters. > Any ideas which could solve this mystery? > One more thing you can test, in case your Linux uses the intel_idle driver: There is a kernel parameter intel_idle.max_cstate, if you boot the vendor BIOS with defaults and Linux with intel_idle.max_cstate=2 it should use C1/C2 but not C3/C4 and thus behave more like coreboot. Nico -- coreboot mailing list: coreboot@coreboot.org https://www.coreboot.org/mailman/listinfo/coreboot
Re: [coreboot] Lenovo X200 running Coreboot drains 3-4W more power than with Vendor BIOS
On 01.05.2016 15:30, Daniel Kulesz wrote: > Hi Nico, > >> On 01.05.2016 12:26, Daniel Kulesz via coreboot wrote: >>> Coreboot with idle=poll: 15,8W >>> Coreboot running "stress": 37,2W >> well, this is what I would expect from the specs. >> >>> Vendor BIOS with idle=poll: 15W >>> Vendor BIOS with intel_pstate=disabled: 10W >>> Vendor BIOS running "stress": 24,3W (!!) >> This looks suspicious. Doing some calculation: >> You are measuring at the wall plug, efficiency could be around 83%, >> which would leave 20W. Chipset, backlight and other stuff needs power as >> well, say around 8W, leaving 12W for your 25W TDP CPU??? >> > Well, I could imagine that the PSU's efficiency is better than 83%, > and maybe the CPU is just rated at 25W TDP while in fact it consumes > less. Please note that the whole family of CPUs is rated at this > wattage and so is the P9600 which runs at 2,66GHz and not just 2,53GHz > and at a slightly higher min. voltage (but slightly lower max. > voltage). > It's the other way around. If a sample is stable at 2.66GHz without drawing more than 25W it's a P8800, if only 2.53GHz it's a P8700 etc. Nico -- coreboot mailing list: coreboot@coreboot.org https://www.coreboot.org/mailman/listinfo/coreboot
Re: [coreboot] Lenovo X200 running Coreboot drains 3-4W more power than with Vendor BIOS
Hi again, I did some more experiments with the vendor BIOS and made the following observations: - disabling "cpu power management" makes the idle consumption raise to 12,8W - disabling "PCI Bus power management" and "PCI express power management" makes the idle consumption raise to 13,3W - disabling the AMT firmware had no effect - running the stress test still drains only 24,2W - performance is the same as before I still don't understand the whole performance issue. Therefore, I took another X200 with a P8600, CCFL screen and an older vendor BIOS and re-ran the benchmark there --- with almost identical results. So in the end I'm just confused. This would mean that running Coreboot makes the X200 *much* faster at the expense of battery life, both in idle and under stress conditions. Any ideas which could solve this mystery? Cheers, Daniel -- coreboot mailing list: coreboot@coreboot.org https://www.coreboot.org/mailman/listinfo/coreboot
Re: [coreboot] Lenovo X200 running Coreboot drains 3-4W more power than with Vendor BIOS
Hi Nico, > On 01.05.2016 12:26, Daniel Kulesz via coreboot wrote: > > Coreboot with idle=poll: 15,8W > > Coreboot running "stress": 37,2W > well, this is what I would expect from the specs. > > > Vendor BIOS with idle=poll: 15W > > Vendor BIOS with intel_pstate=disabled: 10W > > Vendor BIOS running "stress": 24,3W (!!) > This looks suspicious. Doing some calculation: > You are measuring at the wall plug, efficiency could be around 83%, > which would leave 20W. Chipset, backlight and other stuff needs power as > well, say around 8W, leaving 12W for your 25W TDP CPU??? > Well, I could imagine that the PSU's efficiency is better than 83%, and maybe the CPU is just rated at 25W TDP while in fact it consumes less. Please note that the whole family of CPUs is rated at this wattage and so is the P9600 which runs at 2,66GHz and not just 2,53GHz and at a slightly higher min. voltage (but slightly lower max. voltage). > So, before bothering yourself with the power consumption difference > under load, I would also check the performance of coreboot vs. vendor > BIOS. > That's a good point and I was also thinking about this. So I just did a few measurements using "cryptsetup benchmark" (results attached). As you can see, indeed performance with the vendor BIOS is significantly lower. But why? As I don't really need so much performance and rather would prefer better battery lifetime, the vendor BIOS' behavior would suit me better. I will try to tweak its settings a bit and see how this impacts performance and power consumption so we can get a better idea what could be causing the impact. > > And I didn't find any documentation about how to actually extract the > > VGA Bios part, so any hints are welcome. > Um, if you find a way, please document ;) > As I posted, it is there, but a bit hidden in the Wiki. I also ran a test series with the microcode updates included => no difference. Cheers, Daniel # Tests are approximate using memory only (no storage IO). PBKDF2-sha1 409600 iterations per second PBKDF2-sha256 264258 iterations per second PBKDF2-sha512 190511 iterations per second PBKDF2-ripemd160 273066 iterations per second PBKDF2-whirlpool 83591 iterations per second # Algorithm | Key | Encryption | Decryption aes-cbc 128b95.1 MiB/s98.3 MiB/s serpent-cbc 128b32.8 MiB/s 123.5 MiB/s twofish-cbc 128b82.6 MiB/s 108.7 MiB/s aes-cbc 256b72.7 MiB/s74.4 MiB/s serpent-cbc 256b32.8 MiB/s 123.4 MiB/s twofish-cbc 256b82.6 MiB/s 108.7 MiB/s aes-xts 256b98.0 MiB/s97.9 MiB/s serpent-xts 256b 111.9 MiB/s 115.9 MiB/s twofish-xts 256b 100.3 MiB/s 101.1 MiB/s aes-xts 512b74.0 MiB/s73.8 MiB/s serpent-xts 512b 112.1 MiB/s 115.9 MiB/s twofish-xts 512b 100.2 MiB/s 101.0 MiB/s # Tests are approximate using memory only (no storage IO). PBKDF2-sha1 665340 iterations per second PBKDF2-sha256 420102 iterations per second PBKDF2-sha512 303407 iterations per second PBKDF2-ripemd160 428339 iterations per second PBKDF2-whirlpool 132129 iterations per second # Algorithm | Key | Encryption | Decryption aes-cbc 128b 131.5 MiB/s 155.5 MiB/s serpent-cbc 128b51.5 MiB/s 195.2 MiB/s twofish-cbc 128b 130.7 MiB/s 171.6 MiB/s aes-cbc 256b 104.1 MiB/s 117.5 MiB/s serpent-cbc 256b51.5 MiB/s 195.2 MiB/s twofish-cbc 256b 130.7 MiB/s 171.6 MiB/s aes-xts 256b 155.0 MiB/s 154.8 MiB/s serpent-xts 256b 176.1 MiB/s 182.3 MiB/s twofish-xts 256b 158.7 MiB/s 159.7 MiB/s aes-xts 512b 116.9 MiB/s 116.5 MiB/s serpent-xts 512b 176.1 MiB/s 182.3 MiB/s twofish-xts 512b 158.7 MiB/s 159.5 MiB/s -- coreboot mailing list: coreboot@coreboot.org https://www.coreboot.org/mailman/listinfo/coreboot
Re: [coreboot] Lenovo X200 running Coreboot drains 3-4W more power than with Vendor BIOS
Hi all, thank you again for the suggestions! First thing: VGABIOS. I was able to extract the blob (the hint in the wiki is a bit hidden and the introduction of the section is a bit misleading btw) and re-ran the measurements using the proprietary VGA BIOS: Idle: 13,4W Stress: 37,2W So they values are exactly the same as with native graphics init. Second thing: Powertop. I did the suggested powertop --autotune experiments in idle and obtained the following results: vendor BIOS: 8,8W Coreboot: 12,2W So in both cases a decrease of around 1,2W. But still something else drains these extra 3,5W. Not running in C3/C4 would explain that difference maybe. How can I check that? I am now doing another attempt to include the microcode updates, but I doubt this will make such a big difference. Cheers, Daniel -- coreboot mailing list: coreboot@coreboot.org https://www.coreboot.org/mailman/listinfo/coreboot
Re: [coreboot] Lenovo X200 running Coreboot drains 3-4W more power than with Vendor BIOS
Hi Daniel, On 01.05.2016 12:26, Daniel Kulesz via coreboot wrote: > Coreboot with idle=poll: 15,8W > Coreboot running "stress": 37,2W well, this is what I would expect from the specs. > Vendor BIOS with idle=poll: 15W > Vendor BIOS with intel_pstate=disabled: 10W > Vendor BIOS running "stress": 24,3W (!!) This looks suspicious. Doing some calculation: You are measuring at the wall plug, efficiency could be around 83%, which would leave 20W. Chipset, backlight and other stuff needs power as well, say around 8W, leaving 12W for your 25W TDP CPU??? So, before bothering yourself with the power consumption difference under load, I would also check the performance of coreboot vs. vendor BIOS. > And I didn't find any documentation about how to actually extract the > VGA Bios part, so any hints are welcome. Um, if you find a way, please document ;) Nico -- coreboot mailing list: coreboot@coreboot.org https://www.coreboot.org/mailman/listinfo/coreboot
Re: [coreboot] Lenovo X200 running Coreboot drains 3-4W more power than with Vendor BIOS
Hi Daniel, first thing: We never got to the deepest processor sleep states (C3, C4) when we originally ported coreboot for the GM45 chipset. But we didn't see a difference in power consumption back then on the Roda/RK9. On 01.05.2016 00:55, Daniel Kulesz via coreboot wrote: > No tweaking with powertop or such This might not be a good idea: It's not always clear which power saving options should be set by the firmware and which should be set by the os. Anyway, I don't think it makes a big impact, but could you rerun your measurements after `powertop --auto-tune`. Nico -- coreboot mailing list: coreboot@coreboot.org https://www.coreboot.org/mailman/listinfo/coreboot
Re: [coreboot] Lenovo X200 running Coreboot drains 3-4W more power than with Vendor BIOS
Hi Andrey and lynxis, thank you for the quick reply and your suggestions. I followed Andrey's advice and here are the results (only with full screen brightness): Coreboot with idle=poll: 15,8W Coreboot running "stress": 37,2W Vendor BIOS with idle=poll: 15W Vendor BIOS with intel_pstate=disabled: 10W Vendor BIOS running "stress": 24,3W (!!) Remember, the idle values without additional kernel parameters were: Vendor BIOS: 10W Coreboot: 13,4W I didn't expect the power consumption in the "stress" scenario to rise up that high with coreboot, I just supposed to power consumption in idle to be affected! :-( Unfortunately, I was not able to extract the VGA BIOS and use it instead of native gfx init, as I didn't succeed to apply bios_extract: daniel@compilehost:~/extract_x200_vga$ dd bs=1k skip=6144 if=x200_factory.rom of=x200_biospart.img 2048+0 records in 2048+0 records out 2097152 bytes (2.1 MB, 2.0 MiB) copied, 0.00409209 s, 512 MB/s daniel@compilehost:~/extract_x200_vga$ ../bios_extract/bios_extract x200_biospart.img Using file "x200_biospart.img" (2048kB) Error: Unable to detect BIOS Image type. And I didn't find any documentation about how to actually extract the VGA Bios part, so any hints are welcome. By the way: All settings in the vendor BIOS are default/unchanged. And I activated all these PCI power management and ASPM settings in coreboot (see my attached config) and even disabled all debugging to serial console etc. but this didn't help so far. Cheers, Daniel # # Automatically generated file; DO NOT EDIT. # coreboot configuration # # # General setup # CONFIG_LOCALVERSION="" CONFIG_CBFS_PREFIX="fallback" # CONFIG_MULTIPLE_CBFS_INSTANCES is not set CONFIG_COMPILER_GCC=y # CONFIG_COMPILER_LLVM_CLANG is not set # CONFIG_ANY_TOOLCHAIN is not set # CONFIG_CCACHE is not set # CONFIG_FMD_GENPARSER is not set # CONFIG_SCONFIG_GENPARSER is not set # CONFIG_USE_OPTION_TABLE is not set # CONFIG_UNCOMPRESSED_RAMSTAGE is not set CONFIG_COMPRESS_RAMSTAGE=y CONFIG_INCLUDE_CONFIG_FILE=y CONFIG_EARLY_CBMEM_INIT=y CONFIG_COLLECT_TIMESTAMPS=y # CONFIG_USE_BLOBS is not set # CONFIG_COVERAGE is not set # CONFIG_RELOCATABLE_MODULES is not set # CONFIG_RELOCATABLE_RAMSTAGE is not set CONFIG_FLASHMAP_OFFSET=0x0 CONFIG_BOOTBLOCK_SIMPLE=y # CONFIG_BOOTBLOCK_NORMAL is not set CONFIG_BOOTBLOCK_CUSTOM=y CONFIG_BOOTBLOCK_SOURCE="bootblock_simple.c" # CONFIG_C_ENVIRONMENT_BOOTBLOCK is not set # CONFIG_UPDATE_IMAGE is not set # CONFIG_GENERIC_GPIO_LIB is not set # CONFIG_BOARD_ID_AUTO is not set # CONFIG_BOARD_ID_MANUAL is not set # CONFIG_RAM_CODE_SUPPORT is not set # CONFIG_BOOTSPLASH_IMAGE is not set # CONFIG_ACPI_SATA_GENERATOR is not set # # Mainboard # # CONFIG_VENDOR_A_TREND is not set # CONFIG_VENDOR_AAEON is not set # CONFIG_VENDOR_ABIT is not set # CONFIG_VENDOR_ADLINK is not set # CONFIG_VENDOR_ADVANSUS is not set # CONFIG_VENDOR_AMD is not set # CONFIG_VENDOR_AOPEN is not set # CONFIG_VENDOR_APPLE is not set # CONFIG_VENDOR_ARTECGROUP is not set # CONFIG_VENDOR_ASROCK is not set # CONFIG_VENDOR_ASUS is not set # CONFIG_VENDOR_AVALUE is not set # CONFIG_VENDOR_AZZA is not set # CONFIG_VENDOR_BACHMANN is not set # CONFIG_VENDOR_BAP is not set # CONFIG_VENDOR_BCOM is not set # CONFIG_VENDOR_BIFFEROS is not set # CONFIG_VENDOR_BIOSTAR is not set # CONFIG_VENDOR_BROADCOM is not set # CONFIG_VENDOR_COMPAQ is not set # CONFIG_VENDOR_CUBIETECH is not set # CONFIG_VENDOR_DIGITALLOGIC is not set # CONFIG_VENDOR_DMP is not set # CONFIG_VENDOR_ECS is not set # CONFIG_VENDOR_EMULATION is not set # CONFIG_VENDOR_ESD is not set # CONFIG_VENDOR_GETAC is not set # CONFIG_VENDOR_GIGABYTE is not set # CONFIG_VENDOR_GIZMOSPHERE is not set # CONFIG_VENDOR_GOOGLE is not set # CONFIG_VENDOR_HP is not set # CONFIG_VENDOR_IBASE is not set # CONFIG_VENDOR_IEI is not set # CONFIG_VENDOR_INTEL is not set # CONFIG_VENDOR_IWAVE is not set # CONFIG_VENDOR_IWILL is not set # CONFIG_VENDOR_JETWAY is not set # CONFIG_VENDOR_KONTRON is not set # CONFIG_VENDOR_LANNER is not set CONFIG_VENDOR_LENOVO=y # CONFIG_VENDOR_LINUTOP is not set # CONFIG_VENDOR_LIPPERT is not set # CONFIG_VENDOR_MITAC is not set # CONFIG_VENDOR_MSI is not set # CONFIG_VENDOR_NEC is not set # CONFIG_VENDOR_NOKIA is not set # CONFIG_VENDOR_NVIDIA is not set # CONFIG_VENDOR_PACKARDBELL is not set # CONFIG_VENDOR_PCENGINES is not set # CONFIG_VENDOR_PURISM is not set # CONFIG_VENDOR_RCA is not set # CONFIG_VENDOR_RODA is not set # CONFIG_VENDOR_SAMSUNG is not set # CONFIG_VENDOR_SIEMENS is not set # CONFIG_VENDOR_SOYO is not set # CONFIG_VENDOR_SUNW is not set # CONFIG_VENDOR_SUPERMICRO is not set # CONFIG_VENDOR_TECHNEXION is not set # CONFIG_VENDOR_THOMSON is not set # CONFIG_VENDOR_TI is not set # CONFIG_VENDOR_TRAVERSE is not set # CONFIG_VENDOR_TYAN is not set # CONFIG_VENDOR_VIA is not set # CONFIG_VENDOR_WINENT is not set # CONFIG_VENDOR_WYSE is not set CONFIG_BOARD_SPECIFIC_OPTIONS=y CONFIG_MAINBOARD_DIR="lenovo/x200" CONFIG_MAINBOARD_PART_NUMBER="ThinkPad
Re: [coreboot] Lenovo X200 running Coreboot drains 3-4W more power than with Vendor BIOS
Hey, I guess the vendor bios activate pci clock power save and similiar options. Some are supported by coreboot, but not activated by default. I can only guess, but the native vga init might also miss some power management features. best, lynxis -- Alexander Couzens mail: lyn...@fe80.eu jabber: lyn...@fe80.eu mobile: +4915123277221 gpg: 390D CF78 8BF9 AA50 4F8F F1E2 C29E 9DA6 A0DF 8604 pgpY2gT1SNQk3.pgp Description: OpenPGP digital signature -- coreboot mailing list: coreboot@coreboot.org https://www.coreboot.org/mailman/listinfo/coreboot
Re: [coreboot] Lenovo X200 running Coreboot drains 3-4W more power than with Vendor BIOS
Hi, coreboot as such is not active once your system has booted. My guess is that with vendor BIOS you are getting better working p-states and/or c-state residency than with coreboot. I think lower max consumption with vendor bios can be attributed to the cpu really being idle in your experiment. Could you try running stress -c 8 -m 8 on both stock bios and coreboot bios and compare peak consumption? Also what happens if you boot on vendor bios with idle=poll ? this will disable cstates, so if power consumption goes up, that may be the problem. You can also try with intel_pstate=disable on vendor bios and see if that makes a dent on wattage. Andrey -- coreboot mailing list: coreboot@coreboot.org https://www.coreboot.org/mailman/listinfo/coreboot
[coreboot] Lenovo X200 running Coreboot drains 3-4W more power than with Vendor BIOS
Hi, I was wondering why my Lenovo X200 had such a short battery lifetime when running Libreboot/Coreboot, so I did a few measurements using the following hardware configuration: X200 with P8700 CPU 8GB RAM LED Display (yes, one of the rare ones) OCZ Trion SSD (unused, just idling) Wifi and WWAN removed Battery removed Ubuntu MATE 16.04 Live running from an USB thumb drive No tweaking with powertop or such I kept this configuration unchanged except for the BIOS and waited 5 minutes after booting, so the system could settle. Then I measured power consumption both at full brightness and at minimum brightness using a conventional power meter (EKM 365) which was plugged between the AC adapter and the power socket in the wall. I obtained the following numbers: Vendor BIOS: 7,5W (lowest) to 10W (highest) Libreboot 20150518 (using the precompiled binary binary): 13,3W (lowest) to 16,1W (highest) Latest Coreboot, config attached (80a3df260767a6d9ad34b61572d483579c21476c): 10,4W (lowest) to 13,4W (highest) While Libreboot performs much worse than Coreboot, Coreboot still eats around 3W extra when compared with the vendor BIOS. In other words: Coreboot consumes around 30-40% more juice than the vendor BIOS which is a very sad result for an ultraportable notebook. Is this a known issue? Has someone else tried the same and obtained different numbers? Cheers, Daniel -- coreboot mailing list: coreboot@coreboot.org https://www.coreboot.org/mailman/listinfo/coreboot