Force the screen to stay on

sudo nano /etc/lightdm/lightdm.conf

Add the following lines to the [SeatDefaults] section:

# don't sleep the screen
xserver-command=X -s 0 dpms


We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.


  1. Praba

    9 months ago

    this step use but screen few second go to sleep what to do?

    any one help me pls………..

  2. Jeff Swenson

    7 years ago

    I know this is old, but this didn’t work for me at first either. Make sure that what you add/edit comes after [SeatDefaults] and I think the correct command is xserver-command=X -s 0 -dpms (notice the ‘-‘ before dpms)

    1. Yusuf

      6 years ago

      Thanks a a lot. I tried all of things have failed. But, this is working correctly.

    2. Gavin Meeks

      9 months ago

      This was just the fix I needed. Thanks!

    3. Joseph Bacot

      9 months ago

      thanks a lot im running kali linux soo crap needs to stay open this has been very helpful

    4. Tom Bulgin

      9 months ago

      Super helpful for a newbie like me. Dakboard family screen now displaying continuously. Thanks!

    5. David Hannaford

      9 months ago

      I did this and it installed the screensaver but when I click on preferences/ screensaver it just instantly flashes something on the screen for a fraction of a second and then goes away. I’m running Raspbian on pi 4b – Any suggestions?

    6. David Hannaford

      9 months ago

      Have rebooted everything and it is working now – thanks

    7. JJ88

      1 month ago

      Doesn’t work!

  3. luis

    5 years ago

    in the chromium os for raspberry how i can make the same?

  4. GMK

    5 years ago

    Perfect.. I appreciate the info!

  5. Marco Antonio Migoranca

    4 years ago

    Thanks so much

  6. Eiji Hanso

    4 years ago

    Thank you, my Pi 3 now doesn´t go off when i streaming Games :)

  7. Toro Torres

    9 months ago

    This worked, thanks :)


Your email address will not be published.