Package Details: phc-k8 0.4.6-2

Git Clone URL: https://aur.archlinux.org/phc-k8.git (read-only)
Package Base: phc-k8
Description: Frequency driver for AMD CPUs with undervolting feature
Upstream URL: http://www.linux-phc.org
Licenses: GPL
Provides: linux-phc
Submitter: None
Maintainer: fs4000
Last Packager: fs4000
Votes: 25
Popularity: 0.000045
First Submitted: 2009-01-07 20:45
Last Updated: 2016-05-13 16:50

Dependencies (1)

Required by (0)

Sources (6)

Latest Comments

fs4000 commented on 2016-05-13 16:53

Sorry, my fault. Thanks for your notification.

deimos commented on 2016-05-13 04:32

I had to change the lines 25 and 36 of the PKGBUILD to the following to get it to successfully build:
cd "$pkgname"_v"$pkgver"

fs4000 commented on 2016-02-27 11:17

I have updated this package to use DKMS for automatically building the kernel module. This is possible due to the new hooks feature of pacman which is used in the new DKMS package.

Anonymous comment on 2015-06-03 22:35

updated

leo.mnzes commented on 2015-06-02 23:59

This module doesn't build with kernel 3.18.

See this:

$ sudo phc-k8 setup

:: Removing old phc-k8 modules

:: Compiling new phc-k8 module

make -C /lib/modules/`uname -r`/build SUBDIRS=/usr/src/phc-k8 phc-k8.ko
make[1]: Entering directory '/usr/lib/modules/3.18.14-1-MANJARO/build'
CC [M] /usr/src/phc-k8/phc-k8.o
/usr/src/phc-k8/phc-k8.c: In function ‘store_cpb’:
/usr/src/phc-k8/phc-k8.c:2461:8: error: implicit declaration of function ‘strict_strtoul’ [-Werror=implicit-function-declaration]
ret = strict_strtoul(buf, 10, &val);
^
cc1: some warnings being treated as errors
scripts/Makefile.build:263: recipe for target '/usr/src/phc-k8/phc-k8.o' failed
make[2]: *** [/usr/src/phc-k8/phc-k8.o] Error 1
Makefile:1550: recipe for target 'phc-k8.ko' failed
make[1]: *** [phc-k8.ko] Error 2
make[1]: Leaving directory '/usr/lib/modules/3.18.14-1-MANJARO/build'
Makefile:42: recipe for target 'phc-k8.ko' failed
make: *** [phc-k8.ko] Error 2

lockheed commented on 2014-12-24 12:35

The module doesn't build against modern kernels due to the error mentioned by @deimos

deimos commented on 2014-02-21 23:53

:: Removing old phc-k8 modules

:: Compiling new phc-k8 module

make -C /lib/modules/`uname -r`/build SUBDIRS=/usr/src/phc-k8 phc-k8.ko
make[1]: Entering directory '/usr/lib/modules/3.13.4-1-ARCH/build'
CC [M] /usr/src/phc-k8/phc-k8.o
In file included from include/linux/module.h:17:0,
from /usr/src/phc-k8/phc-k8.c:37:
/usr/src/phc-k8/phc-k8.c: In function ‘__check_direct_transitions’:
include/linux/moduleparam.h:349:45: warning: return from incompatible pointer type [enabled by default]
static inline type *__check_##name(void) { return(p); }
^
include/linux/moduleparam.h:395:35: note: in expansion of macro ‘__param_check’
#define param_check_bool(name, p) __param_check(name, p, bool)
^
include/linux/moduleparam.h:127:2: note: in expansion of macro ‘param_check_bool’
param_check_##type(name, &(value)); \
^
include/linux/moduleparam.h:113:2: note: in expansion of macro ‘module_param_named’
module_param_named(name, name, type, perm)
^
/usr/src/phc-k8/phc-k8.c:65:1: note: in expansion of macro ‘module_param’
module_param(direct_transitions, bool, 0444);
^
/usr/src/phc-k8/phc-k8.c: In function ‘__check_min_800MHz’:
include/linux/moduleparam.h:349:45: warning: return from incompatible pointer type [enabled by default]
static inline type *__check_##name(void) { return(p); }
^
include/linux/moduleparam.h:395:35: note: in expansion of macro ‘__param_check’
#define param_check_bool(name, p) __param_check(name, p, bool)
^
include/linux/moduleparam.h:127:2: note: in expansion of macro ‘param_check_bool’
param_check_##type(name, &(value)); \
^
include/linux/moduleparam.h:113:2: note: in expansion of macro ‘module_param_named’
module_param_named(name, name, type, perm)
^
/usr/src/phc-k8/phc-k8.c:68:1: note: in expansion of macro ‘module_param’
module_param(min_800MHz, bool, 0444);
^
/usr/src/phc-k8/phc-k8.c: In function ‘print_basics’:
/usr/src/phc-k8/phc-k8.c:889:29: error: ‘struct cpufreq_frequency_table’ has no member named ‘index’
data->powernow_table[j].index & HW_PSTATE_MASK,
^
/usr/src/phc-k8/phc-k8.c:891:55: error: ‘struct cpufreq_frequency_table’ has no member named ‘index’
cpufreqtable_index_to_vid(data->powernow_table[j].index));
^
/usr/src/phc-k8/phc-k8.c:896:29: error: ‘struct cpufreq_frequency_table’ has no member named ‘index’
data->powernow_table[j].index & 0xff,
^
/usr/src/phc-k8/phc-k8.c:898:29: error: ‘struct cpufreq_frequency_table’ has no member named ‘index’
data->powernow_table[j].index >> 8);
^
/usr/src/phc-k8/phc-k8.c: In function ‘fill_powernow_table’:
/usr/src/phc-k8/phc-k8.c:945:20: error: ‘struct cpufreq_frequency_table’ has no member named ‘index’
powernow_table[j].index = pst[j].fid; /* lower 8 bits */
^
/usr/src/phc-k8/phc-k8.c:946:20: error: ‘struct cpufreq_frequency_table’ has no member named ‘index’
powernow_table[j].index |= (pst[j].vid << 8); /* upper 8 bits */
^
/usr/src/phc-k8/phc-k8.c:951:29: error: ‘struct cpufreq_frequency_table’ has no member named ‘index’
powernow_table[data->numps].index = 0;
^
/usr/src/phc-k8/phc-k8.c: In function ‘powernow_k8_cpu_init_acpi’:
/usr/src/phc-k8/phc-k8.c:1169:23: error: ‘struct cpufreq_frequency_table’ has no member named ‘index’
powernow_table[numps].index = 0;
^
/usr/src/phc-k8/phc-k8.c: In function ‘fill_powernow_table_pstate’:
/usr/src/phc-k8/phc-k8.c:1263:20: error: ‘struct cpufreq_frequency_table’ has no member named ‘index’
powernow_table[i].index = index | (lo << 16);
^
/usr/src/phc-k8/phc-k8.c: In function ‘fill_powernow_table_fidvid’:
/usr/src/phc-k8/phc-k8.c:1292:20: error: ‘struct cpufreq_frequency_table’ has no member named ‘index’
powernow_table[i].index = index;
^
/usr/src/phc-k8/phc-k8.c: In function ‘fill_powernow_table_fidvid_dt’:
/usr/src/phc-k8/phc-k8.c:1358:20: error: ‘struct cpufreq_frequency_table’ has no member named ‘index’
powernow_table[i].index = (fid & 0xFF)
^
/usr/src/phc-k8/phc-k8.c: In function ‘transition_frequency_fidvid’:
/usr/src/phc-k8/phc-k8.c:1452:35: error: ‘struct cpufreq_frequency_table’ has no member named ‘index’
fid = data->powernow_table[index].index & 0xFF;
^
/usr/src/phc-k8/phc-k8.c:1453:36: error: ‘struct cpufreq_frequency_table’ has no member named ‘index’
vid = (data->powernow_table[index].index & 0xFF00) >> 8;
^
/usr/src/phc-k8/phc-k8.c: In function ‘powernowk8_cpu_init’:
/usr/src/phc-k8/phc-k8.c:1769:23: error: ‘struct cpufreq_driver’ has no member named ‘getavg’
cpufreq_amd64_driver.getavg = cpufreq_get_measured_perf;
^
/usr/src/phc-k8/phc-k8.c: In function ‘powernowk8_apply_settings’:
/usr/src/phc-k8/phc-k8.c:1839:35: error: ‘struct cpufreq_frequency_table’ has no member named ‘index’
lo |= ((data->powernow_table[i].index >> 16) \
^
/usr/src/phc-k8/phc-k8.c: In function ‘show_controls’:
/usr/src/phc-k8/phc-k8.c:1910:30: error: ‘struct cpufreq_frequency_table’ has no member named ‘index’
unsigned int fid = table[j].index & 0xff;
^
/usr/src/phc-k8/phc-k8.c:1911:31: error: ‘struct cpufreq_frequency_table’ has no member named ‘index’
unsigned int vid = (table[j].index >> 8) & 0xff;
^
/usr/src/phc-k8/phc-k8.c: In function ‘store_phc_controls’:
/usr/src/phc-k8/phc-k8.c:1973:44: error: ‘struct cpufreq_frequency_table’ has no member named ‘index’
while (fid < (data->powernow_table[entry].index & 0xFF)
^
/usr/src/phc-k8/phc-k8.c:1984:47: error: ‘struct cpufreq_frequency_table’ has no member named ‘index’
else if (fid != (data->powernow_table[entry].index & 0xFF)) {
^
/usr/src/phc-k8/phc-k8.c:1989:30: error: ‘struct cpufreq_frequency_table’ has no member named ‘index’
data->powernow_table[entry].index = (fid & 0xFF)|((vid & 0xFF) << 8);
^
/usr/src/phc-k8/phc-k8.c: In function ‘show_fids’:
/usr/src/phc-k8/phc-k8.c:2031:30: error: ‘struct cpufreq_frequency_table’ has no member named ‘index’
unsigned int fid = table[j].index & 0xff;
^
/usr/src/phc-k8/phc-k8.c: In function ‘show_phc_available_fids’:
/usr/src/phc-k8/phc-k8.c:2048:45: error: ‘struct cpufreq_frequency_table’ has no member named ‘index’
unsigned int fid = data->powernow_table[j].index & 0xff;
^
/usr/src/phc-k8/phc-k8.c: In function ‘store_phc_fids’:
/usr/src/phc-k8/phc-k8.c:2094:41: error: ‘struct cpufreq_frequency_table’ has no member named ‘index’
&& fid < (data->powernow_table[entry].index & 0xFF)) {
^
/usr/src/phc-k8/phc-k8.c:2104:47: error: ‘struct cpufreq_frequency_table’ has no member named ‘index’
else if (fid != (data->powernow_table[entry].index & 0xFF)) {
^
/usr/src/phc-k8/phc-k8.c:2109:37: error: ‘struct cpufreq_frequency_table’ has no member named ‘index’
vid = (data->powernow_table[entry].index >> 8) & 0xFF;
^
/usr/src/phc-k8/phc-k8.c:2110:30: error: ‘struct cpufreq_frequency_table’ has no member named ‘index’
data->powernow_table[entry].index = (fid & 0xFF)|((vid & 0xFF) << 8);
^
/usr/src/phc-k8/phc-k8.c: In function ‘show_vids’:
/usr/src/phc-k8/phc-k8.c:2153:19: error: ‘struct cpufreq_frequency_table’ has no member named ‘index’
vid = (table[j].index >> 8) & 0xff;
^
/usr/src/phc-k8/phc-k8.c:2157:44: error: ‘struct cpufreq_frequency_table’ has no member named ‘index’
vid = cpufreqtable_index_to_vid(table[j].index);
^
/usr/src/phc-k8/phc-k8.c: In function ‘store_phc_vids’:
/usr/src/phc-k8/phc-k8.c:2237:38: error: ‘struct cpufreq_frequency_table’ has no member named ‘index’
u32 fid = data->powernow_table[i].index & 0xFF;
^
/usr/src/phc-k8/phc-k8.c:2238:28: error: ‘struct cpufreq_frequency_table’ has no member named ‘index’
data->powernow_table[i].index = fid | ((vid & 0xFF) << 8);
^
/usr/src/phc-k8/phc-k8.c:2249:40: error: ‘struct cpufreq_frequency_table’ has no member named ‘index’
u32 mask = (data->powernow_table[i].index & ~(HW_PSTATE_VID_MASK << 16));
^
/usr/src/phc-k8/phc-k8.c:2250:28: error: ‘struct cpufreq_frequency_table’ has no member named ‘index’
data->powernow_table[i].index = mask | \
^
/usr/src/phc-k8/phc-k8.c: At top level:
/usr/src/phc-k8/phc-k8.c:2401:2: error: unknown field ‘owner’ specified in initializer
.owner = THIS_MODULE,
^
/usr/src/phc-k8/phc-k8.c:2401:2: warning: initialization makes integer from pointer without a cast [enabled by default]
/usr/src/phc-k8/phc-k8.c:2401:2: warning: (near initialization for ‘cpufreq_amd64_driver.flags’) [enabled by default]
/usr/src/phc-k8/phc-k8.c:2401:2: error: initializer element is not computable at load time
/usr/src/phc-k8/phc-k8.c:2401:2: error: (near initialization for ‘cpufreq_amd64_driver.flags’)
scripts/Makefile.build:314: recipe for target '/usr/src/phc-k8/phc-k8.o' failed
make[2]: *** [/usr/src/phc-k8/phc-k8.o] Error 1
Makefile:1415: recipe for target 'phc-k8.ko' failed
make[1]: *** [phc-k8.ko] Error 2
make[1]: Leaving directory '/usr/lib/modules/3.13.4-1-ARCH/build'
Makefile:42: recipe for target 'phc-k8.ko' failed
make: *** [phc-k8.ko] Error 2

Anonymous comment on 2013-07-04 12:02

The config file has moved to /etc/default/phc-k8. Updated to the latest beta version to make it build with Linux 3.10.

indianahorst commented on 2013-06-16 11:33

$ phc-k8 setup
:: Removing old phc-k8 modules

:: Compiling new phc-k8 module

make -C /lib/modules/`uname -r`/build SUBDIRS=/usr/src/phc-k8 phc-k8.ko
make[1]: Entering directory `/usr/src/linux-3.9.6-1-ARCH'
CC [M] /usr/src/phc-k8/phc-k8.o
In file included from include/linux/module.h:17:0,
from /usr/src/phc-k8/phc-k8.c:36:
/usr/src/phc-k8/phc-k8.c: In function ‘__check_direct_transitions’:
include/linux/moduleparam.h:338:45: warning: return from incompatible pointer type [enabled by default]
static inline type *__check_##name(void) { return(p); }
^
include/linux/moduleparam.h:384:35: note: in expansion of macro ‘__param_check’
#define param_check_bool(name, p) __param_check(name, p, bool)
^
include/linux/moduleparam.h:116:2: note: in expansion of macro ‘param_check_bool’
param_check_##type(name, &(value)); \
^
include/linux/moduleparam.h:102:2: note: in expansion of macro ‘module_param_named’
module_param_named(name, name, type, perm)
^
/usr/src/phc-k8/phc-k8.c:61:1: note: in expansion of macro ‘module_param’
module_param(direct_transitions, bool, 0444);
^
/usr/src/phc-k8/phc-k8.c: In function ‘__check_min_800MHz’:
include/linux/moduleparam.h:338:45: warning: return from incompatible pointer type [enabled by default]
static inline type *__check_##name(void) { return(p); }
^
include/linux/moduleparam.h:384:35: note: in expansion of macro ‘__param_check’
#define param_check_bool(name, p) __param_check(name, p, bool)
^
include/linux/moduleparam.h:116:2: note: in expansion of macro ‘param_check_bool’
param_check_##type(name, &(value)); \
^
include/linux/moduleparam.h:102:2: note: in expansion of macro ‘module_param_named’
module_param_named(name, name, type, perm)
^
/usr/src/phc-k8/phc-k8.c:64:1: note: in expansion of macro ‘module_param’
module_param(min_800MHz, bool, 0444);
^
/usr/src/phc-k8/phc-k8.c: At top level:
/usr/src/phc-k8/phc-k8.c:1742:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘powernowk8_cpu_exit’
static int __devexit powernowk8_cpu_exit(struct cpufreq_policy *pol)
^
/usr/src/phc-k8/phc-k8.c:2342:2: error: implicit declaration of function ‘__devexit_p’ [-Werror=implicit-function-declaration]
.exit = __devexit_p(powernowk8_cpu_exit),
^
/usr/src/phc-k8/phc-k8.c:2342:23: error: ‘powernowk8_cpu_exit’ undeclared here (not in a function)
.exit = __devexit_p(powernowk8_cpu_exit),
^
cc1: some warnings being treated as errors
make[2]: *** [/usr/src/phc-k8/phc-k8.o] Error 1
make[1]: *** [phc-k8.ko] Error 2
make[1]: Leaving directory `/usr/src/linux-3.9.6-1-ARCH'
make: *** [phc-k8.ko] Error 2

bjo commented on 2012-11-05 08:44

Please provide a systemd-unit.

farmerdave commented on 2012-07-15 11:35

Wow, how did I miss that! Thanks fs4000.

fs4000 commented on 2012-06-06 15:12

Do you have your kernel headers installed (probably linux-headers)?

farmerdave commented on 2012-06-03 01:47

Sorry, should have added this:

$ sudo /etc/rc.d/phc-k8 setup
:: Removing old phc-k8 modules [DONE]
:: Compiling new phc-k8 module [FAIL]

farmerdave commented on 2012-06-03 01:46

$ cat /var/log/phc-k8.log
Makefile:22: *** Kernel version not found, maybe you need to install appropriate kernel-headers or run make with KERNELSRC parameter, e.g.: make KERNELSRC=/usr/src/linux. Stop.

Any suggestions on what I should do?

mobad commented on 2011-11-21 23:42

I don't think the PKGBUILD actually compiles anything, seems to be missing make commands.

Anonymous comment on 2011-11-10 18:38

I adjusted the module location so that there is no need to rebuild the module on every minor kernel update anymore. This was introduced with linux 3.1.

fs4000 commented on 2011-08-14 15:49

Thanks for researching. I didn't know it should run with Linux 3.0.

mobad commented on 2011-08-14 01:02

There is a simple fix
http://www.linux-phc.org/forum/viewtopic.php?f=7&t=295
Here is a patch
http://pastebin.com/Z5tdXf2P

Anonymous comment on 2011-08-13 05:29

says:

:: Compiling new phc-k8 module [FAIL]
> Look at /var/log/phc-k8.log to find out what went wrong
$ cat /var/log/phc-k8.log
Makefile:28: *** Only support for 2.6 series kernels. Stop.

FredBezies commented on 2011-07-28 08:29

Any infos with kernel 2.6.39 please ?

fs4000 commented on 2011-06-13 17:53

Warning, this is the beta version of 0.4.4!

fs4000 commented on 2011-03-30 11:41

Oh, I missed to change that back. It's fixed now, md5sum however was from the stable version because I have the files locally.

Anonymous comment on 2011-03-30 09:04

thanks for update!
download link is for v.0.4.4 alpha2

fs4000 commented on 2011-03-28 21:21

The new package only contains the sources for phc-k8!
The module gets built with "/etc/rc.d/phc-k8 setup". The VIDs are automatically initialized with the setting from /etc/conf.d/phc-k8 and after standby and hibernation (pm-utils) these values will be restored (otherwise some CPUs can come up with the default setting again). Make sure you have powernow-k8 and not phc-k8 in your MODULES array or this won't work!
If your computer keeps crashing with PHC use the nophc kernel parameter to boot with the default VIDs.
It might be necessary to disable the patch for kernel 2.6.38 to compile for older versions.

fs4000 commented on 2010-10-26 20:06

should be fixed

I'm thinking about your idea, perhaps we can introduce something like dkms in Arch.

jarryson commented on 2010-10-26 08:05

can not build kernel module in 2.6.36

jarryson commented on 2010-09-22 13:04

i made a little change: add a scripts to rebuild kernel module easyier, generate kernel module when install, and add a config file(you can add phc-k8 to DAEMONS in rc.conf, and this daemon will rules when boot and reset them to default when shutdown.)

i think this is the best way. you can change config by change /etc/conf.d/phc-k8.conf, and you don't have to rebuild this package when kernel changes, just need to run "/etc/rc.d/phc-k8 setup" to build kernel module.

and please check phc-k8.rc, i added support of multiple cpus, hope it's right.

PKGBUILD: http://aur.pastebin.com/TvpHFL4D
phc-k8.install: http://aur.pastebin.com/q4Q6qE4T
phc-k8.rc: http://aur.pastebin.com/T5G33d68
phc-k8.conf: http://aur.pastebin.com/HiL1GLn7

jarryson commented on 2010-09-22 13:03

i made a little change: add a scripts to rebuild kernel module easyier, generate kernel module when install, and add a config file(you can add phc-k8 to DAEMONS in rc.conf, and this daemon will rules when boot and reset them to default when shutdown.)

i think this is the best way. you can change config by change /etc/conf.d/phc-k8.conf, and you don't have to rebuild this package when kernel changes, just need to run "/etc/rc.d/phc-k8 setup" to build kernel module.

and please check phc-k8, i added support of multiple cpus, hope it's right.

PKGBUILD: http://aur.pastebin.com/TvpHFL4D
phc-k8.install: http://aur.pastebin.com/q4Q6qE4T
phc-k8.rc: http://aur.pastebin.com/T5G33d68
phc-k8.conf: http://aur.pastebin.com/HiL1GLn7

Anonymous comment on 2010-06-19 16:01

please, include kernel v2.6.34 for fix.
PKGBUILD: line 24.