You are not logged in.

#1 2007-11-04 07:58:56

Neuro
Member
From: Poland
Registered: 2005-10-12
Posts: 352

PHC undervolting patch - separate PKGBUILD?

Hi,

I've been using linux-phc undervolting patch (https://www.dedigentoo.org/trac/linux-phc/) for a while now. It works great, allows me to knock the temp down of the CPU from 71C to 63C under stress in my laptop, so it doesn't burn my lap when I compile something.
Still, I've been compiling my own kernel for the past few years, including suspend2 (now tuxonice) and this patch. However, since tuxonice could be easily (and with great results) replaced by ususpend, the only difference between my custom kernel and the stock kernel26 package is this little patch.

Now, I know the devs are not so hot about including feature patchces into the arch stock kernel, so I won't even bother asking for this to be included in the mainline kernel, though it's stable and doesn't change a thing if the voltage settings are left untouched.

I actually wanted to build a separate module for it, a bit like ipw3945. Now, I know this can be done, but I lack the kernel build-process magic skills to create a PKGBUILD for it. Could anyone help me out on this one?

Offline

#2 2007-11-05 20:39:12

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: PHC undervolting patch - separate PKGBUILD?

http://cvs.archlinux.org/cgi-bin/viewcvs.cgi/support/

There you'll find some kernel-related PKGBUILDs for inspiration.


1000

Offline

#3 2007-11-05 21:14:02

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: PHC undervolting patch - separate PKGBUILD?

I am not sure if this is a separate driver (module). I rather think it modifies the existing code, and in that case you cannot build it externally.

As said above, just take the kernel pkgbuild and modify it to fit your needs. It is not that difficult to pick up, it's a bit more difficult than a buildscript like Slackware does it, but it is also a lot smaller - it does the essentials.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#4 2007-11-06 16:29:48

Neuro
Member
From: Poland
Registered: 2005-10-12
Posts: 352

Re: PHC undervolting patch - separate PKGBUILD?

Look mate, I know perfectly well how to build my own kernel and with my own PKGBUILD. I'm just getting tired of compiling my own kernel26asus package along with ipw3945-asus and nvidia-asus...etc. I'd like to use the stock kernel and the stock module packages and somewhat neatly make a PKGBUILD which would build _only_ the cpufreq_acpi.ko module patched with PHC.

I just wanted to know if anyone did such a thing, i.e.: made a PKGBUILD which would build a separate module from the _kernel_ source tree with an appropriate patch. Anyone has any clue or ideas how to do it cleanly without too much hackish tricks?

Offline

#5 2007-11-06 16:47:31

nogoma
Member
From: Cranston, RI
Registered: 2006-03-01
Posts: 217

Re: PHC undervolting patch - separate PKGBUILD?

Sorry if I'm missing the point of the question here, but I believe this would be analogous to something like what rlocate does? I get the feeling what you're asking might be more complicated, but perhaps this is the right answer for your question.


-nogoma
---
Code Happy, Code Ruby!
http://www.last.fm/user/nogoma/

Offline

#6 2007-11-06 17:06:43

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: PHC undervolting patch - separate PKGBUILD?

Neuro wrote:

Look mate, I know perfectly well how to build my own kernel and with my own PKGBUILD. I'm just getting tired of compiling my own kernel26asus package along with ipw3945-asus and nvidia-asus...etc. I'd like to use the stock kernel and the stock module packages and somewhat neatly make a PKGBUILD which would build _only_ the cpufreq_acpi.ko module patched with PHC.

I just wanted to know if anyone did such a thing, i.e.: made a PKGBUILD which would build a separate module from the _kernel_ source tree with an appropriate patch. Anyone has any clue or ideas how to do it cleanly without too much hackish tricks?

You see, mate... You just answered your own question. There is already a cpufreq_acpi driver in the kernel. As I was not sure then, but am now: it modifies existing code, so you cannot just compile the code in that patch into a kernel module you install into the /lib/modules/`uname -r` directory. The best you can do is make a diff of the affected code in the vanilla kernel, patch it with this patch, and try to compile it out of tree and install it over the existing module.

It is filthy though.

I don't see how much work a stripped down kernel takes... At least, if it's done with a pkgbuild. Over here, it compiles in a few minutes. You can also integrate the ipw3945 modules into the kernel, not sure if you can do that (legally) for nvidia though.

Last edited by B (2007-11-06 17:43:52)


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#7 2007-11-07 15:34:37

Neuro
Member
From: Poland
Registered: 2005-10-12
Posts: 352

Re: PHC undervolting patch - separate PKGBUILD?

B wrote:

You see, mate... You just answered your own question. There is already a cpufreq_acpi driver in the kernel. As I was not sure then, but am now: it modifies existing code, so you cannot just compile the code in that patch into a kernel module you install into the /lib/modules/`uname -r` directory. The best you can do is make a diff of the affected code in the vanilla kernel, patch it with this patch, and try to compile it out of tree and install it over the existing module.

It is filthy though.

I'm aware of it all, and I know that such an approach would be filthy. My question boiled to exactly that: does anyone know a way of doing something like that in a nifty clean way? Because I can't think of anything else than you'd just described

I don't see how much work a stripped down kernel takes... At least, if it's done with a pkgbuild. Over here, it compiles in a few minutes. You can also integrate the ipw3945 modules into the kernel, not sure if you can do that (legally) for nvidia though.

Yes, I know. But I do want to avoid that. You see, the only thing I need that's not in the stock kernel is this patch. In my current kernel I had merged ipw3945, but I don't want to compile my own kernel every now and then.

Offline

#8 2008-05-24 23:19:21

servilvo
Member
Registered: 2008-05-24
Posts: 4

Re: PHC undervolting patch - separate PKGBUILD?

The new kernel 2.6.25.24 doesn't have phc

To enable it:

Download and extract the file in
http://ifile.it/9h5t8zl

Execute

sh install-module

That's all

Good luck archers

Offline

#9 2008-05-26 18:41:05

Djon
Member
Registered: 2007-12-21
Posts: 17

Re: PHC undervolting patch - separate PKGBUILD?

Hi!

I cannot install the modul, it has an invalid format. After "sh install-module" I get the following message:

insmod: error inserting 'acpi-cpufreq.ko': -1 Invalid module format

dmesg shows the following message:

acpi_cpufreq: version magic '2.6.25-ARCH SMP preempt mod_unload PENTIUMM ' should be '2.6.25-ARCH SMP preempt mod_unload 686 '
acpi_cpufreq: version magic '2.6.25-ARCH SMP preempt mod_unload PENTIUMM ' should be '2.6.25-ARCH SMP preempt mod_unload 686 '
acpi_cpufreq: version magic '2.6.25-ARCH SMP preempt mod_unload PENTIUMM ' should be '2.6.25-ARCH SMP preempt mod_unload 686 '
acpi_cpufreq: version magic '2.6.25-ARCH SMP preempt mod_unload PENTIUMM ' should be '2.6.25-ARCH SMP preempt mod_unload 686 '
acpi_cpufreq: version magic '2.6.25-ARCH SMP preempt mod_unload PENTIUMM ' should be '2.6.25-ARCH SMP preempt mod_unload 686 '

Can somebody help me?

Best Regards.

Djon

Offline

#10 2008-05-26 19:12:08

redbit
Member
Registered: 2007-11-13
Posts: 57

Re: PHC undervolting patch - separate PKGBUILD?

I've used this kernel patch. Works fine for me!
http://iki.fi/teknohog/hacks/linux-phc- … ohog.patch

Offline

#11 2008-05-26 19:14:37

Djon
Member
Registered: 2007-12-21
Posts: 17

Re: PHC undervolting patch - separate PKGBUILD?

Hi!

Can you post your allready patched acpi-cpufreq.c here?

thx.

Djon

Offline

#12 2008-05-26 19:20:26

redbit
Member
Registered: 2007-11-13
Posts: 57

Re: PHC undervolting patch - separate PKGBUILD?

Hope this link works, otherwise simply leave a message.

http://www.scotchbonnet.de/foren/acpi-cpufreq.ko

Last edited by redbit (2008-05-26 19:22:08)

Offline

#13 2008-05-26 19:30:38

Djon
Member
Registered: 2007-12-21
Posts: 17

Re: PHC undervolting patch - separate PKGBUILD?

Hi!

It works fine big_smile

Best Regard.


Djon

Offline

#14 2008-10-14 18:09:34

Djon
Member
Registered: 2007-12-21
Posts: 17

Re: PHC undervolting patch - separate PKGBUILD?

Hi!

This patch doesn't work with current version of kernel (2.6.27) :-(

Any idea?

Djon

Offline

#15 2008-10-17 17:40:52

Djon
Member
Registered: 2007-12-21
Posts: 17

Re: PHC undervolting patch - separate PKGBUILD?

Hi!

The solution for this problem is a new compilation of the modul "acpi-cpufreq".

Regards
Djon

Offline

Board footer

Powered by FluxBB