Проверьте источник xbacklight .Например, следующий код устанавливает яркость экрана на 50%.
// brightness.c
// gcc -o brightness brightness.c -lXrandr -lX11
#include <X11/Xatom.h>
#include <X11/Xlib.h>
#include <X11/extensions/Xrandr.h>
#define BRIGHTNESS 0.5 // Target brightness between 0.0 and 1.0
int main(int argc, char *argv[])
{
Display *dpy;
static Atom backlight;
int screen = 0, o = 0;
Window root;
XRRScreenResources *resources;
RROutput output;
XRRPropertyInfo *info;
double min, max;
long value;
dpy = XOpenDisplay(NULL);
backlight = XInternAtom (dpy, "Backlight", True);
root = RootWindow(dpy, screen);
resources = XRRGetScreenResources(dpy, root);
output = resources->outputs[o];
info = XRRQueryOutputProperty(dpy, output, backlight);
min = info->values[0];
max = info->values[1];
XFree(info); // Don't need this anymore
XRRFreeScreenResources(resources); // or this
value = BRIGHTNESS * (max - min) + min;
XRRChangeOutputProperty(dpy, output, backlight, XA_INTEGER,
32, PropModeReplace, (unsigned char *) &value, 1);
XFlush(dpy);
XSync(dpy, False);
return 0;
}