Broken button on Nokia N9

The unthinkable has happened: The On/Off/Lock-Button of my Nokia N9 is broken. I don’t really know why or how it happened, maybe I should not have used
it in the bath tub.
Anyway, if you have a similar situation, here are some hints:
Turning off the phone:
Enable the developer mode in the settings and then open the Terminal application. Type devel-su and then the password rootme. As you guessed if you know Unix-like systems you can shut down by typing /sbin/shutdown -h now
Turning on the phone:
This one is tricky. Insert a USB charger into the phone. If you turned off the phone with the way I described above it should boot and ask you for the PIN.
Locking the phone:
This one sucks: I have not found a good solution now except setting the auto-lock timeout to 15 seconds in the settings. And sometimes for some reasons it takes a lot longer to lock. If you want to lock it fast, I can recommend the Lock Screen application from the Nokia Store.
Unlocking the phone:
Double tap the screen or swipe multiple times around the edges. If you have other hints for this problem, please comment.
Maybe the problem is software related and an update to Joola or NemoMobile would help?