Its looks like that is the power on jumper wire. I am not sure why it is turning of when it becomes loose. It basicly acts like a power button you would have in a computer tower. Its hard to tell but when it falls out, maybe the wire is exposed and it shorting out against a pin sticking out bottom of the IOboard. Thats all i got so far untill you take the board out so i can see whats going on in there.
Yeah that is J2 , its used to ground ps_on so that when the bios battery goes dead and the bios setting to turn on after power failure gets reset the machine will still turn on after power failure. Theres a few things you can do, but all require taking the board out.
1. replace the battery, its probably dead and connect a keyboard and reset the bios to always turn on after power loss
2. try to fix that connector so it makes a good connection and put some electrical tape over it if its shorting out against something.