You are not logged in.

#1 2024-05-30 23:38:21

ffernn
Member
Registered: 2022-11-19
Posts: 8

Something like setterm but for backlight

Hi, I'm setting up an arch server on an old laptop of mine, and would like to both blank the terminal (so the lcd is black) and disable the backlight (to save power), after say 2 minutes, and let it turn back on if I press the keyboard.
I know I can set the backlight brightness by setting a number 0-100 in /sys/class/backlight/acpi_video0/brightness and 0 turns the backlight off completely, and I can use setterm -blank 2 to clear the terminal.
I'm not using Xorg, just a plain tty terminal.

Offline

#2 2024-05-31 07:59:25

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,774

Re: Something like setterm but for backlight

According to the wiki and stackoverflow  you need APM_DISPLAY_BLANK enabled for console DPMS.
Unless you're willing to build your own kernel (with unknown success, maybe DPMS doesn't turn off your backlight) you're looking at some userspace solution, eg. trapping SIGALRM and there comparing timestamps to some "i did something" indicator (eg. set by your prompt)
Do you use some terminal multiplexer?

Offline

Board footer

Powered by FluxBB