Hi guys,
PHC stands for Processor Hardware Control and, as it's easy to understand, it allows users to customize some features of CPU control in a linux environment, as undervolting.
So what do we need? An Ubuntu (or Debian) box, usually undervolting is useful on laptops: it enhance battery duration and reduces the heat production. You will also need some time and patience, ;]
- You will need a kernel patch and a particular CPU driver so that the hardware control will be possible. First let's add the repo:
sudo add-apt-repository ppa:linux-phc/ppa
sudo add-apt-repository ppa:linux-phc/testing
sudo apt-get update - Now let's install the kernel and its headers:
sudo apt-get install linux-generic-phc linux-headers-generic-phc
First pause... restart your PC and be sure to choose your new *-phc kernel. - As we will need to compile some stuff some Ubuntu users might need
sudo apt-get install gtk2-engines-pixbuf python-gtk2-dev build-essential
And then:
sudo apt-get install dkms debhelper
Before doing anything else we have to create an empty file to match dmks autoconfiguration: Intel users go with the first, AMD with the second line!sudo sh -c 'echo >> /etc/modprobe.d/phc-intel.conf'
sudo sh -c 'echo >> /etc/modprobe.d/phc-k8.conf' - Now you have to download the driver, choose it looking at your CPU: there are two choices AMD and Intel, be sure to take the right one.
- Unpack the package to a temporary folder. Open a terminal and move there:
cd **your_path**
Intel users can generate a debian package:make dkms_mkdeb
And install the resulting .deb package:sudo dpkg -i phc-intel-dkms_0.3.2_all.deb
While AMD can't generate it, so:sudo make dkms_install
Now you have your driver ready to go! - So we will unload the old driver:
sudo modprobe -r acpi-cpufreq
Once you're done load the new one, amd users will have the second line, intel the first!
sudo modprobe phc-intel
If you experience the error: "FATAL: Module acpi_cpufreq is in use." you'll need to:
sudo modprobe phc-k8
sudo sh -c ' echo "\n#blackist required to load phc drivers
And REBOOT =_= ...
blacklist acpi_cpufreq
blacklist cpufreq_stats" > /etc/modprobe.d/blacklist.conf'
sudo sh -c ' echo "modprobe ##your module##" > /etc/modules' - Now I guess you want a cool GUI to easier setting VIDs: get it here. Unpack it to a non temporary folder and move there.
- From the main phctool folder run:
sudo ./install.sh
- Follow the instruction (both yes will be OK)
- Create a new program link in the menu with "Main Menu" to the command /**your_path**/pchtool.sh
- Be sure to create a startup entry with the command
/**your_path**/phctray.sh
So voltages will be restored at each startup!
sudo apt-get install msr-toolsThe correct undervolted values are not universal, so you'll need some testing. If you think you'll need a guide, then take a look here:
sudo modprobe msr
http://linuxsolver.blogspot.com/2011/10/how-to-set-cpu-voltage.html
Cheers!
thanks for the tutorial before
ReplyDeleteI've managed to implement phctool and want to try undervolting, to apply and save the settings, whether to reboot the laptop or not?
could you please explain the meaning of some of the sensors below?
acpitz-virtual-0 [meaning what?]
Adapter: Virtual device [meaning what?]
Temp1: 65.0 ° C (crit = 120.0 ° C) [meaning what?]
temp2: 64.0 ° C (crit = 120.0 ° C) [mean what?]
coretemp-isa-0000 [what does it mean?]
Adapter: ISA adapter [meaning what?]
Core 0: 79.0 ° C (high = 100.0 ° C, crit = 100.0 ° C) [meaning what?]
coretemp-isa-0001 [what does it mean?]
Adapter: ISA adapter [meaning what?]
Core 1: 79.0 ° C (high = 100.0 ° C, crit = 100.0 ° C) [meaning what?]
Hi,
Deletevalues are saved and restored at each boot by phctool. Don't worry about that.
Wow... sensors are not always easy to understand indeed
coretemp-isa-0000 [sensor name]
Adapter: ISA adapter [type of sensing device]
Core 0: 79.0 ° C (high = 100.0 ° C, crit = 100.0 ° C) [Actual sensor: temp (max temp, critical temp))]
in your setup the first is the "acpi thermal zone" maybe motherboard or graphic card sensors, the other are the cores
^_^
thanks for the reply :)
Deleteif I wanted to make a permanent setting value on phctools, how?
because I wanted to test the power consumption using a power quality analyzer.
I am still confused about the "acpitz-virtual-0 Adapter: Virtual device", can you give more info?
btw what is shown on Temp1 n 2 ..
thanks in advance ^ ^
"Temp1: 65.0 ° C (crit = 120.0 ° C) [meaning what?]
Deletetemp2: 64.0 ° C (crit = 120.0 ° C) [mean what?]"
Temp1 is one core temperature or video card temperature or core temperature but mishure in other plase or other metod.
Temp2 is also can be other core temperature and so on...
Crit =120 ° C means, that then temperature rich 120 ° C you computer turn off to protect processor from it damage.
PHCtool not working for me. Would be nice to know how to access these settings directly so that I can add entries in rc.local or init.d
ReplyDeleteIf you give me more details we'll fix it...
DeleteI get the following error trying to launch phctool.sh on a thinkpad T60 running linux mint 13 after following your instructions :
ReplyDeleteTraceback (most recent call last):
File "./phctool.py", line 468, in
app=appgui()
File "./phctool.py", line 102, in __init__
self.ShowPHCVIDs() ##display current VIDs
File "./phctool.py", line 283, in ShowPHCVIDs
columns = self.data[cpu]['frequencies'] ##define the amount of columns we'll use to display all data
KeyError: 'frequencies'
I get the same message that you do. Any workarounds yet?
DeleteI'm working on it, I'll give you a feedback as soon as it's fixed
DeleteCheers
ok, thank you
DeleteI guess they moved the frequencies storing file. Can you please paste the output of:
Deletels /sys/devices/system/cpu/cpu0/
ls /sys/devices/system/cpu/cpu0/cpufreq/
sudo cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
cache cpuidle crash_notes thermal_throttle topology
Deletels: cannot access /sys/devices/system/cpu/cpu0/cpufreq/: No such file or directory
cat: /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies: No such file or directory
Using Linux Mint 13
$ls /sys/devices/system/cpu/cpu0/
ReplyDeletecache cpuidle crash_notes topology
mmm ok, you might not have the driver loaded. Try:
Deletesudo lsmod | grep phc
if no output then:
sudo modprobe phc-intel (or phc-k8)
if it issues an error paste it here
None of those 2 commands give me any output (my laptop is intel).
ReplyDeletePlease keep replying to the same comment. Ok I suppose you to know these commands, but i'll explain them. The first checks if you have loaded any phc driver, so in your case phc-intel, the second loads the driver. If the problem is solved and the second command did not give any output error the driver now should be loaded (please check with lsmod...) and the bug solved. If you need further infos (or of course if it still does not work) feel free to ask.
DeleteCheers ^_^
that was it and phctool now works, but ir doesn't seem to change any voltages. however that's another story and I'll take a look at that later
DeleteI'm pretty clueless when it comes to this stuff and I'm just following your directions. I _think_ I've loaded the new modules, and I am able to open phctool. However, under the Voltages tab, everything is just blank and I don't seem to be able to edit anything anywhere. Any idea where I went wrong?
ReplyDeleteThanks for this great guide!
That's a problem indeed.. what's your cpu? can you paste the output of:
Deletesudo lsmod | grep phc
? Thanks!
Cheers
When I noticed that the PHCTool didnt start, I had to look up (with lsmod) to check if the phc module was actually loaded - it wasn't. I loaded it and got the GUI of PHCTool started right away!
ReplyDeleteI could install phctool and got it to run once, but upon trying to relaunch it, it crashes with the following error:
ReplyDelete./phctool.sh
app=appgui()
File "./phctool.py", line 100, in __init__
self.phcdata.RestoreValues() ##restore VIDs from last session
File "inc/libs/generic.py", line 55, in RestoreValues
self.parent.throttling.set_throttledata_array(throttles)
File "inc/libs/throttling.py", line 77, in set_throttledata_array
self.set_throttledata(cpu, array[cpu])
File "inc/libs/throttling.py", line 69, in set_throttledata
if int(value) >= 0 and int(value)< self.data[cpu]["state_count"]:
ValueError: invalid literal for int() with base 10: ''
When it was running it showed only CPU 0 and CPU 7 and all of the voltage values were N/A, but it was running.
Output of sudo lsmod | grep phc:
phc_intel 18321 1
mperf 12667 1 phc_intel
Any help would be much appreciated.
Sorry, it looks like an interface problem, I'll try to fix it as soon as I can.
DeleteCheers
Thanks. Let me know when a fix is ready and I'm happy to test it. Theron
DeleteCan you please give me some more informations about your cpu?
DeleteI need also the outputs of:
sudo cat /sys/devices/system/cpu/online
sudo ls /sys/devices/system/cpu/cpu*
Thanks
Regards
I have fixed the bug (I guess). To try the fixed phctool take these two steps:
Deletecd to your phctool folder,
rm phctool/inc/libs/cpuinfo.pyc
download the lib again as in step 8
launch phctool
Regards
In step 6 i get this error:
ReplyDelete$ sudo modprobe phc-intel
FATAL: Error inserting phc_intel (/lib/modules/3.2.0-25-generic-phc/updates/dkms/phc-intel.ko): Invalid argument
here's my lsmod listing:
$ lsmod
Module Size Used by
vesafb 13844 1
mperf 12667 0
cpufreq_stats 13364 0
serio_raw 13211 0
tg3 152032 0
mei 41616 0
ext2 73795 1
mac_hid 13253 0
coretemp 13525 0
What does this give back
Deletels /lib/modules/3.2.0-25-generic-phc/updates/dkms/phc-intel.ko
Have you tried the blacklist procedure?
$ ls /lib/modules/3.2.0-25-generic-phc/updates/dkms/phc-intel.ko
Delete/lib/modules/3.2.0-25-generic-phc/updates/dkms/phc-intel.ko
yes i tried the blacklist method. No change in error.
Isn't is weird that the error states: "Invalid argument"?
i have the same error but with amd, will you be able to help me out?
Deletei have amd c50 processor on this tablet.
error details are:
4.4 $ sudo make dmks_install
[sudo] password for xpert:
make: *** No rule to make target `dmks_install'. Stop.
and
4.4 $ sudo modprobe phc-k8FATAL: Error inserting phc_k8 (/lib/modules/3.2.0-25-generic-phc/updates/kernel/arch/x86/kernel/cpu/cpufreq/phc-k8.ko): Device or resource busy
hi
ReplyDeletein step 6 when i write "sudo modprobe -r acpi-cpufreq" i get this eror:
FATAL: Module cpufreq_stats is builtin
FATAL: Error running remove command for acpi_cpufreq
can u help me?
I guess you are running the wrong kernel.. try to check the output of
Deletesudo uname -a
If it has no -phc suffix please take a look at step 2
Cheers
Hi Fabio, Where/how do I select the -phc kernel?
DeleteHi. I've followed the guide and it all seems to work ok apart from the PHCTOOL is only showing my CPU0 and CPU3, not the other CPU1 and CPU2, and its only showing 8 of the 10 voltages. I put screenshot here http://s334.photobucket.com/albums/m421/NigelHealy/?action=view¤t=phc.jpg
ReplyDeleteI guess it's the same bug Theron complained about. I've just fixed it (I guess). Please paste the output of:
Deletesudo cat /sys/devices/system/cpu/online
sudo ls /sys/devices/system/cpu/cpu*
To try the fixed phctool take these two steps:
cd to your phctool folder, rm /inc/libs/cpuinfo.pyc
download the lib again as in step 8
Any feedback would be appreciated ^_^
Regards
Is your command syntax correct for this section, two >> needed? Doesn't match you saying need to create empty files which should be a single > ?
ReplyDelete"Before doing anything else we have to create an empty file to match dmks autoconfiguration: Intel users go with the first, AMD with the second line!
sudo sh -c 'echo >> /etc/modprobe.d/phc-intel.conf'
sudo sh -c 'echo >> /etc/modprobe.d/phc-k8.conf'"
It's the same but I guess the single > is correct. I'll update it
DeleteThanks
I wanted to set undervolted values for my CPU cores but how can achieve that with PHCtool? I get a "Voltages" tab where there is no enough width to fit all the frequencies (my CPU ranges from 2667 to 1199 but PHCtool only shows down to 1866).
ReplyDeletePlus, I can not fix a max CPU from here.
So basically PHCtool is useless for me.
Plus, suspend does not work (cpu goes 100%, fan goes 100%, heat goes 100%, and does not recover). Which has nothing to do with your article, but whining feels good... and I'll add that Linux/Ubuntu laptop power efficiency fucking sucks 360º and I swear to God I'd use another OS if it wasn't because they all suck their own way.
Haters gonna hate...
DeleteIf you need help, why not ask?
If you care please, tell me at least your CPU model. Maybe we can find a solution to your problems, or I'll suggest weather to file a bug to phc forum or not.
Core i5-480M
DeleteIt looks your cpu has 13 (!) voltages, the trouble is that PHCtool window has been thinked to be fixed width: your lower values are somewere out of the border =_="".
DeleteI'll try to fix that.
What do you mean with: "I can not fix a max CPU from here."
For your 100% problem try with
sudo apt-get install htop
after suspend and resume open a terminal and:
sudo htop
try to find the trolling process, so you can investigate where the problem actually is.
I fixed the width problem. Delete your 0.5.2-2 folder and install 0.5.2-3 as in the updated guide
DeleteCheers
Fabio, thank you so much for your support. I'll try to check the update with the width fix soon.
DeleteBy "max CPU" I meant "max CPU frequency" (sorry for the brainfart). I think it would be a useful addition to the program; avoiding having to manage two different applications for CPU-energy issues.
About suspension, the problem is deeper: when I open the lid again, the screen is black and I can do nothing but hard power off. But never mind this because is pretty off-topic.
I get "Makefile:28: *** Only support for 2.6 series kernels. Stop." when running the "sudo make dmks_install" on a AMD processor.
ReplyDeleteFollowing the instructions on http://www.linux-phc.org/forum/viewtopic.php?f=7&t=295, now I get "make: *** No rule to make target `dmks_install'. Stop"...
Deletenvm, it works now...
Delete...or not.
DeleteI can't run phc-tool...
sudo sh phctool.sh
Traceback (most recent call last):
File "./phctool.py", line 468, in
app=appgui()
File "./phctool.py", line 81, in __init__
self.cpuinfo=cpuinfo.cpuinfo() ##functions to gather CPU informations
File "inc/libs/cpuinfo.py", line 13, in __init__
self._get_acpi_cpus() ##get ACPI-supported CPUs
File "inc/libs/cpuinfo.py", line 25, in _get_acpi_cpus
for intcpunr in range(int(content[0].strip()),int(content[1].strip())+1):
IndexError: list index out of range
Well done for the first fix. They are supposed to fix that issue, but nevermind.
DeleteAbout the second problem I'm fixing a trouble linked with more-than-2-cores CPU, but it seems it needs some more work. Can you please post the output of
sudo cat /sys/devices/system/cpu/online
sudo ls /sys/devices/system/cpu/cpu*
Thanks
sudo cat /sys/devices/system/cpu/online
Delete0
sudo ls /sys/devices/system/cpu/cpu*
/sys/devices/system/cpu/cpu0:
cache cpufreq cpuidle crash_notes topology
/sys/devices/system/cpu/cpufreq:
ondemand
/sys/devices/system/cpu/cpuidle:
current_driver current_governor_ro
It's a single core AMD Athlon Neo MV-40, I can undervolt it just fine on Windows with RMClock.
Thanks for helping!
It should work now. Please take a look to the new PHCtool version and update yours (delete 0.5.2-2 folder and install 0.5.2-3)
DeleteCheers
PHCtool does open know, thanks. However, it says my CPU is not recognized.
DeleteI assumed I could blindly change the VID values, but that doesn't seem to be the case.
On Windows, using RMClock, I get a instant BSOD as soon as I set the voltages too low, but setting the VID to 0 doesn't seem to cause this on Linux, nor it seems to affect the temperature. Is there anything I can do about it?
Hi Fabio,
ReplyDeleteThanks for the great tutorial!
I followed it and everything works, except I cannot change CPU voltage in the phctool. It says "CPU not recognized - calculation not available". I have an Intel i3 Sandybridge. You know anything about this?
Thanks!!!
It looks strange indeed. I have two hypothesis:
Delete# you messed up with something
# your cpu is not supported
So double check everything, if you have the same problem open an help request to PHC forum (linked at top of the page)
Cheers
I already followed your tutorial a few times, so I guess it's the CPU that's not supported. Will ask in the forum, thx!
DeleteHi,
ReplyDelete1st thx for your work on this famous tool.
if i start phctool.sh it crashs:
Traceback (most recent call last):
File "./phctool.py", line 468, in
app=appgui()
File "./phctool.py", line 81, in __init__
self.cpuinfo=cpuinfo.cpuinfo() ##functions to gather CPU informations
File "inc/libs/cpuinfo.py", line 14, in __init__
self._get_cpuinfos() ##get Infos from /proc/cpuinfo for every ACPI-CPU we found
File "inc/libs/cpuinfo.py", line 95, in _get_cpuinfos
self._get_phc(cpu) ##get PHC infos
File "inc/libs/cpuinfo.py", line 104, in _get_phc
self.data[cpunr]["phcvalues"]=self._get_PHCData(cpunr)
File "inc/libs/cpuinfo.py", line 123, in _get_PHCData
for line in phcif:
IOError: [Errno 19] No such device
any idea?! its a pentium M 735 1.70 ghz. merci a.
Not sure, can you please paste the output of:
Deletesudo cat /sys/devices/system/cpu/online
sudo ls /sys/devices/system/cpu/cpu*
Thanks
hi,
Deletewas in holidays but now the results of my task:
sudo cat /sys/devices/system/cpu/online
0
sudo ls /sys/devices/system/cpu/cpu0/
cpureq cpuidle crash_notes thermal_throttle topology
Hello Fabio, I noticed that you took a commenter's advice to replace '>>' append shell redirections with '>' overwrite ones, but I don't think that's correct for this part:
ReplyDeletesudo sh -c ' echo "\n#blackist required to load phc drivers
blacklist acpi_cpufreq
blacklist cpufreq_stats" >> /etc/modprobe.d/blacklist.conf'
sudo sh -c ' echo "modprobe ##your module##" >> /etc/modules'
It looks like your intention was to append to the files in this part. Yes, I overwrote my /etc/modules... whoops! I added append redirections above.
Crap! You're definitively right... updated...
DeleteSorry about that!
I still get:
ReplyDeleteFATAL: Error inserting phc_intel (/lib/modules/3.2.0-27-generic/updates/dkms/phc-intel.ko): Device or resource busy
After having followed your post:
"Fabio VeroneseFebruary 6, 2012 8:29 AM
One last attemp before blacklisting... try with
sudo update-initramfs -u
if it still does the same just blacklist acpi_cpufreq and cpufreq_stats by adding
#blackist required to load phc drivers
blacklist acpi_cpufreq
blacklist cpufreq_stats
in /etc/module.d/phc (eventually create it)
and put phc-intel to /etc/modules"
So I wonder what im doing wrong?
Never mind my comment above, i ditched Lubuntu and went the Mint route and now everything works :)
ReplyDeleteGlad to hear that. ^_^
DeleteCheers
First, thanks for making available this amazing tool! I've just discovered the amazing world of undervolting and I have a few newbie questions.
ReplyDeleteI've been running ubuntu for a couple of years, and I've noticed that periodically I get kernel updates.
(1) If I switch to a phc kernel, would the system updater messes up the phc kernel? Or perhaps your package would turn off (only?) that part of the auto-updater?
(2) Does the phc kernel get updated in step with the mainline kernel?
(3) Is it possible to "undo" the phc kernelc, or do I need to reinstall the system from scratch?
(4) Is there a recipe for building my own phc kernel?
MANY THANKS!
1 - maybe... if it founds an update to a newer version of the mainstream it updates and switches to it. The thing you can do is lock auto-update of the kernel and do it manually just when you see the phc update.
Delete2 - sort of... if you want more infos ask here: http://www.linux-phc.org/
3 - you can just boot back the standard kernel from grub at boot. In that case phc driver can't load and you won't be able to undervolt.
4 - Pretty sure. With linux anything is possible. The core point in the phc kernel is that cpu driver and the modules depending on mperf are not built-in, so you can unload them and load the phc driver. For more infos on how to build a custom kernel you'll find out tons of guides, but be sure to look for the ubuntu way, which is different from the other.
Cheers
Hi! I'm using an Intel chip and have been following your instructions for undervolting under 12.04, however I have run into a snag. On step 4, I enter 'make dkms_mkdeb' but I get the error message, 'make: *** No rule to make target `dkms_mkdeb'. Stop.' Up until this point there have been no problems. Please help.
ReplyDeleteThanks!
Please try directly
Deletemake dkms_install
as in the AMD procedure... it should work
Cheers
I got phctool to run and set all my voltages and tested them, but I'm still having a couple of issues:
ReplyDelete1) When I try to run phctray.sh I get the following error:
Traceback (most recent call last):
File "./phctray.py", line 78, in
gtk.main()
2) When I restart my computer, phctool no longer runs (and I can't access the cpufreq commands). Running this code:
sudo modprobe phc-intel
as suggested to a user above, fixes the problem. However, I have to run it every time I start up. Is there a way I can fix this?
3) Kind of unrelated, but after looking at the article on testing and doing some research on the different cpu governors, I decided to change mine from 'performance' to 'ondemand'. But when I restart, it is always set back to performance. Is there a way to save this setting?
Thanks in advance for any help.
1) It crashes apparently for no reason... can you try with "sudo python phctray.py"
Delete2) You just can add it to the default loaded modules with
sudo sh -c 'echo "\n# PHC Mod autoload\nphc-intel" >> modules'
3) You can edit cpufrequtils file (it should lay in /etc/init.d or in /etc/conf.d), look for the lines:
ENABLE="true"
GOVERNOR="preformance"
MAX_SPEED="0"
MIN_SPEED="0"
and change the governor to your likes
Cheers
Hi, today i tried your method for installing phc, but when i go to voltages, everything in the "new voltage" row its locked at n/a, and so is the "difference to original row". I tried the method at https://wiki.archlinux.org/index.php/PHC#Finding_safe_low_voltages with the mprime-phc-setup script and it tries all the vid's until 0 (and it never crashes). So finally, it returns vid 2 for all frequency's (minimum plus 2). The processor is an i5-430m on an hp g62-149wm. It has a serious heating problem... Do you have any idea on how to proceed? Thanks in advance, your post was really helpfull
ReplyDeleteI guess you CPU is a Sandy Bridge. It means it's not supported. We are working to make it compatible too.
DeleteRegards
Ok, i'll keep looking for any updates. Thanks for the help anyways!
DeleteI had a problem starting phctool.sh.
ReplyDeleteI followed some other directions you gave above, namely:
sudo lsmod | grep phc
then
sudo modprobe phc-intel
Output:
WARNING: All config files need .conf: /etc/modprobe.d/options, it will be ignored in a future release.
WARNING: /etc/modprobe.d/options line 3: ignoring bad line starting with 'gksu'
Upon doing these (and ignoring the errors) i can start phctool.sh, made modifications to the voltages based on a table I found online from someone else using same CPU. But i havent noticed any changes to the temperature of my CPU.
Or, perhaps my tool for measuring the system temperature is not good? I use the output read from a fan control software.
I have a feeling the driver isnt loaded...
DeleteYep, you are supposed to get an output to:
Deletesudo lsmod | grep phc
the couple of warning seem not to be related to phc... did you reboot before trying loading the file?
Be sure that phctool or phctray is running, or you voltage changes won't be loaded.
If you still have troubles make me know.
Cheers
Output to sudo lsmod | grep phc
ReplyDeletephc_intel 17977 1
mperf 12603 1 phc_intel
When i run ./phctool.sh i get
File "./phctool.py", line 468, in
app=appgui()
File "./phctool.py", line 100, in __init__
self.phcdata.RestoreValues() ##restore VIDs from last session
File "inc/libs/generic.py", line 55, in RestoreValues
self.parent.throttling.set_throttledata_array(throttles)
File "inc/libs/throttling.py", line 77, in set_throttledata_array
self.set_throttledata(cpu, array[cpu])
File "inc/libs/throttling.py", line 69, in set_throttledata
if int(value) >= 0 and int(value)< self.data[cpu]["state_count"]:
ValueError: invalid literal for int() with base 10: ''
Do you get this error at first run or while you set throttling values? If it pops simply running phc try to delete settings data in your home folder.
DeleteLet me know you you still have problems
Cheers
I get the error in the first run.
ReplyDeleteThe interface never opens now. Please ignore my previous posting from Oct 13...i decided to go back to step 1 and redo everything. Upon doing so, I never get
./phctool.sh
to run (meaning I get the errors I posted above on Nov 22).
When I try this with my Ubuntu 12.10 install I get:
ReplyDeleteE: Unable to locate package linux-generic-phc
E: Unable to locate package linux-headers-generic-phc
Is there a way to get the PHC kernel and headers on Ubuntu 12.10?
You have to be patient and wait for the phc kernel release. If you're not, you still can recompile the kernel, including mperf and acpi-cpufreq as modules.
DeleteIf this does not make sense to you... go to the phc forum, ask for the new kernel patch and be patient.
Regards
hi fabio.
ReplyDeleteIt wasnt clear what you meant by "If it pops simply running phc try to delete settings data in your home folder". Can you elaborate? I am a newbie at ubuntu. I looked for a data folder in my home directory, but it does not exist.
Thanks (and sorry for being annoying).
-Greg
Don't worry, it's just hard to debug everyone's error. The config location is your home folder, its name is .phcstore.phc and, since it's a config file, it's hidden, so you may need to ctrl+h to see it.
DeleteWe have also to consider you have a centrino cpu, in which the throttling interface might still have some functionality. This may introduce unexpected bugs in the GUI...
Hi Fabio
ReplyDeleteOk so this worked. For the other users out there: I had to delete the file .phcstore.phc (as fabio indicated). Then I reinstalled the phctool and the gui opened.
My only remaining question is how to keep setting as is (once modified) for every reboot. In other words: does one alsways need to load phctool to make the desired changes? Or, can settings be saved and loaded upon every bootup?
-Greg
by starting phctray on startup you'll have a nice trayicon, preloading phc stuff.
DeleteHi Fabio,
ReplyDeleteIt seems I overlooked that throttling is "Not Available" according to the dropdown menus in the PHC GUI. Does this mean changes I make have no effect? I do see "Vcc Calculation: CPU recognized, calculation available" Under Analysis tab target VID, target Vcc and reached VID are all n/A.
Does this mean the tool wont work on my CPU?
Thanks
-Greg
Ok, if throttling is "not available" it's not a problem for phc. It relies on Intel Model Specific Registers so it won't be affected.
DeleteHave you tried to "Refresh" values (I mean by pushing the so called button in Analysis tab)?
I tried to hit the refresh button but the values on that page do not change. What i mean is that the entries for target VID/target VCC/Reached VID and reached VCC are all n/A. I saved my changes and made to the voltages and exited the program, entered back in. The entries in Analysis tab are still n/A even if I press the refresh button.
ReplyDeleteMore information that could be useful (maybe):
I checked what was in/sys/devices/system/cpu/cpu0/cpufreq/phc_controls and I indeed see the changes I made in the gui.
Are these being implemented? How can one check?
Is there something else I need to switch on in order for the changes to take effect?
-Greg
Hi
ReplyDeletephctool also worked for me and then stopped. Reinstall did not help!?...cause needed to remove the phc config file
phcstore.phc
Then reinstall and works again
This comment has been removed by a blog administrator.
ReplyDeleteHi Fabio,
ReplyDeleteAre there any news on the SandyBridge version of linux-PHC?
In the forum you mention a hack that works for your machine ... can we do this, too, with a bit of fiddling around?
So much looking forward to silence my current machine!
Cheers
-T
Sorry, but it seems there's still no way to undervolt Sandy Bridge and Ivy Bridge CPUs. I just succeded in unlocking the lowest CPU freq availble. See more infos here:
Deletehttp://linuxsolver.blogspot.it/2012/09/how-to-customize-cpu-frequency-steps.html
Hello to everybody, are i'm the only one who get's Error-messages during installing the new REV9-phc-intel-driver?
ReplyDeletethx
I'm also experiencing problems installing.
ReplyDeletephc-intel-pack-rev9 works. please delete the posts since first may. thanks
ReplyDeleteNo man, it doesn't work! I have 2 intel laptops trying to undervolt:on the older xubu12.04 and on the newer ubu12.04. On both i get the same message after installing the created .deb package on step 5: "Error! Bad return status for module build on kernel: 3.2.0-25-generic-phc(i686) Consult /var/lib/dkms/phc-intel/0.3.2/build/make.log for more information."
DeleteEverything works fine now with Revision9.1.
DeleteHello Fabio
ReplyDeleteRecently i am trying to undervolte my intel core i 5 M 540, I am using ubuntu 12.04 LTS and i have three python in my ubuntu 2.6.6 in a default and 2.7.3 is used by ubunut and 3.2 is used by pycairo, anyway, when i am trying to launch phctool, i am getting this message :
sudo python2.7 phctool.py
GLib-GIO-Message: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications.
Traceback (most recent call last):
File "phctool.py", line 468, in
app=appgui()
File "phctool.py", line 102, in __init__
self.ShowPHCVIDs() ##display current VIDs
File "phctool.py", line 283, in ShowPHCVIDs
columns = self.data[cpu]['frequencies'] ##define the amount of columns we'll use to display all data
KeyError: 'frequencies'
and when sudo python2.7 phctray.py
GLib-GIO-Message: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications.
GLib-GIO-Message: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications.
You need to install pyGTK or GTKv2 or set your PYTHONPATH correctly.
try: export PYTHONPATH= /usr/local/lib/python2.2/site-packages/
i am trying to export the PYTHONPATH but every time this message appear.
sudo ls /sys/devices/system/cpu/cpu*
/sys/devices/system/cpu/cpu0:
cache cpuidle crash_notes node0 topology
/sys/devices/system/cpu/cpu1:
cache cpuidle crash_notes node0 online topology
/sys/devices/system/cpu/cpu2:
cache cpuidle crash_notes node0 online topology
/sys/devices/system/cpu/cpu3:
cache cpuidle crash_notes node0 online topology
/sys/devices/system/cpu/cpufreq:
/sys/devices/system/cpu/cpuidle:
current_driver current_governor_ro
I really don't know what the problem is,So can you help me please? It would be really appreciate to have your help.
payam
Dear Fabio
ReplyDeleteSomehow i managed to run phctool.sh with your guid through above comments, but after I rerun the phctool.sh the follow error appear. even i remove cpuinfo.pyc from the lib and download the phctool0.5.2-3 again and copy the lib but it didn't work. I got the error again. can you help me please.
Thank you for your kind and consideration.
Traceback (most recent call last):
File "./phctool.py", line 468, in
app=appgui()
File "./phctool.py", line 100, in __init__
self.phcdata.RestoreValues() ##restore VIDs from last session
File "inc/libs/generic.py", line 55, in RestoreValues
self.parent.throttling.set_throttledata_array(throttles)
File "inc/libs/throttling.py", line 77, in set_throttledata_array
self.set_throttledata(cpu, array[cpu])
File "inc/libs/throttling.py", line 69, in set_throttledata
if int(value) >= 0 and int(value)< self.data[cpu]["state_count"]:
ValueError: invalid literal for int() with base 10: ''
Thank you Fabio for your great thread, it is working fine right now, I delete the .phcstore.phc as you mentioned above and reinstall the phctool. it work fine. even my vid refresh but still my throttling is "Not Available". I am going to next step.
ReplyDeleteThanks
payam
Hi , I got an error FATAL : Module cpufreq_stats is builtin
ReplyDeleteFATAL : Error running remove command for acpi_cpufreq
This means almost surely you're not running the right kernel.. double check it with "uname -a"
DeleteRegards
uhm...what should the correct kernel be ? I've checked it and I got this as a result
Delete3.2.0-49-generic #75-Ubuntu SMP Tue Jun 18 17:39:32 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
Step 2
Delete"Now let's install the kernel and its headers:
sudo apt-get install linux-generic-phc linux-headers-generic-phc
First pause... restart your PC and be sure to choose your new *-phc kernel."
Uhm...I've run the command...it's said that "linux-generic-phc is already the newest version"....what do you mean by "pause" ?? Just stop ? I've restarted my laptop , but I don't know how to choose the new *-phc kernel...
Deletesorry about all these...I'm a newbie in Linux...just decided to give it a try last week ^^
I've managed to install PHCtool V0.5.2-3 , but in the "Vcc calculation" column , it says "CPU not recognized-calculation not available"...what does this mean ?
ReplyDeleteI also tried to create the program link in Step 10 , but it didn't work , I clicked on the application in Dash , and when I keyed in my password , nothing happened...I have to execute "phctool.sh" manually from the folder where it is located...any ideas on my problem ?
DeleteProbably you CPU is not supported, which one are you running? Which linux distro are you applying this to?
DeleteUbuntu 12.04
DeleteAnd my CPU is Intel Core i3 M350 @2.27 GHz
DeleteHello, thank you for tutorial, iv been using PHC on 10.04, but unfortunately i m not able on 12.04. Maybe i am missing someting, but after installing kernelfrom phc-repos, compiling module using your guide i still won`t boot without acpi=off - otherwise it gives error: " fixing recursive fault but reboot is needed". I am using Pentium M laptop. Thanks in advance.
ReplyDeleteHi,
ReplyDeleteThanks a lot for this tutorial ! I am currently struggling with the " FATAL: Module cpufreq_stats is builtin "
As you said it's because of the step 2 "be sure to choose your new *-phc kernel." but how to be sure ?
Hi Fabio,
ReplyDeleteThanks a lot for your amazing work. I have followed your tutorial: kernel 3.2.0.25-generic-phc loaded. phc-intel driver loaded...but unfortunatelly phctool is not working:
Traceback (most recent call last):
File "./phctool.py", line 468, in
app=appgui()
File "./phctool.py", line 81, in __init__
self.cpuinfo=cpuinfo.cpuinfo() ##functions to gather CPU informations
File "inc/libs/cpuinfo.py", line 14, in __init__
self._get_cpuinfos() ##get Infos from /proc/cpuinfo for every ACPI-CPU we found
File "inc/libs/cpuinfo.py", line 102, in _get_cpuinfos
self._get_phc(cpu) ##get PHC infos
File "inc/libs/cpuinfo.py", line 111, in _get_phc
self.data[cpunr]["phcvalues"]=self._get_PHCData(cpunr)
File "inc/libs/cpuinfo.py", line 130, in _get_PHCData
for line in phcif:
IOError: [Errno 19] No existe el dispositivo
would you please give me some guidance?
Thanks in advance!!!!
By the way I tried to delete the hiden file .phcstore.phc but the file does not exist.... Any hint?
ReplyDeleteIt worked! Thanks for the helpful guide, as a linux noob I'm not sure how I would have done without this.
ReplyDeleteI used PHC to undervolt my Dell Latitude E6400 w/ Intel P9700 and significantly drop my temps.
yes, it work om my AMD MV-40, thank alot guys. Now my laptop running cool.....
ReplyDeleteThere is no solution for ubuntu 14.04? I searched the kernel online to compile it, but I cannot find it... The ones in kernel.org are not working
ReplyDelete