starting weston using systemd on tty=1 query

Armin Krezović krezovic.armin at gmail.com
Wed Oct 5 10:26:22 UTC 2016


On 05.10.2016 10:51, Vikas Patil wrote:
> Dear All,
> 
> I am working on to start weston on tty=1 using the systemd, however it
> fails to start on boot-up. If I launch weston after bootup using
> "systemd start weston" then it works but not with the bootup. If I use
> tty=2 then it work on bootup. systemd version is 225.
> 
> Could you anyone explain why it fails with tty=1 on bootup and works
> with tty=2? Is there anyway I can start it on tty=1? Is it fine if I
> start it with tty=2?
> 
> Here are the log for failure:
> 
> root at linux123:~# systemctl status weston -l
> ? weston.service - weston (wayland compositor)
>    Loaded: loaded (/lib/systemd/system/weston.service; static; vendor
> preset: enabled)
>    Active: inactive (dead) since Fri 2016-09-30 10:00:44 UTC; 51s ago
>   Process: 1284 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: 1278 ExecStartPre=/bin/chmod 0700 /var/run/root/1000
> (code=exited, status=0/SUCCESS)
>   Process: 1271 ExecStartPre=/bin/mkdir -p /var/run/root/1000
> (code=exited, status=0/SUCCESS)
>  Main PID: 1284 (code=exited, status=0/SUCCESS)
> 
> Sep 30 10:00:43 mmt2020 systemd[1]: weston.service: Got notification
> message from PID 1284 (STOPPING=1)
> Sep 30 10:00:43 mmt2020 systemd[1]: weston.service: Changed running ->
> stop-sigterm
> Sep 30 10:00:44 mmt2020 systemd[1]: weston.service: Child 1284 belongs
> to weston.service
> Sep 30 10:00:44 mmt2020 systemd[1]: weston.service: Main process
> exited, code=exited, status=0/SUCCESS
> Sep 30 10:00:44 mmt2020 systemd[1]: weston.service: Changed stop-sigterm -> dead
> Sep 30 10:00:44 mmt2020 systemd[1]: weston.service: cgroup is empty
> 
> Here is my weston.service file
> 
> [Unit]
> Description=weston (wayland compositor)
> DefaultDependencies=false
> Requires=pvrinit.service udevd.service
> After=pvrinit.service udevd.service
> 
> [Service]
> Type=notify
> NotifyAccess=all
> WatchdogSec=20s
> 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 ---
> Nice=-20
> Environment=XDG_RUNTIME_DIR=/var/run/root/1000
> EnvironmentFile=-/tmp/GlobalSystemSettingsEnvironment
> EnvironmentFile=-/tmp/GlobalSPOTOverrideEnvironment
> 
> # --- Kill options ---
> 
> # EOF
> 
> 
> Here are the output for "dmesg | grep tty"
> 
> root at linux123:~# dmesg | grep tty
> [    4.863360] systemd[698]: Spawned
> /lib/systemd/system-generators/systemd-getty-generator as 703.
> [    4.875864] systemd-getty-generator[703]: Automatically adding
> serial getty for /dev/ttyO2.
> [    4.881230] systemd[698]:
> /lib/systemd/system-generators/systemd-getty-generator succeeded.
> [    5.021443] systemd[1]: getty at tty1.service: Installed new job
> getty at tty1.service/start as 61
> [    5.021690] systemd[1]: system-getty.slice: Installed new job
> system-getty.slice/start as 62
> [    5.021819] systemd[1]: getty.target: Installed new job
> getty.target/start as 60
> [    5.022199] systemd[1]: system-serial\x2dgetty.slice: Installed new
> job system-serial\x2dgetty.slice/start as 65
> [    5.022456] systemd[1]: serial-getty at ttyS0.service: Installed new
> job serial-getty at ttyS0.service/start as 63
> [    5.022829] systemd[1]: serial-getty at ttyO2.service: Installed new
> job serial-getty at ttyO2.service/start as 66
> [    5.022908] systemd[1]: dev-ttyS0.device: Installed new job
> dev-ttyS0.device/start as 64
> [    5.022977] systemd[1]: dev-ttyO2.device: Installed new job
> dev-ttyO2.device/start as 67
> [    5.242611] systemd[1]: system-serial\x2dgetty.slice changed dead -> active
> [    5.242637] systemd[1]: system-serial\x2dgetty.slice: Job
> system-serial\x2dgetty.slice/start finished, result=done
> [    5.242665] systemd[1]: Created slice system-serial\x2dgetty.slice.
> [    5.542780] systemd[1]: system-getty.slice changed dead -> active
> [    5.542807] systemd[1]: system-getty.slice: Job
> system-getty.slice/start finished, result=done
> [    5.542839] systemd[1]: Created slice system-getty.slice.
> [    8.252350] systemd[1]:
> sys-devices-platform-44000000.ocp-4806c000.serial-tty-ttyO1.device:
> Changed dead -> plugged
> [    9.234335] systemd[1]: serial-getty at ttyO2.service: Job
> serial-getty at ttyO2.service/start finished, result=done
> [    9.512323] systemd[1]: getty at tty1.service:
> ConditionPathExists=/dev/tty0 succeeded.
> [    9.532327] systemd[1]: getty at tty1.service: Forked /sbin/agetty as 1310
> [    9.572372] systemd[1]: getty at tty1.service: Job
> getty at tty1.service/start finished, result=done
> [    9.942423] systemd[1]: Sent message type=signal sender=n/a
> destination=n/a
> object=/org/freedesktop/systemd1/unit/dev_2dttyO1_2edevice
> interface=org.freedesktop.DBus.Properties member=PropertiesChanged
> cookie=1 reply_cookie=0 error=n/a
> [    9.952428] systemd[1]: Sent message type=signal sender=n/a
> destination=n/a
> object=/org/freedesktop/systemd1/unit/sys_2ddevices_2dplatform_2d44000000_2eocp_2d4806c000_2eserial_2dtty_2dttyO1_2edevice
> interface=org.freedesktop.DBus.Properties member=PropertiesChanged
> cookie=3 reply_cookie=0 error=n/a
> 
> Thanks & Regards,
> Vikas
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel
> 

Did you try adding conflicts with getty at tty1, or disabling getty at tty1, which
is usually enabled by default?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 837 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20161005/e5c2df88/attachment-0001.sig>


More information about the wayland-devel mailing list