Hi,
To me that looks like the hinges are sending a signal that the device is used in "fully open" mode.
So it could be either hardware or software. But most probably hardware.
I am under the impression that the hinges can get some "dirt" (like a little dust or something) that may cause interferences. I've noticed that mine were full of that dust from your pockets and that it happend really often then.
Cleansed those and it seems to solve (or at least reduce significantly).
Still, that doesn't solve another major problem that arose : the fact that you can't really play some games. But that will be another thread.
Regards.