PrintScreen key causes many apps to suddenly die if you are running in Linux text mode

Bug #279973 reported by Jason Spiro
6
Affects Status Importance Assigned to Milestone
console-data (Debian)
Fix Released
Unknown
console-data (Ubuntu)
Fix Released
Medium
Unassigned
console-setup (Debian)
Fix Released
Unknown
console-setup (Ubuntu)
Fix Released
Medium
Colin Watson
kbd (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: console-data

On Ubuntu 8.04, in console mode, the PrintScreen key sends ^\ which sends SIGQUIT to the running application. Depending which application you are running, this may cause it to dump core. So this single wrong keystroke can cause data loss. Most text editors are unaffected, but most other apps are affected.

This problem has affected most Linux PCs for almost a decade now, but AFAICT nobody has ever filed a proper bug report about it with the kernel folks or with Ubuntu. People have complained on mailing lists though.

== Steps to repro ==

1. Press Control+Alt+F1
2. Log in
3. Do one of the following:
     a) type "sudo aptitude" then spend fifteen minutes looking through the list of packages and picking what you want, OR
     b) start up the "lynx" browser then spend 15 minutes editing a Wikipedia article
4. In the middle of step 3, accidentally press the Print Screen key on your keyboard.

== What happens ==

* When you press PrtSc, the kernel sends the ^\ (Control-Backslash) key combination to the terminal. This is by design, but it is a bad design. It causes data loss.
* ^\ sends a SIGQUIT signal, causing the application to immediately abort and dump core.

== What should have happened ==

* When you press PrtSc, the kernel should not send ^\ -- it should either send a different key combination, or send nothing at all.

Revision history for this message
Greg Grossmeier (greg.grossmeier) wrote :

I can confirm this behavior in 8.10.

Changed in console-data:
importance: Undecided → Low
status: New → Confirmed
importance: Low → Medium
Revision history for this message
Jason Spiro (jasonspiro) wrote :

Does this affect the package "kbd" also? I thought it did but now I'm not sure. Will Intrepid use keymaps from the package "kbd" anyway? How about later releases of Ubuntu after Intrepid?

Revision history for this message
Jason Spiro (jasonspiro) wrote :

Followup to my last comment: No, this does not affect "kbd". The problem is only in console-data. In Debian console-data-1.07/keymaps/i386/include/linux-keys-bare.inc, keycode 99 = Control_backslash. But in Debian kbd-1.14.1/data/keymaps/i386/include/linux-keys-bare.inc, keycode 99 = Compose. And Intrepid too, not just Debian testing, uses kbd-1.14.1.

Revision history for this message
Jason Spiro (jasonspiro) wrote :

Marking invalid in package "kbd" as per my last comment.

Changed in kbd:
status: New → Invalid
Revision history for this message
Jason Spiro (jasonspiro) wrote :

I recently tested pressing PrintScreen inside several uncommonly-used text editors while running in console mode. The key seems to make a few of them, including NLED by Evan Weaver, become unresponsive forever. Vim and Nano are unaffected though.

P.S. I will soon be forwarding this bug upstream to http://bugs.debian.org/console-data

description: updated
Changed in console-data:
status: Unknown → New
Changed in console-setup:
status: Unknown → New
Revision history for this message
Colin Watson (cjwatson) wrote :

FWIW, nowadays Ubuntu only uses console-setup, not console-data. It gets its keymaps from xkeyboard-config.

Revision history for this message
Colin Watson (cjwatson) wrote :

(Though I'm not sure whether PrintScreen is implemented in console-setup itself or in xkeyboard-config - I half-suspect the former - so please don't reassign this bug to xkeyboard-config unless you're certain you know better.)

Changed in console-setup:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Colin Watson (cjwatson) wrote :

Patch in the Debian console-setup bug now. I'll have another look after I get back from holiday.

Changed in console-setup:
assignee: nobody → kamion
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package console-setup - 1.28ubuntu4

---------------
console-setup (1.28ubuntu4) jaunty; urgency=low

  * Set plain or shifted PrintScreen key to generate VoidSymbol rather than
    Ctrl-backslash (LP: #279973).

 -- Colin Watson <email address hidden> Mon, 15 Dec 2008 10:09:28 +0000

Changed in console-setup:
status: In Progress → Fix Released
Changed in console-data (Debian):
status: New → Fix Released
Changed in console-setup (Debian):
status: New → Fix Released
Phillip Susi (psusi)
Changed in console-data (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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