[lubuntu-devel] "TTY" goes to black screen, then doesn't come out of it?
Walter Lapchynski
wxl at ubuntu.com
Sun Jan 26 07:35:26 UTC 2020
On Sat, Jan 25, 2020 at 03:06:28PM -0800, Fritz Hudnut wrote:
> I was going to boot Lu 20.04…but for some reason the
> computer booted U-MATE 20.04
Oh, these computers and their capricious ways… 😉
> I guess the only one I didn't try was F1???
"You never know until you find out"
[Ned's Atomic Dustbin][1]
Incidentially, I have seen cases where the key to return to the GUI was
F7 and cases where it was F1, across different Ubuntu flavors.
It's always true that the number of active ttys is six, as you
can see with `grep tty /etc/default/console-setup`. You can also see
this in `systemd` with `grep NAutoVTs /etc/systemd/logind.conf`. An
interesting thing about at least current systemd is that ttys are
created on-demand thus the reason for "Auto" in that key.
The kernel gives a lot more (`ls -h /dev/tty[1-9]* | wc -l` says 63) but
only the ttys that have getty running on them are accessible as
virtual terminals. X runs on a tty that doesn't have getty running.
You can see what's going on with something like
for t in {1..7}; do ps --no-headers --tty /dev/tty$t; done
That said, all twelve function keys are defined with control and alt to
switch between the different ttys (aka consoles, virtual terminals),
which you can see with the likes of
dumpkeys | grep \
"^[[:space:]]*control[[:space:]]*alt[[:space:]]*keycode.*Console_"
Actually, if you just do `dumpkeys | grep Console` you'll find there are
a whole plethora of shortcuts for switching between the terminals.
The only question remaining is why does X end up on tty7 sometimes and
other times not? Actually, I think this is circumstantial. Lubuntu
18.04 and previous, like Ubuntu MATE and Ubuntu proper and every other
flavor of Ubuntu except for Kubuntu, all used lightdm for their display
manager. Kubuntu has long used sddm, and so has Lubuntu since after
18.04. Incidentially, the two display managers have different feelings
about what tty to use.
In lightdm's case, [they've had it set to 7 for 9 years][2], ever since
they first added support for users to define the specific tty you want
to use. This is changed to use 1 simply by editing
/etc/lightdm/lightdm.conf (you will likely have to create it) as such
and then restarting the display manager
[LightDM]
minimum-vt=1
In regards to sddm, [when they added support for a specific tty][3],
they set the default as 7. However, when systemd came around, they
[conditionally set it to 1 or 7][4] with the former being preferred in
the case of systemd. Why that is, I don't know, but it's easily changed
as above, except in this case, with /etc/sddm.conf, to 7 with
[X11]
MinimumVT=7
So, ok, maybe some things are a bit different. But not really.
[1]: https://www.youtube.com/watch?v=LlMB9svNRzo
[2]:
https://github.com/canonical/lightdm/commit/5372aa1c34db925fabae586e6003d58908e9e307
[3]:
https://github.com/sddm/sddm/commit/af8d253d119104ec37059f8920aceae6b204b307
[4]:
https://github.com/sddm/sddm/commit/3f9c18b5129a7110c5974036feb8b210f46ffc4a
--
@wxl | polka.bike
C563 CAC5 8BE1 2F22 A49D
68F6 8B57 A48B C4F2 051A
More information about the Lubuntu-devel
mailing list