On Wed, 15 Jul 2015 04:39:00 +0300
Paul Irofti <[email protected]> wrote:
> Can you apply the following diff and tell me what the debug printf
> says when you push the brightness buttons before and after suspend?
>
>
> Index: acpithinkpad.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/acpi/acpithinkpad.c,v
> retrieving revision 1.44
> diff -u -p -r1.44 acpithinkpad.c
> --- acpithinkpad.c 24 Apr 2015 14:44:17 -0000 1.44
> +++ acpithinkpad.c 15 Jul 2015 01:37:17 -0000
> @@ -304,6 +304,8 @@ thinkpad_hotkey(struct aml_node *node, i
> if (aml_evalinteger(sc->sc_acpi, sc->sc_devnode,
> "MHKP", 0, NULL, &event))
> break;
> + printf("%s: handling event 0x%03llx\n",
> + DEVNAME(sc), event);
> if (event == 0)
> break;
>
After a cold boot the output is as follows.
1) Pressing brightness up
acpithinkpad0: handling event 0x1011
acpithinkpad0: handling event 0x000
2) Pressing brightess down
acpithinkpad0: handling event 0x1011
acpithinkpad0: handling event 0x000
Then I suspend zzz, and resume and the output changes slightly to.
1) Pressing brightness up
acpithinkpad0: handling event 0x1010
acpithinkpad0: handling event 0x000
2) Pressing brightness down
acpithinkpad0: handling event 0x1011
acpithinkpad0: handling event 0x000
For some reason pressing the brightness up command gives the brightness
down event, but doesn't actually change the brightness until a
suspend/resume cycle is done.