Bionic Beaver, 18.04.

A funny thing happened today. I have a system, working fine, booted up to the desktop - uptime about 80 days, lots of windows open on the desktop. Everything fine, until... GUI is running on tty1 (as expected).

In trying to debug another problem, I decide to switch away from the desktop GUI to a virtual console and login. So,I do "sudo chvt 2" and get to the login prompt on tty2. So far, so good. I log in as myself (on tty2), do a few things, then logout (via ^D) - expecting to get back to a login prompt, from which I can then switch back to my GUI desktop session.

However, next thing that happens is that I am presented with a pure purple screen, then about 10 seconds later, a GUI screen asking for my password. I log in and am presented with a clean, fresh desktop. All windows that had previously been there are gone (meaning, I have to figure out what was there before, and restart everything).

It looks like somehow, logging out of tty2, sent a Hangup signal to all the processes running on the GUI desktop, including the desktop itself, forcing you to log in again and restarts whatever had been running before.

Why does this happen?

Some additional information:

  1. After the desktop re-start - and after I've run my scripts to open up my usual windows (programs) - I find that there are a maze of processes running on tty1, running as user "gdm", and also a maze of processed on tty3, running as user "me". All of these processes (on both tty1 and tty3) show as being started at the time of the desktop re-start. There is a single process (a getty) running on tty2.

  2. There is a single file in /var/crash, timestamped at the time of the desktop re-start, that corresponds to one of my processes (i.e., something I had running in one of my terminal windows at the time of the crash). That file shows it to have been killed by signal 6 (SIGABRT). SIGABRT is usually caused by a program failing an assert(3).

  • 1
    Note that tty1 is the login screen and tty2 is the X GUI sesson. It looks like you just logged out of your Xorg sesson.
    – user68186
    Jul 4, 2021 at 13:50
  • No, it is the other way around. You can tell from a ps listing that all of the GUI processes are running on tty1. I was definitely logging into a fresh new virtual console (tty2). There is no doubt that these are the facts.
    – Joe Schmoe
    Jul 4, 2021 at 15:43
  • 1
    No. You can tell by pressing [Ctrl]+[Alt]+[F1] for the login screen; [Ctrl]+[Alt]+[F2] for the Desktop; and, [Ctrl]+[Alt]+[F3] for the ttl3. If you are using a laptop you may have to add the [Fn] key into the mix.
    – user68186
    Jul 4, 2021 at 16:45
  • Was a .crash file generated in /var/crash? What does your syslog say around the time of logout?
    – user535733
    Jul 4, 2021 at 16:53
  • See this question and this question for more.
    – user68186
    Jul 4, 2021 at 16:55


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.