On Wed, Jan 28, 2015 at 12:54:15AM +0000, Raf Czlonka wrote:
> >Synopsis:    Volume buttons stop working after suspend/resume cycle
> >Category:    kernel
> >Environment:
>       System      : OpenBSD 5.6
>       Details     : OpenBSD 5.6-stable (GENERIC) #0: Tue Jan 27 00:09:23 GMT 
> 2015
>                        [email protected]:/usr/src/sys/arch/i386/compile/GENERIC
> 
>       Architecture: OpenBSD.i386
>       Machine     : i386
> >Description:
>     Prior to suspend the physical volume buttons generate keycode 174 (keysym
>     0x1008ff11, XF86AudioLowerVolume) and keycode 176 (keysym 0x1008ff13,
>     XF86AudioRaiseVolume) respectively, as reported by 'xev(1)'. After
>     suspend/resume cycle (by using 'zzz' or with 'machdep.lidsuspend=1'), the
>     physical volume buttons stop working, i.e. 'xev' doesn't report anything
>     while they are pressed.
> >How-To-Repeat:
>     Suspend the laptop with 'zzz' or using the lid (with the aforementioned
>     'machdep.lidsuspend' set to '1').
> >Fix:
>       So far, the only way to resolve the issue is to reboot the machine.

First of all you should update to -current.

Then you should apply the following diff and let me know the result.

Index: dev/acpi/acpisony.c
===================================================================
RCS file: /cvs/src/sys/dev/acpi/acpisony.c,v
retrieving revision 1.6
diff -u -p -r1.6 acpisony.c
--- dev/acpi/acpisony.c 14 Sep 2014 14:17:24 -0000      1.6
+++ dev/acpi/acpisony.c 3 Feb 2015 20:53:36 -0000
@@ -215,16 +215,20 @@ acpisony_notify(struct aml_node *node, i
 void
 acpisony_notify_setup(struct acpisony_softc *sc)
 {
-       struct aml_value arg;
+       struct aml_value arg, mask;
 
        bzero(&arg, sizeof(arg));
        arg.type = AML_OBJTYPE_INTEGER;
+       bzero(&mask, sizeof(mask));
+       mask.type = AML_OBJTYPE_INTEGER;
 
        arg.v_integer = 1;
        aml_evalname(sc->sc_acpi, sc->sc_devnode, "ECON", 1, &arg, NULL);
 
        /* Enable all events */
-       arg.v_integer = 0xffff;
+       arg.v_integer = 0x10;
+       aml_evalname(sc->sc_acpi, sc->sc_devnode, "SN00", 1, &arg, &mask);
+       arg.v_integer = mask.v_integer;
        aml_evalname(sc->sc_acpi, sc->sc_devnode, "SN02", 1, &arg, NULL);
 
        /* Enable hotkeys */

Reply via email to