How shall we start weston under systemd?

Adam Trhon adam.trhon at tbs-biometrics.com
Fri Feb 23 15:00:22 UTC 2018


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?

Thank you and best regards
Adam

-- 
Ing. Adam Trhoň, Software Engineer
Touchless Biometric Systems s.r.o. | 
Palackého třída 180/44 | 61200 Brno | CZECH REPUBLIC | 
Mobile: +42(0) 721 565 113 | tbs-biometrics.cz


More information about the wayland-devel mailing list