You are not logged in.

#1 2008-02-28 22:42:13

Reasons
Member
From: Washington
Registered: 2007-11-04
Posts: 572

Kernel patch for battery life

Using powertop I found out that the kernel was preventing my laptop from going idle and reading this page found out about a patch for it.
http://www.lesswatts.org/projects/powertop/known.php

However, that patch is out of date as I just got 2.6.24.3 today. Is there a recent patch for this as it is very annoying to only get three hours where I get five in vista.

Offline

#2 2008-02-28 23:27:41

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Kernel patch for battery life

See powertop patch in dark kernel patchset.

Offline

#3 2008-02-29 01:00:03

Reasons
Member
From: Washington
Registered: 2007-11-04
Posts: 572

Re: Kernel patch for battery life

Thanks for that. It got me to four hours and fifteen minutes estimated. I'm sure I could nudge it a bit more.

Offline

#4 2008-03-01 16:43:08

uastasi
Member
From: Salento - Italy
Registered: 2007-11-27
Posts: 247

Re: Kernel patch for battery life

I'd like to use that patch. Do I have to compile a custom kernel or to patch my one is quite enough? I don't know where to begin...


Till the last battle, till the last bottle.
aur - twitter

Offline

#5 2008-03-01 16:51:41

Bestiapeluda
Member
From: Buenos Aires, Argentina
Registered: 2007-10-16
Posts: 181

Re: Kernel patch for battery life

You will have to patch the source code and then compile.

Offline

#6 2008-03-02 10:03:26

ech0s7
Member
Registered: 2008-02-13
Posts: 18

Re: Kernel patch for battery life

Should i download the kernel26(with all archlinux patchs)  from abs and after patch it with this patch ?

Offline

#7 2008-03-02 11:00:02

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

Re: Kernel patch for battery life

It's a start, yes wink.


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

Offline

#8 2008-03-06 09:06:08

uastasi
Member
From: Salento - Italy
Registered: 2007-11-27
Posts: 247

Re: Kernel patch for battery life

It seems to me that a new version has been released.. http://forums.gentoo.org/viewtopic-t-671192.html
Anyway... what's the difference between patch and broken-out ?


Till the last battle, till the last bottle.
aur - twitter

Offline

#9 2008-03-08 19:58:45

uastasi
Member
From: Salento - Italy
Registered: 2007-11-27
Posts: 247

Re: Kernel patch for battery life

As suggested, I've sync'd abs, then copied kernel26/ in /var/abs/local/, and finally edited PKGBUILD by adding this rows related to the patch:

#dark5 patch
    patch-2.6.24-dark5.patch.bz2
    
# dark5 patch
    patch -Np1 -i ../patch-2.6.24-dark5.patch || return 1

After running makepkg I get an error like this:

Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file sound/usb/usx2y/usX2Yhwdep.c.rej
patching file sound/usb/usx2y/usx2yhwdeppcm.c
Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file sound/usb/usx2y/usx2yhwdeppcm.c.rej
==> ERRORE: Compilazione interrotta.
    L'operazione sta per essere interrotta...

There's something wrong or missing, I don't know how to go on.. any suggestion on how to fix my PKGBUILD?


Till the last battle, till the last bottle.
aur - twitter

Offline

#10 2008-03-08 20:08:19

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

Re: Kernel patch for battery life

uastasi wrote:

It seems to me that a new version has been released.. http://forums.gentoo.org/viewtopic-t-671192.html
Anyway... what's the difference between patch and broken-out ?

These are patch sets, which means a lot of patches thrown together. Either in one big combined patch, or in a tarball which is actually a directory with all the patches in, separately. That's a 'broken out'.


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

Offline

#11 2008-03-09 03:14:47

schivmeister
Developer/TU
From: Singapore
Registered: 2007-05-17
Posts: 971
Website

Re: Kernel patch for battery life

uastasi wrote:
#dark5 patch
    patch-2.6.24-dark5.patch.bz2
    
# dark5 patch
    patch -Np1 -i ../patch-2.6.24-dark5.patch || return 1

After running makepkg I get an error like this:

Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file sound/usb/usx2y/usX2Yhwdep.c.rej
patching file sound/usb/usx2y/usx2yhwdeppcm.c
Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file sound/usb/usx2y/usx2yhwdeppcm.c.rej
==> ERRORE: Compilazione interrotta.
    L'operazione sta per essere interrotta...

Simple - the patching failed. Apparently you have patches that are conflicting here, and one file in concern is $startdir/src/linux-2.6.24*/sound/usb/usx2y/usx2yhwdeppcm.c but I can't tell what other files are involved since you didn't paste the relevant lines before this.

Last edited by schivmeister (2008-03-09 03:19:10)


I need real, proper pen and paper for this.

Offline

#12 2008-03-09 12:20:31

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

Re: Kernel patch for battery life

Just use the broken out ones, what you are doing now is applying the whole lot, I don't think that's what you're after.


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

Offline

#13 2008-03-09 14:39:48

uastasi
Member
From: Salento - Italy
Registered: 2007-11-27
Posts: 247

Re: Kernel patch for battery life

schivmeister wrote:
uastasi wrote:
#dark5 patch
    patch-2.6.24-dark5.patch.bz2
    
# dark5 patch
    patch -Np1 -i ../patch-2.6.24-dark5.patch || return 1

After running makepkg I get an error like this:

Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file sound/usb/usx2y/usX2Yhwdep.c.rej
patching file sound/usb/usx2y/usx2yhwdeppcm.c
Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file sound/usb/usx2y/usx2yhwdeppcm.c.rej
==> ERRORE: Compilazione interrotta.
    L'operazione sta per essere interrotta...

Simple - the patching failed. Apparently you have patches that are conflicting here, and one file in concern is $startdir/src/linux-2.6.24*/sound/usb/usx2y/usx2yhwdeppcm.c but I can't tell what other files are involved since you didn't paste the relevant lines before this.

This is the PKGBUILD: http://pastebin.com/m6426d31a
These are the relevant lines before the error: http://pastebin.com/m10c1e6ff

B wrote:

Just use the broken out ones, what you are doing now is applying the whole lot, I don't think that's what you're after.

Now that I know what broken-out means I notice that I could only choose to apply something in particular and not the whole patch, but I'm totally a newbie in kernel patching...


Till the last battle, till the last bottle.
aur - twitter

Offline

#14 2008-03-09 16:10:39

schivmeister
Developer/TU
From: Singapore
Registered: 2007-05-17
Posts: 971
Website

Re: Kernel patch for battery life

That's a lot of files.

patching file net/ipv4/xfrm4_tunnel.c
Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file net/ipv4/xfrm4_tunnel.c.rej

Self-explanatory; these are those that have already been patched, by the same patch or a different one modifying, removing and/or adding the same lines.

Hunk #7 succeeded at 8656 with fuzz 1.
Hunk #8 succeeded at 8668 (offset 1 line).

Fuzz denotes a guessing game, and offset denotes factual adjustment where it's merely moving lines up or down to match. In the end, the patch succeeds uncleanly.

Before you try to take down each and every failed file, get the broken-out ones.


I need real, proper pen and paper for this.

Offline

#15 2008-03-09 19:50:53

uastasi
Member
From: Salento - Italy
Registered: 2007-11-27
Posts: 247

Re: Kernel patch for battery life

schivmeister wrote:

That's a lot of files.

patching file net/ipv4/xfrm4_tunnel.c
Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file net/ipv4/xfrm4_tunnel.c.rej

Self-explanatory; these are those that have already been patched, by the same patch or a different one modifying, removing and/or adding the same lines.

Hunk #7 succeeded at 8656 with fuzz 1.
Hunk #8 succeeded at 8668 (offset 1 line).

Fuzz denotes a guessing game, and offset denotes factual adjustment where it's merely moving lines up or down to match. In the end, the patch succeeds uncleanly.

Before you try to take down each and every failed file, get the broken-out ones.

Ok, I start with the broken-out way. I guess I have to extract ../patch/dark from broken-out-2.6.24-dark5.tar.bz2 and copy it into $startdir/src/linux-2.6.24*/ at first, but how to edit the PKGBUILD to include this patches, since they are stored into this subfolder?


Till the last battle, till the last bottle.
aur - twitter

Offline

#16 2008-03-10 03:47:43

schivmeister
Developer/TU
From: Singapore
Registered: 2007-05-17
Posts: 971
Website

Re: Kernel patch for battery life

That will already be in $srcdir if you have it as a source, as a folder named "patches":

source=(http://www.dcaf-security.org/dark-sources/broken-out-2.6.24-dark4.tar.bz2)
...
...
...
patch -Np1 -i ../patches/dark/powertop-2.6.24.patch

That will apply the powertop patch.


I need real, proper pen and paper for this.

Offline

#17 2008-03-11 16:27:11

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

Re: Kernel patch for battery life

Even better yet is pulling out the patch and adding it by itself to the source array and patch section of the PKGBUILD - at least, that's what I prefer.


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

Offline

#18 2008-11-16 13:35:00

Barghest
Member
From: Hanau/Germany
Registered: 2008-01-03
Posts: 563

Re: Kernel patch for battery life

I just want to know if this is still up to date?

Powertop shows me the rescheduling interrupts and I want to get rid of this.

So, is there a newer patch available or what patch file do I need? (dark/powertop-2.6.24.patch ??)

Maybe someone can specify what B has said in the post above?

Thanks

Offline

Board footer

Powered by FluxBB