bugGNU GRUB - Bugs: bug #60727, Input lost after switching...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #60727: Input lost after switching terminal_input to at_keyboard (can't switch to dvorak layout)

Submitter:  Andrew <bircoph>
Submitted:  Fri 04 Jun 2021 11:03:19 AM UTC
Votes: 100
 
Category:  Terminal Severity:  Major
Priority:  5 - Normal Item Group:  None
Status:  None Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Open Release:  other
Release:  Reproducibility:  Every Time
Planned Release:  None

Fri 04 Jun 2021 11:03:19 AM UTC, original submission:  

Hi!

I use grub-2.06_rc1 on Gentoo ~x86. My hardware is AT keyboard (AT Translated Set 2 keyboard built-in in my laptop). This is important, because there are very similar bugs that were closed because reporters used usb keyboard:
bug #51129
bug #50232

I want to use dvorak layout. In order to do this I use the following in my grub config:

insmod keylayouts
keymap /boot/grub/dvorak.gkb
terminal_input at_keyboard

It should work, but it doesn't. (dvorak.gkb is generated using grub-mklayout)

I tried outb magic from Debian bug 741464:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=741464
mentioned in bug #50232:

terminal_input at_keyboard ; outb 0x64 0x60 ; outb 0x60 0x40 0x40

and this one:

terminal_input at_keyboard ; outb 0x64 0x60 ; outb 0x60 0x64

Both don't help, neither in config nor in interactive run-time grub shell.

With grub-2 I always had problem with switching to dvorak layout, but with 2.04-r1 the following hack worked:

insmod terminal
insmod at_keyboard
terminal_input console
terminal_output console
insmod keylayouts
keymap /boot/grub/dvorak.gkb

# the last line in config after all menu entries
terminal_input --append at_keyboard

It is importand that at_keyboard was added after all menu entries. Have no idea why.

This workaround no longer works in 2.06_rc1, but it gave me an insight what to try.

If I switch to the grub run-time built-in shell and try to append at_keyboard first and remove console later, it works. So, if I have the following in the config (or enter interactively):

insmod keylayouts
keymap /boot/grub/dvorak.gkb

and then enter interactively in the grub run-time shell:

terminal_input --append at_keyboard
terminal_input --remove console

Then I can finally use the dvorak layout.

It looks like a bug to me that

terminal_input at_keyboard

doesn't work (it leads to lost input at all), but:

terminal_input --append at_keyboard
terminal_input --remove console

works. They should do the same, but they are not.

Without '--remove console' it appears that both drivers are active and both try to process input, which leads to broken input. E.g. if I press and hold 's' qwerty key which means 'o' in dvorak layout, I have an input line like this one:

oooooosoooossoooooooosooooooooooooooossoooooooosoooooosooooooooooooooooossoooooooooosoooosoooo

This makes input unusable, especially for passwords where no visible input correction is possible.

Furthermore the workaround above does not work if put in the grub config file. I have no idea why. I tried to add a sleep between these 2 commands in the config file, because there is 1-2 seconds delay at runtime when I run 'terminal_input --append at_keyboard':

terminal_input --append at_keyboard
sleep --verbose 5
terminal_input --remove console

but this doesn't help. However, I see that the sleep happens before menu is shown even if I put the snippet shown above in the end of the config file.

Please fix switching to at_keyboard so that dvorak users may enjoy their favorite layout.

Andrew <bircoph>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bircoph (Voted in favor of this item)
  • -email is unavailable- added by bircoph (Submitted the item)
  •  

    There are 100 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-06-04 bircoph Carbon-Copy- Added bircoph

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code