Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Coffee Lake (Tested on i5-9300H) Backlight Set Logic
// coffee lake chips use the BXT methods.
current = INREG(0xC8258);
max = INREG(0xC8254);
printf ("current backlight value: %d%%\n", current * 100 / max);
if (argc > 1) {
uint32_t v = atoi (argv[1]) * max / 100;
if (v > max)
v = max;
OUTREG(0xC8258, v);
(void) INREG(0xC8258);
printf ("set backlight to %d%%\n", v * 100 / max);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment