Version of affected software:

$ rpm -q --whatprovides /usr/bin/Xorg

(In other words, this is on a currently up-to-date install of Fedora 28 Workstation).

Steps to reproduce:

  1. Use ctrl+alt+f5, to switch to text vt 5 and log in
  2. sudo -i
  3. Xorg :10
  4. Use ctrl+alt+f6, to switch to text vt 6
  5. Use ctrl+alt+f5, to switch back to vt 5

Expected results: I see the graphical X session (a completely black screen with no mouse cursor :).

Actual results: I see a text console with some log messages from Xorg. The Xorg process is still running.

Additional information:

The last line shown on the screen is

(II) AIGLX: Suspending AIGLX clients for VT switch

Also, /var/log/Xorg.10.log shows that Xorg is not using systemd-logind.

(II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration

1 Answer 1


You are mis-remembering how Xorg used to work :). Remember that X used to start on VT7 and up, because VT1 through VT6 were reserved for text consoles.

With systemd and logind, by default the VTs are set up on-demand. If you never switched to VT2, then getty and login are not started on VT2. Instead, VT2 remains available... and can be claimed by a program like Xorg, which uses the first free VT.

Another way to see that your Xorg session is actually on VT2, is that ps -ax will show that it has tty2 as its controlling terminal.

In the old system, if you logged in to a text VT and started Xorg, it would never re-use your current text VT. I was confused because startx re-uses your text VT on a modern system - but this is due to using logind. With logind, X is able to start as an unprivileged process... and it does not have the privilege to switch to a different VT. The -keeptty option mentioned in the log message was added specifically for this reason.

I suggest not trying to run Xorg -keeptty inside sudo -i. -keeptty was not specifically intended for this case. Or at least, it does not work correctly on my system, it seems the old and the new code start fighting with each other :) -

I get a screen showing a text cursor (underline) which is not flashing, and "ctrl+alt+f6" does not switch to text vt6; I have to use alt+sysrq+R first. (I have enabled sysrq on my Fedora system). Switching back to the original vt with "ctrl+alt+f5" then shows the black screen that I would have expected. The controlling terminal of the X process is tty5, but lsof -p shows that it also has tty2 open. Switching to VT2 dumps me back on VT5, with Xorg logging an error

[ 40399.826] (II) AIGLX: Suspending AIGLX clients for VT switch
[ 40399.826] (II) AIGLX: Resuming AIGLX clients after VT switch
[ 40399.826] (EE) modeset(0): failed to set mode: Permission denied
[ 40399.826] (EE) 
Fatal server error:
[ 40399.827] (EE) EnterVT failed for screen 0
[ 40399.827] (EE) 
[ 40399.827] (EE) 
Please consult the Fedora Project support 
     at http://wiki.x.org
 for help. 
[ 40399.827] (EE) Please also check the log file at "/var/log/Xorg.10.log" for additional information.
[ 40399.827] (EE) 
[ 40399.828] (II) AIGLX: Suspending AIGLX clients for VT switch
[ 40400.029] (EE) Server terminated with error (1). Closing log file.
  • 2
    You could always tell Xorg which VT you expect it to use: Xorg vt6 :10. That leaves less scope for surprises ;-). Commented Jun 9, 2018 at 11:12

You must log in to answer this question.

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