It seems by default (at least on Ubuntu, but I think I saw the same on other distros) there are virtual TTYs 1-6 for text login, 7 for GUI login, and 8 upwards are unused or at least non-interactive (here they show only a blinking cursor). Is there a standard for which virtual TTYs should be used for what?
Linux – What are the different virtual TTY numbers used for
linuxtty
Related Solutions
That's because you are using the proprietary NVidia driver.
When I was OpenSUSE with the proprietary driver my consoles also would be black, now that I am using Ubuntu again they get an even "cooler" effect: (Don't worry, the screen is fine!)
The reason for this seems to be the NVidia kernel driver which, once initialized by the DDX (=device dependant X11) driver, cannot cope with requests from any other video subsystem (such as fbdev, VESA, Linux console, ...).
The console will still be activated when switching to it. To verify this, try logging in blindly into the console and enter something that will be easy to notice, such as wall
or reboot
:
<Your username>
<Your password>
echo "Test message" >/tmp/message; wall </tmp/message
After returning from the console you should see something like this in any terminal window:
Broadcast message from <Your username>@<Hostname>
(/dev/tty2) at 23:38 ...
Test message
Unfortunately I do not know of any way to fix this except for using the OpenSource driver ("nouveau"). VT switching works fine using that driver, but that driver creates other issues (spontaneous crashes and generally less performance in my case). I'm also neither a kernel developer nor an NVidia developer so I can't do much more than analyzing the symptoms myself.
It’s unclear which namely text buffer dimension is too large for ConSpy (stty --all
or so isn’t provided), so recommendations about both number of text lines and cpl follow.
There are different parameters about a TUI console:
- video mode (i. e. how many scan lines × screen width (in dots));
- how many character boxes are there (i. e. text lines × cpl).
Generally:
text lines = scan lines / character height
cpl = screen width (in dots) / character width
Character height and width are in dots. Division is integer, where remainder is dropped.
To decrease number of text lines, load a font with greater character height. To decrease cpl (characters per line), load a font with character width 12 or more. For example:
setfont /usr/share/consolefonts/Uni3-TerminusBold24x12.psf.gz
(although IMHO Terminus is ugly in many respects).
On Ubuntu, a custom /etc/init/console-setup.conf
script may be manufactured, to be executed on boot. Namely, instead of
exec loadkeys /etc/console-setup/cached.kmap.gz
one may write
script
setfont /usr/share/consolefonts/Uni3-TerminusBold24x12.psf.gz
loadkeys /etc/console-setup/cached.kmap.gz
end script
Note that cached.kmap.gz is a keyboard-layout (keymap) and doesn’t interfere with fonts. It is not necessary to execute setfont
namely from “console-setup.conf”. Because of the meaning of the term “console” that choice seems logical.
Update: There is /etc/init/console-font.conf
task in Ubuntu.
Or read this stuff at Ask Ubuntu, maybe will find something of use.
Most recommendations above assume framebuffer (fbdev
) driver enabled. Also, in this case, the fbset
command without arguments (or sudo fbset
from a user shell) reports geometry of the current video mode, as:
geometry
screen_width scan_lines …
In hardware VGA-like mode, obsolete in modern Linuxes, maximal character width is 9. So one can decrease cpl (characters per line) only by enabling a non-standard (decreased) screen width, hence non-standard mode with decreased pixel clock frequency. It isn’t always possible and safe.
One more note about text lines × cpl at Linux virtual consoles. These values can be obtained with
sudo od -t u1 -N 2 /dev/vcsa
number
The first decimal number is text lines and the second is cpl. See vcs(4) and od(1) for explanations how it works.
Best Answer
Up to whoever sets it up. Here on Fedora 18 (with
systemd
)tty1
is graphical login, others are activated only if somebody tries to use them. What you describe is what the rough consensus was a year or two ago.