Actually mine works ok. Screen off when lid closed. I guess I didn’t visually check carefully enough the first time somehow. Roughly 27 Watts with screen on and 22 Watts with screen off.
rpi4 was roughly 7watts.
Shame really, I was starting to look forward to ripping off the screen lol. Now I am less motivated to do that.
I am running a Nix OS on a computer that I am using as a Kiosk. The OS is using wayland.
On a Wayland Nix system you can issue the following command to turn on / off the display.
I have created a Command Line Switch in Home assistant that is driven by a motion sensor automation to turn on the screen if someone is detected near the display. And turn it off after 4 minutes undetected.
Wanted to reply and say that adding “consoleblank=60” to the /mnt/boot/EFI/boot/grub.cfg at the end of the default_cmdline line fixed this for me. I have an HP Elite X2 1012 G1 (Surface clone). With the monitor running, its using 16-17 watts. After 60 seconds when the monitor shuts off, power drops to 9 watts (and doesn’t burn in my laptop screen). Thanks all!
Acer V123: a partial success. Font is no longer visible after the timeout. But the screen is still ON.
Also, it would be great to have HAOS running, the lid closed and the monitor power off. It was possible with OpenMediaVault. I installed it to manage HA in docker. But I moved to HAOS to benefit from supervisor. /etc/systemd/logind.conf is read-only. sudo is not enabled. Any idea on that?
I edited my previous post, probably during your reply.
I checked logind.conf and it’s already correctly configured.
Now it’s working. Don’t ask me why but I remember the pc supending with the lid closed. I can still access the HAOS, the monitor power is off.
Btw the logind.conf is read-only. I don’t know how to gain root in HAOS, I simply used login+ENTER to navigate the filesystem from the laptop (SSH not configured yet).
vi /mnt/boot/EFI/BOOT/grub.cfg
add “consoleblank=120” to the end of the line starting with default_cmdline before the " for 120 seconds of screen ontime.
Hi ejopzee,
Just wanted to say that as someone who writes a lot of tech documentation, your post is great.
So many people leave out details that they just “assume” people will just know - for example that you need to add “consoleblank=120” to the end of that specific line and that it has to be inside the “”'s and that the number value tells the command how many seconds.
Otherwise you would just bang it in at the end of the file itself on a new line and just wonder why it didnt work.
Worked perfectly for me on my Acer Travelmate B117. Thanks!
Screen goes completely off including the backlight. Comes back on after a keyboard key is pressed
After implementing it I noticed that closing the lid does the same.
So I wouldn’t even needed the “consoleblank=120”, but now I’m “double safe”.
Hi all,
I too am trying to get my screen to turn off on an old Dell Latitude E7270.
I’m getting a bit more familiar now with HAOS and have used the Terminal Add-on in HAOS a few times before for some other operations but when I try to edit the grub.cfg file using:
vi /mnt/boot/EFI/BOOT/grub.cfg
I just get a page full of:
~
~
~
~
~
~
and nothing else. I can’t even exit out of it and have to re-install the terminal add-on to be able to back.
Could anyone please specify how to edit the grub.cfg file? I am running Home Assistant OS installed directly on a Surface Pro 2 and I need to turn off the display. When I try to enter “vi /mnt/boot/EFI/BOOT/grub.cfg” in the Home Assistant OS terminal, it does not recognize the command.
I got this working on a Dell Precision M4700 laptop. The backlight turns off completely for me after 120 seconds and turns it back on with when any key is pressed. It took me a while to piece together how to do it so I’ll summarize the steps:
Step 1: On the laptop itself (not in the SSH hass add-on), type “login” and press enter i.e. ha > login. This didn’t work immediately for me but after a few tries, it worked. You should see a new line with # if it worked.
Step 2: Open file to edit with vim. # vi /mnt/boot/EFI/BOOT/grub.cfg
Step 3: Find the line starting with “default_cmdline=” and add “consoleblank=120” at the end of the line but before the double-quotes at the end of the line.
i.e. default_cmdline="rootwait <other stuff> consoleblank=120"
Note: To insert stuff in vim, press ‘i’ to enable insert mode. Edit the file. Then press ‘esc’ to exit insert mode. Then type :wq <ENTER> to save and exit vim.
Thanks @bitbrain for posting this grub.cfg command line modification solution!
For anyone who has implemented this update before Feb 2023, please be aware that you may have to repeat this edit due to a new grub.cfg. My laptop lid has been closed all this time and I had no idea that the screen had been turned back on after a HASS OS update.
I also see that there is logic in grub.cfg to read a text file /mnt/boot/cmdline.txt that will issue commands listed in it along with the default_cmdline commands. This file currently contains just “console=tty1”. I would assume we can add the consoleblank=xx command to this file instead of editing grub.cfg, but I haven’t tested it.
Was parsing cmdline.txt for additional commands a new addition for Intel/NUC grub bootloader, or normally included with grub?