← Back to team overview

group.of.nepali.translators team mailing list archive

[Bug 520546] Re: [SRU]Alt+KEY incorrectly behaves like Ctrl+Alt+KEY, and/or unwanted VT switch from Alt+Left/Right

 

** Changed in: kbd (Ubuntu Cosmic)
       Status: Fix Committed => Won't Fix

-- 
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/520546

Title:
  [SRU]Alt+KEY incorrectly behaves like Ctrl+Alt+KEY, and/or unwanted VT
  switch from Alt+Left/Right

Status in console-setup package in Ubuntu:
  Fix Released
Status in kbd package in Ubuntu:
  Fix Released
Status in xorg-server package in Ubuntu:
  Invalid
Status in console-setup source package in Xenial:
  Confirmed
Status in kbd source package in Xenial:
  Won't Fix
Status in xorg-server source package in Xenial:
  Confirmed
Status in console-setup source package in Bionic:
  Fix Released
Status in kbd source package in Bionic:
  Won't Fix
Status in linux source package in Bionic:
  Confirmed
Status in xorg-server source package in Bionic:
  Invalid
Status in console-setup source package in Cosmic:
  Fix Released
Status in kbd source package in Cosmic:
  Won't Fix
Status in linux source package in Cosmic:
  Confirmed
Status in xorg-server source package in Cosmic:
  Invalid
Status in console-setup source package in Disco:
  Fix Released
Status in kbd source package in Disco:
  Won't Fix
Status in linux source package in Disco:
  Confirmed
Status in xorg-server source package in Disco:
  Invalid
Status in console-setup source package in Eoan:
  Fix Released
Status in kbd source package in Eoan:
  Fix Released
Status in linux source package in Eoan:
  Confirmed
Status in xorg-server source package in Eoan:
  Invalid

Bug description:
  (kbd)
  [Impact]

   * kbd_mode -u is documented to break keyboards in modes other than xlate and unicode, while it is still called by some scripts. Those scripts are called transitively by maintainer scripts such as the one already fixed in console-setup. 
   * To avoid accidentally breaking keyboards a -f option is added to force such breaking mode changes. Without -f only the safe mode changes are performed and an error is printed when the requested mode change is not safe. Next upstream version will also exit with error, but the cherry-picked fix makes kbd_mode return success even when the mode switch is not performed to avoid regressions of scripts.

  [Test case]

   * Verify that safe mode switches work and dangerous ones are skipped
  without -f. Please note that the test will temporarily break the
  system's keyboard and it is recommended to run the test in a VM.

  rbalint@MacBookAir-test:~$ sudo kbd_mode -C /dev/tty4; echo $?
  The keyboard is in Unicode (UTF-8) mode
  0
  rbalint@MacBookAir-test:~$ sudo kbd_mode -a -C /dev/tty4; echo $?
  0
  rbalint@MacBookAir-test:~$ sudo kbd_mode -a -C /dev/tty4; echo $?
  0
  rbalint@MacBookAir-test:~$ sudo kbd_mode -C /dev/tty4
  The keyboard is in xlate (8-bit) mode
  rbalint@MacBookAir-test:~$ sudo kbd_mode -u -C /dev/tty4; echo $?
  0
  rbalint@MacBookAir-test:~$ sudo kbd_mode -C /dev/tty4
  The keyboard is in Unicode (UTF-8) mode
  rbalint@MacBookAir-test:~$ sudo kbd_mode -u -C /dev/tty0; echo $?
  The keyboard is in some unknown mode
  Changing to the requested mode may make your keyboard unusable, please use -f to force the change.
  0
  rbalint@MacBookAir-test:~$ sudo kbd_mode -f -u -C /dev/tty0; echo $?
  0
  rbalint@MacBookAir-test:~$ sudo kbd_mode -C /dev/tty0
  The keyboard is in Unicode (UTF-8) mode
  rbalint@MacBookAir-test:~$ sudo kbd_mode -s -C /dev/tty0
  rbalint@MacBookAir-test:~$ sudo kbd_mode -C /dev/tty0
  The keyboard is in raw (scancode) mode
  rbalint@MacBookAir-test:~$ sudo kbd_mode -u -C /dev/tty0; echo $?
  The keyboard is in raw (scancode) mode
  Changing to the requested mode may make your keyboard unusable, please use -f to force the change.
  0

  [Regression Potential]

   * kbd_mode stops performing breaking mode switches and this may make
  scripts ineffective when trying to perform a breaking change. This is
  the intention of the change and the emitter error helps in finding the
  offending script.

  The following packages found to call kbd_mode directly:
  console-setup
  xinit
  console-cyrillic
  initramfs-tools
  dracut
  console-tools
  xview
  ubiquity's embedded console-setup copy
  console-data
  vnc4

  The console related packages are expected to execute only safe mode
  changes because they should operate on consoles only and the rest seem
  to be safe, too.

  (console-setup)
  [Impact]

   * keyboard-configuration's postinst changes keyboard mode breaking X
  keys.

  [Test Case]

   * Ssh to a system or open a terminal and unset DISPLAY

      $ echo $DISPLAY

      $

   * Check kbd mode, should be raw (set by kbd_mode -s) or unknown:
     $ sudo kbd_mode
     The keyboard is in some unknown mode
     $ sudo kbd_mode
     The keyboard is in raw (scancode) mode
     $

     On Xenial X runs on VT7 thus the graphical environment is not affected in the default configuration, but the keyboard-configuration postinst maintaner script still changes mode on vt1-6, thus at the beginning set VT1 to raw mode to observe the change:
     $  sudo kbd_mode -s -C /dev/tty1
     $ sudo kbd_mode -C /dev/tty1
     The keyboard is in raw (scancode) mode

   * Install or reinstall kbd-configuration

     $ sudo apt install --reinstall keyboard-configuration
     ...
     Setting up keyboard-configuration (1.178ubuntu11) ...
     Your console font configuration will be updated the next time your system
     boots. If you want to update it now, run 'setupcon' from a virtual console.
     ...

   * With the fixed package you should see the note above and the kbd
  mode must stay the same (on Xenial check VT1: sudo kbd_mode -C
  /dev/tty1):

     $ sudo kbd_mode
     The keyboard is in raw (scancode) mode
     $

   * The unfixed package sets the kbd mode to unicode:

     $  sudo kbd_mode
     The keyboard is in Unicode (UTF-8) mode
     $

  [Regression Potential]

   * The change may break debian-installer changing the keyboard mode, this should also be tested.
   * In general changing the postinst script may make the package unable to install, but this is tested in generic environment and the change to the postinst script is very small.

  [Original Bug Text]
  WORKAROUND:

  sudo kbd_mode -s

  ORIGINAL DESCRIPTION:

  I'm running Ubuntu Lucid development branch.

  Pressing alt-f2 switches the screen to the second virtual terminal.
  Alt-f3 does the same to the third and so on. I expected alt-f2 to open
  the run dialog.

  I'm pretty sure that my keyboard is not malfunctioning as I can use
  all my applications normally. (Pressing O and Ctrl-O do not have the
  same effect.)

  I'm not sure which package I should file this bug against. I'll
  happily do an apport-collect once I know.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/console-setup/+bug/520546/+subscriptions