Thanks, I don't have setup to build a kernel right now, but will try a new
snap maybe next week.

regards

On Mon, Aug 30, 2021 at 12:03 AM Anton Lindqvist <[email protected]> wrote:

> On Sun, Aug 29, 2021 at 07:08:47PM -0500, Abel Abraham Camarillo Ojeda
> wrote:
> > To: [email protected]
> > Subject: kernel loops in 'wskbd3 cannot load keymap' when kbd us.dvorak
> > From: acamari
> > Cc: acamari
> > Reply-To: acamari
> >
> > >Synopsis: kernel loops in 'wskbd3 cannot load keymap' when kbd us.dvorak
> > >Category: system
> > >Environment:
> > System      : OpenBSD 7.0
> > Details     : OpenBSD 7.0-beta (GENERIC.MP) #195: Mon Aug 23 23:41:21
> MDT
> > 2021
> > [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> >
> > Architecture: OpenBSD.amd64
> > Machine     : amd64
> > >Description:
> > If I plug my kinesis advantage keyboard and after that I run the
> > command:
> >
> > # kbd us.dvorak
> >
> > kernel prints in console indefinitely
> >
> > wskbd3: cannot load keymap, falling back to default
> > wskbd3: cannot load keymap, falling back to default
> > wskbd3: cannot load keymap, falling back to default
> > wskbd3: cannot load keymap, falling back to default
> > wskbd3: cannot load keymap, falling back to default
> > wskbd3: cannot load keymap, falling back to default
> > ...
> >
> >
> > >How-To-Repeat:
> > I can repeat using above process even in single user mode
> > >Fix:
> > # rm /etc/kbdtype
> >
> > and only use qwerty in console.
> >
> > xmodmap over x11 with dvorak keymapping works.
>
> Should be solved by the following commit:
>
> commit da425875dc1ba65b624bb01a56274feae09bb0a8
> Author: anton <[email protected]>
> Date:   Wed Aug 25 05:48:02 2021 +0000
>
>     Remove the KB_DEFAULT flag from the wskbd keymap layout. Presence of
>     this flag will cause wskbd to discard the given keymap layout and
>     instead favor the layout of the associated wsmux. This is not a problem
>     while attaching ucc(4) during boot as the wsmux uses the default layout
>     at this point. However, if the layout is changed using /etc/kbdtype
> from
>     rc(8) during boot, attaching ucc(4) at this point would cause
>     wskbd_attach() to get stuck in an infinite loop:
>
>             wskbdX: cannot load keymap, falling back to default
>
>     ... which in turn is caused by ucc(4) only providing a us layout and
>     using anything else in /etc/kbdtype would not work.
>
>     I missed this as I don't use /etc/kbdtype but cwen@ and Mazzurco
>     Riccardo <mazzurco dot riccardo at protonmail dot com> reported the
> same
>     problem.
>
> diff --git sys/dev/usb/ucc.c sys/dev/usb/ucc.c
> index cdd5d0f3c07..26f7393e16a 100644
> --- sys/dev/usb/ucc.c
> +++ sys/dev/usb/ucc.c
> @@ -1,4 +1,4 @@
> -/*     $OpenBSD: ucc.c,v 1.9 2021/08/25 05:47:15 anton Exp $   */
> +/*     $OpenBSD: ucc.c,v 1.10 2021/08/25 05:48:02 anton Exp $  */
>
>  /*
>   * Copyright (c) 2021 Anton Lindqvist <[email protected]>
> @@ -281,7 +281,7 @@ ucc_attach_wskbd(struct ucc_softc *sc)
>         sc->sc_keydesc[0].map_size = sc->sc_maplen;
>         sc->sc_keydesc[0].map = sc->sc_map;
>         sc->sc_keymap.keydesc = sc->sc_keydesc;
> -       sc->sc_keymap.layout = KB_US | KB_DEFAULT;
> +       sc->sc_keymap.layout = KB_US;
>         sc->sc_wskbddev = config_found(&sc->sc_hdev.sc_dev, &a,
> wskbddevprint);
>  }
>
>

Reply via email to