Prevent sleep/suspension at login screen

Hi, I’m trying to disable the display sleep/suspension that occurs at the login screen after 5 minutes of idle time. I’ve been at it for quite some time and tried all solutions I’ve come upon for the Ubuntu case (my question including attempts at Askubuntu: https://askubuntu.com/questions/942366/how-to-disable-sleep-suspend-at-login-screen).

Today I instead googled for the Jetson TX2 case. The closest thing was the same question regarding the TK1 (https://askubuntu.com/questions/942366/how-to-disable-sleep-suspend-at-login-screen), which led me to http://elinux.org/Jetson/Performance. However, most of that information is not applicable for the TX2 it seems.

Finally I tried using nvpmodel and jetson_clocks.sh and managed to run both after boot with rc.local.

#!/bin/bash
( sleep 60 && /usr/sbin/nvpmodel -m 0 && /home/nvidia/jetson_clocks.sh ) &
exit 0

Though executing properly the display is still put into sleep/suspension.

Any more suggestion are very welcome!

Sorry that I don’t get what is the purpose clearly. Do you mean you want “ubuntu desktop” never enter sleep? Or the “login screen” (The one with pwd prompt)

Are you talking about preventing a power saving mode? Or perhaps not letting the screen blank when unattended for long periods of time?

I want the login screen to never enter sleep or suspension. I want to boot the Jetson without a display hooked up and either start a VPN or SSH session, which works fine. However the audio output is tied to the display output, and when the login screen goes to sleep so does the audio.

(I’m using a HDMI->VGA converter with a standalone audio jack, and so I’d imagine that the Jetson still thinks it’s hooked up to a display even if nothing is plugged into the VGA end of it)

Does the System Settings-> Brightness & lock not help for your case?
Why not just leave it never entering sleep/lock through GUI?

Brightness & Lock does work if I login as a user without VPN or SSH. I think that that setting is user specific, so it doesn’t take effect at the login screen.

The issue with this is that in order to be logged in like that I either need to allow automatic login after boot – which is troublesome due to security concerns – or use a physical keyboard (which isn’t really an option if I want to use it remotely).

I found a solution from here https://askubuntu.com/a/543861/718511. Essentially a script is made and lightdm told to run it.

In /etc/lightdm/lightdm.conf.d/ make a file 50-dpms.conf:

sudo nano /etc/lightdm/lightdm.conf.d/50-dpms.conf

Add the lines

[SeatDefaults]
display-setup-script=/usr/local/bin/dpms-stop

Close the file

In /usr/local/bin/ create a file dpms-stop:

sudo nano /usr/local/bin/dpms-stop

Add the lines

#!/bin/sh
sudo xhost +si:localuser:lightdm # creates a user 'lightdm'
sudo su lightdm -s /bin/bash <<HERE # lightdm stops dpms from HERE
/usr/bin/xset -dpms
exit
HERE # and stops at this HERE

Close the file

Make the file executable:

sudo chmod +x /etc/lightdm/lightdm.conf.d/dpms-stop

At reboot it worked for me.