How shall we start weston under systemd?

Pekka Paalanen ppaalanen at gmail.com
Tue Mar 6 08:15:53 UTC 2018


On Fri, 23 Feb 2018 16:00:22 +0100
Adam Trhon <adam.trhon at tbs-biometrics.com> wrote:

> Hello,
> 
> I would like to ask about the preferred way (now and in the future)
> of starting Weston from systemd.
> 
> In our devices we start it by a custom .service file:
> 
>   [Unit]
>   Description=Weston Wayland Compositor (on tty7)
>   RequiresMountsFor=/run
>   Conflicts=getty at tty7.service plymouth-quit.service
>   After=systemd-user-sessions.service getty at tty7.service plymouth-quit-wait.service
> 
>   [Service]
>   Type=notify
>   User=root
>   PermissionsStartOnly=true      
>   PAMName=login
> 
>   # Grab tty7
>   UtmpIdentifier=tty7
>   TTYPath=/dev/tty7
>   TTYReset=yes
>   TTYVHangup=yes
>   TTYVTDisallocate=yes
>    
>   EnvironmentFile=-/etc/default/weston
> 
>   ExecStartPre=/usr/bin/chvt 7   
>   ExecStart=/usr/bin/weston --modules=systemd-notify.so --log=/dev/null $OPTARGS  
>     
>   IgnoreSIGPIPE=no
>       
>   [Install]
>   WantedBy=graphical.target
> 
> This used to work well, but after a systemd update a couple months ago
> stopped working with:
> 
>   weston.service: Unit entered failed state.
>   weston.service: Failed with result 'protocol'
> 
> When we remove the `Type=notify` line, Weston starts fine, but other
> apps, which are dependent on it, start too early and fail. The behavior
> is consistent across multiple platforms. I checked Weston git history
> for changes in compositor/systemd-notify.c, also the bug tracker, but
> failed to find any recent changes. 
> 
> How to proceed with this? Either it works for everyone else, or this is
> not the right way to start Weston. Could you please check that our
> unit file is correct? If yes and there is nothing to fix, shall we
> revert back to using weston-launch, or start filling a bug report of
> systemd-notify module not working?

Hi,

have you compared your file and experience with the example and
discussion at https://patchwork.freedesktop.org/patch/190638/ ?

Currently I have no knowledge beyond that. Would be good to not throw
the weston log away and instead check if there is anything unusual.
"Failed with result 'protocol'" sounds like systemd didn't like the
communication, but I'm not sure.

Why would you run it as root?

(I assume your email was in the moderation queue, it arrived just now.)


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20180306/3e4e1ade/attachment-0001.sig>


More information about the wayland-devel mailing list