Disable sleep mode after 5 minutes

I have Ubuntu 14.04 installed on my laptop. When I have my laptop plugged in to my tv to watch a movie, the screen goes black after exactly 5 minutes. I have to move the mouse, to see I'm at the login screen like this

enter image description here

I'm wondering how can I disable this screen from popping up entirely?

I have already went to System -> Power Management and put everything at Don't suspend / Do nothing. This did not work!!


Solution 1:

Change both "System Settings -> Brightness & Lock" and "System Settings -> Power Settings"

Solution 2:

If someone is using Gnome, this can be accomplished using the Caffeine Gnome extension

https://extensions.gnome.org/extension/517/caffeine/

I'm not sure if Unity has something similar or not.

Solution 3:

I had the same problem on my Xubuntu and I did this:

xset -display :0 s off -dpms

It is not persistent though and since I dont want it to be I did this:

Add this command to your startup applications:

sh -c "sleep 30; xset -display :0 s off -dpms"

You can change the sleep time to whatever you want even remove it.