How to prevent computer from automatically sleeping and/or hibernating?

Here are the two common Gnome 3 ways which usually disable suspend; otherwise you can try booting with the acpi=off parameter:

  1. Power Settings:

    enter image description here

    enter image description here

  2. gnome-tweak-tool (install if necessary):

    enter image description here


From System Settings or by searching in Dash, go to Power settings. You'll find what you need there ;)

Power settings

And to prevent from locking, go to Brightness and Lock:

Brightness and Lock settings