You are not logged in.

#1 2013-03-24 16:17:20

Funfrog
Member
Registered: 2013-03-19
Posts: 5

T420 adjust default brightness?

Hello all,

where do I edit the default values for display brightness?
Everytime I boot the T420 the maximum value ist selected. I use Gnome 3.

I know...it is really not a big deal to adjust it manually but on the other hand....

bb smile

Offline

#2 2013-03-25 00:15:35

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: T420 adjust default brightness?

...on the other hand... if you are going to configure a system, you might as well configure the system.  I get it.

You need to determine what is controlling the brightness levels in /sys.  For my ThinkPad E430 and its Intel integrated graphics, it is /sys/class/backlight/acpi_video0/brightness. 

Then you need to find a way to have that value changed on boot.  There are some around here that swear by the tmpfiles.d method (see the tmpfiles.d man page), which can be used to write a desired value to a file on boot.  But I use a udev rule because I found that sometimes it seemed that the necessary directory structure in /sys wasn't quite ready yet.  Though I am not sure how this would even be possible since the screen is activated and functioning, but for me it would sometimes fail.

To write a udev rule, you need to learn the basics of udevadm.  It can be used to give you the variables necessary to instruct udev on how to identify and apply the rule.  See the udev page for more info.  There is a link about writing udev rules on that page.  It is a bit old, and the examples use the command "udev" instead of "udevadm".  But all the other information is still valid.

Offline

#3 2013-03-30 11:24:10

wwn
Member
Registered: 2013-03-25
Posts: 68

Re: T420 adjust default brightness?

Funfrog, this should be a valid udev rule for a Lenovo T4xx:

ACTION=="add", KERNEL=="acpi_video0", SUBSYSTEM=="backlight", SUBSYSTEMS=="pci", DRIVERS=="i915", ATTR{brightness}="9"

Offline

#4 2013-03-30 19:11:57

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: T420 adjust default brightness?

wwn wrote:

Funfrog, this should be a valid udev rule for a Lenovo T4xx:

ACTION=="add", KERNEL=="acpi_video0", SUBSYSTEM=="backlight", SUBSYSTEMS=="pci", DRIVERS=="i915", ATTR{brightness}="9"

This is what we refer to as "spoon feeding" and provides the OP with zero insight into what is making this work.  So if he/she ever comes across another issue that might need to be solved with a udev rule, he/she will likely come back here looking for a udev rule to be written for them.

Offline

Board footer

Powered by FluxBB