grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
* Re: Changing default keyboard layout
       [not found] <DUB128-W9390937FD593A87315BBB28F720@phx.gbl>
@ 2015-08-09 13:19 ` Andrei Borzenkov
       [not found]   ` <DUB128-W71F6855D659F76AA094F7E8F7E0@phx.gbl>
  0 siblings, 1 reply; 4+ messages in thread
From: Andrei Borzenkov @ 2015-08-09 13:19 UTC (permalink / raw
  To: Hervé Werner; +Cc: bug-grub@gnu.org, Marco Gamberoni, grub-devel

Please in future send such mails to grub-devel or open bug on savannah.

В Sat, 8 Aug 2015 19:36:58 +0200
Hervé Werner <dud225@hotmail.com> пишет:

> Hello
> 
> I'm trying to change the default US keyboard layout on 
> Grub2 but I don't manage to get it working. Here is basically what I did
>  :
> $ ckbcomp fr bepo |grub-mklayout -v -o /boot/grub/bepo.gkb
> 
> and then I added these lines :
> 
> terminal_input at_keyboard
> insmod keylayouts
> keymap /boot/grub/bepo.gkb
> 
> After running grub-mkconfig, grub.cfg looks fine. Unfortunately at boot the layout is still qwerty.
> 

I can't reproduce it, at least in QEMU (grub build for i386-pc).
Loading custom keyboard does change keyboard layout.

> I'm using Grub version 2.02~beta2-22 as shipped by Debian. 
> 
> There is a bug reported on Debian : https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=741464 but unfortunately it is still pending.

This bug is not clear, but I notice that at least in QEMU interrupt is
not disabled after startup and we never explicitly do it either. So
grub may race with BIOS for input characters. The commands mentioned in
this bug report (outb 0x64 0x60 ; outb 0x60 0x64) effectively disable
keyboard interrupt. 

@Marco: would you be willing to test a patch that does it by default?

> I also stubbled upon similar bugs pertaining to other distros so it looks like a global issue though I did not find anything on Grub BTS.
> 
> 
> I'm looking for help pertaining this issue.
> 

Well, you will need to debug this, as I said, I cannot reproduce it and
bug report you mentioned does not show any debug information either. If
you are willing to compile your grub, we could add debug output to
verify what you actually get from controller.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Changing default keyboard layout
       [not found]   ` <DUB128-W71F6855D659F76AA094F7E8F7E0@phx.gbl>
@ 2015-08-13 17:33     ` Andrei Borzenkov
  2015-08-13 19:05       ` Hervé Werner
  0 siblings, 1 reply; 4+ messages in thread
From: Andrei Borzenkov @ 2015-08-13 17:33 UTC (permalink / raw
  To: Hervé Werner; +Cc: bug-grub@gnu.org, Marco Gamberoni, grub-devel@gnu.org



On 12.08.2015 22:17, Hervé Werner wrote:
> As requested I compiled the latest development version of Grub and installed it on a test laptop. Without any further configuration, Grub works fine, it is able to boot as intended but the keyboard mapping is us.
>
> I then added the following snippet :
> grubdir="`echo "/boot/grub" | sed 's,//*,/,g'`"
>
> grub-kbdcomp -o "${grubdir}"/layout.gkb fr
>
> cat <<EOF
> terminal_input at_keyboard
> insmod keylayouts
> keymap `make_system_path_relative_to_its_root "${grubdir}"/layout.gkb`
> EOF
>
> and ran grub-mkconfig which produced the following output in grub.cfg :
> terminal_input at_keyboard
> insmod keylayouts
> keymap /grub/layout.gkb
>
> I checked that the file /boot/grub/layout.gkb (as you have probably figured out, I have a dedicated partition for Grub's files), it is fine the file has been successfully created. At last I executed grub-install and rebooted. This time I'm no longer able to boot : the screen is freezing at Grub's main menu, the timeout counter isn't even decreasing and I'm not able to enter into Grub's rescue. Removing the insmod line doesn't change anything.
>

To be sure - does it hang without at_keyboard as well? keylayouts is 
loaded automatically as dependency of at_keyboard anyway, and it is 
quite unlikely anything in this module would cause observed effect.

> Could you please tell me what I could do to increase debugging output ?
>

First try to reproduce it without GUI  - it is rather hard to see 
anything in this case. Just boot grub without any grub.cfg - you will be 
left in plain CLI. Now try

insmod at_keyboard
terminal_input at_keyboard

does it still work? If yes, try keymap /grub/layout.gkb; does it still work?

and to be sure - could you send me your gkb file for test?


^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Changing default keyboard layout
  2015-08-13 17:33     ` Andrei Borzenkov
@ 2015-08-13 19:05       ` Hervé Werner
  2015-09-02  0:31         ` Hervé Werner
  0 siblings, 1 reply; 4+ messages in thread
From: Hervé Werner @ 2015-08-13 19:05 UTC (permalink / raw
  To: Andrei Borzenkov; +Cc: bug-grub@gnu.org, Marco Gamberoni, grub-devel@gnu.org


[-- Attachment #1.1: Type: text/plain, Size: 838 bytes --]


> To be sure - does it hang without at_keyboard as well? 

No it doesn't with only the keymap line (but the layout is still us).


> First try to reproduce it without GUI  - it is rather hard to see 
> anything in this case. Just boot grub without any grub.cfg - you will be 
> left in plain CLI. Now try
> 
> insmod at_keyboard
> terminal_input at_keyboard

Hangs right after this last command.

> 
> does it still work? If yes, try keymap /grub/layout.gkb; does it still work?
> 
> and to be sure - could you send me your gkb file for test?

Sure you'll find it enclosed. Please also note that grub-kbdcomp is displaying the following warnings when creating the file :
Unknown keyboard scan code 0x54
Unknown keyboard scan code 0x65
Unknown keyboard scan code 0x7f


Thanks for your help.

dud
 		 	   		  

[-- Attachment #1.2: Type: text/html, Size: 1182 bytes --]

[-- Attachment #2: layout.gkb.xz --]
[-- Type: application/octet-stream, Size: 496 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Changing default keyboard layout
  2015-08-13 19:05       ` Hervé Werner
@ 2015-09-02  0:31         ` Hervé Werner
  0 siblings, 0 replies; 4+ messages in thread
From: Hervé Werner @ 2015-09-02  0:31 UTC (permalink / raw
  To: Andrei Borzenkov; +Cc: bug-grub@gnu.org, Marco Gamberoni, grub-devel@gnu.org

[-- Attachment #1: Type: text/plain, Size: 1874 bytes --]

Hello

After some tests on different boxes I found out that terminal_input at_keyboard does work well on some hardware :
- Dell laptop & tower : OK. Some keys doesn't respond (such as escape), but this may correspond to the "Unknown keyboard scan code" message
- Acer laptop : fails
- HP laptop : fails

So it may confirm a bios issue (please note that firmware is up-to-date on every box).

However I've also lost interest in this feature as my main usage was to be able to enter a LUKS password in my native language and unfortunately I found out despites that keymap works as intended on Dell computers, Grub2 still asks for password in us layout. AFAIU disk decryption is executed even before grub.cfg is read, so this might mean that the layout stuff has to be installed at early disk place.

dud

From: dud225@hotmail.com
To: arvidjaar@gmail.com
CC: bug-grub@gnu.org; grub-devel@gnu.org; gamberoni@libero.it
Subject: RE: Changing default keyboard layout
Date: Thu, 13 Aug 2015 21:05:48 +0200





> To be sure - does it hang without at_keyboard as well? 

No it doesn't with only the keymap line (but the layout is still us).


> First try to reproduce it without GUI  - it is rather hard to see 
> anything in this case. Just boot grub without any grub.cfg - you will be 
> left in plain CLI. Now try
> 
> insmod at_keyboard
> terminal_input at_keyboard

Hangs right after this last command.

> 
> does it still work? If yes, try keymap /grub/layout.gkb; does it still work?
> 
> and to be sure - could you send me your gkb file for test?

Sure you'll find it enclosed. Please also note that grub-kbdcomp is displaying the following warnings when creating the file :
Unknown keyboard scan code 0x54
Unknown keyboard scan code 0x65
Unknown keyboard scan code 0x7f


Thanks for your help.

dud
 		 	   		   		 	   		  

[-- Attachment #2: Type: text/html, Size: 2471 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-09-02  0:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <DUB128-W9390937FD593A87315BBB28F720@phx.gbl>
2015-08-09 13:19 ` Changing default keyboard layout Andrei Borzenkov
     [not found]   ` <DUB128-W71F6855D659F76AA094F7E8F7E0@phx.gbl>
2015-08-13 17:33     ` Andrei Borzenkov
2015-08-13 19:05       ` Hervé Werner
2015-09-02  0:31         ` Hervé Werner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).