I’m running the Intel NUC image on a surface pro 4 which is working great except the screen is showing the console 24/7. Does anyone know the commands I could run from ssh to turn the laptop screen off?
How about a smart switch on the monitor power?
That’s the easy way out I took.
This does the trick on most *nixes:
export DISPLAY=:0 && xset dpms force off
Thanks but I’m using a surface pro 4 so it’s the built in display that I need to turn off.
I must have tuned off my brain when I saw ‘NUC’. Sorry.
I tried that but got a xset command not found error from bash so I’m guessing that’s not supported on hassio
Are you using a VM in Windows 10 or actually running HassOS on the Surface as the OS?
Its the Intel NUC directly on the Surface. I loaded ubuntu on a live usb and then burned the hassio image to the surface hard drive. So no windows.
Thank you so much for the idea!!!
I did the same thing on my kid’s old school laptop and got myself a beatiful HA box up and running…
…but, of course, it has the same issue with the screen.
Did you find any way to turn it off?
I wish somebody would come up with a way to turn the screen off. I know it’s a little thing, but it bugs me to have it on all the time for no reason.
From the addon SSH & Web Terminal, with protection mode off, try this:
xset dpms force off
Should turn off the monitor until a key is pressed.
If that works there’s probably a way to do it from within Lovelace, but test the command and see if it works first.
Hi everyone,
After googling like crazy I’ve managed to find out how to turn off the backlight on my Dell Latitude laptop so want to share the knowledge incase it helps someone else.
- On the host laptop, in the terminal type:
login
You should then just see a # - Type:
echo 0 | tee /sys/class/backlight/*/brightness
This then completely turned off the backlight on the screen. You can change 0 in the command to another number to change the brightness but setting it to 0 turns it off completely.
A restart returns it to default if you need to see the screen again.
Found the command from here: How to change LCD brightness from command line (or via script)? - Ask Ubuntu
Hope it helps someone!
Dan
Turning off the backlight will reduce heat and darken the room, but it will still allow the LCD to burn in after months/years of displaying the exact same text.
I was having trouble writing to the brightness file. Running mount showed that sysfs was mounted read only, and running sudo mount -o remount,rw /sys said the /sys wasn’t in /proc/mount (even though it was in there). So I cheated.
- sudo mkdir /ss
- sudo mount /dev/null -t sysfs /ss
- echo 0 | sudo tee /ss/class/backlight/*/brightness
- sudo umount /ss
- sudo rmdir /ss
There’s probably a way to make sysfs mount rw on boot but I’m too lazy to find it. Using /dev/null bypasses some checks that try to prevent sysfs from being mounted multiple times.
On an old toshiba satellite running debian 11, the following works for me:
sudo vbetool dpms off
Is there a way to run this from the webui so I dont have to type it in the laptop itself?
Thanks in advance!
When I try to use this, it just gives me “command not found” for xset. Am I missing something here?
Sounds like the command is not available on HA OS.
Not sure if you need the screen?
I’ll be investigating just disconnecting mine. And maybe even removing the whole screen. Headless…
I’m adding my progress to this post.
I found a work around that’s stupid but at least it works on the 2014 MacBook Pro I’m using. If you close the lid fast enough after pushing the power button (as long as an external display is connected), it will disable the built in screen. So I guess if I get one of those HDMI dongles that fakes as a screen, and close the lid quickly, I found my solution