I setup a Raspberry Pi 2 with Raspbian Jessie Lite in read only mode. To run a Qt application I installed the packages "xserver-xorg" and "xinit". I am starting the application automatically after boot from /etc/rc.local with following command: sudo startx <application-path> &

Now I want it to run for a long time without the screen going blank. I was able to turn off the screensaver for the console by changing /etc/kbd/config to this:


and adding consoleblank=0 at the end of the line in /boot/cmdline.txt.

When I dont start the application and I stay in console this works and the screen stays turned on. But it seems that the XServer has its own Screensaver.

I installed x11-xserver-utils and tried adding this to /home/pi/.xinitrc:

xset s off
xset -dpms
xset s noblank

But this file is never called (checked by adding the line date >> /home/pi/checkFile). Typing theses commands or xset q myself gives the error xset: unable to open display ""

I also tried to add setterm -blank 0 in /etc/rc.local which did not work.

Looking for solutions I found all kinds of hints which suggest changes in one or some of these files:


But I have non of these on my pi, because (I assume) its just a Jessie Lite distribution and I installed the XServer myself (by installing packages xserver-xorg and xinit.

Any ideas what else I could try?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.