Bug 70876 - Launching Weston on different tty corrupts original tty
Summary: Launching Weston on different tty corrupts original tty
Status: VERIFIED FIXED
Alias: None
Product: Wayland
Classification: Unclassified
Component: weston (show other bugs)
Version: unspecified
Hardware: Other All
: medium critical
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-25 22:00 UTC by U. Artie Eoff
Modified: 2013-10-30 21:12 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description U. Artie Eoff 2013-10-25 22:00:36 UTC
When executing weston from a console tty and instructing it to launch on a different tty causes the original tty to be corrupted.  That is, the original tty's command-line echos garbled characters when attempting to type in it after shutting down weston.  Moreover, while weston is running, vt-switching no longer works.  One must use 'chvt' from an ssh session to force a vt switch.

1. Start a new console/tty session, say, on tty2 (e.g. <ctrl>+<alt>+<F2>)
2. Execute 'weston --tty=3' (as root/suid)
 * Weston should now be active and running
3. Attempt to vt-switch back to tty2 (or any other tty)
 * Observe that vt-switching does not work
4. Exit weston with <ctrl>+<alt>+<backspace>
 * Observe that display/screen does not return to a text console and vt-switching is still not working; screen goes blank
5. Start an ssh session to the misbehaving weston device
6. Execute 'sudo chvt 2'
 * Observe the original console/tty2 session activates
7. Try typing into the console
 * Observe garbled characters echo to the screen and vt-switching is not working

wayland (master) heads/master-0-g16b2dab
drm (master) 2.4.47-0-g951ebe0
mesa (master) heads/master-0-g64c081e
libva (master) heads/master-0-g73a11b3
intel-driver (master) heads/master-0-g01b39f7
weston (master) heads/master-0-gc85f1d4
Comment 1 Kristian Høgsberg 2013-10-30 20:54:04 UTC
commit 529a81a89829daf71f4d33b3f02a90001b3dfe5f
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Wed Oct 30 13:53:01 2013 -0700

    logind: Return proper error value when tty or seat doesn't match
    
    If the seat or tty doesn't match we return with r == 0, which looks like
    success to weston_launcher_connect(), which then fails to fall back
    to the legacy path.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=70876


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.