Screen Randomly turning off

So I recently installed Ubuntu onto my Surface Pro 1, and have been running fine for about 2 days, until today I saw the screen constantly turning off, as if it were inactive for the set time and turning the screen off. I would then just have to tap the power button and it would come back on and then about 20 seconds later turn back off. This used to only happen after the system was suspended, and I would just have to restart to fix it, but now it is happening all the time and making it un usable. How can I fix this? Thanks!


I was able to solve the problem by updating the file /etc/systemd/logind.conf to include the following:

HandleLidSwitch=ignore


This is a real shot in the dark....

I came across this bug report today: LidSwitchIgnoreInhibited=no where systemd was automatically suspending the laptop for no reason and I remembered your post from 2 days ago. The Surface Pro also has a lid close switch.

Type gksu gedit /etc/systemd/logind.conf in the terminal. And search for this line:

#LidSwitchIgnoreInhibited=yes

Remove the # and change the yes to no.

Save the file, reboot and let me know if it changes anything.