I just discovered this after dealing with the flickering problem for weeks.
Between the lenses on the headset there's what appears to be an IR sensor. I figured out that this is how the headset detects being put on and taken off.
While testing this, I realized that covering the sensor...