From owner-freebsd-questions@freebsd.org Wed Jun 30 16:40:46 2021 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A04746678C7 for ; Wed, 30 Jun 2021 16:40:46 +0000 (UTC) (envelope-from gundoghusse@protonmail.com) Received: from mail-4319.protonmail.ch (mail-4319.protonmail.ch [185.70.43.19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "protonmail.com", Issuer "SwissSign Server Gold CA 2014 - G22" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GFRt527Dbz4sB1 for ; Wed, 30 Jun 2021 16:40:44 +0000 (UTC) (envelope-from gundoghusse@protonmail.com) Date: Wed, 30 Jun 2021 16:40:34 +0000 To: Dominic Fandrey From: Kristofer Cc: "freebsd-questions@freebsd.org" Reply-To: Kristofer Subject: Re: Keymapping erased when disconnecting/connecting keyboard Message-ID: <5S4hJQQAkXOAEvHp14QUyl2aeHjUWjJWPIs5ZD_lOh_lBzTOnOwdHLsZSVVg_PKvWF2Y2jT0ClKP4S2kis8oxB0z4uQ69S40MTI4xEFyUWQ=@protonmail.com> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch X-Rspamd-Queue-Id: 4GFRt527Dbz4sB1 X-Spamd-Bar: --- X-Spamd-Result: default: False [-4.00 / 15.00]; HAS_REPLYTO(0.00)[gundoghusse@protonmail.com]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[protonmail.com]; R_SPF_ALLOW(-0.20)[+ip4:185.70.43.0/24]; DKIM_TRACE(0.00)[protonmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[protonmail.com,quarantine]; NEURAL_HAM_SHORT(-1.00)[-0.999]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[protonmail.com]; ASN(0.00)[asn:62371, ipnet:185.70.43.0/24, country:CH]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[protonmail.com:s=protonmail]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; FREEMAIL_REPLYTO(0.00)[protonmail.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RWL_MAILSPIKE_VERYGOOD(0.00)[185.70.43.19:from]; MAILMAN_DEST(0.00)[freebsd-questions] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 16:40:46 -0000 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 k= now *why* it happens now and not before. Some change in the USB stack on Fr= eeBSD, perhaps? ~> setxkbmap -query rules: evdev model: pc105 layout: se variant: nodeadkeys options: terminate:ctrl_alt_bksp ~> 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 =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Original Me= ssage =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 On Tuesday, June 29th, 2021 at 10:52 PM, Dominic Fandrey 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 freque= ntly unplug the keyboard to use on another machine and I have been doing th= is for many years on older FreeBSD installations without any issues. Now wi= th 13.0, every time I plug in the keyboard again, I have US keymap and it i= gnores the setting I have in /etc/rc.conf. locale is also unmodified, as ep= xected. 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 simila= r in Xorg. > > I'm using the us layout using the altgr-intl variant and the variant is o= ccasionally > > 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 ke= ymap back without rebooting the machine. There has got to be some simple th= ing I'm missing here. > > I restore the setting by executing `setxkbmap us altgr-intl`. The first a= rgument is > > the layout, the second the variant.