Issue
I've got a RPI headless, connected to a TV via HDMI. I have a script to display a chromium in kiosk mode via a Web page :
#!/bin/sh
xset -dpms xset s off xset s noblank
#export DISPLAY=:0
unclutter &
chromium-browser http://page-url --window-size=1920,1080 --start-fullscreen --kiosk --incognito --noerrdialogs --disable-translate --no-first-run --fast --fast-start --disable-infobars --disable-features=TranslateUI --password-store=basic
This script was stored in ~/.xinitrc file
I've custom my bashrc file like this :
# source the user's bashrc if it exists
if [ -f "${HOME}/.bashrc" ] ; then
source "${HOME}/.bashrc"
fi
if [ -z $DISPLAY ] && [ $(tty) = /dev/tty1 ];
then
startx
fi
So, when my RPI reboot, "startx" with instructions in xinitrc file is execute, it's working properly.
However, every night, my TV screen is completely off (not in sleep mode, standby or hibernate. Completely off. Its powerstrip is shutdown.)
Every morning, when i turn it on, the screen stay black.
I checked with ps -ef
, the script is running in background, but nothing is displayed.
When i reboot the RPI, it's OK.
I think when TV is off, RPI (or Xserver) detect that HDMI input is off and... stop something.
Do you have a solution to avoid this issue and have a correct display permanently (before and after TV shutodnw) ?
Thanks !
Solution
Fixed replacing this :
xset -dpms xset s off xset s noblank
by this
xset -dpms
xset s off
Answered By - Captain Nemo Answer Checked By - Willingham (WPSolving Volunteer)