Pulling the plug lets residual power in the power supply and motherboard drain. That's a fairly common way to try to fix problems like this. Glad it worked for you!
Black out, cannot power on. So I pull out power and plug it in back. After that power switch working. But I don’t know why? 
XPS 8940, black out, can’t power on