Mark Kettenis:
> Does the following diff work?
No. (Thinkpad X230.)
> Index: acpithinkpad.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/acpi/acpithinkpad.c,v
> retrieving revision 1.51
> diff -u -p -r1.51 acpithinkpad.c
> --- acpithinkpad.c 10 Jan 2016 16:30:43 -0000 1.51
> +++ acpithinkpad.c 16 Feb 2016 19:42:58 -0000
> @@ -126,6 +126,7 @@ struct acpithinkpad_softc {
> const char *sc_thinklight_set;
>
> uint64_t sc_brightness;
> + int sc_newbrightness;
> };
>
> extern void acpiec_read(struct acpiec_softc *, u_int8_t, int, u_int8_t *);
> @@ -667,7 +668,7 @@ thinkpad_set_brightness(void *arg0, int
>
> memset(&arg, 0, sizeof(arg));
> arg.type = AML_OBJTYPE_INTEGER;
> - arg.v_integer = sc->sc_brightness & 0xff;
> + arg.v_integer = sc->sc_newbrightness;
> aml_evalname(sc->sc_acpi, sc->sc_devnode,
> "PBLS", 1, &arg, NULL);
> }
> @@ -708,6 +709,7 @@ thinkpad_set_param(struct wsdisplay_para
> dp->curval = maxval;
> sc->sc_brightness &= ~0xff;
> sc->sc_brightness |= dp->curval;
> + sc->sc_newbrightness = dp->curval;
> acpi_addtask(sc->sc_acpi, thinkpad_set_brightness, sc, 0);
> acpi_wakeup(sc->sc_acpi);
> return 0;
--
Christian "naddy" Weisgerber [email protected]