weston sometime fails to start using systemd unit file

Vikas Patil vikasmpatil at gmail.com
Tue Jan 10 12:39:41 UTC 2017


Dear All,

We are starting weston (1.9.0) using below systemd unit file of type notify
(backported sd_notify related changes from weston 1.11.0 to weston 1.9.0).
It works well with i.MX6 (NXP, fbdev backend) based platform, however with
Jacinto (TI, drm backend) based platform sometimes it fails to start and
sometime it works after reboot. It always works if we start weston service
manually after platform boots up using “systemctl”.

Is there anyone encountered this issue? Any suggestion/inputs to fix this?


Weston.service file:

[Unit]
Description=weston (wayland compositor)
DefaultDependencies=false
After=pvrinit.service

[Service]
#Type=simple
Type=notify
NotifyAccess=all
WatchdogSec=60s
ExecStartPre=/bin/mkdir -p /var/run/root/1000
ExecStartPre=/bin/chmod 0700 /var/run/root/1000
ExecStart=/usr/bin/weston --tty=1 --idle-time=0 --backend=drm-backend.so
--connector=36 --log=/tmp/weston.log

# --- Exec options ---
Environment=XDG_RUNTIME_DIR=/var/run/root/1000
EnvironmentFile=-/tmp/GlobalSystemSettingsEnvironment
EnvironmentFile=-/tmp/GlobalSPOTOverrideEnvironment

# EOF


Below is the status of service when fails and when starts successfully.

Failure:

root at linux_demo0:~# systemctl status weston -l
? weston.service - weston (wayland compositor)
   Loaded: loaded (/lib/systemd/system/weston.service; static; vendor
preset: enabled)
   Active: inactive (dead) since Thu 1970-01-01 00:00:13 UTC; 4s ago
  Process: 760 ExecStart=/usr/bin/weston --tty=1 --idle-time=0
--backend=drm-backend.so --connector=36 --log=/tmp/weston.log (code=exited,
status=0/SUCCESS)
  Process: 755 ExecStartPre=/bin/chmod 0700 /var/run/root/1000
(code=exited, status=0/SUCCESS)
  Process: 744 ExecStartPre=/bin/mkdir -p /var/run/root/1000 (code=exited,
status=0/SUCCESS)
 Main PID: 760 (code=exited, status=0/SUCCESS)

Jan 01 00:00:05 linux_demo0 weston[760]: failed to load module:
/usr/lib/gbm/gbm_dri.so: cannot open shared object file: No such file or
directory
Jan 01 00:00:05 linux_demo0 weston[760]: failed to load module:
/usr/lib/gbm/gbm_gallium_drm.so: cannot open shared object file: No such
file or directory
Jan 01 00:00:05 linux_demo0 weston[760]: loaded module : gbm_pvr.so
Jan 01 00:00:05 linux_demo0 weston[760]: found valid GBM backend :
gbm_pvr.so
Jan 01 00:00:12 linux_demo0 systemd[1]: weston.service: Got notification
message from PID 760 (STOPPING=1)
Jan 01 00:00:12 linux_demo0 systemd[1]: weston.service: Changed running ->
stop-sigterm
Jan 01 00:00:13 linux_demo0 systemd[1]: weston.service: Child 760 belongs
to weston.service
Jan 01 00:00:13 linux_demo0 systemd[1]: weston.service: Main process
exited, code=exited, status=0/SUCCESS
Jan 01 00:00:13 linux_demo0 systemd[1]: weston.service: Changed
stop-sigterm -> dead
Jan 01 00:00:13 linux_demo0 systemd[1]: weston.service: cgroup is empty


Success:

root at linux_demo0:~# systemctl status weston -l
? weston.service - weston (wayland compositor)
   Loaded: loaded (/lib/systemd/system/weston.service; static; vendor
preset: enabled)
   Active: active (running) since Thu 1970-01-01 00:00:15 UTC; 17s ago
  Process: 752 ExecStartPre=/bin/chmod 0700 /var/run/root/1000
(code=exited, status=0/SUCCESS)
  Process: 746 ExecStartPre=/bin/mkdir -p /var/run/root/1000 (code=exited,
status=0/SUCCESS)
 Main PID: 761 (weston)
   CGroup: /system.slice/weston.service
           mq761 /usr/bin/weston --tty=1 --idle-time=0
--backend=drm-backend.so --connector=36 --log=/tmp/weston.log

Jan 01 00:00:15 linux_demo0 systemd[1]: weston.service: Changed start-pre
-> start
Jan 01 00:00:15 linux_demo0 systemd[761]: weston.service: Executing:
/usr/bin/weston --tty=1 --idle-time=0 --backend=drm-backend.so
--connector=36 --log=/tmp/weston.log
Jan 01 00:00:15 linux_demo0 weston[761]: failed to load module:
/usr/lib/gbm/gbm_dri.so: cannot open shared object file: No such file or
directory
Jan 01 00:00:15 linux_demo0 weston[761]: failed to load module:
/usr/lib/gbm/gbm_gallium_drm.so: cannot open shared object file: No such
file or directory
Jan 01 00:00:15 linux_demo0 weston[761]: loaded module : gbm_pvr.so
Jan 01 00:00:15 linux_demo0 weston[761]: found valid GBM backend :
gbm_pvr.so
Jan 01 00:00:15 linux_demo0 systemd[1]: weston.service: Got notification
message from PID 761 (READY=1)
Jan 01 00:00:15 linux_demo0 systemd[1]: weston.service: Changed start ->
running
Jan 01 00:00:15 linux_demo0 systemd[1]: weston.service: Job
weston.service/start finished, result=done
Jan 01 00:00:15 linux_demo0 systemd[1]: Started weston (wayland compositor).
Jan 01 00:00:45 linux_demo0 systemd[1]: weston.service: Got notification
message from PID 761 (WATCHDOG=1)


Thanks & Regards,
Vikash
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20170110/65679d4a/attachment.html>


More information about the wayland-devel mailing list