Announcement

Collapse
No announcement yet.

New tool for undervolt/overclock AMD K8L and K10 processors

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • New tool for undervolt/overclock AMD K8L and K10 processors

    Hi guys, I made a new tool for undervolting/overclocking Family 11h (K8L) and Family 10h (K10) AMD processors, available both in Linux and Windows, for 32 bit and 64 bit flavours.

    The program name is TurionPowerControl, since it has born as a tool to control power usage of Turion ZM/RM and Athlon QL processors, then it has evolved to support also Phenom, Phenom II, Athlon II desktop processors and mobile Athlon II, Turion II and Phenom II.

    I put here because I need some feedback from users: K8L support is established and working well, but K10 support is still in a early state and needs testing and feedback since I have no continous access to K10 processors.

    You can grab the program here:

    TurionPowerControl 0.29 pre-alpha

    The package contains compiled win x86 and AMD64 binaries, compiled Fedora 13 AMD64 binary and full source code with compile script. Last but not least, there's a full documentation with some usage and compiling examples.

  • #2
    Originally posted by blackshard View Post
    Hi guys, I made a new tool for undervolting/overclocking Family 11h (K8L) and Family 10h (K10) AMD processors, available both in Linux and Windows, for 32 bit and 64 bit flavours.

    The program name is TurionPowerControl, since it has born as a tool to control power usage of Turion ZM/RM and Athlon QL processors, then it has evolved to support also Phenom, Phenom II, Athlon II desktop processors and mobile Athlon II, Turion II and Phenom II.

    I put here because I need some feedback from users: K8L support is established and working well, but K10 support is still in a early state and needs testing and feedback since I have no continous access to K10 processors.

    You can grab the program here:

    TurionPowerControl 0.29 pre-alpha

    The package contains compiled win x86 and AMD64 binaries, compiled Fedora 13 AMD64 binary and full source code with compile script. Last but not least, there's a full documentation with some usage and compiling examples.
    Hi blackshard, thanks for this tool. It seems great work, but unfortunately I am unable to get it working. I'm trying it on a Phenom II X4 940 BE (10h).
    Code:
    sudo ./TurionPowerControl -l
    gives
    Code:
    Turion Power States Optimization and Control - by blackshard - v0.29.1 (alpha)
    Detected CPU:
    Family: 0xf             Model: 0x4              Stepping: 0x2
    Extended Family: 0x10   Extended Model: 0x4
    Package Type: 0x1       BrandId: 0x1a86
    Detected Physical Cores: 4
    Detected processor: AMD Family 10h Processor
    Processor has 4 cores
    Processor has 5 p-states
    
    Power States table:
    -- Core 0
    core 0 pstate 0 - En:1 VID:16 FID:20 DID:0 Freq:3600 VCore: 1.1500
    core 0 pstate 1 - En:1 VID:24 FID:7 DID:0 Freq:2300 VCore: 0.9500
    core 0 pstate 2 - En:1 VID:32 FID:2 DID:0 Freq:1800 VCore: 0.7625
    core 0 pstate 3 - En:1 VID:32 FID:0 DID:1 Freq:800 VCore: 0.7625
    core 0 pstate 4 - En:0 VID:0 FID:0 DID:0 Freq:1600 VCore: 1.5500
    -- Core 1
    core 1 pstate 0 - En:1 VID:16 FID:20 DID:0 Freq:3600 VCore: 1.1500
    core 1 pstate 1 - En:1 VID:24 FID:7 DID:0 Freq:2300 VCore: 0.9500
    core 1 pstate 2 - En:1 VID:32 FID:2 DID:0 Freq:1800 VCore: 0.7625
    core 1 pstate 3 - En:1 VID:32 FID:0 DID:1 Freq:800 VCore: 0.7625
    core 1 pstate 4 - En:0 VID:0 FID:0 DID:0 Freq:1600 VCore: 1.5500
    -- Core 2
    core 2 pstate 0 - En:1 VID:16 FID:20 DID:0 Freq:3600 VCore: 1.1500
    core 2 pstate 1 - En:1 VID:24 FID:7 DID:0 Freq:2300 VCore: 0.9500
    core 2 pstate 2 - En:1 VID:32 FID:2 DID:0 Freq:1800 VCore: 0.7625
    core 2 pstate 3 - En:1 VID:32 FID:0 DID:1 Freq:800 VCore: 0.7625
    core 2 pstate 4 - En:0 VID:0 FID:0 DID:0 Freq:1600 VCore: 1.5500
    -- Core 3
    core 3 pstate 0 - En:1 VID:16 FID:20 DID:0 Freq:3600 VCore: 1.1500
    core 3 pstate 1 - En:1 VID:24 FID:7 DID:0 Freq:2300 VCore: 0.9500
    core 3 pstate 2 - En:1 VID:32 FID:2 DID:0 Freq:1800 VCore: 0.7625
    core 3 pstate 3 - En:1 VID:32 FID:0 DID:1 Freq:800 VCore: 0.7625
    core 3 pstate 4 - En:0 VID:0 FID:0 DID:0 Freq:1600 VCore: 1.5500
    Processor Maximum PState: 3
    Processor Startup PState: 3
    Processor Maximum Operating Frequency: No maximum defined. Unlocked multiplier.
    
    Minimum allowed VID: 123 (-0.375v) - Maximum allowed VID 0 (1.550v)
    Processor AltVID: 34 (0.738v)
    Core 0 C1E CMP halt bit is disabled
    Core 1 C1E CMP halt bit is disabled
    Core 2 C1E CMP halt bit is disabled
    Core 3 C1E CMP halt bit is disabled
    
    Voltage Regulator Slamming time register: 4
    Voltage Regulator Step Up Ramp Time: 8
    Voltage Regulator Step Down Ramp Time: 8
    Processor is using Parallel VID Interface (probably Single Plane mode)
    Processor PState Identifier: 0x2
    PSI_L bit not enabled
    If I try for example
    Code:
    sudo ./TurionPowerControl -set core all pstate 3 frequency 700
    I get
    Code:
    Turion Power States Optimization and Control - by blackshard - v0.29.1 (alpha)
    Detected CPU:
    Family: 0xf             Model: 0x4              Stepping: 0x2
    Extended Family: 0x10   Extended Model: 0x4
    Package Type: 0x1       BrandId: 0x1a86
    Detected Physical Cores: 4
    set frequency 700 Mhz on all cores pstate 3
    
    For frequency 700, FID is 12.000000, DID 2.000000
    
    
    For frequency 700, FID is 12.000000, DID 2.000000
    
    
    For frequency 700, FID is 12.000000, DID 2.000000
    
    
    For frequency 700, FID is 12.000000, DID 2.000000
    
    *** -set parsing terminated
    Unfortunately /proc/cpuinfo and KDE System Monitor still report the CPU at 800 Mhz when idle. I've also tried the manual way with
    Code:
    sudo ./TurionPowerControl -pf 0 3 2 -pd 0 3 0
    (for example) but the result is the same. Please note though that launching
    Code:
    sudo ./TurionPowerControl -l
    after one of these commands shows that pstates have been correctly altered.

    Could you help me? Thanks again

    Comment


    • #3
      Hi kbios.

      Actually cpuinfo (and don't know kde system monitor too) don't update in real time the information about the cpu.
      Also many utilities (like cpufreq-info) state that they do hardware calls to report their data, but actually they don't!

      Tpc instead reads all its info directly from the processor, it can't be wrong.
      With Linux, the only way I know to see if cpu frequency has changed is to do a benchmark. Prime95 is my favourite benchmark: it has a builtin benchmark that takes seconds to say if your processor has changed frequency.

      Also, are you running your processor on an AM2 motherboard? In that case probably you can change voltage at various pstates, but it won't have effect.

      Comment


      • #4
        The program is not working correctly with 2.6.36-rc6...

        Code:
        root@dandel-desktop:/home/dandel/Downloads/tpc-0.29pa/bin# ./TurionPowerControl -l
        Turion Power States Optimization and Control - by blackshard - v0.29 (pre-alpha)
        cpuid:open: No such file or directory
        Cpuid_Fn0 Instruction failed
        Error: unable to get processor specifications
        root@dandel-desktop:/home/dandel/Downloads/tpc-0.29pa/bin# uname -r
        2.6.36-rc6+
        root@dandel-desktop:/home/dandel/Downloads/tpc-0.29pa/bin# gcc -v
        Using built-in specs.
        Target: x86_64-linux-gnu
        Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.3-4ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i486 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
        Thread model: posix
        gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)

        Comment


        • #5
          Originally posted by blackshard View Post
          Hi kbios.

          Actually cpuinfo (and don't know kde system monitor too) don't update in real time the information about the cpu.
          Also many utilities (like cpufreq-info) state that they do hardware calls to report their data, but actually they don't!

          Tpc instead reads all its info directly from the processor, it can't be wrong.
          With Linux, the only way I know to see if cpu frequency has changed is to do a benchmark. Prime95 is my favourite benchmark: it has a builtin benchmark that takes seconds to say if your processor has changed frequency.

          Also, are you running your processor on an AM2 motherboard? In that case probably you can change voltage at various pstates, but it won't have effect.
          Exactly. I opened a bug report about this some time ago on the kernel and it was rejected. The cpu speed shown everywhere normally is wrong when you over- or underclock.

          Comment


          • #6
            Doesn't work after compilation. My system is ArchLinux 64-bit, processor AMD Phenom II 905e

            Code:
            # tpc -l
            Turion Power States Optimization and Control - by blackshard - v0.29 (pre-alpha)
            cpuid:open: No such file or directory
            Cpuid_Fn0 Instruction failed
            Error: unable to get processor specifications

            Comment


            • #7
              First of all, grab newer version 0.29.1 alpha below. I'm sorry, but I can't edit first post to put updated version on top.

              TurionPowerControl 0.29.1 alpha

              Then all people having problems with cpuid/msr can take a look at the manual paragraph 1.2

              Comment


              • #8
                Thx. Now it's working but I've notice one thing - when I monitor core usage while mrpime is running at 4 cores, tpc shows that only 3 cores are at 99% (core 2 is at 0%) but top/htop shows all 4 at 99%.

                Comment


                • #9
                  Originally posted by blackshard View Post
                  Hi kbios.

                  Actually cpuinfo (and don't know kde system monitor too) don't update in real time the information about the cpu.
                  Also many utilities (like cpufreq-info) state that they do hardware calls to report their data, but actually they don't!

                  Tpc instead reads all its info directly from the processor, it can't be wrong.
                  With Linux, the only way I know to see if cpu frequency has changed is to do a benchmark. Prime95 is my favourite benchmark: it has a builtin benchmark that takes seconds to say if your processor has changed frequency.

                  Also, are you running your processor on an AM2 motherboard? In that case probably you can change voltage at various pstates, but it won't have effect.
                  Hi, thanks for your answer. I tried setting all pstates to 100 mhz and I felt the result , so a big thanks for this tool. Yes, I'm using an AM2 motherboard. Apart from changing VID, do you think the reportd one is correct? Because 1.15V for 3600 mhz seems a bit too low to me (and the bios says otherwise).

                  Comment


                  • #10
                    Originally posted by kbios View Post
                    Hi, thanks for your answer. I tried setting all pstates to 100 mhz and I felt the result , so a big thanks for this tool. Yes, I'm using an AM2 motherboard. Apart from changing VID, do you think the reportd one is correct? Because 1.15V for 3600 mhz seems a bit too low to me (and the bios says otherwise).
                    Most probably it is reported correctly, but there is an issue with AM2+ CPUs on AM2 boards: since there is just one single power plane, the processor and the northbridge (i.e. the memory controller) share the power source. So the processor is feed with northbridge voltage, which is usually higher than processor voltage, so those VID numbers means just nothing in such situation. That's the reason why AMD raise the TDP of AM2+ CPUs when put in an AM2 boards.

                    You may try to change those VIDs but shouldn't happen anything at all. To be precise, I guess that because I never had the chance to experiment it by myself, but just read it on AMD documentation.

                    At the moment the program can't change the Northbridge VID on K10 processors because I have to test and experiment by myself since the matter is a bit delicate.

                    Comment


                    • #11
                      Originally posted by kfgz View Post
                      Thx. Now it's working but I've notice one thing - when I monitor core usage while mrpime is running at 4 cores, tpc shows that only 3 cores are at 99% (core 2 is at 0%) but top/htop shows all 4 at 99%.
                      Mmmh, thanks for reporting this. I need to investigate on this fact.

                      Comment


                      • #12
                        try to rerun tpc, maybe some other program (or perhaps the kernel) is manipulating the processor counters.

                        Also it would be nice if you could post here the output of the program launched with -pcgetinfo switch

                        Comment


                        • #13
                          Originally posted by blackshard View Post
                          try to rerun tpc, maybe some other program (or perhaps the kernel) is manipulating the processor counters.

                          Also it would be nice if you could post here the output of the program launched with -pcgetinfo switch
                          Here's mine. I have a 1055T, running boinc on all cores (htop shows 100% usage). Also the CPUs reporting zero usage have changed since my last run (~hour ago).

                          Code:
                          sudo ./bin/TurionPowerControl -cpuusage
                          Turion Power States Optimization and Control - by blackshard - v0.29.1 (alpha)
                          Detected CPU:
                          Family: 0xf             Model: 0xa              Stepping: 0x0
                          Extended Family: 0x10   Extended Model: 0xa
                          Package Type: 0x1       BrandId: 0x50   
                          Detected Physical Cores: 6
                          Core 0 is using already set Performace Counter 0
                          Core 1 is using already set Performace Counter 0
                          Core 2 is using already set Performace Counter 0
                          Core 3 is using newly set Performace Counter 0
                          Core 4 is using already set Performace Counter 0
                          Core 5 is using already set Performace Counter 0
                          CPU Usage: core 0: 99 core 1: 99 core 2: 0 core 3: 100 core 4: 0 core 5: 0
                          CPU Usage: core 0: 100 core 1: 100 core 2: 0 core 3: 100 core 4: 0 core 5: 0
                          CPU Usage: core 0: 100 core 1: 99 core 2: 0 core 3: 99 core 4: 0 core 5: 0
                          CPU Usage: core 0: 99 core 1: 100 core 2: 0 core 3: 99 core 4: 0 core 5: 0
                          CPU Usage: core 0: 100 core 1: 99 core 2: 0 core 3: 100 core 4: 0 core 5: 0
                          CPU Usage: core 0: 100 core 1: 99 core 2: 0 core 3: 99 core 4: 0 core 5: 0
                          CPU Usage: core 0: 99 core 1: 100 core 2: 0 core 3: 99 core 4: 0 core 5: 0
                          CPU Usage: core 0: 100 core 1: 100 core 2: 0 core 3: 100 core 4: 0 core 5: 0
                          CPU Usage: core 0: 99 core 1: 100 core 2: 0 core 3: 99 core 4: 0 core 5: 0
                          CPU Usage: core 0: 99 core 1: 99 core 2: 0 core 3: 99 core 4: 0 core 5: 0
                          CPU Usage: core 0: 100 core 1: 100 core 2: 0 core 3: 100 core 4: 0 core 5: 0
                          Code:
                          > sudo ./bin/TurionPowerControl -pcgetinfo
                          Turion Power States Optimization and Control - by blackshard - v0.29.1 (alpha)
                          Detected CPU:
                          Family: 0xf             Model: 0xa              Stepping: 0x0
                          Extended Family: 0x10   Extended Model: 0xa
                          Package Type: 0x1       BrandId: 0x50   
                          Detected Physical Cores: 6
                          Core 0 - Perf Counter 0: EAX:430076 EDX:0 - Evt: 0x76 En: 1 U: 1 OS: 1
                          Core 0 - Perf Counter 1: EAX:151d6f7f EDX:108 - Evt: 0x7f En: 0 U: 1 OS: 0
                          Core 0 - Perf Counter 2: EAX:501fdf3b EDX:7 - Evt: 0x3b En: 0 U: 1 OS: 1
                          Core 0 - Perf Counter 3: EAX:1095bff3 EDX:20d - Evt: 0xf3 En: 0 U: 1 OS: 0
                          Core 1 - Perf Counter 0: EAX:430076 EDX:0 - Evt: 0x76 En: 1 U: 1 OS: 1
                          Core 1 - Perf Counter 1: EAX:f897e74b EDX:30f - Evt: 0x4b En: 0 U: 1 OS: 1
                          Core 1 - Perf Counter 2: EAX:f99fb418 EDX:107 - Evt: 0x18 En: 0 U: 1 OS: 1
                          Core 1 - Perf Counter 3: EAX:d89bb04c EDX:107 - Evt: 0x4c En: 0 U: 1 OS: 1
                          Core 2 - Perf Counter 0: EAX:430076 EDX:0 - Evt: 0x76 En: 1 U: 1 OS: 1
                          Core 2 - Perf Counter 1: EAX:151d6f7f EDX:108 - Evt: 0x7f En: 0 U: 1 OS: 0
                          Core 2 - Perf Counter 2: EAX:501fdf3b EDX:7 - Evt: 0x3b En: 0 U: 1 OS: 1
                          Core 2 - Perf Counter 3: EAX:1095bff3 EDX:20d - Evt: 0xf3 En: 0 U: 1 OS: 0
                          Core 3 - Perf Counter 0: EAX:2b9db4f6 EDX:101 - Evt: 0xf6 En: 0 U: 1 OS: 0
                          Core 3 - Perf Counter 1: EAX:3f95bbfe EDX:101 - Evt: 0xfe En: 0 U: 1 OS: 0
                          Core 3 - Perf Counter 2: EAX:d13ab1f EDX:30e - Evt: 0x1f En: 0 U: 1 OS: 1
                          Core 3 - Perf Counter 3: EAX:71d9d9d EDX:20a - Evt: 0x9d En: 0 U: 1 OS: 0
                          Core 4 - Perf Counter 0: EAX:430076 EDX:0 - Evt: 0x76 En: 1 U: 1 OS: 1
                          Core 4 - Perf Counter 1: EAX:151d6f7f EDX:108 - Evt: 0x7f En: 0 U: 1 OS: 0
                          Core 4 - Perf Counter 2: EAX:501fdf3b EDX:7 - Evt: 0x3b En: 0 U: 1 OS: 1
                          Core 4 - Perf Counter 3: EAX:1095bff3 EDX:20d - Evt: 0xf3 En: 0 U: 1 OS: 0
                          Core 5 - Perf Counter 0: EAX:430076 EDX:0 - Evt: 0x76 En: 1 U: 1 OS: 1
                          Core 5 - Perf Counter 1: EAX:f897e74b EDX:30f - Evt: 0x4b En: 0 U: 1 OS: 1
                          Core 5 - Perf Counter 2: EAX:f99fb418 EDX:107 - Evt: 0x18 En: 0 U: 1 OS: 1
                          Core 5 - Perf Counter 3: EAX:d89bb04c EDX:107 - Evt: 0x4c En: 0 U: 1 OS: 1

                          Comment


                          • #14
                            Code:
                            # tpc -pcgetinfo
                            Turion Power States Optimization and Control - by blackshard - v0.29.1 (alpha)
                            Detected CPU:
                            Family: 0xf        Model: 0x4        Stepping: 0x2
                            Extended Family: 0x10    Extended Model: 0x4
                            Package Type: 0x1    BrandId: 0x1857    
                            Detected Physical Cores: 4
                            Core 0 - Perf Counter 0: EAX:430076 EDX:0 - Evt: 0x76 En: 1 U: 1 OS: 1
                            Core 0 - Perf Counter 1: EAX:8008f13f EDX:200 - Evt: 0x3f En: 0 U: 0 OS: 0
                            Core 0 - Perf Counter 2: EAX:cc0af51d EDX:3 - Evt: 0x1d En: 0 U: 0 OS: 1
                            Core 0 - Perf Counter 3: EAX:17cdbf EDX:20f - Evt: 0xbf En: 0 U: 1 OS: 1
                            Core 1 - Perf Counter 0: EAX:430076 EDX:0 - Evt: 0x76 En: 1 U: 1 OS: 1
                            Core 1 - Perf Counter 1: EAX:320ea74b EDX:30a - Evt: 0x4b En: 0 U: 0 OS: 1
                            Core 1 - Perf Counter 2: EAX:a06565f EDX:10a - Evt: 0x5f En: 0 U: 0 OS: 1
                            Core 1 - Perf Counter 3: EAX:c084e30f EDX:309 - Evt: 0xf En: 0 U: 0 OS: 0
                            Core 2 - Perf Counter 0: EAX:430076 EDX:0 - Evt: 0x76 En: 1 U: 1 OS: 1
                            Core 2 - Perf Counter 1: EAX:8008f13f EDX:200 - Evt: 0x3f En: 0 U: 0 OS: 0
                            Core 2 - Perf Counter 2: EAX:cc0af51d EDX:3 - Evt: 0x1d En: 0 U: 0 OS: 1
                            Core 2 - Perf Counter 3: EAX:17cdbf EDX:20f - Evt: 0xbf En: 0 U: 1 OS: 1
                            Core 3 - Perf Counter 0: EAX:3952649 EDX:a - Evt: 0x49 En: 0 U: 1 OS: 0
                            Core 3 - Perf Counter 1: EAX:2291342c EDX:208 - Evt: 0x2c En: 0 U: 1 OS: 0
                            Core 3 - Perf Counter 2: EAX:2a9e623b EDX:9 - Evt: 0x3b En: 0 U: 0 OS: 1
                            Core 3 - Perf Counter 3: EAX:1a963c2b EDX:10f - Evt: 0x2b En: 0 U: 0 OS: 1
                            With rerun, cpu usage is the same as before

                            Code:
                            # tpc -cpuusage
                            Turion Power States Optimization and Control - by blackshard - v0.29.1 (alpha)
                            Detected CPU:
                            Family: 0xf        Model: 0x4        Stepping: 0x2
                            Extended Family: 0x10    Extended Model: 0x4
                            Package Type: 0x1    BrandId: 0x1857    
                            Detected Physical Cores: 4
                            Core 0 is using already set Performace Counter 0
                            Core 1 is using already set Performace Counter 0
                            Core 2 is using already set Performace Counter 0
                            Core 3 is using newly set Performace Counter 0
                            CPU Usage: core 0: 94 core 1: 99 core 2: 0 core 3: 99
                            CPU Usage: core 0: 100 core 1: 99 core 2: 0 core 3: 100
                            CPU Usage: core 0: 100 core 1: 100 core 2: 0 core 3: 99
                            CPU Usage: core 0: 99 core 1: 100 core 2: 0 core 3: 99
                            CPU Usage: core 0: 99 core 1: 100 core 2: 0 core 3: 100
                            CPU Usage: core 0: 100 core 1: 100 core 2: 0 core 3: 99
                            CPU Usage: core 0: 100 core 1: 99 core 2: 0 core 3: 100
                            CPU Usage: core 0: 99 core 1: 99 core 2: 0 core 3: 100
                            CPU Usage: core 0: 100 core 1: 100 core 2: 0 core 3: 99

                            Comment


                            • #15
                              Yup, probably I found the bugs.

                              You should be able to fix them yourselves editing the file K10Processor.cpp and changing these two instructions:

                              at line 1017 change this line:
                              Code:
                              RdmsrPx (BASE_PESR_REG+perf_reg,&eaxMsr,&edxMsr,coreId+1);
                              with this line:
                              Code:
                              RdmsrPx (BASE_PESR_REG+perf_reg,&eaxMsr,&edxMsr,1<<coreId);

                              then at line 1207 change this line:
                              Code:
                              RdmsrPx (BASE_PESR_REG+perf_reg,&eaxMsr,&edxMsr,coreId+1);
                              with this line:
                              Code:
                              RdmsrPx (BASE_PESR_REG+perf_reg,&eaxMsr,&edxMsr,1<<coreId);

                              Then recompile and check if it works. Well, I hope it works...

                              Comment

                              Working...
                              X