How to turn off HDMI screen properly

Hi,
in our application, we need to be able to turn the HDMI screen off at certain moments (and then obviously be able to turn it on again) This is controlled via GPIO pins, but that’s not improtant - just giving a background.

What is a proper way to do it on Jetson?

Since this is Ubuntu, I tried running:
xset dpms force off

It works. But only for something like 5 - 10 seconds and then the screen wakes up again. Not sure what is causing this. I tried disconnecting mouse and keyboard to be sure, but it still happens.

The only reason the screen should turn on again would be our own explicit command. In this case: xset dpms force on.

May be a similar problem as this one, but I cannot tell as that thread never got actually resolved:

That said, I either need to diagnose and fix this xset dpms method, or use a different method.

Can anyone suggest anything?

You can directly blank the monitor with node

cd /sys/class/graphics/fbX → find out which Fb node is for your HDMI.

And

echo 4 > blank

Thanks, that sounds promising. How do I then turn the screen on again?

I’ve been trying to google what “4” means in this case, but I was unable to figure it out. On most topic I found, people just seem to be writing 1 or 0 to blank. Can you please explain or send a link where this covered?

Thanks!
Jan

You can use 0 to unblank it.

In my case, there’s fb0 and fb1. I tried both but I always get:
bash: blank: Permission denied.

I tried with sudo as well, but that’s no different.

Anything I overlooked?

Thanks