clear_console locks up video when X is running and you log out from a plain text console

Bug #1822184 reported by Quesar
This bug affects 2 people
Affects Status Importance Assigned to Milestone
X.Org X server
bash (Ubuntu)
xorg (Debian)
xorg-server (Debian)
Fix Released
xorg-server (Ubuntu)

Bug Description


If X is running and you switch to a plain text console (ie ctrl-alt-f3), log in as a regular user, and then log out, the display switches back to the graphical login screen and locks up. The system is still functioning (can ssh in, etc) but the video output is frozen.

The underlying cause is:

However, the problem can at least be worked around by making clear_console switch to tty 6 and back instead of switching to 1 and back. This patch corrects the problem:

--- bash-4.4.18.orig/debian/clear_console.c 2019-03-28 12:09:02.415907787 -0400
+++ bash-4.4.18/debian/clear_console.c 2019-03-28 12:08:11.984366858 -0400
@@ -205,7 +205,7 @@
 #if defined(__linux__)
   num = vtstat.v_active;
- tmp_num = (num == 1 ? 2 : 1);
+ tmp_num = (num == 6 ? 5 : 6);

   /* switch vt to clear the scrollback buffer */
   if (ioctl(fd, VT_ACTIVATE, tmp_num))

Revision history for this message
Quesar (rick-microway) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "makes clear_console switch to either tty6 or tty5 instead of tty1/tty2" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

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

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

Changed in bash (Ubuntu):
status: New → Confirmed
Changed in bash (Ubuntu):
status: Confirmed → Opinion
Changed in xorg-server (Ubuntu):
status: New → Confirmed
Changed in xorg-server (Debian):
status: Unknown → Confirmed
Changed in xorg (Debian):
status: Unknown → New
Changed in xorg-server:
status: Unknown → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bash - 5.0-3ubuntu1

bash (5.0-3ubuntu1) disco; urgency=medium

  * Merge with Debian; remaining changes:
    - skel.bashrc:
      - Run lesspipe.
      - Enable ls aliases.
      - Set options in ll alias to -alF.
      - Define an alert alias.
      - Enabled colored grep aliases.
    - etc.bash.bashrc:
      - Add sudo hint.

bash (5.0-3) unstable; urgency=medium

  * Apply upstream patch 003.
  * Fix clear_console locking up video when X is running and logging out
    from a plain text console. Closes: #810660. LP: #1822184.

 -- Matthias Klose <email address hidden> Thu, 04 Apr 2019 05:11:47 +0200

Changed in bash (Ubuntu):
status: Opinion → Fix Released
Revision history for this message
Quesar (rick-microway) wrote :

Thanks! This also affects 18.04 and will need to be fixed there too please.

Changed in xorg-server (Debian):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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