Brightness control program for Thinkpad X220 with AGAN X230 2K modification board
  • C 73.8%
  • Roff 12.8%
  • M4 9.2%
  • Makefile 2.7%
  • Shell 1.5%
Find a file
2025-11-29 15:53:21 +03:00
scripts Initial commit 2024-04-20 23:34:13 +03:00
src Make command-line argument flags more convinient 2025-11-29 15:36:35 +03:00
.gitignore Add TAGS and backup files to the .gitignore 2025-11-29 15:35:36 +03:00
agan.conf Add devd rule to call program without root 2024-04-21 03:04:37 +03:00
brightness_agan2k.1 Update link to the actual project issues (Codeberg) 2025-11-29 15:39:49 +03:00
ChangeLog Add ChangeLog 2025-11-29 15:53:21 +03:00
configure.ac Add --version argument to display program's version 2025-11-29 15:36:11 +03:00
LICENSE Initial commit 2024-04-20 23:16:15 +03:00
Makefile.am Add devd rule to call program without root 2024-04-21 03:04:37 +03:00
README.org Update README 2025-11-28 23:25:43 +03:00

Brightness control program for AGAN X230 2K modification board

There are exists some 2K modification boards (usually named Agan X230) for Lenovo Thinkpad X220/X230: link. This program can change 2K display brightness via board's USBHID interface.

Program written only for FreeBSD.

Dependencies

To build program autotools and bash is necessary.

Compilation and installation

./scripts/autotools.sh
./configure
make
sudo make install

Last command will install compiled binary and man page. Also, it will install necessary devd rule to /usr/local/etc/devd/agan.conf.

After installation you can reboot computer to apply devd rule. Just a devd restart will not work - because AGAN X230 board soldered to motherboard and cannot be reconnected. New devd rule will be applied only on system startup.

User, which want to use this program, should be on the wheel group. If you want to use another group — edit the agan.conf file.

Usage

Brightness from AGAN X230 can take values from 0 to 15.

To read brightness from board just run:

brightness_agan2k
11

Or add option -p (--percent) to output brightness in percents:

brightness_agan2k -p
73

To write brightness to board:

brightness_agan2k -b 10

Or:

brightness_agan2k --brightness 10

To increase or decrease brightness by one step, the options -i (--increase-brightness) or -d (--decrease-brightness) exists.