https://www.omgubuntu.co.uk/2016/07/caffeine-indicator-applet-ubuntu-lock-screen
Keep Ubuntu Awake with Caffeine (And Avoid That Pesky Lock Screen)