My power button has stopped working on my Nexus S, everything else works but this!
How can i get my power button back?
You can remap either of the volume buttons to be a power button. I have remapped my volume up button to power button.
To remap, you should have rooted phone, with terminal emulator and busybox application you can edit the file /usr/system/keylayout/herring-keypad.kl
change the line
And reboot your phone.
You can fix this issue by simply opening the phone up by removing the 6 screws on the back, and fixing the power button yourself. What is happening is there is a ribbon connector that goes from the power button to the circuit board and this becomes loose and disconnects itself. You can simply press on it and reconnect it to the board to fix the power button issues. This will only be a temporary fix, as the phone is a poor design and will become disconnect more and more frequently. But this can at least let you use your phone.
Here's a similar question: How can I boot my Nexus S with a broken power button? Can only boot to "Do not turn off target"
Best thing to do is get the power button replaced. It is not too expensive.
You can also try the battery or bump tricks described in that chapter to try to get your Nexus S to boot while plugged into USB, but that seems like a short term solution.