Skip to contentSkip to conversation

weston-init: Add chvt to weston.service

PATCH In review Tom Hochstein 1 participant 2 messages Jun 13, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 weston-init: Add chvt to weston.service

In testing a specific scenario with multiple displays, one of the displays did fail to start into weston the majority of the time. The problem was traced to a change in seatd from 0.8.0 to 0.9.1, and a writeup of the problem was found here:

https://lists.sr.ht/~kennylevinsen/seatd-devel/%3CZy_-FRQnBTeNPXVj@mail-itl%3E

Here is a copy of the explanation:

```
The main change is that libseat no longer activates the session when
using the logind backend, so if an inactive VT/TTY is targeted, a chvt
before or after starting the session is required in the start scripts to
make the session visible.

This activation is removed to allow starting sessions in the background,
something Weston used to allow before adopting libseat.

An example of a fix is available here:
https://gitlab.gnome.org/World/Phosh/phosh/-/merge_requests/1566
```
---
 meta/recipes-graphics/wayland/weston-init/weston.service | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-graphics/wayland/weston-init/weston.service +1 -0
index 80745998ed..db2c74649f 100644
@@ -34,6 +34,7 @@ ConditionPathExists=/dev/tty0
 # Requires systemd-notify.so Weston plugin.
 Type=notify
 EnvironmentFile=/etc/default/weston
+ExecStartPre=+chvt 7
 ExecStart=/usr/bin/weston --modules=systemd-notify.so
 
 # Optional watchdog setup
Signature · 1 line
2.34.1
#1 lore raw

Please consider this patch withdrawn. After further testing, we are seeing similar issues even with the change.

Tom