Acer Aspire 3 laptop randomly turns off monitor and goes to sleep

Solution 1:

It turns out that there is a magnet in the lid that is used to detect when the lid is closed.

The sensor for this magnet is right in the place where I put my wrist on which there is often a watch which has a magnetic strap on it. This magnet was confusing the laptop into thinking that the lid was being closed.

I can either disable the lid detector (e.g. prevent monitor switching when closing laptop lid) or stop wearing my watch when typing!

This took me a long time to solve and I could not find any similar answer so I thought I'd post this in case it helps.