Bug 106179 - weston-launch does not restore the interface
Summary: weston-launch does not restore the interface
Status: RESOLVED MOVED
Alias: None
Product: Wayland
Classification: Unclassified
Component: weston (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium normal
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-22 17:53 UTC by Dilian
Modified: 2018-06-08 23:56 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Log of weston-launch, when it does not restore to the GUI (50.93 KB, text/plain)
2018-04-24 05:26 UTC, Dilian
Details

Description Dilian 2018-04-22 17:53:52 UTC
When I start weston-launch, then a terminal, and epiphany and switch Ctrl+Alt+F1 (text interface) and then back to the graphical interface (with Ctrl+Alt+F2), several times, at once the graphical interface doesn't show any more.  I can killall weston-launch and restart it.

This happens with weston-4.0.0 and wayland-1.15.0, but has not happened with weston-3.0.0 or wayland-1.14.0.

weston-launch -v doesn't print anything.

Any ideas?  What can I do to find the exact cause of the problem?
Comment 1 Pekka Paalanen 2018-04-23 07:31:15 UTC
Could you redirect both stdout and stderr of weston-launch into a file, reproduce the issue, and attach the file here?

Do you actually need to use weston-launch?

You should never kill 'weston-launch', at least with SIGKILL, because that may leave your VT in a useless state. Try killing 'weston' instead.
Comment 2 Dilian 2018-04-23 09:21:45 UTC
weston-launch -v does not print anything.

When I installed Weston I looked for way how to start it, then I found weston-launch, it worked, so I use it.
Comment 3 Pekka Paalanen 2018-04-23 09:50:55 UTC
The reason I asked you to redirect weston-launch output into a file is because that will actually be Weston's log output and it will print lots. But if you do not redirect it into a file, you will lose it, because the virtual terminal printing stops working as soon as Weston starts.

weston-launch is only necessary if you do not run a system service similar to logind. This is mentioned in the weston man page. I would not expect this to be related to your problem though. I have a suspicion, but for that I'd need the Weston log.
Comment 4 Dilian 2018-04-24 05:26:40 UTC
Created attachment 139034 [details]
Log of weston-launch, when it does not restore to the GUI

This is the file `stdbuf -o 0 -e 0 weston-launch -v` generate from its start, until it doesn't return to the graphical interface after pressing Ctrl+Alt+Fn, and is then terminated with Alt+Backspace.

The line "[07:14:56.166] activating session" is printed after pressing Alt+Backspace.
Comment 5 Pekka Paalanen 2018-04-24 07:28:40 UTC
Thank you. It's a little bit along the lines I suspected, but in a surprising way. The below is my analysis for the record:

Main details from the log:
- atomic modesetting is in use

The interesting sequence:

[07:07:31.718] activating session
...
[07:07:31.797] DRM: expected property DPMS to not be an enum, but it is; ignoring
[07:07:31.797] DRM: expected property DPMS to not be an enum, but it is; ignoring
[07:07:31.817] unexpectedly large timestamp jump (from 31925138 to 31934769)
[07:13:57.726] atomic: couldn't commit new state: Permission denied
[07:13:57.727] deactivating session

Judging by the timestamps, it seems that EPERM might result from a sequence like this:
- user hits Ctrl+Alt+F#
- that ends up calling launcher_logind_activate_vt()
- logind revokes DRM access
- libweston core hits repaint and fails atomic flip with EPERM
- logind signals VT deactivation
- session_notify() gets called, prints "deactivating session"

If an atomic flip fails, I think libweston will never try again, which leads to no screen updates. Looks like two things: fix the race (libweston or logind?), and maybe find a way to recover from atomic failures.
Comment 6 Dilian 2018-04-24 08:25:04 UTC
When I close and open my laptop subsequent kprints shown by 'dmesg -T' do not jump with the corresponding time.  The '[07:07:31.817] unexpectedly large timestamp jump (from 31925138 to 31934769)' might be related to this.  However I do not think this is anyhow related to the problem, as weston-launch also stops redrawing the GUI when I do not close and reopen my laptop after its start.

For the record I use systemd's logind as service, but weston-launch I just start as normal process.

From the last comment I understand, that from me no further information is needed for a fix.
Comment 7 GitLab Migration User 2018-06-08 23:56:05 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/wayland/weston/issues/103.


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.