all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#35585: GRUB does not work with USB keyboards when using keyboard-layout
@ 2019-05-05 17:35 pelzflorian (Florian Pelz)
  2019-05-07 16:11 ` Ludovic Courtès
  0 siblings, 1 reply; 12+ messages in thread
From: pelzflorian (Florian Pelz) @ 2019-05-05 17:35 UTC (permalink / raw)
  To: 35585

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

In the bootloader menu, input from a USB external keyboard or a
Macbook’s built-in USB keyboard is ignored by GRUB.  This makes it
impossible to choose which generation to boot.  The passphrase of an
encrypted boot partition can be entered though (with US English
keyboard layout instead of the chosen layout).

The attached patch makes the USB keyboard work in the bootloader menu,
but it uses US English layout instead of the chosen layout too.  Also
the patch is just imitating what is already in gnu/bootloader/grub.scm
but I do not actually know what I’m doing.

Regards,
Florian

[-- Attachment #2: 0001-bootloader-grub-Support-USB-keyboards-when-using-a-k.patch --]
[-- Type: text/plain, Size: 1027 bytes --]

From c0c8167cf4f7ddd68567618effc665dd950c2f93 Mon Sep 17 00:00:00 2001
From: Florian Pelz <pelzflorian@pelzflorian.de>
Date: Sun, 5 May 2019 17:38:47 +0200
Subject: [PATCH] bootloader: grub: Support USB keyboards when using a
 keyboard-layout.

With this USB keyboards are recognized again, the layout does not currently
get used by GRUB though.

* gnu/booloader/grub.scm (keyboard-layout-config): Add usb_keyboard terminal
to terminal_input command.
---
 gnu/bootloader/grub.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm
index e97a17b3e2..a99e5286ca 100644
--- a/gnu/bootloader/grub.scm
+++ b/gnu/bootloader/grub.scm
@@ -360,7 +360,7 @@ entries corresponding to old generations of the system."
                              (keyboard-layout-file layout #:grub grub))))
           (when keymap
             (format port "\
-terminal_input at_keyboard
+terminal_input at_keyboard usb_keyboard
 insmod keylayouts
 keymap ~a~%" keymap)))))
 
-- 
2.21.0


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

* bug#35585: GRUB does not work with USB keyboards when using keyboard-layout
  2019-05-05 17:35 bug#35585: GRUB does not work with USB keyboards when using keyboard-layout pelzflorian (Florian Pelz)
@ 2019-05-07 16:11 ` Ludovic Courtès
  2019-05-07 16:39   ` Danny Milosavljevic
  2019-05-07 17:25   ` pelzflorian (Florian Pelz)
  0 siblings, 2 replies; 12+ messages in thread
From: Ludovic Courtès @ 2019-05-07 16:11 UTC (permalink / raw)
  To: pelzflorian (Florian Pelz); +Cc: 35585

Hi,

"pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de> skribis:

> From c0c8167cf4f7ddd68567618effc665dd950c2f93 Mon Sep 17 00:00:00 2001
> From: Florian Pelz <pelzflorian@pelzflorian.de>
> Date: Sun, 5 May 2019 17:38:47 +0200
> Subject: [PATCH] bootloader: grub: Support USB keyboards when using a
>  keyboard-layout.
>
> With this USB keyboards are recognized again, the layout does not currently
> get used by GRUB though.
>
> * gnu/booloader/grub.scm (keyboard-layout-config): Add usb_keyboard terminal
> to terminal_input command.

Oh, interesting.  I guess on “PCs” the BIOS/UEFI emulates AT keyboard
even when the keyboard is really an external USB keyboard, which is why
we don’t see that problem.

> --- a/gnu/bootloader/grub.scm
> +++ b/gnu/bootloader/grub.scm
> @@ -360,7 +360,7 @@ entries corresponding to old generations of the system."
>                               (keyboard-layout-file layout #:grub grub))))
>            (when keymap
>              (format port "\
> -terminal_input at_keyboard
> +terminal_input at_keyboard usb_keyboard

What do others think?  Danny?

I’d like to make sure this is as harmless as it looks.

Ludo’.

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

* bug#35585: GRUB does not work with USB keyboards when using keyboard-layout
  2019-05-07 16:11 ` Ludovic Courtès
@ 2019-05-07 16:39   ` Danny Milosavljevic
  2019-05-07 22:09     ` pelzflorian (Florian Pelz)
  2019-05-08 10:03     ` Ludovic Courtès
  2019-05-07 17:25   ` pelzflorian (Florian Pelz)
  1 sibling, 2 replies; 12+ messages in thread
From: Danny Milosavljevic @ 2019-05-07 16:39 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 35585

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

Hi Ludo,

On Tue, 07 May 2019 18:11:55 +0200
Ludovic Courtès <ludo@gnu.org> wrote:

> > --- a/gnu/bootloader/grub.scm
> > +++ b/gnu/bootloader/grub.scm
> > @@ -360,7 +360,7 @@ entries corresponding to old generations of the system."
> >                               (keyboard-layout-file layout #:grub grub))))
> >            (when keymap
> >              (format port "\
> > -terminal_input at_keyboard
> > +terminal_input at_keyboard usb_keyboard  
> 
> What do others think?  Danny?
> 
> I’d like to make sure this is as harmless as it looks.

AT keyboard should also match USB bootp keyboards, but I guess the mac doesn't
support bootp.  (USB keyboards have a "bootloader" protocol (BOOTP) and
a "normal" protocol with the rationale being that the "normal" protocol is
too compliated to fit into the bootloader - hence, USB keyboard should support
both--and, when talked to using the bootloader protocol, the PC firmware should
transform it into AT keyboard commands in order to further simplify the
bootloader's job)

Why is it specified at all?  If it's not specified, it will default to
the "platform native" inputs which means the ones available in the source code
for that platform.  So aren't we complicating our life for no reason by
specifying it in the first place?

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* bug#35585: GRUB does not work with USB keyboards when using keyboard-layout
  2019-05-07 16:11 ` Ludovic Courtès
  2019-05-07 16:39   ` Danny Milosavljevic
@ 2019-05-07 17:25   ` pelzflorian (Florian Pelz)
  2019-05-07 17:48     ` pelzflorian (Florian Pelz)
  1 sibling, 1 reply; 12+ messages in thread
From: pelzflorian (Florian Pelz) @ 2019-05-07 17:25 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 35585

On Tue, May 07, 2019 at 06:11:55PM +0200, Ludovic Courtès wrote:
> Oh, interesting.  I guess on “PCs” the BIOS/UEFI emulates AT keyboard
> even when the keyboard is really an external USB keyboard, which is why
> we don’t see that problem.
> 

Not for my external USB keyboard on my PC (using an Asus P8H67
motherboard).

Regards,
Florian

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

* bug#35585: GRUB does not work with USB keyboards when using keyboard-layout
  2019-05-07 17:25   ` pelzflorian (Florian Pelz)
@ 2019-05-07 17:48     ` pelzflorian (Florian Pelz)
  0 siblings, 0 replies; 12+ messages in thread
From: pelzflorian (Florian Pelz) @ 2019-05-07 17:48 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 35585

On Tue, May 07, 2019 at 07:25:39PM +0200, pelzflorian (Florian Pelz) wrote:
> On Tue, May 07, 2019 at 06:11:55PM +0200, Ludovic Courtès wrote:
> > Oh, interesting.  I guess on “PCs” the BIOS/UEFI emulates AT keyboard
> > even when the keyboard is really an external USB keyboard, which is why
> > we don’t see that problem.
> > 
> 
> Not for my external USB keyboard on my PC (using an Asus P8H67
> motherboard).
> 

Sorry, I was wrong.  It works on my PC on Guix System installer 1.0.
When it did not work before, I must have done something wrong; my USB
hub is a little flaky.

Sorry.

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

* bug#35585: GRUB does not work with USB keyboards when using keyboard-layout
  2019-05-07 16:39   ` Danny Milosavljevic
@ 2019-05-07 22:09     ` pelzflorian (Florian Pelz)
  2019-05-08 10:03     ` Ludovic Courtès
  1 sibling, 0 replies; 12+ messages in thread
From: pelzflorian (Florian Pelz) @ 2019-05-07 22:09 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: 35585

On Tue, May 07, 2019 at 06:39:14PM +0200, Danny Milosavljevic wrote:
> Why is it specified at all?  If it's not specified, it will default to
> the "platform native" inputs which means the ones available in the source code
> for that platform.  So aren't we complicating our life for no reason by
> specifying it in the first place?

On my Macbook, omitting the terminal_input line works fine; I can use
the keyboard.  The layout for passphrase and boot menu remains US
English though, as it always was for the passphrase and as it was with
terminal_input usb_keyboard.  But this is much better than no
keyboard in the boot menu at all (and I prefer US English anyway).

Thank you for sharing your expertise Danny!

Regards,
Florian

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

* bug#35585: GRUB does not work with USB keyboards when using keyboard-layout
  2019-05-07 16:39   ` Danny Milosavljevic
  2019-05-07 22:09     ` pelzflorian (Florian Pelz)
@ 2019-05-08 10:03     ` Ludovic Courtès
  2019-05-08 12:23       ` pelzflorian (Florian Pelz)
  1 sibling, 1 reply; 12+ messages in thread
From: Ludovic Courtès @ 2019-05-08 10:03 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: 35585

Hi Danny,

Danny Milosavljevic <dannym@scratchpost.org> skribis:

> Why is it specified at all?  If it's not specified, it will default to
> the "platform native" inputs which means the ones available in the source code
> for that platform.  So aren't we complicating our life for no reason by
> specifying it in the first place?

I don’t know.  I added it in 8d058e7b1b1a409d3d9cc29c5650a98db4e78783,
which was inspired by a patch posted by nee, but in hindsight I think
this has nothing to do here.  So I’m happy to remove that
“terminal_input” line.

Florian, can you check whether removing the line fixes the issue for
you?

We should make sure it also works for the rest of us.

Thanks for your feedback, Danny!

Ludo’.

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

* bug#35585: GRUB does not work with USB keyboards when using keyboard-layout
  2019-05-08 10:03     ` Ludovic Courtès
@ 2019-05-08 12:23       ` pelzflorian (Florian Pelz)
  2019-05-09 10:14         ` Ludovic Courtès
  0 siblings, 1 reply; 12+ messages in thread
From: pelzflorian (Florian Pelz) @ 2019-05-08 12:23 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 35585

On Wed, May 08, 2019 at 12:03:21PM +0200, Ludovic Courtès wrote:
> Florian, can you check whether removing the line fixes the issue for
> you?
> 

Yes, it fixes having no keyboard input at all on my Macbook (the
layout is not applied though).

On Wed, May 08, 2019 at 12:09:45AM +0200, pelzflorian (Florian Pelz) wrote:
> On Tue, May 07, 2019 at 06:39:14PM +0200, Danny Milosavljevic wrote:
> > Why is it specified at all?  If it's not specified, it will default to
> > the "platform native" inputs which means the ones available in the source code
> > for that platform.  So aren't we complicating our life for no reason by
> > specifying it in the first place?
> 
> On my Macbook, omitting the terminal_input line works fine; I can use
> the keyboard.  The layout for passphrase and boot menu remains US
> English though, as it always was for the passphrase and as it was with
> terminal_input usb_keyboard.  But this is much better than no
> keyboard in the boot menu at all (and I prefer US English anyway).
> 
> Thank you for sharing your expertise Danny!
> 
> Regards,
> Florian
> 
> 
> 

Regards,
Florian

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

* bug#35585: GRUB does not work with USB keyboards when using keyboard-layout
  2019-05-08 12:23       ` pelzflorian (Florian Pelz)
@ 2019-05-09 10:14         ` Ludovic Courtès
  2019-05-09 12:52           ` Danny Milosavljevic
  2019-05-13 13:59           ` Giovanni Biscuolo
  0 siblings, 2 replies; 12+ messages in thread
From: Ludovic Courtès @ 2019-05-09 10:14 UTC (permalink / raw)
  To: pelzflorian (Florian Pelz); +Cc: 35585-done

"pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de> skribis:

> On Wed, May 08, 2019 at 12:03:21PM +0200, Ludovic Courtès wrote:
>> Florian, can you check whether removing the line fixes the issue for
>> you?
>> 
>
> Yes, it fixes having no keyboard input at all on my Macbook (the
> layout is not applied though).

I’ve removed the ‘terminal_input at_keyboard’ line in
cae0725b809449dcdebc2d84cf997e051e689e06.

Ludo’.

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

* bug#35585: GRUB does not work with USB keyboards when using keyboard-layout
  2019-05-09 10:14         ` Ludovic Courtès
@ 2019-05-09 12:52           ` Danny Milosavljevic
  2019-05-13 13:59           ` Giovanni Biscuolo
  1 sibling, 0 replies; 12+ messages in thread
From: Danny Milosavljevic @ 2019-05-09 12:52 UTC (permalink / raw)
  To: pelzflorian (Florian Pelz); +Cc: 35585-done

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

Hi Florian,

> "pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de> skribis:
> Yes, it fixes having no keyboard input at all on my Macbook (the
> layout is not applied though).  

As for the layout not being applied, can you please report a bug with grub
upstream?  I've checked grub-core/term/usb_keyboard.c and they usually do
call grub_term_map_key in parse_keycode--so it should work.  Hmm...

(Your Grub config is in /boot/grub/grub.cfg--maybe they want it)

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* bug#35585: GRUB does not work with USB keyboards when using keyboard-layout
  2019-05-09 10:14         ` Ludovic Courtès
  2019-05-09 12:52           ` Danny Milosavljevic
@ 2019-05-13 13:59           ` Giovanni Biscuolo
  2019-05-13 20:34             ` Ludovic Courtès
  1 sibling, 1 reply; 12+ messages in thread
From: Giovanni Biscuolo @ 2019-05-13 13:59 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 35585-done

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

Ludovic Courtès <ludo@gnu.org> writes:

[...]

> I’ve removed the ‘terminal_input at_keyboard’ line in
> cae0725b809449dcdebc2d84cf997e051e689e06.

the commit message states

 bootloader: grub: Remove unneeded 'terminal_output'

but I guess should be 'terminal_input' :-)

Gio'

[...]

-- 
Giovanni Biscuolo

Xelera IT Infrastructures

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

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

* bug#35585: GRUB does not work with USB keyboards when using keyboard-layout
  2019-05-13 13:59           ` Giovanni Biscuolo
@ 2019-05-13 20:34             ` Ludovic Courtès
  0 siblings, 0 replies; 12+ messages in thread
From: Ludovic Courtès @ 2019-05-13 20:34 UTC (permalink / raw)
  To: Giovanni Biscuolo; +Cc: 35585-done

Giovanni Biscuolo <g@xelera.eu> skribis:

> Ludovic Courtès <ludo@gnu.org> writes:
>
> [...]
>
>> I’ve removed the ‘terminal_input at_keyboard’ line in
>> cae0725b809449dcdebc2d84cf997e051e689e06.
>
> the commit message states
>
>  bootloader: grub: Remove unneeded 'terminal_output'
>
> but I guess should be 'terminal_input' :-)

Oops, indeed, sorry for the confusion!

Ludo’.

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

end of thread, other threads:[~2019-05-13 20:35 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-05 17:35 bug#35585: GRUB does not work with USB keyboards when using keyboard-layout pelzflorian (Florian Pelz)
2019-05-07 16:11 ` Ludovic Courtès
2019-05-07 16:39   ` Danny Milosavljevic
2019-05-07 22:09     ` pelzflorian (Florian Pelz)
2019-05-08 10:03     ` Ludovic Courtès
2019-05-08 12:23       ` pelzflorian (Florian Pelz)
2019-05-09 10:14         ` Ludovic Courtès
2019-05-09 12:52           ` Danny Milosavljevic
2019-05-13 13:59           ` Giovanni Biscuolo
2019-05-13 20:34             ` Ludovic Courtès
2019-05-07 17:25   ` pelzflorian (Florian Pelz)
2019-05-07 17:48     ` pelzflorian (Florian Pelz)

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.