diff options
author | Khem Raj <raj.khem@gmail.com> | 2020-09-09 09:27:04 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-09-10 13:48:27 +0100 |
commit | 31259e5913ddd4962c0086f70639a7bd4da961cc (patch) | |
tree | e09b222fd4568415d88925cc4c59a832d654ecc9 /meta/recipes-graphics/wayland/weston-init/weston@.service | |
parent | 75e803a4d043d053f181f2683945e418b294dad2 (diff) | |
download | poky-31259e5913ddd4962c0086f70639a7bd4da961cc.tar.gz |
weston-init: Redefine weston service and add socket activation option
Currently, weston when autolauched with systemd ends up with seat0
related errors because its launched before seat0 is assigned.
Fixes
[05:16:09.357] logind: failed to get session seat
[05:16:09.358] logind: cannot setup systemd-logind helper (-61), using legacy fallback
The above error results in ptest failures in parselogs, even though
weston has started ok using fallback methods, these errors are still seen in logs
Also fixes weston ptests
RESULTS - weston.WestonTest.test_weston_can_initialize_new_wayland_compositor: PASSED (8.58s)
(From OE-Core rev: c21fa5a291ab207a084285935ab73a0b4225c965)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Henning Heinold <henning@itconsulting-heinold.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/wayland/weston-init/weston@.service')
-rw-r--r-- | meta/recipes-graphics/wayland/weston-init/weston@.service | 69 |
1 files changed, 59 insertions, 10 deletions
diff --git a/meta/recipes-graphics/wayland/weston-init/weston@.service b/meta/recipes-graphics/wayland/weston-init/weston@.service index 39e193014a..0a1df15bdf 100644 --- a/meta/recipes-graphics/wayland/weston-init/weston@.service +++ b/meta/recipes-graphics/wayland/weston-init/weston@.service | |||
@@ -1,15 +1,64 @@ | |||
1 | # This is a system unit for launching Weston with auto-login as the | ||
2 | # user configured here. | ||
3 | # | ||
4 | # Weston must be built with systemd support, and your weston.ini must load | ||
5 | # the plugin systemd-notify.so. | ||
1 | [Unit] | 6 | [Unit] |
2 | Description=Weston Wayland Compositor | 7 | Description=Weston, a Wayland compositor, as a system service |
3 | RequiresMountsFor=/run | 8 | Documentation=man:weston(1) man:weston.ini(5) |
4 | Conflicts=plymouth-quit.service | 9 | Documentation=http://wayland.freedesktop.org/ |
5 | After=systemd-user-sessions.service plymouth-quit-wait.service | 10 | |
11 | # Make sure we are started after logins are permitted. | ||
12 | After=systemd-user-sessions.service | ||
13 | |||
14 | # If Plymouth is used, we want to start when it is on its way out. | ||
15 | After=plymouth-quit-wait.service | ||
16 | |||
17 | # D-Bus is necessary for contacting logind. Logind is required. | ||
18 | Wants=dbus.socket | ||
19 | After=dbus.socket | ||
20 | |||
21 | # Since we are part of the graphical session, make sure we are started before | ||
22 | # it is complete. | ||
23 | Before=graphical.target | ||
24 | |||
25 | # Prevent starting on systems without virtual consoles, Weston requires one | ||
26 | # for now. | ||
27 | ConditionPathExists=/dev/tty0 | ||
6 | 28 | ||
7 | [Service] | 29 | [Service] |
8 | User=%i | 30 | # Requires systemd-notify.so Weston plugin. |
9 | PAMName=login | 31 | Type=notify |
10 | EnvironmentFile=-/etc/default/weston | 32 | ExecStart=/usr/bin/weston --modules=systemd-notify.so |
33 | |||
34 | # Optional watchdog setup | ||
35 | TimeoutStartSec=60 | ||
36 | WatchdogSec=20 | ||
37 | |||
38 | # The user to run Weston as. | ||
39 | User=%I | ||
40 | |||
41 | # Make sure working directory is users home directory | ||
42 | WorkingDirectory=/home/%i | ||
43 | |||
44 | # Set up a full user session for the user, required by Weston. | ||
45 | PAMName=weston-autologin | ||
46 | |||
47 | # A virtual terminal is needed. | ||
48 | TTYPath=/dev/tty7 | ||
49 | TTYReset=yes | ||
50 | TTYVHangup=yes | ||
51 | TTYVTDisallocate=yes | ||
52 | |||
53 | # Fail to start if not controlling the tty. | ||
54 | StandardInput=tty-fail | ||
55 | StandardOutput=journal | ||
11 | StandardError=journal | 56 | StandardError=journal |
12 | PermissionsStartOnly=true | ||
13 | IgnoreSIGPIPE=no | ||
14 | 57 | ||
15 | ExecStart=/usr/bin/weston-start -v -e -- $OPTARGS | 58 | # Log this user with utmp, letting it show up with commands 'w' and 'who'. |
59 | UtmpIdentifier=tty7 | ||
60 | UtmpMode=user | ||
61 | |||
62 | [Install] | ||
63 | WantedBy=graphical.target | ||
64 | DefaultInstance=tty7 | ||