On Tue, 6 Mar 2018 10:15:53 +0200
Pekka Paalanen <ppaala...@gmail.com> wrote:

> On Fri, 23 Feb 2018 16:00:22 +0100
> Adam Trhon <adam.tr...@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@tty7.service plymouth-quit.service
> >   After=systemd-user-sessions.service getty@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

Hello,

thank you for the answer. Yes, my e-mail ended up in moderation queue and we
got it resolved before it got out :)

The problem was that we use systemd v234 and it contains a bug (fixed in
v235) that breaks combination of Type=notify and PAMname=login.

It is fixed here: https://github.com/systemd/systemd/pull/6932

We run it as root because it is in an embedded device and root is the
only user we have there.

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

Attachment: pgpdvfHwTSiaq.pgp
Description: OpenPGP digital signature

_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to