# swsusp2 2.1.5.10 fails to apply to gentoo-dev-sources 2.6.10

## r4v5

Hi.

```
linux-2.6.10-gentoo-r1-swsusp2 # /tmp/software-suspend-2.1.5.10-for-2.6.10/apply 

Applying 100-kdb-v4.4-2.6.10-common-1 ...

100-kdb-v4.4-2.6.10-common-1 will not apply cleanly. Reverse applied patches [Yn                ]? n
```

Looking through the source, it looks like (for instance) drivers/char/keyboard.c is choking because of the #include "../video/fbsplash.h" and the #include <linux/speakup.h>, which shift line numbers and change the code around. So is there a working swsusp2 for gentoo-dev-sources 2.6.10-r1?

----------

## nightfrost

I'd like to find a solution to this as well  :Smile: 

----------

## astaroth_pod

I've tried for a little while now but it's just so much that's different. I hope someone smarter can come up with a lil modified patch....  :Smile: 

----------

## loudawg

I was hoping for a fix for this as well, but it never came, so I dove in myself.  It turns out it was an extremely simple change.  The first patch was trying to add a new value KERN_KDB=67 to an enum in sysctl.h, but (I'm guessing due to the gentoo bootsplash patches) it was already taken by KERN_FBSPLASH=67.  So I just modified the patch to add KERN_KDB=69 to the end of the list instead.  It works perfectly for me against 2.6.10-gentoo-r4 and I have seen no problems with suspending.  I figured since it was just an enum that it didn't really matter that I made it 69 instead of 67.  Can anyone verify this?  I didn't really take the time to see how it was used in the kernel.

Anyway, if you'd like to give it a shot, I packaged the modified version which you can download from here:

http://www.cs.ucr.edu/~ilievskl/software-suspend-2.1.5.12-for-2.6.10-gentoo-r4.tar.bz2

Just extract it and run that "apply" script like you would with the original.

Enjoy!

----------

## nightfrost

Thanks a lot!

I'm gonna try it as soon as I find the time  :Smile: 

----------

## didl

 *loudawg wrote:*   

> II figured since it was just an enum that it didn't really matter that I made it 69 instead of 67.  Can anyone verify this?

 

This is fine   :Laughing: 

Those changes in sysctl.h happen quite frequently when patching.

----------

## nightfrost

patched, compiled and running it now  :Smile: 

seems like everything is a-ok!

----------

## DSL_MTLCA

thanks big lou, it's working like a charm   :Cool: 

----------

## sebasje

 *loudawg wrote:*   

>   I figured since it was just an enum that it didn't really matter that I made it 69 instead of 67.  Can anyone verify this? 

 

The fix is OK, the main concern is that this number is yet unused in that part. Another option would be removing the kdb related patches from the package.

----------

## sminons

Thanks pal. I was having the same problem..patch not applying cleanly. Now all patched..compiling the kernel  :Smile: 

----------

## loudawg

Here is the software suspend 2 patch set for kernel 2.6.10-gentoo-r5.  I had to make a couple changes again to make them apply cleanly.

* Changes:

  - Had to make a slight adjustment to 100-kdb-v4.4-2.6.10-common-1 to make it place KERN_KDB=69 in the correct place.  It applied without modification, but because of a small change in sysctl.h, it placed this value wrongly.

  - Removed 954-linus-acpi-fix from the applied patches altogether.  This patch was taken care of with gentoo's patch 1910_video-slab-corruption.patch.

http://www.cs.ucr.edu/~ilievskl/software-suspend-2.1.5.12-for-2.6.10-gentoo-r5.tar.bz2

Have fun!

----------

## sminons

Sorry to interrupt, not related to patching the kernel. My system on reboot (after hibernate)..shows that it is resuming, but ends up with a blank monitor and nothing more.

----------

## REDONDOS

@loudawg: You rock, dude! I got hibernation working on an HP Pavilion ze5620us laptop, it was impossible for me to find specific guidelines for setting up linux on this computer but this was the last thing that needed to be done.

Thank you!

RED (Another happy Gentoo user, this time from Argentina)

----------

## cypis

 *loudawg wrote:*   

> http://www.cs.ucr.edu/~ilievskl/software-suspend-2.1.5.12-for-2.6.10-gentoo-r5.tar.bz2

 

Does anyone know is there something like this for kernels that are curently in portage?

----------

