as for MakeMKV I want to open another tool to Ubuntu users too: PHC. It 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.
Gentoo users should look at this specific guide!
!!UPDATED UBUNTU 11.10 VERSION!!!
!!UPDATED UBUNTU 12.04 VERSION!!!
!!UPDATED UBUNTU 11.10 VERSION!!!
!!UPDATED UBUNTU 12.04 VERSION!!!
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**
Now we have to generate a debian package (AMD users with newer kernels might find troubles, in case leave a comment):make dkms_mkdeb
And install the resulting .deb package. 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
sudo modprobe phc-k8 - 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.
- You'll need to fix an error, so download this corrected file and save it to:
**your path**/phctool/inc/libs/
overwriting the existent file. - From the main phctool folder run:
sudo ./install.sh
- Follow the instruction (both yes will be OK)
- relogin and make two links to let you launch these programs directly from terminal:
sudo ln **your path**/phctool.sh /usr/bin/phctool
sudo ln **your path**/phctray.sh /usr/bin/phctray - done!
sudo phctoolthere you can set the voltages and see many infos about your CPU. The correct values are not universal, so you'll need some testing.
UPDATE
I wrote a new guide to tune voltages, take a look here:
http://linuxsolver.blogspot.com/2011/10/how-to-set-cpu-voltage.html
Cheers!
Following these set of instructions is the closest I got to getting undervolting to work on my AMD M500 powered laptop to work.
ReplyDeleteThe phctool instructions work. I can't get the PHC modules to load. Phctool says PHC extensions missing.
Any help would be appreciated.
This means there's something wrong in kernel or driver... have you installed and booted the patched kernel? Try to issue
ReplyDeleteuname -a
and post the output, the step 5 did work or you've received an error? as you have an AMD this might be possible
nayagan:~$ uname -a
ReplyDeleteLinux nayagan 2.6.35-27-generic-phc #48~phc0-Ubuntu SMP Wed Mar 2 00:39:51 UTC 2011 x86_64 GNU/Linux
That's the output I get.
Let me try Step 5 again and see if I get any errors. Don't remember getting any.
nayagan:~/phc-k8_v0.4.3$ make prepare
ReplyDeletemake: *** No rule to make target `prepare'. Stop.
nayagan:~/phc-k8_v0.4.3$ make
make: Nothing to be done for `all'.
nayagan:~/phc-k8_v0.4.3$ sudo make install
install -m 644 -o root -g root phc-k8.modprobe /etc/modprobe.d/phc-k8.conf
mkdir -p /lib/modules/2.6.35.11/updates/kernel/arch/x86/kernel/cpu/cpufreq/
install -m 644 -o root -g root phc-k8.ko mperf.ko /lib/modules/2.6.35.11/updates/kernel/arch/x86/kernel/cpu/cpufreq/
depmod 2.6.35.11 -a
everything looks ok, try to issue:
ReplyDeletelsmod
This comment has been removed by a blog administrator.
ReplyDeleteWhy is Step5 making updates to 2.6.35.11 when my current kernel is 2.6.35-27-generic-phc?
ReplyDeleteIs that normal?
The module is ok and loaded, the phctool interface loads properly? can you please paste the exact terminal output? The kernel is different because the phc driver it's built against the headers, not the whole kernel so their version is slightly different, but it's ok.
ReplyDeleteI'm thinking it's kinda interface trouble or your cpu it's not fully supported
The phctool loads properly. But I can't change any of the voltages etc.
ReplyDeleteWhich terminal output would you like me to post? Step 6?
I thought it didn't load, forget about it. It looks like (but I'm not 100% sure) your cpu is not yet supported. Maybe you can try with a beta from phc forum, if you don't find nothing try to open an help thread here
ReplyDeletehttp://www.linux-phc.org/forum/
Sorry but I think we've done both our best ^_^"
Name: AMD Turion(tm) II Dual-Core Mobile M500
ReplyDeleteCPU MOdel: Vendor:AuthenticAMD, Family:16, Model:6, Stepping:2
Frequencies: 2200Mhz 2000Mhz 1500Mhz 1100Mhz 800Mhz
Throttling: not available
PHC extensions: missing
PHC Version
MSR extensions: not available
Vcc calculation: CPU not recognized - calculation not available
The above is under info. Voltages and Throttling show nothing. Analysis shows n/a for each processor.
Oh. Darn. Thanks a lot for helping. Your instructions were the easiest to follow.
ReplyDeleteI couldn't get it to work in Windows before either. I think Toshiba locked the voltages. But I'm holding out hope that I can get it working in linux because the temps range from 65-90. And once it hits 90 it reboots.
It seems to confirm this cpu it's not supported... try with this driver
ReplyDeletehttp://www.linux-phc.org/forum/download/file.php?id=111
but it's not sure...
If the temp is so high check your cpufan!!! It should not rise so much!
ReplyDeleteI tried 4.4a2 with the same result. Not supported.
ReplyDeleteI will give TurionPowerControl a shot and if that doesn't work live with the overheating.
The fan does get quite loud so I know that it is working.
Double check everything, heatsink, thermal compound etc, it should not reach such temps in any case...
ReplyDeleteI got in contact with the AMD driver developer for the PHC project, please answer back, he needs your help to test a new version supporting your processor too!
ReplyDeleteI have strange problem. PHCTool runs with no problems, reports all is available, but does not apply VID-s. Nothing changes when I click "save values". Any clues?
ReplyDeleteDo you mean you see always the same VIDs in the analysis tab? Keep in mind that not all the VIDs are actually applicable by the motherboard (for instance I can set from 9 to 43 but it won't go below 15). If what happens is that VIDs remain stuck at their default values, be sure to have correct rights (try to launch "sudo phctool") and be sure to check all the available frequency steps.
ReplyDeleteBTW with which CPU are you having troubles?
Hey,
ReplyDeleteI tried you're method with 11.04, and everything went perfect; However, nothing happens when I enter "sudo phctool"
What should I do?
Any output in terminal?
ReplyDeleteHi,sorry I am new to ubuntu terminal tweaking and every guide I've seen says step 5.. but what am I supposed to type there? I have no clue. The directory that the extracted folder is in is
ReplyDelete/home/sunil/Downloads/phc-intel-pack-rev1
I've tried different things but can't get anything to give me a good result.
uname -a gives this;
Linux sunil-3000-N200 2.6.35-28-generic-phc #50~phc0-Ubuntu SMP Thu Apr 21 10:44:36 UTC 2011 i686 GNU/Linux
Could you type what I'd need to for step 5 please.
Thanks for the guide and any help is much appreciated.
Sunil.
I don't understand what you mean...
ReplyDelete"but what am I supposed to type there?" there... where?
if you want to know how to move to that folder you just need to:
cd /home/sunil/Downloads/phc-intel-pack-rev1
if I'm missing something please explain better where is the point in step 5
Ye that was it. I didn't know about the CD thing, thanks. Ran into a problem on step 6 though.
ReplyDelete~$ sudo modprobe -r acpi-cpufreq
FATAL: Module acpi_cpufreq is in use.
FATAL: Error running remove command for acpi_cpufreq
Sunil.
You're not the first complaining about that behaviour... I believe you have the right kernel (looking at the uname output) but for no reason your acpi-cpufreq seems to be still built-in kernel.
ReplyDeleteCan we try a reboot?
Thanks that did the trick. Worked my way to step 11 but not sure what to do there.
ReplyDeleteSorry for the hassle, I have't done much terminal work in ubuntu yet so figuring things out still. Lol but would prefer my laptop to stop burning me :P.
Sunil
Ok, I'm going to fix the guide with the two suggestions. At step 11 the two codelines are already there, the only thing to modify is **your_path** wich should be /home/sunil/Downloads/phc-intel-pack-rev1
ReplyDeletewe're almost done ^_^
(consider some sponsor support >_>)
:( done it all, running phctool but it doesn't affect anything I think, the temperature stays the same so pretty sure there is no change. I like how you edited the guide a bit to make it more idiot proof :D
ReplyDeleteSunil.
Hi, I have an AMD turion cpu and I tried to download build-essential on ubuntu 11.04 and it said it was up to date. So I can't do steps 4-6. I continued on but when i run "sudo phctool" nothing happens. I don't get any errors.
ReplyDeleteHi, I have AMD Turion X2 TL-56 and in step 5. after 'make prepare' I get:
ReplyDelete'make: *** Brak reguł do wykonania obiektu `prepare'. Stop.'
It means more or less 'make: *** There are no rules to make the object 'prepare'. Stop.'
I skept it and went to next steps, but in step 6. after 'sudo modprobe phc-k8' I got
'FATAL: Error inserting phc_k8 (/lib/modules/2.6.38-10-generic/updates/kernel/arch/x86/kernel/cpu/cpufreq/phc-k8.ko): Invalid module format'
the same on step 6 though.
ReplyDelete~$ sudo modprobe -r acpi-cpufreq
FATAL: Module acpi_cpufreq is in use.
FATAL: Error running remove command for acpi_cpufreq
I had reboot the machine. the next step are
sudo modprobe phc-intel
FATAL: Error inserting phc_intel (/lib/modules/2.6.38-10-generic/extra/phc-intel.ko): Device or resource busy
thanks
can I use PHC in 3.0.1 kernel?
ReplyDeleteGive me advise please ?
@ Andrew
ReplyDeleteI can't figure out where the problem stands... Try to answer these few questions... where did you get the sources? Are you running the command in the right folder? Which distro are you running?
@ Stefan
After the reboot you simply run "sudo modprobe phc-intel", when you were supposed to "sudo modprobe -r acpi-cpufreq" and then "sudo modprobe phc-intel"
@ Anonyous
AFAIK the latest supported kernel is 3.0, be patient and stay tuned for further kernels releases
sudo modprobe phc-intel
ReplyDeleteFATAL: Error inserting phc_intel (/lib/modules/2.6.38-10-generic/extra/phc-intel.ko): Device or resource busy
sudo modprobe -r acpi-cpufreq
FATAL: Module cpufreq_stats is builtin
FATAL: Error running remove command for acpi_cpufreq
?
The patched kernel stands to avoid that issue, so you might be running the plain kernel... try to issue "uname -a" to check it ^_^
ReplyDeleteuname -a
ReplyDeleteLinux Generator 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:07:17 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
thanks
In Ubuntu 11.04, the 2nd step does not work. I am running ubuntu 11.04 and when i tried to install the linux-phc package I got the following. Would you please help?
ReplyDeletelastdylan@ubuntu:~$ sudo apt-get install linux-generic-phc linux-headers-generic-phc
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
linux-generic-phc : Depends: linux-image-generic-phc (= 2.6.38.8.22~phc0) but it is not going to be installed
E: Broken packages
@Last Feremenga
ReplyDeleteIt looks like you are missing some dependencies, if the behaviour shows in any 11.04 installation I'm going to update the guide. I think you might solve just issuing:
sudo apt-get install linux-generic-phc linux-headers-generic-phc linux-image-generic-phc
Cheers
I followed your advice regarding sudo 'modprobe -r acpi-cpufreq' and restated a bunch of times without any result.
ReplyDeleteI ran lsmod command and discovered that the module mperf was using acpi-cpufreq. I tried blacklisting mperf with no success, but then I tried disabling several performance services in BIOS (Multi-Core Support, Dynamic Acceleration and Speedstep). After rebooting mperf was no longer using acpi-cpufreq and I could modprobe it. So far so good.
M1330 / 2.6.28
nice
ReplyDeletecan't get it to work with the last line from the terminal.. i got it successfully but whenever i'm goin to run the tool it's just tells nothing..
ReplyDelete@ p0dde
ReplyDeleteCan you now see the phc driver among the output of lsmod? Hope so ^_^
@ stratocaster
Do you mean you have no output when issuing "sudo phctool"?
hi there,
ReplyDeletei followed your guide step by step and did not encounter any obstacles (no error messages etc.). until ..
when i type "sudo phctool" nothing happens (i.e. no output in the terminal).
"lsmod | grep acpi_cpufreq" also gives no output at all (so i guess i did not install anything afterall or is my cpu not supported (its quite old)?)
thx
@Anonymous
ReplyDeleteIt does not mean your cpu is not supported. Try to look for the phc driver in lsmod output. If it does not you haven't installed anything... As you may have seen a reboot may do the deal...
cheers
hi,
ReplyDeletethanks for your reply.
lsmod yields:
phc_intel 18278 1
mperf 12667 1 phc_intel
cpufreq_stats 13257 0
I did/had to reboot in step 6.
Still no luck.
Tom
Ok, so it seems you have the driver installed, the issue stands in the GUI. Try to launch the GUI from your path as:
ReplyDeletesudo sh **yourpath**/phctool.sh
and let's see if we can get an output at least...
hi,
ReplyDeleteit works! Somehow I didn't manage to set the link, however I can start it from **mypath**.
Sorry for bothering you cause I was to stupid to try it without the link.
Thanks a lot.
Tom
hi,
ReplyDeleteso i tried following your guide and when i get to sudo phctool it says:command not found.
I tried running it (./phctool.sh) from the **mypath** directory and a new tab appeared on my bar but after 5 seconds it disappeared.
I tried doing sudo sh **mypath**/phctool.sh and I got this as a message.
File "./phctool.py", line 468, in
app=appgui()
File "./phctool.py", line 83, in __init__
self.throttling=throttling.throttlecontrol(self.cpuinfo.data)
File "inc/libs/throttling.py", line 16, in __init__
self._cpus_have_interface() ##check which CPU has a trottling interface
File "inc/libs/throttling.py", line 23, in _cpus_have_interface
if os.path.exists('/proc/acpi/processor/'+self.cpus[cpu]['acpi']['acpiname']+'/throttling') & os.path.exists('/proc/acpi/processor/'+self.cpus[cpu]['acpi']['acpiname']+'/limit'):
KeyError: 'acpiname'
What did I do wrong and how can i correct this?
Thanks in advanced
@ Daniel
ReplyDeleteSomething's wrong at step 8, try to download the patch once again and overwrite the existing file.
Hi, I have i5-540m which in Windows downscales from 2.4GHz to 600MHz, but in Ubuntu only down to 1200MHz. Have you seen such cases before, any idea where to dig? cpufreq shows min frequency as 1199000
ReplyDelete@ Pavel
ReplyDeleteActually you're the first complaining about that. I looked around and found this:
http://download.intel.com/design/processor/datashts/322812.pdf
at page 55 you can see that the lowest clock available physically for your CPU is 1.2GHz (as your CPU is 540M -> SV table). This means that linux rocks (as always) and shows you the truth, while windoze, I believe, halves the CPU clock as it is shared by two thread for each physical core... which actually does not make any sense, but who knows what comes from Redmond?
Cheers
Hi,
ReplyDeleteI managed to get everything except the hard links part. I keep getting this error
justin@justin-laptop:~$ sudo ln /home/justin/tool/phctray.sh /usr/bin/phctray
ln: creating hard link `/usr/bin/phctray' => `/home/justin/tool/phctray.sh': Invalid cross-device link
Could you help me with this?
@QM ASEAN
ReplyDeleteIt might mean you are linking over two phisical different devices, try with "sudo ln -s"...
Anyway the only thing you're missing is the capability to launch phctool just writing the command in the term: if you right ./home/justin/tool/phctool it will launch anyway
Hi Docet,
ReplyDeleteThank you very very much!
Anyway just to update you that I had to install "gtk2-engines-pixbuf" as I got an error (Unable to locate theme engine in module_path: "pixmap") as well.
I run Ubuntu 11.10 x64 bit. But after a bit of fiddling with it it works now!
Thanks for your report, I added it to the guide ^_^
ReplyDeleteAfter 'Makefile:37: *** Only support for 2.6 series kernels. Schluss.' noting happens. What might be the Problem? AFAIK i should habe the newest patch with intel-0.3.2-12-1
ReplyDeleteIm Using a Lenovo T61 with latest Ubuntu 11.10
Well, after I've reread the article I came to step 6. I can't remove the current driver because it's used (as you say) so I rebooted via 'sudo reboot' but I neither can't unload the old driver (it's still in use) nor 'insert' the new one (device or resource busy).
ReplyDeleteAny ideas?
Thanks in Advance...
This comment has been removed by a blog administrator.
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDeleteCiao, ho seguito la tua guida e al momento di caricare il driver con
ReplyDeletesudo modprobe phc-intel
mi esce il seguente errore
FATAL: Error inserting phc_intel (/lib/modules/3.0.0-14-generic-phc/updates/dkms/phc-intel.ko): Device or resource busy
qualche consiglio?
PS: al comando
make dkms_mkdeb
mi dava errore. ho risolto installando il pacchetto dh-make con
sudo apt-get install make dkms_mkdeb
This comment has been removed by the author.
ReplyDeleteHi,
ReplyDeleteI am getting this as well:
sudo sh ./phctool.sh
Traceback (most recent call last):
File "./phctool.py", line 468, in
app=appgui()
File "./phctool.py", line 83, in __init__
self.throttling=throttling.throttlecontrol(self.cpuinfo.data)
File "inc/libs/throttling.py", line 16, in __init__
self._cpus_have_interface() ##check which CPU has a trottling interface
File "inc/libs/throttling.py", line 23, in _cpus_have_interface
if os.path.exists('/proc/acpi/processor/'+self.cpus[cpu]['acpi']['acpiname']+'/throttling') & os.path.exists('/proc/acpi/processor/'+self.cpus[cpu]['acpi']['acpiname']+'/limit'):
KeyError: 'acpiname'
I checked 4 times and I copied the patched file at step 8.
The same happens with phctray, but I can see the icon in the tray, it just throws that at startup and each time I push it.
I am on 11.10 with gnome-shell, if it can help.
ok, then my problem was I couldn't compile the .deb file with
ReplyDeletemake dkms_mkdeb
and I solved it installing the dkms_mkdeb package with
sudo apt-get install dkms_mkdeb
Now I can't load the drivers with
sudo modprobe phc-intel
and the output error was
FATAL: Error inserting phc_intel (/lib/modules/3.0.0-14-generic-phc/updates/dkms/phc-intel.ko): Device or resource busy
If I understand correctly, to resolve it I need to do
blacklist acpi_cpufreq cpufreq_stats
and after add in /etc/modules with
sudo gedit /etc/modules
the string "phc-intel" in any location of the file.
Is that correct? I aspect of your confirmation before proceeding. =)
PS. I read your blog. Congratulations I really liked it
Based on Step 5 on this blog, what is the difference between "make dkms_mkdeb" and "sudo apt-get install dkms_mkdeb"?
DeleteThis comment has been removed by the author.
ReplyDeleteok the problem seems to be solved. I finish to follow your guide but at the end, when I launch
ReplyDeletesudo phctool
what should happen? because no windows is open.
I guess you messed up with the step 11... A GUI should open as it happens when you go to the path and run
ReplyDeletesh phctool.sh
in term.
Thanks for your help, I'm not running an Ubuntu box but a Gentoo one, so fixing those issues without any help would have been a pain.
Cheers
I tried
ReplyDeletesh **my path**/phctool.sh
and it works. I removed my old links and recreate them: I thought I had the wrong link because when I was in the directory /*mypath*/phctool I simply made
ln phctool.sh /usr/bin/phctray
it was wrong, wasn't it?
So I recreate the link using the "long form" but it still doesn't work.
Solved, in a very stupid way. I created a new .sh file in whice I wrote only the path
ReplyDelete**my_path**/phctool.sh
I made it executable with
chmod +x new_file.sh
and I used it for the link with
ln /**my_new_file_path**/new_file.sh /usr/bin/phctool
In this way it works. I'm unable to undestand why the normal link doesn't work. I think it's a unity problem.
Now, two final questions:
1) "Update Manager" (in italiano si chiama "gestore aggiornamenti") ask me to install the new kernel. I guess that if I install it, then I unable to change the CPU voltage. So, how can I disable the request of installing the new kernel? My fear is that thoughtfully I can upgrade all, forgetting to disable the kernel upgrade, and that might happen to other users.
2) I'm using a netbook Samsung N145P with ubuntu 11.10.
Is gentoo lighter than Ubuntu? Looking at the hardware requirements, seems don't change so much.
I got some feedback from developers and this is how it should go, no need to blacklist or manual edit conf
ReplyDeleteif you run a phc kernel you should not need the mainstream kernel. Just to be sure you can block the mainstream kernel updates and follow just the phc one.
Gentoo is a radically different distro... take a look here http://linuxsolver.blogspot.com/2010/09/g-for-gentoo.html
Hi fabio, I am trying to undervolt my laptop & using your post as guidance
ReplyDeleteI am using Ubuntu 10.10 Kernel 2.6.35.31-generic
Processor Intel Core2Duo T6600@2.2GHz
Here we go,
Step 1. No problem
Step 2. done & restart the machine
I get this from uname
uname -a
Linux lennyG430 2.6.35-31-generic-phc #63~phc0-Ubuntu SMP Fri Dec 9 05:18:22 UTC 2011 i686 GNU/Linux
Step 3. there is no dkms-mkdeb in my maverick repository, so I've change it to
sudo apt-get install build-essential dkms
done
& then, this command
sudo sh -c 'echo >> /etc/modprobe.d/phc-intel.conf'
done
Step 4. Get the phc-intel-pack-rev4.tar.bz2 done,
extracted to $HOME/phc/phc-intel-pack-rev4
Step 5. Not quite sure which folder **your_path** means
what I do,
cd /phc/phc-intel-pack-rev4
then
make dkms_mkdeb
Here what I got:
Creating symlink /home/raafi/phc/phc-intel-pack-rev4/.dkms/phc-intel/0.3.2/source ->
/home/raafi/phc/phc-intel-pack-rev4/.dkms//usr/src//phc-intel-0.3.2
DKMS: add Completed.
Using /etc/dkms/template-dkms-mkdeb
copying template...
modifying debian/changelog...
modifying debian/compat...
modifying debian/control...
modifying debian/copyright...
modifying debian/dirs...
modifying debian/postinst...
modifying debian/prerm...
modifying debian/README.Debian...
modifying debian/rules...
copying legacy postinstall template...
Copying source tree...
Building binary package... dpkg-source --before-build phc-intel-dkms-0.3.2
fakeroot debian/rules clean
make[1]: dh_testdir: Command not found
make[1]: *** [clean] Error 127
dpkg-buildpackage: error: fakeroot debian/rules clean gave error exit status 2
(bad exit status: 2)
Error! There was a problem creating your deb.
make: *** [dkms_mkdeb] Error 7
Got stuck there. I am not quite familiar with creating kernel module, so will you please help me?
Am I missing/forget something?
what I did do wrong?
-Raafi-
**your_path** is the temporary folder you are supposed to create in step 5. the most common place might be just
Delete/home/[your_user]/phc/
that might solve the issue.
This comment has been removed by the author.
Deletein my case actually there is some package need to be installed
Deletewhich is 'debhelper'
the hint is in this line error
make[1]: dh_testdir: Command not found
I got this from http://ubuntuforums.org/showthread.php?t=607797&page=3 post #25
then when I re-do the step 5. It's done with no error & I get the .deb package
Install the .deb package by double-click it in nautilus...done
If I go directly to step 6 then got some error
$ sudo modprobe -r acpi-cpufreq
FATAL: Module acpi_cpufreq is in use.
FATAL: Error running remove command for acpi_cpufreq
So you should restart the machine, between step 5 & step 6
(cmiiw, this need to be done because we are installing & removing kernel module aren't we)
then step 6 will finished gracefully
step 7 downloading the phctool
put it & extracted on
/home/raafi/phctool
then the full path become
/home/raafi/phctool/0.5.2-2/phctool/
step 8 download the patch done
get the file 'cpuinfo.tar.bz2'
extract it, filename inside actually 'cpuinfo.py'
patch it (move and replace) to
/home/raafi/phctool/0.5.2-2/phctool/inc/libs/
done
step 9
main phc folder in my case is
/home/raafi/phctool/0.5.2-2/phctool/
then
sudo ./install.sh
done
step 10
something like this:
need to create group (answer with y then enter)
need to create sudo permission (answer with y then enter)
done
step 11 LOG OUT then LOG IN
done
then
create hardlink
for phc tool
sudo ln /home/raafi/phctool/0.5.2-2/phctool/phctool.sh usr/bin/phctool
for phctray
sudo ln /home/raafi/phctool/0.5.2-2/phctool/phctray.sh usr/bin/phctray
done
step 12
when I try
sudo phctool
nothing happens
but if I run the script directly from the folder
(/home/raafi/phctool/0.5.2-2)
then
sudo ./phctool.sh
then It runs well & the GUI shows up
maybe something missing with the command in step 11?
I don't really know, cause I am not quite familiar with hardlinking command anyway.
But anyway. It works!
Thank you fabio for your guide
Hello Fabio,
ReplyDeleteUdervolting is my best subject and I appreciate you sharing with us meaningful topics. Since I am still a Ubuntu 11.10 Linux newbie, I got a few to ask:
1) In Step 2, "First pause... restart your PC and be sure to choose your new *-phc kernel." What do you mean by choose your new *-phc kernel?
2) 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. Again, what do you mean by "move there"?
My system:
Pavilion dv2210us
AMD Turion 64 X2 1.6Ghz TL-52
2GB DDR2 RAMs
nVidia Geforce Go 6150
160GB WD 5400RPM
Thanks,
Cason
Glad to help newbies ^_^
Delete1) the * in informatics (and maybe in other fields) but at least surely here means "whatever".. you can read the output of Raafi, jright before your comment: "... 2.6.35-31-generic-phc ..." that's a *-phc kernel. Just run in terminal "uname -a" and make sure you have something like that... if you don't we can manage it.
2) "move there" means: open a terminal and "cd [that folder]"
If you need further help just ask
Cheers
Yeah, the Italians are always helpful. ^.^
ReplyDeleteAlright, here goes error for Step 1:
cason@Casonade:~$ sudo add-apt-repository ppa:linux-phc/ppa ppa:linux-phc/testing
[sudo] password for cason:
Error: need a repository as argument
cason@Casonade:~$ ^C
cason@Casonade:~$
I tried "sudo -i" command and repeated, still yielded same error.
Cason
My fault ^_^ I've updated the post content.. thanks
DeleteI followed "Fix for linux-3.x support in phc-k8" to delete the bug but now I get this instead,
ReplyDeletecason@Casonade:~$ cd Downloads
cason@Casonade:~/Downloads$ cd phc-k8_v0.4.4
cason@Casonade:~/Downloads/phc-k8_v0.4.4$ make dkms_mkdeb
make: *** No rule to make target `dkms_mkdeb'. Stop.
cason@Casonade:~/Downloads/phc-k8_v0.4.4$
I am stuck in Step 5. Can you help me?
I knew that there was the 3.x bug ("AMD users might fid troubles..."), but I think it'll be fixed soon.
DeleteI can't get where the problem is.. try with
sudo make clean
and then
make dkms_mkdeb
it sounds strange...
Thanks for replying. I tried those commands above and still get the same thing. Furthermore, when doing a cold boot, the log in screen is blank. I typed my password blindly, hit enter, waited for the hard drive activity to finish, then put it to sleep mode and resume - only way to access Ubuntu GUI.
ReplyDeleteI think it has something to do with the steps prior to Step 5. It's driving me nut...Can we reverse the steps and uninstall?
I guess you messed up with something else, no way to do such a disaster 'cause of PHC... did you update your system recently? Try to google around, maybe it's a known issue.
DeleteIf you want to undo the phc installation just delete the phc folder (since you did not create nor install the package); then uninstall the *-phc kernel using synaptic and reboot your box.
Sorry about that...
Well, I started using Ubuntu 11.10 about a month now so besides running Update Manager after Clean Installation, I never made anything drastic change to the system. The only major I did was updating my GeForce Go 6150 173 driver to 290.10.
ReplyDeleteAs far as following your instruction, I made sure of that. I still have a copy of what appeared on the Terminal, saved in a text file.
Here is the link:
https://docs.google.com/document/pub?id=1QDBnEphLcnS7VhjQkNreg_ULN-bThrxkqFiyFv4FFqI
I've had a look and bolded the part which appeared to be some errors. Please have a look and tell me what you think. Thanks!
it looks to be the cpu driver loading procedure... the errors refers to drivers tha don't fit your cpu, so nothing strange. Do you still have that issue? try to step back the videocard drivers...
Deleteto get rid of error message dh_testdir not found - you need to install package debhelper
ReplyDeleteI think there in an error in your instructions, dkms_mkdeb is not a valid package for me, and dkms will not install not til you add the gtk2-engines-pixbuf package
so the lines
sudo apt-get install build-essential dkms-mkdeb
sudo apt-get install gtk2-engines-pixbuf
has to become
sudo apt-get install gtk2-engines-pixbuf build-essential
sudo apt-get install dkms debhelper
thanks for suggestion, post updated ^_^ Cheers
DeleteI managed to get to the last step aka run "sudo phctool" but nothing came up. Here is what I did:
ReplyDeleteRedo Step 1 - 5: I had to run "sudo make dkms_install" to get it to install (see the BOLD part). the make dkms still resulted same error. Have a look at the Terminal output.
https://docs.google.com/document/pub?id=1mRHrjWrOrt7apt32SMvgUO6wejZsrGhzecyXoEPg-sI
Step 6 - 10
https://docs.google.com/document/pub?id=1DEOXRvoqdq8rGrmjrQrv5fc_1nN3X_6d6D9JdqwOnZI
Stuck on Step 11
relogin and make two links to let you launch these programs directly from terminal:
sudo ln **your path**/phctool.sh /usr/bin/phctool
sudo ln **your path**/phctray.sh /usr/bin/phctray
I unzipped the file to Home/Downloads/0.5.2-2/phctool
so I put:
sudo ln Downloads/0.5.2-2/phctool/phctool.sh /usr/bin/phctool
sudo ln Downloads/0.5.2-2/phctool/phctray.sh /usr/bin/phctray
If this is incorrect, let me know.
Then tried to run "sudo phctool" and nothing popped up.
Maybe you just need a reboot. Try to launch the program with:
Deletesudo sh Downloads/0.5.2-2/phctool/phctool.sh
if it runs then try
sudo sh /usr/bin/phctool
if this runs too:
sudo ./usr/bin/phctool
if this does not run you must change permissions with:
sudo chmod 755 Downloads/0.5.2-2/phctool/phctool.sh
This is what I get after sudo sh Downloads... command:
ReplyDeletecason@Casonade:~$ sudo sh Downloads/0.5.2-2/phctool/phctool.sh
You need to install pyGTK or GTKv2 or set your PYTHONPATH correctly.
try: export PYTHONPATH= /usr/local/lib/python2.2/site-packages/
cason@Casonade:~$
The answer it's in the question:
Deletetry: export PYTHONPATH= /usr/local/lib/python2.2/site-packages/
if it doesn't work try installing pyGTK
Same problem here. No matter what. I have pyGTK installed and so on... ubuntu 11.10 here.
Deletesorry, solved by installing:
Deleteapt-get install python-gtk2-dev
Thnks
Fabio, could you add this information (apt-get install python-gtk2-dev) to the main entry at the top? I'm on ubuntu 11.10 and I've had the same problem. Having had python-gtk2 installed, I did not recognize what was missing.
DeleteI see that this problem has already been asked about but I still dont understand.
ReplyDeleteI go through the steps fine, use sudo modprobe -r acpi-cpufreq and it doesnt give output, then I use sudo modprobe phc-intel and it gives me this:
FATAL: Error inserting phc_intel (/lib/modules/3.0.0-15-generic-phc/updates/dkms/phc-intel.ko): Device or resource busy
how can I make this work? my laptop runs very hot without undervolting and I fixed this in windows but when I switched to linux I cannot figure out how to do it.
thanks
Sorry I forgot to mention that I used uname -a and I am running the phc version
DeleteOk, it seems that for some reason there is still some module loaded on cpus... have you tried a reboot? Have you created the empty file in /etc/modprobe.d/phc-intel.conf?
DeleteIf the answers are both yes you've just to blacklist a couple of modules (ask me and I'll tell you), don't worry, but this procedure has been discouraged by developers.
Cheers
yes I have rebooted and created the file. So how do I blacklist the modules and which ones?
ReplyDeleteOne last attemp before blacklisting... try with
Deletesudo 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
Cheers
I am running ubuntu 11.10 and currently having this error trying to run the GUI:
ReplyDeleterichard@richard-laptop:~/Downloads/0.5.2-2/phctool$ sudo sh phctool.sh
Traceback (most recent call last):
File "./phctool.py", line 468, in
app=appgui()
File "./phctool.py", line 83, in __init__
self.throttling=throttling.throttlecontrol(self.cpuinfo.data)
File "inc/libs/throttling.py", line 16, in __init__
self._cpus_have_interface() ##check which CPU has a trottling interface
File "inc/libs/throttling.py", line 23, in _cpus_have_interface
if os.path.exists('/proc/acpi/processor/'+self.cpus[cpu]['acpi']['acpiname']+'/throttling') & os.path.exists('/proc/acpi/processor/'+self.cpus[cpu]['acpi']['acpiname']+'/limit'):
KeyError: 'acpiname'
Any help would be great.
Double check step 8 ^_^
DeleteCheers
Long time no see, man. Been busy with school but now that Spring Break is here, I'm up for a little Linux.
DeleteI'm getting exact error as the person above me. I did double checked Step 8.
cason@Casonade:~/Downloads/0.5.2-2/phctool$ sudo sh phctool.sh
Traceback (most recent call last):
File "./phctool.py", line 468, in
app=appgui()
File "./phctool.py", line 83, in __init__
self.throttling=throttling.throttlecontrol(self.cpuinfo.data)
File "inc/libs/throttling.py", line 16, in __init__
self._cpus_have_interface() ##check which CPU has a trottling interface
File "inc/libs/throttling.py", line 23, in _cpus_have_interface
if os.path.exists('/proc/acpi/processor/'+self.cpus[cpu]['acpi']['acpiname']+'/throttling') & os.path.exists('/proc/acpi/processor/'+self.cpus[cpu]['acpi']['acpiname']+'/limit'):
KeyError: 'acpiname'
cason@Casonade:~/Downloads/0.5.2-2/phctool$
What else, sir?
Try with sudo rm ~/Downloads/0.5.2-2/phctool/incs/libs/cpuinfo.pyc
DeleteAnd try again. If it still does not run paste the output of:
sudo cat ~/Downloads/0.5.2-2/phctool/incs/libs/cpuinfo.py
Same error.
DeleteOutput of:
sudo cat ~/Downloads/0.5.2-2/phctool/incs/libs/cpuinfo.py
https://docs.google.com/document/pub?id=1ulTR7y3QYC7_rek_i2x1mPQ_M1WQTgmXDp1HRi1kw5c
mmm.... really strange... can you please paste the output of:
Deletels /proc/acpi/processor/
ls /sys/devices/system/cpu/
I think we are close to the point ^_^
cason@Casonade:~$ ls /proc/acpi/processor/
Deletels: cannot access /proc/acpi/processor/: No such file or directory
cason@Casonade:~$ ls /sys/devices/system/cpu/
cpu0 cpufreq kernel_max online present release
cpu1 cpuidle offline possible probe
cason@Casonade:~$
Don't know why the first command turned out that way? Am I missing something?
Hello,
DeleteThe very same thing happens to me (I'm under Mint 11 / Natty). Installation went all right, driver installed, no error, but running phctool does not work (see below). Like Casonade, the directory or file /proc/acpi/processor/ does not exist.
What's wrong? Many thanks in advance
-------------------
fs@Ligeia ~/phctool $ sudo sh ./phctool.sh
Traceback (most recent call last):
File "./phctool.py", line 468, in
app=appgui()
File "./phctool.py", line 83, in __init__
self.throttling=throttling.throttlecontrol(self.cpuinfo.data)
File "inc/libs/throttling.py", line 16, in __init__
self._cpus_have_interface() ##check which CPU has a trottling interface
File "inc/libs/throttling.py", line 23, in _cpus_have_interface
if os.path.exists('/proc/acpi/processor/'+self.cpus[cpu]['acpi']['acpiname']+'/throttling') & os.path.exists('/proc/acpi/processor/'+self.cpus[cpu]['acpi']['acpiname']+'/limit'):
KeyError: 'acpiname'
Sorry, I forgot to mention that I'm running a Toshiba R500 with Intel Core2 Duo U7700.
Deletels /sys/devices/system/cpu/ gives, like in Casonade's case:
cpu0 cpufreq kernel_max online present release
cpu1 cpuidle offline possible probe.
Thanks for the great tuto anyway.
Nothing wrong apparently.. both of you have the newer path.. try to download the new version of cpuinfo.py at step 8, delete both cpuinfo.py and .pyc
DeleteIf you have still troubles please paste the output of:
python -V
cat /sys/devices/system/cpu/online
ls /sys/devices/system/cpu/cpu0/
Thank you Fabio for the quick reply.
DeleteI reloaded cpuinfo.py from step 8, deleted both .py and .pyc, and got the same result (ending with " KeyError: 'acpiname' ").
Here is the output:
fs@Ligeia ~/phctool $ python -V
Python 2.7.1+
fs@Ligeia ~/phctool $ cat /sys/devices/system/cpu/online
0-1
fs@Ligeia ~/phctool $ ls /sys/devices/system/cpu/cpu0/
cache cpufreq cpuidle crash_notes node0 topology
Can this help you?
Try again please... it looks like your cpus have no throttling at all, so you missed a path.. I should have fixed that.
DeleteCheers
Molte grazie, tutto funziona a meraviglia ora!
DeleteThe GUI is now active. I hope I can get now my processor to cool down a bit! Thank you again. Francis
I went ahead and upgrade to Ubuntu 12.04 LTS yesterday (release date) and boy, it is much more fine tune in performance and battery life. One exception is that I cannot log in through Unity 3D due to some bug with new nVidia 295.40 driver. I hope it gets fixed soon. Cheers.
DeleteHi Fabio,
ReplyDeleteI got stuck on number 5. I put the correct path with cd in front of it but this what I get:
al@ubuntu:~$ cd /home/al/downloads/phc-intel-pack-rev4
bash: cd: /home/al/downloads/phc-intel-pack-rev4: No such file or directory
I tried moving the file to a different folder, but I got the same thing.
uname -a gives:
Linux ubuntu 3.0.0-15-generic-phc #26~phc0-Ubuntu SMP Tue Jan 24 02:57:43 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
Thanks,
Al
Are you sure you have successfully extracted the archive in that folder? Take a look if that folders exists and there's any file in there... maybe try with
Deletels /home/al/download/
ls /home/al/download/phc-intel-pack-rev4
I tried both and this is what I got:
Deleteal@ubuntu:~$ ls /home/al/Downloads/
phc-intel-pack-rev4.tar.bz2
al@ubuntu:~$ ls /home/al/Downloads/phc-intel-pack-rev4
ls: cannot access /home/al/Downloads/phc-intel-pack-rev4: No such file or directory
As you can see in the picture of the screen below, that is where I have my file, I even moved it to different places, but I keep getting the same thing.
[IMG]http://i39.tinypic.com/104jo5g.png[/IMG]
By the way, I have ubuntu 11.10.
DeleteSorry, Fabio. It was a stupid mistake on my part, I did not unzip the file before, but when I did it worked.
DeleteNow, I am stuck on step 11:
al@ubuntu:~$ sudo ln Downloads/0.5.2-2/phctool/phctool.sh /usr/bin/phctool
ln: creating hard link `/usr/bin/phctool': File exists
al@ubuntu:~$ sudo ln Downloads/0.5.2-2/phctool/phctray.sh /usr/bin/phctray
ln: creating hard link `/usr/bin/phctray': File exists
al@ubuntu:~$ sudo phctool
al@ubuntu:~$
Is that it? I understand that a program should open up, but nothing did.
I have the same issue... I think the program doesn't like being lauched from another location (relative paths maybe?) anyway i'll modify the guide to create a menu placeholder, which is better ^_^
DeleteHi, will this soon be updated for ubuntu 12.04?
ReplyDeleteI tried to compile the AMD k8 patch but I get an error saying it only supports kernel 2.6
Take a look at the newer guide. amd-k8 has a little trouble, it will be ready soon...
DeleteI am on Ubuntu 11.10,
ReplyDeletedownload install until here:
$ make dkms_mkdeb
does not work
$ make install dkms_mkdeb
works, but
got this:
... Fehler: Implizite Deklaration der Funktion »cpufreq_debug_printk« [-Werror=implicit-function-declaration]
/home/thomas/Downloads/Ubuntu/phc-k8_v0.4.4a2/phc-k8.c:336:4: Fehler: »CPUFREQ_DEBUG_DRIVER« nicht deklariert
Oh.. here you are! Have you tried taking a look to the up-to-date guide?
Deleteworks great on my T7500 CPU. rebuilt my standard kernel with CONFIG_CPU_FREQ_STAT=m and also rebuilt phc-intel driver module.
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.
Are the ppa still up ? I get an error on apt-get update !
ReplyDelete