This allows to control the backlight level on certain Intel(R) GPUs, including i915. This has been taken from intel-gpu-tools which can be found here: http://cgit.freedesktop.org/xorg/app/intel-gpu-tools/ Originally ported to FreeBSD by "emmex" of the FreeBSD forums. FreeBSD Build: pkg install libpciaccess libdrm make make install OpenBSD Build: make make install (this installs intel_backlight setuid root, so any user can execute it). Usage: $ intel_backlight current backlight value: 30% (281/937) $ intel_backlight 50 current backlight value: 15% (141/937) set backlight to 50% (469/937) $ intel_backlight incr current backlight value: 50% (469/937) set backlight to 51% (478/937) $ intel_backlight incr current backlight value: 51% (478/937) set backlight to 60% (562/937) $ intel_backlight incr current backlight value: 60% (562/937) set backlight to 70% (656/937) $ intel_backlight decr current backlight value: 70% (656/937) set backlight to 60% (562/937) $ intel_backlight decr current backlight value: 60% (562/937) set backlight to 51% (478/937) The included example allows adjusting brightness automatically based on the input of the isl driver (currently not part of standard FreeBSD). Usage: ./isl_backlight.sh & OpenBSD Notes: Requires a kernel capable of concurrent opening of /dev/xf86, if this is to be run while X is running. The following patch implements machdep.allowaperture=3 to support this. Index: arch/amd64/amd64/mem.c =================================================================== RCS file: /cvs/src/sys/arch/amd64/amd64/mem.c,v retrieving revision 1.23 diff -u -p -u -p -r1.23 mem.c --- arch/amd64/amd64/mem.c 14 Mar 2015 03:38:46 -0000 1.23 +++ arch/amd64/amd64/mem.c 26 May 2015 02:52:31 -0000 @@ -93,8 +93,9 @@ mmopen(dev_t dev, int flag, int mode, st if (suser(p, 0) != 0 || !allowaperture) return (EPERM); - /* authorize only one simultaneous open() */ - if (ap_open_count > 0) + /* authorize only one simultaneous open() unless + * allowaperture=3 */ + if (ap_open_count > 0 && allowaperture < 3) return(EPERM); ap_open_count++; break; @@ -213,6 +214,7 @@ mmmmap(dev_t dev, off_t off, int prot) else return -1; case 2: + case 3: /* Allow mapping of the whole 1st megabyte for x86emu */ if (off <= BIOS_END || !amd64_pa_used(off))
Control intel backlight on FreeBSD (and OpenBSD)
openbsd
C
98.0%
Shell
0.4%
Makefile
0.3%
Other
1.4%
10
1
0
Clone this repository
https://tangled.org/jcs.org/intel_backlight_fbsd
https://tangled.org/did:plc:6ashubrd3ihfmnrpsatviswa/intel_backlight_fbsd
git@git.jcs.org:jcs.org/intel_backlight_fbsd
git@git.jcs.org:did:plc:6ashubrd3ihfmnrpsatviswa/intel_backlight_fbsd
For self-hosted knots, clone URLs may differ based on your setup.
Download tar.gz
works on the skylake hp chromebook 13
tested on:
vga1 at pci0 dev 2 function 0 "Intel HD Graphics 5300" rev 0x09
README