xset dpms command is not shutting down the monitor

5,047

Solution 1

I found this raspberry pi specific problem was discussed in this issue with some workarounds.

The framebuffer driver on the pi does or did not implement the appropriate ioctl FBIOBLANK to set the monitor to video off.

The workaround is to use the tvservice command to switch off power to the video signals, and eventually the monitor should turn off. There's a small problem when you use tvservice to turn video power back on however, and you need to workaround round that too, by using chvt to switch out of X11 into the console virtual terminal, then back again.

Demo:

sudo tvservice  -o # turn off video
sleep 5
sudo tvservice  -p # turn on video
whichvt=$(sudo fgconsole) # which vt are we on
let othervt=which==1?2:1
sudo chvt $othervt; sudo chvt $whichvt

Solution 2

On Current versions of raspbian these workarounds are no longer required, dpms capability has beed added to the drivers. Only Problem: it's turned off by default. You need to put

hdmi_blanking=1

in your /boot/config.txt to enable. The official documentation has not yet been updated to include this setting so it's a bit hard to find.

Share:
5,047

Related videos on Youtube

tarzanno
Author by

tarzanno

Updated on September 18, 2022

Comments

  • tarzanno
    tarzanno over 1 year

    I have a problem with this command: xset dpms force off. It puts the screen black, but it doesnt shut down nor suspend (with suspend command) the monitor.

    The command 'xset -q' shows that DPMS is enabled in my monitor.

    I am using Raspberry Pi with Raspbian on it, and monitor is connected with hdmi - DVI cable (and pins that trasnfers data connections are working).

    Can you please help me, maybe tell me where to find the answer or some logs? Maybe there is a configuration file somewhere, that contains information about the amount of energy that is being sent to the monitor when it is on stand-by, enabled or off?

    I found that solution: http://shallowsky.com/linux/x-screen-blanking.html ,but I can't install VBETOOL on my computer as it doesn't have PCI ports (and /pci folder).

  • tarzanno
    tarzanno almost 9 years
    I was looking all over the internet for the answer and as you could see there was no solution to this issue. You are the first person that gave the proper solution. You are magnificent guy, thank you. Last thing that bothers me, is my incapability to change the brightness of the monitor by software through DCC: superuser.com/questions/937829/…
  • fixer1234
    fixer1234 almost 9 years
    Can you expand your answer a little to explain what these commands do?