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

Bug #520546 reported by David D Lowe
532
This bug affects 216 people
Affects Status Importance Assigned to Milestone
console-setup (Ubuntu)
Fix Released
High
Balint Reczey
Xenial
Confirmed
Low
Unassigned
Bionic
Fix Released
High
Unassigned
Cosmic
Fix Released
Undecided
Unassigned
Disco
Fix Released
High
Balint Reczey
Eoan
Fix Released
Undecided
Unassigned
kbd (Ubuntu)
Fix Released
Undecided
Unassigned
Xenial
Won't Fix
Undecided
Unassigned
Bionic
Won't Fix
Undecided
Unassigned
Cosmic
Won't Fix
Undecided
Unassigned
Disco
Won't Fix
Undecided
Unassigned
Eoan
Fix Released
Undecided
Unassigned

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.

Revision history for this message
dmatt (martind) wrote :

I had the same problem. ALT-F2 switched to terminal 2, ALT-F1 (not F7) switched back to GNOME GUI, CTRL-ALT-Fx did not work at all. At the same time all texts written in GUI application were copied into tty1 as well (these texts are visible during shutdown. This includes also cursor movements. tty1 showed repeating failing login prompts fed by characters entered in GUI.
After pressing CTRL-C in GUI, GDM is restarted and everything is functioning normally.
To me it looks like GDM is running in tty1 and keyboard mapping is confused.

Last restarts (after al upgrades) I could not reproduce problem with ALT-Fx keys to switch to different terminal, but CTRL-ALT-F7 does not switch to GUI and CTRL-ALT-F1 switches to GUI - so it still some discrepancy where the GUI is actually running.

I am using
Linux ***** 2.6.32-13-generic #18-Ubuntu SMP Wed Feb 10 21:32:38 UTC 2010 x86_64 GNU/Linux
with ATI
01:00.0 VGA compatible controller: ATI Technologies Inc Mobility Radeon HD 3400 Series
using only opensource drivers.

David D Lowe (flimm)
Changed in ubuntu:
status: New → Confirmed
Revision history for this message
David D Lowe (flimm) wrote :

I don't know which update fixed it, but I don't experience this bug any more. Do you, martind?

Revision history for this message
dmatt (martind) wrote :

ALT-F2 now works correctly for me. However, GUI still runs in tty1 and not in usual tty7.

Revision history for this message
Philip Muškovac (yofel) wrote :

This bug report is being closed due to your last comment regarding this being fixed with an update. For future reference you can manage the status of your own bugs by clicking on the current status in the yellow line and then choosing a new status in the revealed drop down box. You can learn more about bug statuses at https://wiki.ubuntu.com/Bugs/Status. Thank you again for taking the time to report this bug and helping to make Ubuntu better. Please submit any future bugs you may find.

Changed in ubuntu:
status: Confirmed → Invalid
Revision history for this message
Oleg Melnik (boten-blindage) wrote :

No, this bug is not fixed yet. When I try to press Alt+F2 or Alt+F4, it switches me accordingly to tty2 or tty4. No updates helped me.

Revision history for this message
Yavor Vutov (yavor-vutov) wrote :

It's not fixed. The bug does not appear after a logout & login, but it does every time after a reboot.

Changed in ubuntu:
status: Invalid → Confirmed
assignee: nobody → Andrei C. (gnomemory)
assignee: Andrei C. (gnomemory) → nobody
Revision history for this message
Alex Kurilo (kamazee) wrote :

Still present in release.
After restarting xserver described bug disappears. (gdm restart, logout/login etc).
Also, server flags like DontVTSwitch don't make any changes (again) until xserver is restarted.
Is there a way to fix it? It is really pissing out :(

Revision history for this message
Oleg Shevchenko (ol-shevchenko) wrote :

Can confirm the bug.
It happens on my laptop too (Kubuntu 10.04, Acer Extenza 5620z intel X3100). The bug disappears when I disable KMS support ('nomodeset' kernel's option).
Also I found advice how to resolve the problem on the one forum.
You need to add GrabDevice option to the evdev keyboard, i.e. add to the xorg.conf something like this:
Section "InputClass"
    Identifier "evdev keyboard grabdevice"
    MatchIsKeyboard "on"
    Driver "evdev"
    Option "GrabDevice" "True"
EndSection
It resolves the problem, but sometimes mouse is frozen after switching to vt7.

Revision history for this message
=0yP)F]|L(0YNrv (ccgjsz8xdbdyyvy-deactivatedaccount) wrote :

Confirmed. Started happening after I created a new user, switched to virtual terminal 1, sudo startx -- :1, then logged out of virtual terminal 8 when I realized I accidentally used the root user. Happened right after, and I can't use the run dialog now which also uses alt+f2.

Revision history for this message
Oleg Yaroshevych (brainunit) wrote :

Same problem on Ubuntu Desktop 10.04 x64. After reboot, Alt+F1, Alt+F2, ... switches to console. After logout/login works fine (opens main menu, run dialog, etc.).

Hardware: Asus UL30A with Intel GMA 4500MHD.

Revision history for this message
Eugene (eugene-tarasov) wrote :

Windows xp'64 was once forced me to switch to slackware, now, this bug makes me think about windows7. sadly ...

Revision history for this message
Dennis Prochko (wolfsoft) wrote :

Still reproduced, so annoying... When pressing Alt+Fn, the action taken place (Alt+F4 closes window, Alt-F2 opens "Run" dialog), but the switching to the tty is appeared immidiately. Alt+F7 switches back to the GUI.

uname -a
Linux desktop 2.6.32-24-generic #38-Ubuntu SMP Mon Jul 5 09:20:59 UTC 2010 x86_64 GNU/Linux

Revision history for this message
Oleg Melnik (boten-blindage) wrote :

Seems that I found the root of that problem. It is in console-cyrillic package. When I removed it, the bug has disappeared.

Revision history for this message
Ivnitskii Andrei (ivnitsky-a) wrote :

Oleg Melnik, Thanks! I remove console-cyrillic, reboot and the bug has disappeared.

Revision history for this message
Eugene (eugene-tarasov) wrote :

Oleg, Thanks a lot!

Revision history for this message
Philip Muškovac (yofel) wrote :

Thanks Oleg, I'm marking this bug as affecting console-cyrillic

affects: ubuntu → console-cyrillic (Ubuntu)
tags: added: lucid
Revision history for this message
aoandr (t-launchpad-nbs-eng-ru) wrote :

The bug is still here, in 10.10. Very annoying!
Submitted the same bug as Bug #730307

Disabling console-cyrillic at boot time solves the problem, but leaves console without Russian characters.
I manually edited /etc/console-cyrillic, changing YES to NO in the following line:

# Bootsetup: NO

Now ALT+Fn works as expected, but I have to enable Russian letters on console by manually running 'cyr'.

Related bug: bug 463762 (probably exactly the same bug)
Related bug: bug 730307

Revision history for this message
aoandr (t-launchpad-nbs-eng-ru) wrote :

Console-cyrillic just calls "kbd_mode -u". This command alone produces the bug.

The bug is easy to reproduce: do not install console-cyrillic, but simply add the kbd_mode -u command to /etc/rc.local.
On the GDM login screen press Alt+F2, and you will switch to text console!

So, the but is related to kdb, not to console-cyrillic.

Revision history for this message
aoandr (t-launchpad-nbs-eng-ru) wrote :

Even easier way to reproduce the bug.
Run the following command from X terminal emulator (Gnome terminal, xterm):

kbd_mode -u

and see the effect instantly.

Revision history for this message
aoandr (t-launchpad-nbs-eng-ru) wrote :

OK. I think I figured this one out.
If one installs console-cyrillic package and selects Unicode (utf-8) input and enables it at boot time, then the script "cyr" executes 'kbd_mode -u' at startup, whith /dev/console as the standard input. Running 'kdb_mode -u /dev/console' at any time triggers this bug.

This is probably a problem in kbd_mode program of package kbd, which should not break the keyboard in X session.

But in any case, the cyr script should apply mode change to all configured consoles, not to the one which happens to be its stdin.

So, here is the patch for /usr/bin/cyr.
The script is tested on Ubunut 10.10, with console-cyrillic 0.9-16 and kbd 1.15-1ubuntu3.

tags: added: patch
Revision history for this message
Marius B. Kotsbak (mariusko) wrote :

Might this be marked as duplicate of bug #730307?

Revision history for this message
Denis Konstantinov (linvinus) wrote :

aoandr, patch helps me.

Revision history for this message
Kuskis Artuom (yami-gds) wrote :

Patch works fine!
aoandr, thanks.

It will be nice, if pkg "console-cyrillic" will be fixed.

uname -a
Linux Azusa 2.6.38-11-generic #48-Ubuntu SMP Fri Jul 29 19:05:14 UTC 2011 i686 athlon i386 GNU/Linux

Revision history for this message
Kuskis Artuom (yami-gds) wrote :

fail... RUS don't work in console now...

Revision history for this message
Kuskis Artuom (yami-gds) wrote :

Sorry, aoandr, all works fine.

My fail... now i need to make "cyr" in tty wich i'd like to use and no problems with Alt+Fx or Alt+left / Alt+right
Thanks again and sorry for 3 messages (spam) =)

Revision history for this message
Marius B. Kotsbak (mariusko) wrote :

Has anyone seen this in any newer Ubuntu versions?

Revision history for this message
dmatt (martind) wrote :

I haven't seen this bug appearing in last three-four vesrions. Using kubuntu, though.

Revision history for this message
Kuskis Artuom (yami-gds) wrote :

Yes, now it works fine.

Changed in console-cyrillic (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for console-cyrillic (Ubuntu) because there has been no activity for 60 days.]

Changed in console-cyrillic (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Marius B. Kotsbak (mariusko) wrote :

I still see it.

tags: added: precise quantal
Changed in console-cyrillic (Ubuntu):
status: Expired → Confirmed
Revision history for this message
Anders Kaseorg (andersk) wrote :

When console-setup is configured, it runs ‘setupcon --force’, which breaks the running X server in exactly this way.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in console-setup (Ubuntu):
status: New → Confirmed
Revision history for this message
Anders Kaseorg (andersk) wrote :

This might have something to with the default setting ACTIVE_CONSOLES="/dev/tty[1-6]" in /etc/default/console-setup conflicting with the recent move of X from console 7 to console 2.

Revision history for this message
aoandr (t-launchpad-nbs-eng-ru) wrote :

Anders Kaseorg: What version of Ubuntu are you talking about?

Revision history for this message
Anders Kaseorg (andersk) wrote :

I’m running Ubuntu Gnome 16.04.

Revision history for this message
Carl Mueller (cmuell89) wrote :

Alt + f4 usually closes windows for me. But from time to time, it switches to tty 4. I am certain I am not accidentally hitting ctrl :)

Dell Precision 5520
Ubuntu 16.04

Revision history for this message
Andreas Enk (enki...) wrote :

@Carl Mueller
I ran into the same problem yesterday with my fresh Ubuntu Gnome 16.10
on my HP EliteBook 840 G4.
Alt + F1-F6 switched virtual terminals and Ctrl + Alt + F1-F6 did nothing.
And strangely Gnome was running on tty1. A

   #sudo dpkg-reconfigure console-setup

helped me out. I set "UTF-8" and "Latin2".
Now everything is working fine.
Just Gnome is still running on tty1.

Revision history for this message
Carl Mueller (cmuell89) wrote :

@Andres It is not permanently like this. Most often Alt + f4 does not change to the tty. Only occasionally does it do it.

Revision history for this message
Anders Kaseorg (andersk) wrote :

Carl: I’m not sure whether that “@Andres” was directed at Andreas or me (I’m Anders), but I still believe the situation is explained by my comments #31 and #33; it is not a mystery why this is seen only occasionally. The bug is triggered every time the console-setup package is installed or upgraded: specifically, when dpkg runs console-setup.postinst which runs ‘setupcon --force’. You can reproduce either by running ‘sudo apt install --reinstall console-setup’ or by running ‘sudo setupcon --force’ directly. The problem is cleared by rebooting or by logging out and in again.

tags: added: zesty
Revision history for this message
forteller (forteller) wrote :

I seem to have almost exactly the same bug, and it's been bothering me off and on for many months now. The step to reproduce in the latest comment here from @anders works for me. (I only checked 'sudo setupcon --force')

The only differences that I have is that

1) Alt + F2 doesn't send me to a terminal, but to the GUI (and if I'm already in the GUI then it opens the run dialog as you'd expect) and

2) Ctrl + Alt + F-buttons still work during this bug for me.

This is the kind of bug that makes me think twice before recommending Linux to non-technical people (which to me is the most important people to recruit), so I'm really hoping it will get fixed soon. Thank you all very much for your work!

Let me know if I can be of any help with any logs or the like.

dino99 (9d9)
Changed in console-setup (Ubuntu):
status: Confirmed → Invalid
Changed in console-cyrillic (Ubuntu):
status: Confirmed → Invalid
Anders Kaseorg (andersk)
Changed in console-setup (Ubuntu):
status: Invalid → Confirmed
Tais P. Hansen (taisph)
tags: added: xenial
tags: added: bionic
summary: - Alt-f2 switches to virtual terminal 2
+ Alt+KEY incorrectly behaves like Ctrl+Alt+KEY
tags: added: cosmic
removed: lucid precise quantal zesty
Changed in console-setup (Ubuntu):
importance: Undecided → High
no longer affects: console-cyrillic (Ubuntu)
tags: added: id-5c51b3a3cb40343530f1abbd
description: updated
Changed in linux (Ubuntu):
status: New → Confirmed
importance: Undecided → High
summary: - Alt+KEY incorrectly behaves like Ctrl+Alt+KEY
+ Alt+KEY incorrectly behaves like Ctrl+Alt+KEY, and/or unwanted VT switch
+ from Alt+Left/Right
Changed in xorg-server (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Changed in console-setup (Ubuntu):
assignee: nobody → Balint Reczey (rbalint)
status: Confirmed → In Progress
Changed in console-setup (Ubuntu Bionic):
importance: Undecided → High
status: New → Confirmed
Changed in linux (Ubuntu Bionic):
importance: Undecided → High
status: New → Confirmed
Changed in xorg-server (Ubuntu Bionic):
importance: Undecided → High
status: New → Confirmed
Changed in console-setup (Ubuntu Cosmic):
status: New → Confirmed
Changed in console-setup (Ubuntu Eoan):
status: New → Confirmed
Changed in linux (Ubuntu Cosmic):
status: New → Confirmed
Changed in linux (Ubuntu Eoan):
status: New → Confirmed
Changed in xorg-server (Ubuntu Cosmic):
status: New → Confirmed
Changed in xorg-server (Ubuntu Eoan):
status: New → Confirmed
Changed in kbd (Ubuntu Bionic):
status: New → Confirmed
Changed in kbd (Ubuntu Cosmic):
status: New → Confirmed
Changed in kbd (Ubuntu Disco):
status: New → Confirmed
Changed in kbd (Ubuntu):
status: New → Confirmed
Balint Reczey (rbalint)
description: updated
Changed in console-setup (Ubuntu Eoan):
status: Confirmed → Fix Released
Robie Basak (racb)
description: updated
Changed in console-setup (Ubuntu Disco):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-disco
Changed in console-setup (Ubuntu Cosmic):
status: Confirmed → Fix Committed
tags: added: verification-needed-cosmic
Changed in console-setup (Ubuntu Bionic):
status: Confirmed → Fix Committed
tags: added: verification-needed-bionic
Balint Reczey (rbalint)
no longer affects: linux (Ubuntu)
Changed in xorg-server (Ubuntu Bionic):
status: Confirmed → Invalid
Changed in xorg-server (Ubuntu Cosmic):
status: Confirmed → Invalid
Changed in xorg-server (Ubuntu Disco):
status: Confirmed → Invalid
Changed in xorg-server (Ubuntu Eoan):
status: Confirmed → Invalid
Balint Reczey (rbalint)
description: updated
Balint Reczey (rbalint)
Changed in kbd (Ubuntu Eoan):
status: Confirmed → In Progress
Balint Reczey (rbalint)
Changed in console-setup (Ubuntu Xenial):
importance: Undecided → Low
status: New → Confirmed
Changed in kbd (Ubuntu Xenial):
status: New → Confirmed
Changed in xorg-server (Ubuntu Xenial):
status: New → Confirmed
Balint Reczey (rbalint)
tags: added: verification-done-disco
removed: verification-needed-disco
Balint Reczey (rbalint)
tags: added: verification-done-cosmic
removed: verification-needed-cosmic
Balint Reczey (rbalint)
tags: added: verification-done-bionic
removed: verification-needed-bionic
tags: added: verification-done
removed: verification-needed
73 comments hidden view all 153 comments
Revision history for this message
Launchpad Janitor (janitor) wrote : Re: Alt+KEY incorrectly behaves like Ctrl+Alt+KEY, and/or unwanted VT switch from Alt+Left/Right

This bug was fixed in the package console-setup - 1.178ubuntu9.2

---------------
console-setup (1.178ubuntu9.2) cosmic; urgency=medium

  * Call setupcon --force only when debian-installer is active
    and always redirect output to /dev/null to not block. (LP: #520546)

 -- Balint Reczey <email address hidden> Tue, 23 Apr 2019 13:55:23 +0200

Changed in console-setup (Ubuntu Cosmic):
status: Fix Committed → Fix Released
Revision history for this message
Steve Langasek (vorlon) wrote : Update Released

The verification of the Stable Release Update for console-setup has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote : Re: Alt+KEY incorrectly behaves like Ctrl+Alt+KEY, and/or unwanted VT switch from Alt+Left/Right

This bug was fixed in the package console-setup - 1.178ubuntu12.1

---------------
console-setup (1.178ubuntu12.1) disco; urgency=medium

  * Call setupcon --force only when debian-installer is active
    and always redirect output to /dev/null to not block. (LP: #520546)

 -- Balint Reczey <email address hidden> Tue, 23 Apr 2019 13:45:00 +0200

Changed in console-setup (Ubuntu Disco):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package console-setup - 1.178ubuntu2.9

---------------
console-setup (1.178ubuntu2.9) bionic; urgency=medium

  * Call setupcon --force only when debian-installer is active
    and always redirect output to /dev/null to not block. (LP: #520546)

 -- Balint Reczey <email address hidden> Tue, 23 Apr 2019 14:04:14 +0200

Changed in console-setup (Ubuntu Bionic):
status: Fix Committed → Fix Released
Balint Reczey (rbalint)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package kbd - 2.0.4-4ubuntu2

---------------
kbd (2.0.4-4ubuntu2) eoan; urgency=medium

  * kbd_mode: Add -f option and don't perform dangerous mode switches without
    it. In the back-ported fix kbd_mode exits with success, even when the
    dangerous mode change is skipped, just prints an error, to not break old
    scripts. (LP: #520546)

 -- Balint Reczey <email address hidden> Thu, 09 May 2019 17:22:51 +0200

Changed in kbd (Ubuntu Eoan):
status: In Progress → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

I see that the kbd changes didn't really get reviewed upstream yet, right? Anyway, the change is a bit intrusive, but it does make sense (especially with the additional patch of not erroring out), so I will accept it for now at least into -proposed.

Changed in kbd (Ubuntu Disco):
status: Confirmed → Fix Committed
tags: added: verification-needed verification-needed-disco
removed: verification-done verification-done-disco
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello David, or anyone else affected,

Accepted kbd into disco-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/kbd/2.0.4-4ubuntu1.19.04.0 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-disco to verification-done-disco. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-disco. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello David, or anyone else affected,

Accepted kbd into cosmic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/kbd/2.0.4-2ubuntu1.18.10.0 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-cosmic to verification-done-cosmic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-cosmic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in kbd (Ubuntu Cosmic):
status: Confirmed → Fix Committed
tags: added: verification-needed-cosmic
removed: verification-done-cosmic
Changed in kbd (Ubuntu Bionic):
status: Confirmed → Fix Committed
tags: added: verification-needed-bionic
removed: verification-done-bionic
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello David, or anyone else affected,

Accepted kbd into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/kbd/2.0.4-2ubuntu1.18.04.0 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in kbd (Ubuntu Xenial):
status: Confirmed → Fix Committed
tags: added: verification-needed-xenial
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello David, or anyone else affected,

Accepted kbd into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/kbd/1.15.5-1ubuntu5.16.04.0 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Balint Reczey (rbalint) wrote : Re: Alt+KEY incorrectly behaves like Ctrl+Alt+KEY, and/or unwanted VT switch from Alt+Left/Right

Verified 2.0.4-4ubuntu1.19.04.0 on Disco:
test@test-Standard-PC-i440FX-PIIX-1996:~$ dpkg -l kbd | cat
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-======================-============-=========================================
ii kbd 2.0.4-4ubuntu1.19.04.0 amd64 Linux console font and keytable utilities
test@test-Standard-PC-i440FX-PIIX-1996:~$ sudo kbd_mode -C /dev/tty4; echo $?
[sudo] password for test:
The keyboard is in Unicode (UTF-8) mode
0
test@test-Standard-PC-i440FX-PIIX-1996:~$ sudo kbd_mode -a -C /dev/tty4; echo $?
0
test@test-Standard-PC-i440FX-PIIX-1996:~$ sudo kbd_mode -a -C /dev/tty4; echo $?
0
test@test-Standard-PC-i440FX-PIIX-1996:~$ sudo kbd_mode -C /dev/tty4
The keyboard is in xlate (8-bit) mode
test@test-Standard-PC-i440FX-PIIX-1996:~$ sudo kbd_mode -u -C /dev/tty4; echo $?
0
test@test-Standard-PC-i440FX-PIIX-1996:~$ sudo kbd_mode -C /dev/tty4
The keyboard is in Unicode (UTF-8) mode
test@test-Standard-PC-i440FX-PIIX-1996:~$ 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
test@test-Standard-PC-i440FX-PIIX-1996:~$ sudo kbd_mode -f -u -C /dev/tty0; echo $?
0
test@test-Standard-PC-i440FX-PIIX-1996:~$ sudo kbd_mode -C /dev/tty0
The keyboard is in Unicode (UTF-8) mode
test@test-Standard-PC-i440FX-PIIX-1996:~$ sudo kbd_mode -s -C /dev/tty0
test@test-Standard-PC-i440FX-PIIX-1996:~$ sudo kbd_mode -C /dev/tty0
The keyboard is in raw (scancode) mode
test@test-Standard-PC-i440FX-PIIX-1996:~$ 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
test@test-Standard-PC-i440FX-PIIX-1996:~$

Revision history for this message
Balint Reczey (rbalint) wrote :

Verified 2.0.4-2ubuntu1.18.10.0 on Cosmic:

test@test-Standard-PC-i440FX-PIIX-1996:~$ dpkg -l kbd | cat
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-======================-============-=========================================
ii kbd 2.0.4-2ubuntu1.18.10.0 amd64 Linux console font and keytable utilities
test@test-Standard-PC-i440FX-PIIX-1996:~$ sudo kbd_mode -C /dev/tty4; echo $?
The keyboard is in Unicode (UTF-8) mode
0
test@test-Standard-PC-i440FX-PIIX-1996:~$ sudo kbd_mode -a -C /dev/tty4; echo $?
0
test@test-Standard-PC-i440FX-PIIX-1996:~$ sudo kbd_mode -a -C /dev/tty4; echo $?
0
test@test-Standard-PC-i440FX-PIIX-1996:~$ sudo kbd_mode -C /dev/tty4
The keyboard is in xlate (8-bit) mode
test@test-Standard-PC-i440FX-PIIX-1996:~$ sudo kbd_mode -u -C /dev/tty4; echo $?
0
test@test-Standard-PC-i440FX-PIIX-1996:~$ sudo kbd_mode -C /dev/tty4
The keyboard is in Unicode (UTF-8) mode
test@test-Standard-PC-i440FX-PIIX-1996:~$ 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
test@test-Standard-PC-i440FX-PIIX-1996:~$ sudo kbd_mode -f -u -C /dev/tty0; echo $?
0
test@test-Standard-PC-i440FX-PIIX-1996:~$ sudo kbd_mode -C /dev/tty0
The keyboard is in Unicode (UTF-8) mode
test@test-Standard-PC-i440FX-PIIX-1996:~$ sudo kbd_mode -s -C /dev/tty0
test@test-Standard-PC-i440FX-PIIX-1996:~$ sudo kbd_mode -C /dev/tty0
The keyboard is in raw (scancode) mode
test@test-Standard-PC-i440FX-PIIX-1996:~$ 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
test@test-Standard-PC-i440FX-PIIX-1996:~$

Revision history for this message
Balint Reczey (rbalint) wrote :

Verified 2.0.4-2ubuntu1.18.04.0 on Bionic:

test@test-Standard-PC-i440FX-PIIX-1996:~$ dpkg -l kbd | cat
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-======================-============-=========================================
ii kbd 2.0.4-2ubuntu1.18.04.0 amd64 Linux console font and keytable utilities
test@test-Standard-PC-i440FX-PIIX-1996:~$ sudo kbd_mode -C /dev/tty4; echo $?
The keyboard is in Unicode (UTF-8) mode
0
test@test-Standard-PC-i440FX-PIIX-1996:~$ sudo kbd_mode -a -C /dev/tty4; echo $?
0
test@test-Standard-PC-i440FX-PIIX-1996:~$ sudo kbd_mode -a -C /dev/tty4; echo $?
0
test@test-Standard-PC-i440FX-PIIX-1996:~$ sudo kbd_mode -C /dev/tty4
The keyboard is in xlate (8-bit) mode
test@test-Standard-PC-i440FX-PIIX-1996:~$ sudo kbd_mode -u -C /dev/tty4; echo $?
0
test@test-Standard-PC-i440FX-PIIX-1996:~$ sudo kbd_mode -C /dev/tty4
The keyboard is in Unicode (UTF-8) mode
test@test-Standard-PC-i440FX-PIIX-1996:~$ 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
test@test-Standard-PC-i440FX-PIIX-1996:~$ sudo kbd_mode -f -u -C /dev/tty0; echo $?
0
test@test-Standard-PC-i440FX-PIIX-1996:~$ sudo kbd_mode -C /dev/tty0
The keyboard is in Unicode (UTF-8) mode
test@test-Standard-PC-i440FX-PIIX-1996:~$ sudo kbd_mode -s -C /dev/tty0
test@test-Standard-PC-i440FX-PIIX-1996:~$ sudo kbd_mode -C /dev/tty0
The keyboard is in raw (scancode) mode
test@test-Standard-PC-i440FX-PIIX-1996:~$ 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
test@test-Standard-PC-i440FX-PIIX-1996:~$

Revision history for this message
Balint Reczey (rbalint) wrote :

Verified 1.15.5-1ubuntu5.16.04.0 on Xenial:

ubuntu@ubuntu-Standard-PC-i440FX-PIIX-1996:~$ dpkg -l kbd | cat
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-=======================-============-=========================================
ii kbd 1.15.5-1ubuntu5.16.04.0 amd64 Linux console font and keytable utilities
ubuntu@ubuntu-Standard-PC-i440FX-PIIX-1996:~$ sudo kbd_mode -C /dev/tty4; echo $?
The keyboard is in Unicode (UTF-8) mode
0
ubuntu@ubuntu-Standard-PC-i440FX-PIIX-1996:~$ sudo kbd_mode -a -C /dev/tty4; echo $?
0
ubuntu@ubuntu-Standard-PC-i440FX-PIIX-1996:~$ sudo kbd_mode -a -C /dev/tty4; echo $?
0
ubuntu@ubuntu-Standard-PC-i440FX-PIIX-1996:~$ sudo kbd_mode -C /dev/tty4
The keyboard is in xlate (8-bit) mode
ubuntu@ubuntu-Standard-PC-i440FX-PIIX-1996:~$ sudo kbd_mode -u -C /dev/tty4; echo $?
0
ubuntu@ubuntu-Standard-PC-i440FX-PIIX-1996:~$ sudo kbd_mode -C /dev/tty4
The keyboard is in Unicode (UTF-8) mode
ubuntu@ubuntu-Standard-PC-i440FX-PIIX-1996:~$ 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
ubuntu@ubuntu-Standard-PC-i440FX-PIIX-1996:~$ sudo kbd_mode -f -u -C /dev/tty0; echo $?
0
ubuntu@ubuntu-Standard-PC-i440FX-PIIX-1996:~$ sudo kbd_mode -C /dev/tty0
The keyboard is in Unicode (UTF-8) mode
ubuntu@ubuntu-Standard-PC-i440FX-PIIX-1996:~$ sudo kbd_mode -s -C /dev/tty0
ubuntu@ubuntu-Standard-PC-i440FX-PIIX-1996:~$ sudo kbd_mode -C /dev/tty0
The keyboard is in raw (scancode) mode
ubuntu@ubuntu-Standard-PC-i440FX-PIIX-1996:~$ 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
ubuntu@ubuntu-Standard-PC-i440FX-PIIX-1996:~$

Balint Reczey (rbalint)
tags: added: verification-done verification-done-bionic verification-done-cosmic verification-done-disco verification-done-xenial
removed: verification-needed verification-needed-bionic verification-needed-cosmic verification-needed-disco verification-needed-xenial
Revision history for this message
Balint Reczey (rbalint) wrote : Re: [Don't release SRU yet]Alt+KEY incorrectly behaves like Ctrl+Alt+KEY, and/or unwanted VT switch from Alt+Left/Right

I'm looking into https://github.com/systemd/systemd/issues/12616, please don't release the SRU yet. I'd like to test the systemd fix together with this fix.

summary: - Alt+KEY incorrectly behaves like Ctrl+Alt+KEY, and/or unwanted VT switch
- from Alt+Left/Right
+ [Don't release SRU yet]Alt+KEY incorrectly behaves like Ctrl+Alt+KEY,
+ and/or unwanted VT switch from Alt+Left/Right
tags: added: verification-failed verification-failed-bionic verification-failed-cosmic verification-failed-disco verification-failed-xenial
removed: verification-done verification-done-bionic verification-done-cosmic verification-done-disco verification-done-xenial
Balint Reczey (rbalint)
tags: added: verification-done-cosmic verification-done-disco
removed: verification-failed-cosmic verification-failed-disco
Balint Reczey (rbalint)
summary: - [Don't release SRU yet]Alt+KEY incorrectly behaves like Ctrl+Alt+KEY,
- and/or unwanted VT switch from Alt+Left/Right
+ [SRU]Alt+KEY incorrectly behaves like Ctrl+Alt+KEY, and/or unwanted VT
+ switch from Alt+Left/Right
Revision history for this message
Steve Langasek (vorlon) wrote : Proposed package removed from archive

The version of kbd in the proposed pocket of Xenial that was purported to fix this bug report has been removed because one or more bugs that were to be fixed by the upload have failed verification and been in this state for more than 10 days.

Changed in kbd (Ubuntu Xenial):
status: Fix Committed → Won't Fix
5 comments hidden view all 153 comments
Revision history for this message
Steve Langasek (vorlon) wrote :

The version of kbd in the proposed pocket of Bionic that was purported to fix this bug report has been removed because one or more bugs that were to be fixed by the upload have failed verification and been in this state for more than 10 days.

Changed in kbd (Ubuntu Bionic):
status: Fix Committed → Won't Fix
5 comments hidden view all 153 comments
Revision history for this message
Steve Langasek (vorlon) wrote :

The version of kbd in the proposed pocket of Disco that was purported to fix this bug report has been removed because one or more bugs that were to be fixed by the upload have failed verification and been in this state for more than 10 days.

Changed in kbd (Ubuntu Disco):
status: Fix Committed → Won't Fix
5 comments hidden view all 153 comments
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (kbd/2.0.4-4ubuntu1.19.04.0)

All autopkgtests for the newly accepted kbd (2.0.4-4ubuntu1.19.04.0) for disco have finished running.
The following regressions have been reported in tests triggered by the package:

systemd/240-6ubuntu5 (arm64)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/disco/update_excuses.html#kbd

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Mathew Hodson (mhodson)
Changed in kbd (Ubuntu Cosmic):
status: Fix Committed → Won't Fix
Revision history for this message
Boris Rybalkin (ribalkin) wrote :

I have this issue. kbd_mode -s fixes it but then gnome session restarts when I hit enter anywhere.

Ubuntu 20.04 LTS
Linux 5.4.0-31-generic #35-Ubuntu SMP Thu May 7 20:20:34 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Revision history for this message
Boris Rybalkin (ribalkin) wrote :

Fresh (unlike upgrade previously) install of 20.04 fixed it.

Steve Langasek (vorlon)
Changed in linux (Ubuntu Disco):
status: Confirmed → Won't Fix
Changed in linux (Ubuntu Cosmic):
status: Confirmed → Won't Fix
Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

I have just faced this and kbd_mode -s also fixed the issue for me. The behavior started out of nothing (something I did without perceiving most likely). I'm using:

[rafaeldtinoco@fujitsu ~]$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.10
Release: 20.10
Codename: groovy

apt-history shows last apt command was yesterday (for my host) and it was working fine yesterday. Unfortunately I have no time to dig into this now, but wanted to state that this still happens in 20.10 (and possibly 20.04 according to @ribalkin report).

Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

[rafaeldtinoco@fujitsu ~]$ sudo kbd_mode
The keyboard is in Unicode (UTF-8) mode

[rafaeldtinoco@fujitsu ~]$ sudo kbd_mode -C /dev/tty1
The keyboard is in Unicode (UTF-8) mode

[rafaeldtinoco@fujitsu ~]$ sudo kbd_mode -s

[rafaeldtinoco@fujitsu ~]$ sudo kbd_mode -C /dev/tty1
The keyboard is in raw (scancode) mode

and it was "fixed".

Revision history for this message
Samuel thibault (samuel-thibault) wrote :

It seems I have to insist again: patch https://launchpadlibrarian.net/405256420/patch should definitely really really be applied. As explained in https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1508146/comments/73 that script should really *not* pass --force to setupcon. There is no reason for that except that it was copy/pasted from the Debian installer, where it is needed due to the use of bterm. On Ubuntu it should really not be used.

Can somebody at last apply that patch that has been waiting for 2 years?

Mathew Hodson (mhodson)
no longer affects: xorg-server (Ubuntu)
no longer affects: xorg-server (Ubuntu Lucid)
no longer affects: xorg-server (Ubuntu Maverick)
no longer affects: xorg-server (Ubuntu Xenial)
no longer affects: xorg-server (Ubuntu Bionic)
no longer affects: xorg-server (Ubuntu Cosmic)
no longer affects: xorg-server (Ubuntu Disco)
no longer affects: xorg-server (Ubuntu Eoan)
no longer affects: linux (Ubuntu Bionic)
no longer affects: linux (Ubuntu Cosmic)
no longer affects: linux (Ubuntu Disco)
no longer affects: linux (Ubuntu Eoan)
no longer affects: kbd (Ubuntu Maverick)
no longer affects: kbd (Ubuntu Lucid)
no longer affects: console-setup (Ubuntu Maverick)
no longer affects: console-setup (Ubuntu Lucid)
Revision history for this message
Mathew Hodson (mhodson) wrote :

A patch was applied to console-setup so that --force is only used with debian-installer, which you can see here: https://launchpadlibrarian.net/420660116/console-setup_1.191ubuntu1_1.191ubuntu2.diff.gz

You can see the current code for Groovy at https://git.launchpad.net/ubuntu/+source/console-setup/tree/debian/keyboard-configuration.postinst?h=ubuntu/groovy&id=4c8bc0d16b2b0dcefe2a38e3060e38863b7bb736#n113

Since this bug was closed when that patch was released, please report a new bug so it can be determined if another fix is needed.

Displaying first 40 and last 40 comments. View all 153 comments or add a comment.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.