INSTALL.md

Mon, 12 Apr 2021 20:22:57 +0200

author
David Demelier <markand@malikania.fr>
date
Mon, 12 Apr 2021 20:22:57 +0200
changeset 27
25155025900d
parent 23
6081cc143d37
permissions
-rw-r--r--

misc: update copyright years

6
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
1 backlight INSTALL
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
2 =================
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
3
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
4 Supported systems
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
5 -----------------
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
6
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
7 - Linux: requires video ACPI module,
23
6081cc143d37 backlight: add OpenBSD support
David Demelier <markand@malikania.fr>
parents: 19
diff changeset
8 - FreeBSD: requires the `acpi_video(4)` loaded,
6081cc143d37 backlight: add OpenBSD support
David Demelier <markand@malikania.fr>
parents: 19
diff changeset
9 - OpenBSD.
6
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
10
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
11 Installation on Linux
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
12 ---------------------
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
13
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
14 First, build the program:
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
15
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
16 make
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
17
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
18 On Linux, adjusting the brightness can be done as normal user if you have write
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
19 access to the appropriate files which are usually under */sys*.
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
20
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
21 The recommandation is to install the udev rule which change the ownership of the
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
22 brightness file to `video` group and writable by users in this group. Use the
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
23 `install-udev` for that purpose. Then don't forget to check if you are part of
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
24 the video group.
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
25
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
26 make install
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
27 make install-udev
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
28
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
29 Otherwise, as alternative you can simply install the binary as setuid if you
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
30 don't run udev.
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
31
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
32 make install-setuid
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
33
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
34 Installation on FreeBSD
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
35 -----------------------
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
36
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
37 In FreeBSD, it's required to have the tool in setuid as there is no way to
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
38 change sysctl values from a regular user.
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
39
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
40 Also, you will need the ACPI video module, add the following to your
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
41 */boot/loader.conf*:
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
42
19
0de3886f98ad misc: minor updates
David Demelier <markand@malikania.fr>
parents: 6
diff changeset
43 acpi_video_load=YES
6
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
44
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
45 Alternatively, you can compile this module into the kernel.
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
46
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
47 Then install using:
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
48
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
49 make
77ea2359f3e4 misc: refactor
David Demelier <markand@malikania.fr>
parents:
diff changeset
50 make install-setuid

mercurial