[systemd-devel] Fast User Switching does not seem to work
David Herrmann
dh.herrmann at gmail.com
Tue Oct 21 01:06:39 PDT 2014
Hi
On Tue, Oct 21, 2014 at 1:35 AM, Lennart Poettering
<lennart at poettering.net> wrote:
> On Thu, 09.10.14 19:44, constantine (costas.magnuse at gmail.com) wrote:
>
>> Hello all!
>>
>> I am not sure this is the appropriate mailing list, and I have also
>> posted to intel-gfx at lists.freedesktop.org (without any solution) and
>> arch-general at archlinux.org
>> Please indicate if you recommend me posting the problem to another list.
>>
>> I am encountering a peculiar problem with Fast User Switching or
>> Kernel Mode Setting and I do not know how to troubleshoot it.
>>
>> Suppose the following tty2,3 or VTs:
>> 1. Ctrl+Alt+F2: logged in user in console (no X)
>> 2. Ctrl+Alt+F3: logged in user in console (no X)
>> 3. Ctrl+Alt+F4: logged in user in Desktop Environment (X)
>> 4. Ctrl+Alt+F5: logged in user in Desktop Environment (X)
>>
>> >From 1 to 2, or 2 to 1 there is no delay.
>> >From 1,2 to 3, or 1,2 to 4 there is no delay.
>> >From 3,4 to 1,2 there **is** delay.
>> >From 3 to 4, or 4 to 3, there **is**delay.
>>
>> In words: when I run two (or more) Virtual Terminals switching between
>> them (Ctrl+Alt+F4-5, etc.) takes 2+ seconds. (The VTs are either
>> simply initiated with startx from tty2 and tty3 and having only TWM,
>> xorg-clock and xterm as their open windows OR as different displays
>> with KDisplay Manager (kdm) in :0 and :1)
>>
>> I am using an intel graphics driver so I suppose KMS should be enabled
>> by default and this seems to be the case, but there still are delays
>> swithing between VTs.
>>
>> I have followed the instructions at
>> http://carlosbecker.com/posts/how-to-enable-kms-on-i915-graphiccard-archlinux/
>> https://wiki.archlinux.org/index.php/kernel_mode_setting
>> https://wiki.archlinux.org/index.php/Intel_graphics after a fresh Arch
>> Linux installation, but I am still experiencing the problem.
>>
>> I am certain it is not a hardware related issue, because I can fast
>> switch in ubuntu, but not in Arch linux.
>>
>> My Arch uses systemd and Ubuntu upstart.
>>
>> Last, I am aware of the systemd's on-demand "feature" of spawning
>> terminals but I think it is not related to this, since I think I
>> correctly "pre-spawned" them.
>>
>> How can I make switching between VTs as instantaneous as possible?
>
> Well, the only component that subscribes to VT switching is logind
> really, but it actually shouldn't interfere with it. VT switching on
> linux is synchronous, hence I figure that the X server is blocking
> things when you switch VT. It might be worth using tools like strace
> to figure out what it blocks on. It might also be sueful to check X's
> logs to see if you see any messages about timeouts or so.
>
> Not sure what else I can recommend.
This is expected behavior.
X.org runs hardware specific drivers which often use different modes
than any generic KMS users. Changing into such modes is usually fast
and properly supported, but leaving them (and restoring a generic
mode) requires a full modeset, which can take up to 2s.
One example: to improve 3D rendering performance, you wanna render
into tiled-buffers, therefore, those are also used for scan-out.
Generic user-space usually uses linear buffers and thus requires a
pipe-line change. Some hardware cannot perform such changes without a
full modeset.
Furthermore, some Xorg drivers reset their state on VT-leave events.
This requires extra time on behalf of Xorg and is usually redundant.
Thanks
David
More information about the systemd-devel
mailing list