Keymapping erased when disconnecting/connecting keyboard

Kristofer gundoghusse at protonmail.com
Wed Jun 30 16:40:46 UTC 2021


Thanks Dominic, that gets it so I can restore the keymap without having to kill/restart X. The below at least shows *what* happened although I don't know *why* it happens now and not before. Some change in the USB stack on FreeBSD, perhaps?

~> setxkbmap -query
rules:      evdev
model:      pc105
layout:     se
variant:    nodeadkeys
options:    terminate:ctrl_alt_bksp
<unplug and then re-plug in the keyboard>
~> setxkbmap -query
rules:      evdev
model:      pc105
layout:     us
~> setxkbmap se nodeadkeys
~> setxkbmap -query
rules:      evdev
model:      pc105
layout:     se
variant:    nodeadkeys
options:    terminate:ctrl_alt_bksp


‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On Tuesday, June 29th, 2021 at 10:52 PM, Dominic Fandrey <kamikaze at bsdforen.de> wrote:

> On 28/06/2021 19:17, Kristofer via freebsd-questions wrote:
>
> > ...
> >
> > I have another issue that I have not seen before FreeBSD 13.0. I frequently unplug the keyboard to use on another machine and I have been doing this for many years on older FreeBSD installations without any issues. Now with 13.0, every time I plug in the keyboard again, I have US keymap and it ignores the setting I have in /etc/rc.conf. locale is also unmodified, as epxected. The kaymap is correctly set to Swedish keymap when I log in, but as soon as I remove/re-add the keyboard, it is lost.
>
> I don't know about the rc.conf settings but I experience something similar in Xorg.
>
> I'm using the us layout using the altgr-intl variant and the variant is occasionally
>
> forgotten when I plug a new keyboard in (I'm using a KM switch). I.e. it reverts to
>
> vanilla US.
>
> I'm running i3 and AFAIK it doesn't mess with the keyboard settings.
>
> > On top of that, I haven't been able to figure out how to get get the keymap back without rebooting the machine. There has got to be some simple thing I'm missing here.
>
> I restore the setting by executing `setxkbmap us altgr-intl`. The first argument is
>
> the layout, the second the variant.


More information about the freebsd-questions mailing list