blob: 8804032a4be0c5e1f81252d383923d62db36eb22 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
BRIGHTNESS(1)
# NAME
brightness - adjust brightness via sysfs
# SYNOPSIS
*brightness* [*-h*] [*-m* _minimum_[*%*]] [*-M* _maximum_[*%*]] _backlight_ [*+*|*-*]_adjustment_
# DESCRIPTION
The *brightness* utility is used to perform log-scale brightness adjustments of
a sysfs exposed backlight.
The options are as follows:
*-m* _minimum_[*%*] or *--min* _minimum_[*%*]
Specify an artificial minimum raw value or log-scale percentage.
*-M* _maximum_[*%*] or *--max* _maximum_[*%*]
Specify an artificial maximum raw value or log-scale percentage.
*-h* or *--help*
Print out the *brightness* help text and exit.
_backlight_ must be the path to the directory of a backlight exposed over sysfs.
_adjustment_ is a real number optionally prefixed by a sign. Numbers prefixed
with either a *+* or a *-* are relative percentage changes and un-prefixed
numbers are treated as absolute percentages. If *--max* or *--min* are
specified, the meanings of a percent of change and a percentage setpoint are
unaffected. This means that attempting to set 15% brightness when a 10% is set
will set the brightness to 15%, not 23.5%.
# EXAMPLES
Increase the brightness by 10%:
```
$ brightness /sys/class/backlight/amdgpu_bl0 +10
```
Decrease the brightness by 6.25%:
```
$ brightness /sys/class/backlight/amdgpu_bl0 -6.25
```
Set the backlight to maximum brightness:
```
$ brightness /sys/class/backlight/amdgpu_bl0 100
```
This tool is best paired with _acpid_(8) and used as part of an event handler.
For example:
```
#!/bin/sh
backlight=/sys/class/backlight/amdgpu_bl0
pct=6.25
case "$1" in
video/brightnessup*) brightness "$backlight" "+$pct" ;;
video/brightnessdown*) brightness "$backlight" "-$pct" ;;
esac
```
# SEE ALSO
_sysfs_(5), _acpid_(8)
|