Change font size
It is currently Wed 8. Sep 2010, 10:55


Post a new topicPost a reply Page 1 of 1   [ 6 posts ]
Author Message
 Post subject: Patch for Athlon64, Opteron, Turion64, DirectTrans, & MSR
PostPosted: Fri 7. Aug 2009, 21:07 

Joined: Wed 5. Aug 2009, 20:49
Posts: 6
Hi,

Just posting this during a break before I go catchup on sleep, quite tired, so I will be quite brief.. :)

When I downloaded and ran PHCTool-0.5.2-2, I realized it was missing important features, especially support for AMD64/Opteron/Turion64 in terms of Vcc calculation (Voltages tab), MSR Polling (Analysis tab). Even more unfortunate, if I use phc-k8 with direct_transitions=1 (enabled), and add intermediate fids/vids in command line, then try to open PHCTool, it would crash because it doesn't know about these intermediate fids/vids (since it doesn't find default vids for them in phc_default_fids) :|

So I went ahead and made a patch to address all these issues :)

Changes made by the attached patch:
- Added VID->Voltage calculation formula(s) for Athlon64, Opteron, Turion64 Mobile Technology CPUs (including X2)
- Added autodetection of Turion64 X2 Mobile Technology TL-50, TL-52, TL-56, Tl-58, TL-60, TL-62, etc.. to use said formula(s)
- Added checking for direct_transitions if phc-k8 module is being used (for AMD CPUs), and display if its enabled in "Infos" page
- Added detection of intermediate frequencies being used if phc-k8 is detected and direct_transitions is enabled, and auto-calculation of "default VIDs" for the intermediate FIDs (Quick and dirty imitation of RMClock, but done in a haste, so need to revise for accuracy) so that PHCTool recognizes them and allows for adjustment of their VIDs and displays the difference between the "defaults" and the values you set, and more importantly, NOT CRASH!
- Added support for AMD K8 MSR Polling, so you can now use the "Analysis" tab of PHCTool to check if the VIDs (and optionally intermediate FIDs) are actually being used by your CPU

Screenshots? Everyone loves screenshots :P

Infos
Image

Voltages
Image

Analysis
Image

Infos - Direct Transitions enabled and used
Image

Voltages - Direct Transitions enabled and used (also shows difference from the calculated "defaults")
Image

Sources used for reference/ideas in the process of creating the patch:
- Chapter 9 (Power and Thermal Management) of the "BIOS and Kernel Developer's Guide for the AMD Athlon 64 and AMD Opteron Processors" available for download from AMD
- AMD AthlonTM 64 Processor Power and Thermal Data Sheet available for download from AMD (also applies to Sempron & Turion64 Mobile Technology CPUs)
- arch/x86/kernel/cpu/cpufreq/powernow-k8.c from kernel 2.6.30 sources
- cpupowerd (just for ideas and to confirm the correctness of the formula used - src/msr_amd.c)
- RMClock manual/Readme


Attachments:
File comment: PHCTool-0.5.2-2 Patch for Athlon64, Opteron, and Turion64 VIDs->Voltages calculation support. Also enables basic DirectTransitions support & MSR polling support in the "Analysis" tab..
phctool-0.5.2-2_amd64.patch.tar.gz [4.6 KiB]
Downloaded 92 times
Top
 Profile  
 
 Post subject: Re: Patch for Athlon64, Opteron, Turion64, DirectTrans, & MSR
PostPosted: Fri 7. Aug 2009, 22:44 
User avatar

Joined: Fri 18. Jul 2008, 11:25
Posts: 104
Glad to have you on board! ;)


Top
 Profile  
 
 Post subject: Re: Patch for Athlon64, Opteron, Turion64, DirectTrans, & MSR
PostPosted: Wed 7. Oct 2009, 19:30 
Administrator

Joined: Wed 9. Jul 2008, 19:57
Posts: 341
Me, too!

Welcome on board!


Top
 Profile  
 
 Post subject: patch shows no effect
PostPosted: Mon 17. May 2010, 16:12 

Joined: Mon 17. May 2010, 15:59
Posts: 1
Hi,

thanks for this patch and the time you spent writing it, but... it seems to have no effect on my machine (Acer travelmate with tl-58). When I run the patch in a terminal the following appears:
XXXXX@XXXXX:~/Dokumente/energieverwaltung/0.5.2-2/phctool/inc/libs$ sudo patch < phctool-0.5.2-2_amd64.patch
patching file cpuinfo.py
patching file msr.py
patching file voltages.py
patching file phctool.py
Hunk #1 FAILED at 97.
Hunk #2 FAILED at 216.
Hunk #3 FAILED at 225.
Hunk #4 FAILED at 307.
Hunk #5 FAILED at 339.
Hunk #6 FAILED at 355.
Hunk #7 FAILED at 363.
7 out of 7 hunks FAILED -- saving rejects to file phctool.py.rej
XXXX@XXXX:~/Dokumente/energieverwaltung/0.5.2-2/phctool/inc/libs$

when I run phctool afterwards my cpu keeps non recognized. Shut I apply the patch before or after running the install.sh of phctool? I am a linux-newbie and every help is much appreciated, because the fan of my laptop is the only thing that keeps me away from nonstop working in linux instead of windows.

Thanks in advance.


Top
 Profile  
 
 Post subject: Re: Patch for Athlon64, Opteron, Turion64, DirectTrans, & MSR
PostPosted: Mon 17. May 2010, 20:41 
Administrator

Joined: Wed 9. Jul 2008, 19:57
Posts: 341
Please note that PHCTool is currently not maintained.

I apologize that I still can not provide a new alternative.

I hope someone with some time to spend will take care of a GUI.

Until then you need to use the console tools. They give you all you need (but not a GUI at all :) )


Top
 Profile  
 
 Post subject: Re: Patch for Athlon64, Opteron, Turion64, DirectTrans, & MSR
PostPosted: Sun 18. Jul 2010, 09:31 

Joined: Sun 18. Jul 2010, 08:45
Posts: 3
@the-fallen,@jasmine: Thank you so much ! You saved me from WinXP + RM Clock. Now XP is virtual.
I`ve applied your patch, but since my CPU wasn`t in, i`ve added a line in voltages.py for it (though I don`t understand python).
(Turion64 MLxx is old single core which benefits from undervolting hugely, mine is ML34 at 1.45v@1.8Ghz underpowered to 1.15V@1.8G thus 35W->25W like MT34 model (same Si) ).
@Nic: For those (like me :) ) who can`t even use patch tool, i put here the whole (AMD) patched version.
Attachment:
phctool-0.5.2-2.tar.gz [51.06 KiB]
Downloaded 34 times
Ripped the doc folder to meet the 256k limit. One can D/L the original source to get it.
run phctool by typing: path_to/phctool.sh
I`ve did a nasty fix for error i got trying to run phctray.sh It was problem regarding egg.trayicon (no such object or so). Now using gtk.StatusIcon.
@Nic: Do you have phc kernel and phc_k8 kernel module loaded ?
For unknown reason I`ve lost /dev/cpu node, so I couldn`t check if the settings applied from GUI/Analysis tab. To resolve i `ve loaded the msr driver by hand: sudo modprobe msr
hope it helps someone.
@the-fallen: registration here was very challenging due to captcha module. I recognized 1 from 8 tries.


Last edited by Gele on Sun 18. Jul 2010, 18:57, edited 5 times in total.

Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 6 posts ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
610nm Style by Daniel St. Jules of Gamexe.net