<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hello,</p>
<p>Environment: Debian bullseye (custom build using debootstrap),
Kernel 5.10.52, Weston 9.0.0-1, systemd 247.3-7+deb11u1.</p>
<p>I am struggling to get weston running as a user. It is working on
some other Debian bullseye BSP image, but not in my Debian image
(both are very similar). When I use weston-launch in a systemd
service and add a "--user" and "--tty" (see service below), I
always get the following error:</p>
<p>##########</p>
<p>Feb 17 12:16:24 tavla systemd[1]: Starting DISPLAY Wayland
Service...<br>
Feb 17 12:16:24 tavla systemd[1]: Started DISPLAY Wayland Service.<br>
Feb 17 12:16:24 tavla sudo[948]: pam_unix(sudo:session): session
closed for user root<br>
Feb 17 12:16:24 tavla weston-launch[952]: pam_unix(login:session):
session opened for user tavla-run(uid=1001) by (uid=0)<br>
Feb 17 12:16:24 tavla systemd-logind[344]: New session 9 of user
tavla-run.<br>
Feb 17 12:16:24 tavla systemd[1]: Started Session 9 of user
tavla-run.<br>
Feb 17 12:16:24 tavla systemd-logind[344]: Failed to apply ACLs:
Operation not supported<br>
Feb 17 12:16:24 tavla DISPLAY Wayland[957]: Date: 2023-02-17 CET<br>
Feb 17 12:16:24 tavla DISPLAY Wayland[957]: [12:16:24.605] weston
9.0.0<br>
Feb 17 12:16:24 tavla DISPLAY Wayland[957]:
<a class="moz-txt-link-freetext" href="https://wayland.freedesktop.org">https://wayland.freedesktop.org</a><br>
Feb 17 12:16:24 tavla DISPLAY Wayland[957]: Bug
reports to: <a class="moz-txt-link-freetext" href="https://gitlab.freedesktop.org/wayland/weston/issues/">https://gitlab.freedesktop.org/wayland/weston/issues/</a><br>
Feb 17 12:16:24 tavla DISPLAY Wayland[957]: Build:
9.0.0<br>
Feb 17 12:16:24 tavla DISPLAY Wayland[957]: [12:16:24.605] Command
line: /usr/bin/weston<br>
Feb 17 12:16:24 tavla DISPLAY Wayland[957]: [12:16:24.605] OS:
Linux, 5.10.52-gba9ade6851ca-dirty, #1 SMP PREEMPT Fri Feb 17
09:13:57 UTC 2023, aarch64<br>
Feb 17 12:16:24 tavla DISPLAY Wayland[957]: [12:16:24.606] Using
config file '/etc/xdg/weston/weston.ini'<br>
Feb 17 12:16:24 tavla DISPLAY Wayland[957]: [12:16:24.606] Output
repaint window is 16 ms maximum.<br>
Feb 17 12:16:24 tavla DISPLAY Wayland[957]: [12:16:24.606] Loading
module '/usr/lib/aarch64-linux-gnu/libweston-9/drm-backend.so'<br>
Feb 17 12:16:24 tavla DISPLAY Wayland[957]: [12:16:24.612]
initializing drm backend<br>
Feb 17 12:16:24 tavla DISPLAY Wayland[957]: [12:16:24.616] logind:
session control granted<br>
Feb 17 12:16:24 tavla DISPLAY Wayland[957]: [12:16:24.624] using
/dev/dri/card1<br>
Feb 17 12:16:24 tavla DISPLAY Wayland[957]: [12:16:24.624] DRM:
supports atomic modesetting<br>
Feb 17 12:16:24 tavla DISPLAY Wayland[957]: [12:16:24.624] DRM:
does not support GBM modifiers<br>
Feb 17 12:16:24 tavla DISPLAY Wayland[957]: [12:16:24.624] DRM:
supports picture aspect ratio<br>
Feb 17 12:16:24 tavla DISPLAY Wayland[957]: [12:16:24.624] Loading
module '/usr/lib/aarch64-linux-gnu/libweston-9/g2d-renderer.so'<br>
Feb 17 12:16:25 tavla DISPLAY Wayland[957]: [ 1] Failed to
open device: No such file or directory, Try again...<br>
Feb 17 12:16:26 tavla DISPLAY Wayland[957]: [ 2] Failed to
open device: No such file or directory, Try again...<br>
Feb 17 12:16:27 tavla DISPLAY Wayland[957]: [ 3] Failed to
open device: No such file or directory, Try again...<br>
Feb 17 12:16:28 tavla DISPLAY Wayland[957]: [ 4] Failed to
open device: No such file or directory, Try again...<br>
Feb 17 12:16:28 tavla DISPLAY Wayland[957]: [ 5]
_OpenDevice(1249): FATAL: Failed to open device, errno=No such
file or directory.<br>
Feb 17 12:16:28 tavla weston-launch[952]: pam_unix(login:session):
session closed for user tavla-run<br>
Feb 17 12:16:28 tavla sudo[961]: tavla : TTY=pts/0 ;
PWD=/home/tavla ; USER=root ; COMMAND=/usr/bin/journalctl<br>
Feb 17 12:16:28 tavla sudo[961]: pam_unix(sudo:session): session
opened for user root(uid=0) by tavla(uid=1000)<br>
Feb 17 12:16:28 tavla systemd[1]: tavla-display.service: Main
process exited, code=exited, status=1/FAILURE</p>
<p>##########<br>
</p>
<p>I tried to change tty owner (chown tavla-run:tty /dev/tty7),
however, after the service starts the owner is set to "root".</p>
<p>This <u>does not happen</u> in the other image (owner of
/dev/tty7 remains "tavla-run" and weston starts as this user).
What is going on?</p>
<p>Groups of user "tavla-run": tavla-run tty dialout audio video
bluetooth i2c tavla netdev<br>
</p>
<p>########## /lib/systemd/system/weston.service <br>
</p>
<p>[Unit]<br>
Description=DISPLAY Wayland Service<br>
<br>
After=dbus.socket systemd-user-sessions.service<br>
Wants=dbus.socket<br>
Before=tavla-run.service<br>
<br>
[Service]<br>
SyslogIdentifier=DISPLAY Wayland<br>
<br>
PAMName=login<br>
<br>
Environment=DISPLAY=:0<br>
<br>
# Grab tty7<br>
UtmpIdentifier=tty7<br>
TTYPath=/dev/tty7<br>
TTYReset=yes<br>
TTYVHangup=yes<br>
TTYVTDisallocate=yes<br>
<br>
# Weston does not successfully change VT, nor does systemd place
us on<br>
# the VT it just activated for us. Switch manually:<br>
ExecStartPre=/bin/chvt 7<br>
ExecStart=/usr/bin/weston-launch --tty /dev/tty7 --user tavla-run
--<br>
<br>
IgnoreSIGPIPE=no<br>
<br>
[Install]<br>
WantedBy=default.target<br>
</p>
<p>##########<br>
</p>
<p>Thanks,</p>
<p>Martin<br>
</p>
<p><br>
</p>
</body>
</html>