Different ways to control laptop brightness?

12 replies [Last post]
GNUser
Offline
Joined: 07/17/2013

Hey everyone,

I have a librebooted T400, which has a built-in brightness control of the screen. Using Fn+Home or Fn+End
However, I noticed a different response from using the xrandr terminal command.
With the keyboard option, the screen seems to really be "turned off", while using the xrandr option it seems like the screen is producing a "darkish" image, which if set to 0 is a "bright black image".
How can I control (in the terminal) the real brightness of the screen?

Thanks!

nori
Offline
Joined: 11/14/2021

I would try xbacklight:

https://www.x.org/archive/X11R7.5/doc/man/man1/xbacklight.1.html

The xrandr --brightness seems to be modifying gamma only.

GNUser
Offline
Joined: 07/17/2013

Thanks!
But trying any command with xbacklight gives me the error:

RANDR Query Version returned error -1

Any ideas why?

lanun
Offline
Joined: 04/01/2021

How about running it with sudo?

nori
Offline
Joined: 11/14/2021

Things might get tricky depending on your specs.

I would try to tune ACPI instead, following these steps:

https://wiki.archlinux.org/title/Backlight#ACPI

GNUser
Offline
Joined: 07/17/2013

Hum... I have been reading those links and trying some other things and I am not able to get it to work.... Maybe I'm approaching it wrong.

Here's what I need:

I have the laptop connected to a TV through the VGA cable. I have mpv set to play video on the TV screen automatically (it selects the screen on it's own). But I don't want the laptop screen to be wasting life time while I watch TV (other people who need to use it won't care to lower the brightness of the screen). I need to make it so the laptop screen goes into screen saver mode or something like that (blank, lower brightness, whatever) without affecting the other screen. Any ideas how I could approach this? Thanks!

loldier
Offline
Joined: 02/17/2016

If you have a multihead setup, install 'arandr' or use control center's display monitor preferences. Shut the unneeded built-in laptop display off (set 'inactive').

arandr.png monitorpref.png
GNUser
Offline
Joined: 07/17/2013

That's what I need to to do, but from command line so I can automate it for other users. Any idea how to do so?

I will have a look at arandr

Thanks.

loldier
Offline
Joined: 02/17/2016

There's a script here. I have no idea if it works in your use case, but it's a start.

http://eradman.com/posts/openbsd-workstation.html

#!/bin/sh
xrandr --output DP-1 --auto --primary
xrandr --output eDP-1 --off
xrandr --output HDMI-1 --off

lanun
Offline
Joined: 04/01/2021

In a similar user case, I think I used to tell the laptop to turn off the screen when I close the lid (instead of going into sleep mode).

You should find the option in the Power management preferences.

GNUser
Offline
Joined: 07/17/2013

I tried that yesterday, but it turns off both screens.

lanun
Offline
Joined: 04/01/2021

I see.

On my current setting, the VGA monitor goes black for a few seconds, then back on. As loldier mentioned, the laptop screen is set 'inactive'.

damidu
Offline
Joined: 03/30/2021

Hi,

I use this command in root.

echo 4500 > /sys/class/backlight/intel_backlight/brightness

You can change the range.