Let's start as simple as possible:
Do you have a loose connection / glitch at the power-connector? Check and solder (link to manual for disassembly is further down in this document)
To me this looks like a stuck key (not necessary one on the keyboard):
create live-usb-ubuntu:
1. download and burn ubuntu 8.10 to cd.
2. boot _any_ computer with it, connect >1GB USB stick.
3. System --> Administration --> Install to live usb
4. Boot from live-usb-stick that you just created
5. open terminal (Applications --> Accessories --> terminal)
6. paste this: sudo apt-get install xev
7. paste this: xev
8. hover with mouse over white box
9. make sure not to press any keys or move the mouse. Now flip the screen or try to recreate a situation in which the task manager would pop up in windows.
10. what's the output in the terminal window? Try to pinpoint exactly how and when the events are generated.
There should be no event generated, when you physically flip the display (which means you don't have to replace the hinge).
Press every single key you can find on the laptop. Verify that each key generates exactly one event.
If you find that there is a series of events generated without any key pressed, try to clean the malfunctioning key. (
Service manual for disassembly)
It might possibly be a broken hinge (20USD). Flipping the display and pressing soft keys (Q, rotate, e) does not generate events in xev. Any other button does.