Then some drivers may not have been installed.
Maybe you can try doing this instead, I doubt it would work tho: xrandr --output LVDS-1 --brightness 0.8
For some reason my Dell Latitude 5590 doesn’t like consoleblank.
Around 10-20 seconds after the screen shuts down the computer freezes and gets unresponsive and needs a hard reboot. If I press any key before that time it comes back as it should.
Anyway I found another solution in the BIOS, you can activate FN+F7 button to kill all sound and light emitting from the laptop. Pressing it again reactivates lights and sounds. So I can just hit FN+F7 and put laptop away, and if I need to acess it again for some reason I can just hit FN+F7 again.
This took me a while to get there… {NOOB here} SO I felt like sharing my process step by step to see if I can help at least one poor soul…
So boot up your laptop an wait until it is ready to accept commands
ha >
1º Step (I remember it didn’t worked on the first try, but don’t know what a did next
ha > login
2º Step (this is where I found my grub.cfg)
# vi /mnt/boot/EFI/boot/grub.cfg
3º go to line where it starts with default_cmdline and go to the end of the line and add, just before the " this argument: ’consoleblank=60’.
Remember to leave space from the previous argument, so the line should look something like this:
default_cmdline="rootwait [bla bla bla bla] $bot_condition consoleblank=60"
To edit the file press the key i to enable text edit. After you add the " consoleblank=60", press ESC once, then just press shift+z+z (two uppercase ZZ) to exit and save.
Next type # reboot, and its done… at least for me.
There is logic in grub.cfg to read a text file /mnt/boot/cmdline.txt that will issue any additional options listed in it along with the default_cmdline string.
Not that it makes any functional difference, but it is a bit cleaner and safer to edit this cmdline.txt file instead of grub.cfg. I’ve tested this and it works as expected (on a Dell Latitude E6500).
New contents of /mnt/boot/cmdline.txt: console=tty1 consoleblank=60
Thanks! For those of you who, like me, read this and have no idea how to get there: You can type “login” on the HA CLI and you get a # prompt. There, you can do “vi /mnt/boot/EFI/boot/grub.cfg” to edit the grub.cfg and find the line that starts with “default_cmdline” and add the “consoleblank=60” there. If you do not know how to use vi, please google.
The edit will need to be redone after an os update. I don’t know if it can be automated, but I doubt it. I’ve since replaced the laptop with a Beelink mini PC running headless, so no longer an issue for me.
I have the HASS OS installed on it. The key for me was to enter these commands AT the laptop! I was following other instructions similar to this but trying it from the HA terminal and it’s not same thing as the file structure is not the same.
I’m also able to shut the lid of my laptop and it stays on. That must be a HASS OS function by default, I’m not sure.
Hello, I know this is an old post. But i have an issue with my laptop running HAS OS.
It is running fine for about 1 or 2 hours, then shut down completely. Is there anywhere i can change that or do you have any ideas of what can be done?
Best regards
Henrik
THIS for a 2012 Macbook Air running HA directly installed. I was pulling my hair out trying to do this via the SSH add-on, since I saw the /sys/class/backlight directory. However, when I tried to execute via SSH, the console threw an ownership error. Tried to CHOWN - no luck even though I’m root (whut!) - further research indicated that it might be that the SSH add-on is locked to it’s own container environment (more here) -
After reading about this, I simply went over to my Air and typed in the command
echo 0 | tee /sys/class/backlight/*/brightness
WIN. Thanks Dan for your concise but accurate post. There was no grub.cfg file on my system that I could find - this did the trick for me. Screen off, happy guy here. Thanks @dglwilkins