GNU bug report logs - #37897
Keyboard layout not honored under Xorg

Previous Next

Package: guix;

Reported by: o.rojon <at> posteo.net

Date: Wed, 23 Oct 2019 22:50:02 UTC

Severity: normal

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 37897 in the body.
You can then email your comments to 37897 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#37897; Package guix. (Wed, 23 Oct 2019 22:50:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to o.rojon <at> posteo.net:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Wed, 23 Oct 2019 22:50:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: o.rojon <at> posteo.net
To: bug-guix <at> gnu.org
Subject: Bug: Resetting locale settings
Date: Thu, 24 Oct 2019 00:49:36 +0200
Hello guix,

I believe that a locale-related bug has slipped in somewhere in the last 
two-three weeks. During installation and in my configuration file, I 
have specified de_DE specified as locale, which should translate to a 
german keyboard layout. But since said two-three weeks, I startup with 
what I believe is the US layout (qwerty) - and before this occurred, I 
was once even unable to login because my keyboard layout has been 
changed to something so obscure it didnt even seem to know basic 
characters like the exclamation mark, while there was a number of 
characters that could not be displayed (probably non-utf characters I 
suppose).

In the latter case, I was able to login via 'loadkeys 
/run/current-system/profile/share/keymaps/i386/qwertz/de-latin1' in TTY 
(where I went with C-M-F2 or F3, nvm); but now, I am unable to set the 
keymap via loadkeys. When I dont use sudo, I receive the message 'data 
descriptor referring to console couldnt be found' (translated from 
german "Dateideskriptor, der auf die Konsole verweist, konnte nicht 
gefunden werden."); if I do use sudo, I dont get an error, but the 
keyboard layout doesnt change.

I really dont know what I could've contributed to produce such a 
situation. The only thing I noticed is that it KIND OF coincides with me 
installing glibc to make guile stop nagging that "locale couldnt be 
found" (or something like that).

Obviously, help would be appreciated :)

Greetings!




Information forwarded to bug-guix <at> gnu.org:
bug#37897; Package guix. (Wed, 23 Oct 2019 23:20:02 GMT) Full text and rfc822 format available.

Message #8 received at 37897 <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
Cc: 37897 <at> debbugs.gnu.org
Subject: Re: bug#37896: setxkbmap has worked
Date: Thu, 24 Oct 2019 01:19:32 +0200
[Message part 1 (text/plain, inline)]
Hullo,

I think this was sent to bug #37896 by mistake so I'm re-posting 
it to what I assume is the correct bug number:

o.rojon <at> posteo.net 写道:
> Hello everyone,
>
> just a quickie: I noticed that even though loadkeys doesnt work,
> setxkbmap does. Sorry, just read the setxkbmap and figured how 
> to use
> it properly.
>
> Yet, this doesnt explain why, on each startup, my keyboard
> configuration seems to be set to the us layout, even though I 
> have
> setup and reconfigured it to use the german one.
>
> Greetings!

Kind regards,

T G-R
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#37897; Package guix. (Wed, 23 Oct 2019 23:28:02 GMT) Full text and rfc822 format available.

Message #11 received at 37897 <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: 37897 <at> debbugs.gnu.org
Subject: Re: bug#37897: Bug: Resetting locale settings
Date: Thu, 24 Oct 2019 01:27:16 +0200
[Message part 1 (text/plain, inline)]
Hullo again,

I can't help you with your exact problem, but

o.rojon <at> posteo.net 写道:
> In the latter case, I was able to login via 'loadkeys
> /run/current-system/profile/share/keymaps/i386/qwertz/de-latin1' 
> in
> TTY (where I went with C-M-F2 or F3, nvm); but now, I am unable 
> to set
> the keymap via loadkeys. When I dont use sudo, I receive the 
> message
> 'data descriptor referring to console couldnt be found' 
> (translated
> from german "Dateideskriptor, der auf die Konsole verweist, 
> konnte
> nicht gefunden werden."); if I do use sudo, I dont get an error, 
> but
> the keyboard layout doesnt change.

I ran ‘sudo loadkeys de-latin1’ on VT 2, where my ‘y’ key now does 
the bad thing.  So it works here.

This mix of loadkeys and setxkbmap confuses me, though: are you 
trying to log in on a VT (the Linux console), or X?

‘loadkeys’ only handles the former, ‘setxkbmap’ only the latter. 
They are entirely separate.

Kind regards,

T G-R
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#37897; Package guix. (Fri, 25 Oct 2019 20:46:01 GMT) Full text and rfc822 format available.

Message #14 received at 37897 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: o.rojon <at> posteo.net
Cc: 37897 <at> debbugs.gnu.org
Subject: Re: bug#37897: Bug: Resetting locale settings
Date: Fri, 25 Oct 2019 22:44:55 +0200
Hello,

o.rojon <at> posteo.net skribis:

> I believe that a locale-related bug has slipped in somewhere in the
> last two-three weeks. During installation and in my configuration
> file, I have specified de_DE specified as locale, which should
> translate to a german keyboard layout. But since said two-three weeks,
> I startup with what I believe is the US layout (qwerty) - and before
> this occurred, I was once even unable to login because my keyboard
> layout has been changed to something so obscure it didnt even seem to
> know basic characters like the exclamation mark, while there was a
> number of characters that could not be displayed (probably non-utf
> characters I suppose).

Could you be more specific about the context in which you get an
incorrect layout (console, Xorg, Wayland, GNOME, etc.)?

Note that locale settings and keyboard layout settings are entirely
separate—choosing the “de_DE” locale gives you programs that speak
German, but it does not give you a “qwertz” layout.  See:

  https://guix.gnu.org/manual/devel/en/html_node/Keyboard-Layout.html
  https://guix.gnu.org/manual/devel/en/html_node/Locales.html

HTH,
Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#37897; Package guix. (Sat, 26 Oct 2019 21:27:01 GMT) Full text and rfc822 format available.

Message #17 received at 37897 <at> debbugs.gnu.org (full text, mbox):

From: o.rojon <at> posteo.net
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 37897 <at> debbugs.gnu.org
Subject: Re: bug#37897: Bug: Resetting locale settings
Date: Sat, 26 Oct 2019 23:26:22 +0200
Hello Ludo,

maybe I have been a bit unprecise in my wording, Im rather new to that 
level of configurability.

So I was talking about the keyboard layout all along. Not only was my 
locale set to "de_DE.utf8", but my keyboard configuration is set to 
"de-latin1-nodeadkeys". Interestingly, the keyboard layout is different 
in xorg and xfce than it is in the console (the one I reach via C-M-Fx, 
not the terminal emulator). In the console, I have the qwertz keyboard 
layout.

Also find the part of my current configuration file (sitting at 
/etc/config.scm) which specifies both locale and keyboard layout:
(operating-system
  (locale "de_DE.utf8")
  (timezone "Europe/Berlin")
  (keyboard-layout (keyboard-layout "de" "latin1-nodeadkeys"))
  (bootloader
    (bootloader-configuration
      (bootloader grub-bootloader)
      (target "/dev/sdb")
      (keyboard-layout keyboard-layout)))

I was surprised by the behaviour described in my bug report because I 
saw that the value for "keyboard-layout", which is set very early in the 
operating-system declaration, is simply copied over in later parts of 
the configuration file.

If you need anything else, please specify. Again, Im rather new to these 
things, so sorry for technical inspecificity.

Greetings!

On 25.10.2019 22:44, Ludovic Courtès wrote:
> Hello,
> 
> o.rojon <at> posteo.net skribis:
> 
>> I believe that a locale-related bug has slipped in somewhere in the
>> last two-three weeks. During installation and in my configuration
>> file, I have specified de_DE specified as locale, which should
>> translate to a german keyboard layout. But since said two-three weeks,
>> I startup with what I believe is the US layout (qwerty) - and before
>> this occurred, I was once even unable to login because my keyboard
>> layout has been changed to something so obscure it didnt even seem to
>> know basic characters like the exclamation mark, while there was a
>> number of characters that could not be displayed (probably non-utf
>> characters I suppose).
> 
> Could you be more specific about the context in which you get an
> incorrect layout (console, Xorg, Wayland, GNOME, etc.)?
> 
> Note that locale settings and keyboard layout settings are entirely
> separate—choosing the “de_DE” locale gives you programs that speak
> German, but it does not give you a “qwertz” layout.  See:
> 
>   https://guix.gnu.org/manual/devel/en/html_node/Keyboard-Layout.html
>   https://guix.gnu.org/manual/devel/en/html_node/Locales.html
> 
> HTH,
> Ludo’.




Changed bug title to 'Keyboard layout not honored under Xorg' from 'Bug: Resetting locale settings' Request was from Ludovic Courtès <ludo <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 13 Nov 2019 13:47:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-guix <at> gnu.org:
bug#37897; Package guix. (Wed, 13 Nov 2019 13:49:02 GMT) Full text and rfc822 format available.

Message #22 received at 37897 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: o.rojon <at> posteo.net
Cc: 37897 <at> debbugs.gnu.org
Subject: Re: bug#37897: Bug: Resetting locale settings
Date: Wed, 13 Nov 2019 14:48:33 +0100
Hi,

o.rojon <at> posteo.net skribis:

> So I was talking about the keyboard layout all along. Not only was my
> locale set to "de_DE.utf8", but my keyboard configuration is set to
> "de-latin1-nodeadkeys". Interestingly, the keyboard layout is
> different in xorg and xfce than it is in the console (the one I reach
> via C-M-Fx, not the terminal emulator). In the console, I have the
> qwertz keyboard layout.
>
> Also find the part of my current configuration file (sitting at
> /etc/config.scm) which specifies both locale and keyboard layout:
> (operating-system
>   (locale "de_DE.utf8")
>   (timezone "Europe/Berlin")
>   (keyboard-layout (keyboard-layout "de" "latin1-nodeadkeys"))
>   (bootloader
>     (bootloader-configuration
>       (bootloader grub-bootloader)
>       (target "/dev/sdb")
>       (keyboard-layout keyboard-layout)))

Could you post your complete config file?

The snippet above defines the keyboard layout for the console and for
GRUB, but it does not define the keyboard layout for Xorg/Xfce.  For
that you need an extra bit with ‘set-xorg-configuration’ as noted at
<https://guix.gnu.org/manual/devel/en/html_node/Keyboard-Layout.html>.

Thanks in advance,
Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#37897; Package guix. (Thu, 14 Nov 2019 12:24:02 GMT) Full text and rfc822 format available.

Message #25 received at 37897 <at> debbugs.gnu.org (full text, mbox):

From: o.rojon <at> posteo.net
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 37897 <at> debbugs.gnu.org
Subject: Re: bug#37897: Bug: Resetting locale settings
Date: Thu, 14 Nov 2019 13:23:13 +0100
Hello ludo, hey guys,

here you go. I took the liberty to anonymize and to skip the package 
modules and packages sections.

I realised that when I dont specify WHICH KIND of german keyboard layout 
I have, the problem does not occur. That is, if I use the 
(keyboard-layout (keyboard-layout "de")), I dont have any problems.

Thus I suppose that there might be something wrong with the spelling of 
the specification (compare both commented-out attempts at 
specification). Strictly speaking, then, it may not be a bug. But if it 
is not a bug, I dont know how specify the specification, since in the 
manual the specification consists of only one word (e.g. "fr" "bepo"), 
and under /run/current-system/profile/share/keymaps/i386/qwertz/, said 
keymap is listed as "de-latin1-nodeadkeys".

(use-modules (gnu))
(use-service-modules desktop networking ssh xorg)
(use-package-modules ...)

(operating-system
  (locale "de_DE.utf8")
  (timezone "Europe/Berlin")
;;  (keyboard-layout (keyboard-layout "de" "latin1-nodeadkeys"))
;;  (keyboard-layout (keyboard-layout "de" "latin1 nodeadkeys"))
  (keyboard-layout (keyboard-layout "de"))
  (bootloader
    (bootloader-configuration
      (bootloader grub-bootloader)
      (target "/dev/sdb")
      (keyboard-layout keyboard-layout)))
  (swap-devices (list "/dev/sdb3"))
  (file-systems
    (cons* (file-system
             (mount-point "/home")
             (device
               (uuid "8ee0b983-53f0-4e18-852f-8cd4424a6c6f"
                     'btrfs))
             (type "btrfs"))
           (file-system
             (mount-point "/")
             (device
               (uuid "cb425a5f-bd91-45d3-92e1-3b983450ee21"
                     'ext4))
             (type "ext4"))
           %base-file-systems))
  (host-name "guixter")
  (users (cons* (user-account
                  (name "user")
                  (comment "")
                  (group "users")
                  (home-directory "/home/user")
                  (supplementary-groups
                    '("wheel" "netdev" "audio" "video")))
                %base-user-accounts))
  (packages
    (append
     (list ...)
      %base-packages))
  (services
    (append
      (list (service xfce-desktop-service-type)
            (set-xorg-configuration
              (xorg-configuration
                (keyboard-layout keyboard-layout))))
      %desktop-services)))

Greetings,
Olivier

On 13.11.2019 14:48, Ludovic Courtès wrote:
> Hi,
> 
> o.rojon <at> posteo.net skribis:
> 
>> So I was talking about the keyboard layout all along. Not only was my
>> locale set to "de_DE.utf8", but my keyboard configuration is set to
>> "de-latin1-nodeadkeys". Interestingly, the keyboard layout is
>> different in xorg and xfce than it is in the console (the one I reach
>> via C-M-Fx, not the terminal emulator). In the console, I have the
>> qwertz keyboard layout.
>> 
>> Also find the part of my current configuration file (sitting at
>> /etc/config.scm) which specifies both locale and keyboard layout:
>> (operating-system
>>   (locale "de_DE.utf8")
>>   (timezone "Europe/Berlin")
>>   (keyboard-layout (keyboard-layout "de" "latin1-nodeadkeys"))
>>   (bootloader
>>     (bootloader-configuration
>>       (bootloader grub-bootloader)
>>       (target "/dev/sdb")
>>       (keyboard-layout keyboard-layout)))
> 
> Could you post your complete config file?
> 
> The snippet above defines the keyboard layout for the console and for
> GRUB, but it does not define the keyboard layout for Xorg/Xfce.  For
> that you need an extra bit with ‘set-xorg-configuration’ as noted at
> <>.
> 
> Thanks in advance,
> Ludo’.




Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Thu, 14 Nov 2019 21:52:02 GMT) Full text and rfc822 format available.

Notification sent to o.rojon <at> posteo.net:
bug acknowledged by developer. (Thu, 14 Nov 2019 21:52:02 GMT) Full text and rfc822 format available.

Message #30 received at 37897-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: o.rojon <at> posteo.net
Cc: 37897-done <at> debbugs.gnu.org
Subject: Re: bug#37897: Bug: Resetting locale settings
Date: Thu, 14 Nov 2019 22:51:33 +0100
Hi,

o.rojon <at> posteo.net skribis:

> Hello ludo, hey guys,

Guys and gals.  :-)

> I realised that when I dont specify WHICH KIND of german keyboard
> layout I have, the problem does not occur. That is, if I use the
> (keyboard-layout (keyboard-layout "de")), I dont have any problems.

Oh I see, the “variant” part is indeed the problem.

> ;;  (keyboard-layout (keyboard-layout "de" "latin1-nodeadkeys"))

If we build verbosely, we see:

--8<---------------cut here---------------start------------->8---
building /gnu/store/r3pibry4qsyfs090fcxglvfr52vfq3cx-console-keymap.de.drv...
WARNING: Can not find "latin1nodeadkeys" in "de".
WARNING: Unknown X keysym "dead_belowmacron"
WARNING: Unknown X keysym "dead_belowmacron"
WARNING: Unknown X keysym "dead_belowmacron"
WARNING: Unknown X keysym "dead_belowmacron"
successfully built /gnu/store/r3pibry4qsyfs090fcxglvfr52vfq3cx-console-keymap.de.drv
--8<---------------cut here---------------end--------------->8---

IOW, under the hood, the ‘ckbcomp’ program, which converts from XKB to
console layout data, wans us that it doesn’t know anything about
“latin1nodeadkeys” and then goes on to ignore the issue.  I’m not sure
how to avoid that.

As noted in
<https://guix.gnu.org/manual/devel/en/html_node/Keyboard-Layout.html>,
the list of supported keyboard variants is to be found in the
‘xkeyboard-config’ package:

  less $(guix build xkeyboard-config)/share/X11/xkb/rules/base.xml

Though I have to admit that it’s not user-friendly.

Anyway, I’m closing the bug for now, but please to reopen it if you
think further discussion is needed (or email help-guix <at> gnu.org).

Thank you!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 13 Dec 2019 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 107 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.