DIAGNOSIS The washer thinks the lid is open or the lock mechanism is faulty. This is a safety feature. The problem is usually the lid switch assembly itself or the plastic 'strike' that activates it.
FIX First, check the simple mechanical part. 1) Look at the small plastic tab (the strike) on the underside of the lid. 2) Make sure it's not broken or cracked. If it is, the lid can't push the switch down. 3) Next, locate the lid switch on the top-right side of the washer cabinet, right where the lid closes. 4) Manually press the switch button with your finger (unplug the washer first!). You should feel a definite click. If it feels mushy or doesn't click, the switch is bad.
IF THAT DIDN'T WORK If the strike is good and the switch clicks, the wiring from the switch to the control board might be damaged, or the control board isn't recognizing the signal. This is less common, but requires checking continuity with a multimeter.
HEADS UP Always unplug the machine before inspecting or touching the lid switch. If you need to replace the switch, it's a relatively simple job, but you'll need to remove the top panel of the washer to access the wiring harness.