0

I know there is often confusion about ctrl-alt-Fkey surprisingly "killing" X when in reality they have just switched to a text virtual console.

This is not that question.

When I switch to a virtual console something happens to X such that I can't switch back to X in vt 7. It's still running, but I can't X to show anything. Instead I see a blank screen at virtual terminal 7 with a blinking underline cursor (that doesn't respond to typing). Sometimes just killing and restarting the window manager will let me switch back, but usually I have to kill gnome-session or Xorg to completely restart it.

It used to only be virtual console 10 that caused this problem, I could switch to other virtual consoles fine and come back to X, but VT 10 would always break X. Now switching to any virtual console is crashing X.

1 Answer 1

0
+50

Which Ubuntu are you using? GDM? LightDM? What Session? Can you provide some logs (Xorg, GDM/LightDM log, journal output at the time you switch).

If you use GDM (on 18.04 at least) on default it uses vt1 for the login screen and vt2 (or the next free vt) for the actual session once you login.

LightDM still uses vt7 for both on default.

You can also do a manually swtich using sudo chvt N. You may also check (for GDM and maybe LDM):

#Prints the processes together with env and commandline argsq
~$ ps e -a | grep Xorg
...
#or without env
~$ pgrep -a Xorg
1471 /usr/lib/xorg/Xorg vt1 -displayfd 3 -auth /run/user/121/gdm/Xauthority -background none -noreset -keeptty -verbose 3
5337 /usr/lib/xorg/Xorg vt3 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -background none -noreset -keeptty -verbose 3

#Or identify sessions via loginctl (works for LightDM too)
~$ loginctl list-sessions
        c1        121 gdm              seat0            tty1            
         4       1000 user             seat0            tty3            
         5       1000 user             seat0            tty3            
         2       1000 user      

~$ loginctl show-session 5
Id=5
User=1000
Name=user
Timestamp=Wed 2020-03-04 10:48:55 CET
TimestampMonotonic=240064915
VTNr=3
Seat=seat0
TTY=tty3
Remote=no
Service=gdm-password
Scope=session-5.scope
Leader=5326
Audit=5
Type=x11
Class=user
Active=yes
State=active
...
2
  • Crikey - that shows how crusty a Unix user I am, I just assumed it would be vt7, in part because I was having what I now see to be a different problem with lightdm and VT10 (the original version of this question). But now I'm on gdm, and it's using vt2! Didn't see that coming. Commented Mar 5, 2020 at 20:30
  • I've also system systems where X normally started up on vt 7, and it had been restarted a few times (by the user), or other irregularities, and then - even though vt 7 was apparently available, at least with no X there, it would start up on vt 8 instead. Commented Sep 10, 2023 at 17:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .