Results 1 to 4 of 4

Thread: mini HOWTO: Using PHC in precise (advanced)

  1. #1
    Join Date
    Apr 2011
    Beans
    3

    mini HOWTO: Using PHC in precise (advanced)

    Putting this here so people can just google instead of going through the same process I did.

    I did this with phc-k8 on a Turion 64 X2 processor. Will take a little tweaking to use the Intel driver.

    FIRST: You must be running kernel 3.2.0-24.38 or later. At the time of this writing, this kernel is still in -proposed.

    Allrighty then. Get your driver here. Before we can compile this, we have to tweak something quick for 3.2 kernels. Edit Makefile. Change these two lines:
    Code:
    MODULES := phc-k8.ko mperf.ko
    obj-m += phc-k8.o mperf.o
    To this:
    Code:
    MODULES := phc-k8.ko
    obj-m += phc-k8.o
    Also comment this out:
    Code:
    ifneq ($(KERNELMAJOR), 2.6)
    $(error Only support for 2.6 series kernels)
    endif
    Now open dkms.conf and comment out these two lines:

    Code:
    BUILT_MODULE_NAME[1]="mperf"
    DEST_MODULE_LOCATION[1]="/kernel/arch/x86/kernel/cpu/cpufreq/"
    With that done, make && sudo make dkms_install. Module is installed. But we're not done yet.

    Edit /etc/default/grub and change this line:
    Code:
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
    to:
    Code:
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash cpufreq_driver=phc-k8"
    Finally, update-grub, add phc-k8 to /etc/modules, and reboot. When your system comes back up, phc-k8 will be loaded and you'll have the /sys/devices/system/cpu/cpu0/phc_* hooks. The rest I'll leave up to other guides around the Internet.
    Last edited by roothorick; May 4th, 2012 at 05:34 PM. Reason: Yikes! The forum ate my formatting!

  2. #2
    Join Date
    Feb 2012
    Beans
    1

    Re: mini HOWTO: Using PHC in precise (advanced)

    Thanks heaps for this. I actually found that even the newest 0.4.4b1 can be compiled with a few changes, so I put together a .deb for dkms and have attached it.

    It's a ZIP containing the actual .deb because the forum wouldn't let me attach .deb files Also this is my first DKMS .deb, so I hope it works, if not, tell me.

    Installation should work as follows:
    Download the file.
    Open a terminal and "cd" to the directory of the downloaded file (e.g. "cd Downloads").
    Type
    Code:
    sudo apt-get install linux-image-generic-phc linux-headers-generic-phc
    unzip phc-k8-dkms_0.4.4b2_all.zip
    sudo dpkg -i phc-k8-dkms_0.4.4b2_all.deb
    And then I did your last two steps (editing /etc/default/grub and /etc/modules) and it worked fine.

    Lastly, I added this line into /etc/rc.local (before the exit 0):
    Code:
    echo -n "40 46 52 60" | tee /sys/devices/system/cpu/cpu?/cpufreq/phc_vids
    BUT of course the exact numbers certainly need to be different on other CPUs, so don't just copy this line if you don't know what these numbers mean.

    And when I rebooted and saw that everything worked, I uninstalled the non-PHC kernel:
    Code:
    sudo apt-get remove linux-image-generic linux-headers-generic
    sudo apt-get autoremove

    Hope it helps!

    Stefan
    Attached Files Attached Files
    Last edited by seidler2547; July 11th, 2012 at 07:08 AM.

  3. #3
    Join Date
    Sep 2006
    Location
    Allentown, PA; USA
    Beans
    493
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: mini HOWTO: Using PHC in precise (advanced)

    Guys, thanks for this. I have an Asus 1201T netbook with an Ati 3200 graphics card. It always ran hot in Ubuntu, and sucked the life out of the battery compared to XP running a cpu clock/undervolt program, RMClock. Even not running RMClock, XP with the Hybrid Engine seemed to manage battery much better.

    If someone finds this, the settings that work well for the Athlon Neo that I put into RC local are:

    echo -n 27 38 > /sys/devices/system/cpu/cpu0/cpufreq/phc_vids

    HIGHER numbers seem to lower voltage. I used this post to determine what to do; go down the the bottom of page 1, then onto page 2 to see were these numbers come from.

    FYI, running an older bios, one might have 3 values depending on what make/model the processor is in, but apparently, the newer bios got rid of a step. Not sure why.

    More info at
    http://linuxsolver.blogspot.com/2012...untu-1204.html

  4. #4
    Join Date
    Mar 2011
    Location
    New Zealand
    Beans
    443
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: mini HOWTO: Using PHC in precise (advanced)

    Before trying to undervolt it might pay to check if your cpu is supported. I went through a lot of bother only to find out mine isn't supported.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •