On Mon, Sep 10, 2012 at 03:30:38PM +0200, [email protected] wrote:
> >Synopsis:    LCD brigtness on Thinkpad T61 can not be adjusted without 
> >rebooting 
> >Category:    Thinkpad t61 hotkey
> >Environment:
>       System      : OpenBSD 5.2
>       Details     : OpenBSD 5.2-current (GENERIC.MP) #8: Tue Aug 28 12:25:19 
> MDT 2012
>                        
> [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> 
>       Architecture: OpenBSD.amd64
>       Machine     : amd64
> >Description:
>       If I decrease my LCD brightness I can not increase it again without 
> restarting my laptop
>       and the other way round is the same.
> >How-To-Repeat:
>       Switch on laptop adjust brightness with (FN+Pos1) or (FN+Ende)
> >Fix:
>       Restart Laptop and adjust brightness either increasing or decreasing.

Can you send me the output from pressing the brightness buttons after 
applying this diff?

Index: acpithinkpad.c
===================================================================
RCS file: /cvs/src/sys/dev/acpi/acpithinkpad.c,v
retrieving revision 1.28
diff -u -p -r1.28 acpithinkpad.c
--- acpithinkpad.c      6 Jun 2011 06:13:46 -0000       1.28
+++ acpithinkpad.c      12 Sep 2012 09:54:04 -0000
@@ -279,12 +279,15 @@ thinkpad_hotkey(struct aml_node *node, i
                if (event == 0)
                        break;
 
+               printf("event: %d\n", event);
                switch (event) {
                case THINKPAD_BUTTON_BRIGHTNESS_UP:
+                       printf("BR_UP\n");
                        thinkpad_brightness_up(sc);
                        handled = 1;
                        break;
                case THINKPAD_BUTTON_BRIGHTNESS_DOWN:
+                       printf("BR_DOWN\n");
                        thinkpad_brightness_down(sc);
                        handled = 1;
                        break;
@@ -412,12 +415,14 @@ thinkpad_toggle_wan(struct acpithinkpad_
 int
 thinkpad_cmos(struct acpithinkpad_softc *sc, uint8_t cmd)
 {
+       int rc;
        struct aml_value arg;
 
        bzero(&arg, sizeof(arg));
        arg.type = AML_OBJTYPE_INTEGER;
        arg.v_integer = cmd;
-       aml_evalname(sc->sc_acpi, sc->sc_devnode, "\\UCMS", 1, &arg, NULL);
+       rc = aml_evalname(sc->sc_acpi, sc->sc_devnode, "\\UCMS", 1, &arg, NULL);
+       printf("thinkpad_cmos: rc = %d\n", rc);
        return (0);
 }

Reply via email to