10

I have used the virtual consoles (tty1-6) for decades in various Linuxes. I recently installed Ubuntu 18.04 (Bionic Beaver) on an x86-64 box. Everything is fine, except that the VCs don't work. As far as I can tell, it is by design that people are now only supposed to use the GUI (like in Windows). I would like to be able to use the VCs.

Note:
I've noticed (from ps output) that a lot of the GUI processes are running on tty1, so I assume that the GUI gets launched from there).

What I've tried:

  1. Ctrl-Alt-F1 (or F2 or F3 or ...). Nothing happens. By "nothing happens", I mean, literally, nothing happens.
    Note:
    I am familiar with one system where you can switch to the virtual consoles (from the GUI), and it really does switch, but the screen stays on the GUI. You can now type and you are typing on the virtual console, but the screen makes it look like you are still on the GUI. I mention all this to say that, no, this is not the case here. You are still typing into the GUI.
  2. (as root) chvt 1. Nothing happens. Prompt comes right back and nothing has changed.
  3. (as root) chvt 2. Process hangs until you hit Ctrl/C. Weird...!
  4. (as root) strace chvt 2. Lots of strace output, ending with something like:

    ioctl(3,VT_WAITACTIVE ...)
    

and then it hangs (until you hit CTRL-C).
Next, following some advice I found on this board, I tried editing the file:

/etc/systemd/logind.conf

and uncommenting the first two active lines, which are:

NAutoVTs=6
ReserveVT=6

I tried first just uncommenting the first one, then rebooted, nothing changed.
So I then uncommented the second one as well, rebooted, again, no change.

So, what to do?
What is next?

Oli
  • 293,335
  • Thank you, zx485, for editing my post. It looks much nicer now. I didn't know how to do any of those things. – Joe Schmoe Aug 30 '18 at 11:39
  • One more piece of information regarding this. I tried (as root): open sleep 1000 and then I can see (via ps) that sleep is indeed running on tty2. But, I still can't get to it... – Joe Schmoe Aug 30 '18 at 16:01
  • 1
    Ctrl+Alt+F1 does nothing on my Ubuntu 18.04.1 because the gnome session is running there. Other Ctrl+Alt+Fx shortcut work as expected (I see linux console). Previously, (Ubuntu 16.04) GUI part (Unity) used Ctrl + Alt + F7. – jfs Sep 16 '18 at 14:39
  • 1
    Are you sure those keys are mapped as Fx keys? Nowadays on laptops those usually are used to VolUp/Down, airplane mode, etc. You'll need to press the Fn (function but in other sense) key: Ctrp+Fn+Alt+F2. – Pablo Bianchi Jan 10 '19 at 18:54

3 Answers3

3

Actually I had the same problem. I changed the /etc/systemd/logind.conf file adding the line

NAutoVTs=6

And the VCs were not accessible till I had an idea! On my laptop, a Lenovo T490, the default F keys are instead configured as Laptop keys. Therefore they are not usable a F keys directly. To get the Fn keyboard working I have to press:

Fn + CTRL + ALT + F1-12

now with Fn + Ctrl + Alt + F3 key I can get to the tty3. tty1 is the GDM login page, while tty2 is the current X session.

Tankman六四
  • 1,681
  • 2
  • 18
  • 23
Zioalex
  • 151
0

Note: This is now working as expected. I assume that whatever system updates I've installed in the last year or so (as a result of the OS popping up a message telling me that new software is available for my computer...) has fixed the underlying problem.

Now, if I do Ctrl/Alt/F2, it takes me to a login prompt on tty2 (implicitly launching a getty there). Ctrl/Alt/F1 takes me back to the GUI (Gnome session). "chvt" also works as expected. So, I guess all is well. BTW, note that in earlier versions of Debian/etc, the GUI was always running on tty7; now it is running on tty1. This can throw you for a loop (and cause panic) if you expect Ctrl/Alt/F7 to take you back to the GUI.

But, modulo that, it is OK now.

0

Recently I had exactly the same problem with a newly acquired "old" notebook with xenial installed. The problem turned out to be in /etc/default/grub, the line GRUB_TERMINAL=console was uncommented, and the text mode was obviously not working (maybe the combination of KMS and my videocard?) In any case, grub did complain with booting in blind mode error message, but continued as usual, with the framebuffer seemingly enabled (kernel messages etc. were visible). As far as I can tell, virtual consoles and gettys were working well, but only the (unchanging) kernel boot messages were visible, in what looked like a native framebuffer mode (presumably the consoles were writing into a text-mode VGA memory).

After commenting out the GRUB_TERMINAL=console line, the virtual consoles now work as expected, in a framebuffer (vcs1 is unavailable, though).