Description of problem: Newer laptops with AMD Turion X2 and AMD Athlon X2 mobile processors (which are C1E capable) are overheating and have very degraded battery life due to bug in /usr/src/linux/drivers/acpi/processor_idle.c -> acpi_processor_get_power_info_fadt. The exact problem lies in "if (!pr->pblk) return -ENODEV;". C1E replaces C2 and C3 states, so BIOS usually doesn't have definitions for _CST and PBLK in FADT - it is perfectly valid according to ACPI specification. When there is no PBLK its address is 0. In this situation acpi_processor_get_power_info_fadt returns error code which causes acpi_processor_get_power_info to disable C1/C1e. Instead of error there should be returned zero. Version-Release number of selected component (if applicable): all Linux kernels including not yet realeased 2.6.27 How reproducible: With modern Puma laptops, virtually always. Steps to Reproduce: 1.Buy Acer Aspire 4530 or HP Pavilion or anything else which is based on AMD Puma platform or slightly order 2.Install Linux on it 3.Then compare temperatures and battery life with Vista. You will be very disappointed by Linux. Actual results: Linux on AMD laptops sucks. Expected results: Linux on AMD laptops rulez. Additional info: http://download.microsoft.com/download/0/0/b/00bba048-35e6-4e5b-a3dc-36da83cbb0d1/ProcPowerMgmt.docx Evil always enables C1.
Created attachment 319520 [details] C1 visible by powertop With this patch we are sure that C1 is used, but it doesn't increase battery life drastically. The question (to AMD) is why? 2h comparing to 3h in Vista.
Is the system going into tickless mode? What does /proc/interrupts tell you about how often the timer interrupt is happening? Also please attach /var/log/dmesg from booting the latest rawhide kernel (2.6.27-1 or later.)
Created attachment 320120 [details] dmesg
Created attachment 320121 [details] interrupts - time0
Created attachment 320122 [details] interrupts - time30
here are screenshots with powertop: http://jakub007.blogspot.com/2008/10/powertop-on-linux-2.html http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/41256.pdf Cited MSR for C1E is zero.
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle. Changing version to '10'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Current AMD dual-core CPUs don't support C2 and C3. Instead C1E is used. C1 is automatically used when core enters halt(). If both cores are in halt (or C1 state) C1E is entered if configured by BIOS. So if your system (BIOS) does not setup C1E, I assume that it is not used under Windows as well. Thus the different power consumption has a different root cause. One possible culprit for decreased battery life can be different graphic card drivers used under Linux and Windows.
If I had enabled C1E by BIOS in Windows how much would be battery life increased? Can I reprogram MSR001_0055 on early kernel init? What should I write into it among bits 28 and 26? Can acpi_osi trigger C1E configuration?
> If I had enabled C1E by BIOS in Windows how much would > be battery life increased? AFAIK several AMD CPU family 0x11 systems are using CLMC. See "AMD Family 11h Processor BKDG", section "2.4.3.1 C1 Enhanced State (C1E)" C1E is not supported when CLMC is used by the IO Hub. CLMC is used for power management, too. I don't expect huge differences in power consumption. I don't have numbers at hand, though. > Can I reprogram MSR001_0055 on early kernel init? Sure in general you can change MSRs. You also can change MSRs using /dev/cpu/X/msr interface after the system is up and running. But you can really screw up your system when writing the wrong values to an MSR. > What should I write into it among bits 28 and 26? Don't modify it. The BIOS should know how to set these bits. > Can acpi_osi trigger C1E configuration? Do you mean acpi_osi kernel parameter?
I will never again buy any AMD product
> I will never again buy any AMD product That's unfortunate. Hope that has nothing to do with my last comment. In that I just wanted to point out that it is waste of time to try to activate C1E (due to CLMC). Regards, Andreas
HyperTransport specification in chapter 8.6 says that CLMC works only on single core CPU and I have dual core CPU. CLMC is about HT power management, not about CPU power management.
> Unfortunately that information is under a Non-Disclosure Agreement (NDA) and is > not available for the public. If you want NDA access, please contact your local > AMD office and request NDA access. > http://www.amd.com/us-en/Corporate/AboutAMD/0,,51_52_502,00.html#Europe People need to sign NDA just to learn that to enable C1E they must put in arch/x86/kernel/cpu/amd.c line: wrmsrl(0xC0010055, 0x0000000014C11015); After that patched 2.6.30-rc3 hangs during boot, workaround is 'nolapic'. That proves that AMD hardware is broken. I wonder if reworked FADT and CST with hand made C2 and C3 would work.
Patched C1E + acpi=ht boots fine. Why ACPI hangs laptop?