5

When switching to a virtual terminal using e.g. Ctrl+Alt+F2, it takes about a second to switch. Not too horrible for something that's typically rarely used, but I would like to use it more and it's substantially slower than, say, Alt+Tab. It's particularly weird since switching back to the desktop environment (Alt+F7 for me) is instant.

I've noticed it before, but currently I'm running Debian testing (Stretch) with Cinnamon 2.8.7 on X 1.18.3. The resolution of the virtual terminal is the same as X's resolution.

What is this delay caused by and how can I improve it?

Luc
  • 3,610
  • Works pretty great for me :). You need to say what software + hardware you're using! – sourcejedi May 11 '16 at 08:17
  • @sourcejedi Hmm I've noticed it on every Linux-based OS ever, but I'll include that. – Luc May 11 '16 at 09:20
  • My "good" system is Fedora 23 on Thinkpad X201, and it just feels instant. The resolution is the same on X (xdpyinfo) & console (fbset). Pre-KMS, you tended to suffer long mode-changes switching either way. Exception: switching to gdm (which has its own VT) flickers once - it does take about a second overall but nothing more than that. I don't know the root cause, but I note that gdm (on Fedora) is different in that it runs as Wayland instead of X. – sourcejedi May 11 '16 at 09:36
  • @sourcejedi I also run X (added the info to the post) and the resolution is also the same. If it wasn't I think I'd also have a delay switching back from the vt to the desktop environment. – Luc May 11 '16 at 10:21
  • what GPU and driver are you using? i have nvidia cards using the proprietary nvidia driver, and also have delays of over a second when switching from X to VT and vice-versa....annoying, but I don't do it often so it's not a big deal for me. – cas May 11 '16 at 10:43
  • @cas Nvidia indeed, not sure what driver. How can I look that up? (I tried dpkg -l | grep -i nvidia but the only result is some libnvtt2, some texture tools.) I do remember something about nouveau, I see that popping up regularly in dmesg, that could be it. – Luc May 11 '16 at 13:10
  • ok, i suspected it might have something to do with the proprietary nvidia driver, but if you're using nouveau then that can't be the case. – cas May 11 '16 at 13:40
  • @cas You mention instant. Do you mean the screen instantly goes black and after a very short (but visible) delay the text appears? Because that's what it does for me. – Luc May 11 '16 at 14:12
  • umm, i didn't mention instant at all. if, while in X, i press Ctrl-Alt-F1, I get about a half-second delay, then a switch to a blank console, another delay of maybe a second, and then I see the text on my console. Switching back to X with Alt-F5, it switches instantly to a blank VT5 followed by a delay of about a second before my X session is displayed. I have no idea what causes these delays - never cared enough to bother finding out. – cas May 11 '16 at 14:22
  • @cas Oh sorry, I misremebered, sourcejedi mentioned that it feels instant. My bad! – Luc May 11 '16 at 14:53

1 Answers1

1

The X server manages the state of the graphics card when it's active. When you switch between X and a text console or back, the graphics card needs to be reinitialized. Depending on the graphics card and on how it's used, there may be an unavoidable delay. A 1s delay is on the high side but not unreasonable.

Few people use a text console, so even if it was possible to improve the transition time (which it might not be), this isn't a high priority for developers.

If this delay is really a problem, try changing the driver or the configuration in X, in text consoles or both. If you're using a proprietary driver, use the free driver, or vice versa. If you're using a framebuffer console, don't, or vice versa. Some options that can affect what needs to be reinitialized when the console switches owners; I don't know what to look for in particular.

  • How/to what would I change the "framebuffer console"? Searching for "virtual console no framebuffer" and "switch framebuffer console" yield no good results it seems (at least on DDG). – Luc May 12 '16 at 06:22
  • 1
    @Luc There are multiple ways to parametrize the console. At least the vga=… and fbcon=… kernel parameters, /etc/default/console-setup. I haven't really use VGA consoles for a long time so I don't know the modern ways. – Gilles 'SO- stop being evil' May 12 '16 at 07:28