Hello,

Environment: Debian bullseye (custom build using debootstrap), Kernel 5.10.52, Weston 9.0.0-1, systemd 247.3-7+deb11u1.

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:

##########

Feb 17 12:16:24 tavla systemd[1]: Starting DISPLAY Wayland Service...
Feb 17 12:16:24 tavla systemd[1]: Started DISPLAY Wayland Service.
Feb 17 12:16:24 tavla sudo[948]: pam_unix(sudo:session): session closed for user root Feb 17 12:16:24 tavla weston-launch[952]: pam_unix(login:session): session opened for user tavla-run(uid=1001) by (uid=0)
Feb 17 12:16:24 tavla systemd-logind[344]: New session 9 of user tavla-run.
Feb 17 12:16:24 tavla systemd[1]: Started Session 9 of user tavla-run.
Feb 17 12:16:24 tavla systemd-logind[344]: Failed to apply ACLs: Operation not supported
Feb 17 12:16:24 tavla DISPLAY Wayland[957]: Date: 2023-02-17 CET
Feb 17 12:16:24 tavla DISPLAY Wayland[957]: [12:16:24.605] weston 9.0.0
Feb 17 12:16:24 tavla DISPLAY Wayland[957]: https://wayland.freedesktop.org
Feb 17 12:16:24 tavla DISPLAY Wayland[957]:                Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/
Feb 17 12:16:24 tavla DISPLAY Wayland[957]:                Build: 9.0.0
Feb 17 12:16:24 tavla DISPLAY Wayland[957]: [12:16:24.605] Command line: /usr/bin/weston 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 Feb 17 12:16:24 tavla DISPLAY Wayland[957]: [12:16:24.606] Using config file '/etc/xdg/weston/weston.ini' Feb 17 12:16:24 tavla DISPLAY Wayland[957]: [12:16:24.606] Output repaint window is 16 ms maximum. 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' Feb 17 12:16:24 tavla DISPLAY Wayland[957]: [12:16:24.612] initializing drm backend Feb 17 12:16:24 tavla DISPLAY Wayland[957]: [12:16:24.616] logind: session control granted Feb 17 12:16:24 tavla DISPLAY Wayland[957]: [12:16:24.624] using /dev/dri/card1 Feb 17 12:16:24 tavla DISPLAY Wayland[957]: [12:16:24.624] DRM: supports atomic modesetting Feb 17 12:16:24 tavla DISPLAY Wayland[957]: [12:16:24.624] DRM: does not support GBM modifiers Feb 17 12:16:24 tavla DISPLAY Wayland[957]: [12:16:24.624] DRM: supports picture aspect ratio 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' Feb 17 12:16:25 tavla DISPLAY Wayland[957]: [     1] Failed to open device: No such file or directory, Try again... Feb 17 12:16:26 tavla DISPLAY Wayland[957]: [     2] Failed to open device: No such file or directory, Try again... Feb 17 12:16:27 tavla DISPLAY Wayland[957]: [     3] Failed to open device: No such file or directory, Try again... Feb 17 12:16:28 tavla DISPLAY Wayland[957]: [     4] Failed to open device: No such file or directory, Try again... Feb 17 12:16:28 tavla DISPLAY Wayland[957]: [     5] _OpenDevice(1249): FATAL: Failed to open device, errno=No such file or directory. Feb 17 12:16:28 tavla weston-launch[952]: pam_unix(login:session): session closed for user tavla-run Feb 17 12:16:28 tavla sudo[961]:    tavla : TTY=pts/0 ; PWD=/home/tavla ; USER=root ; COMMAND=/usr/bin/journalctl Feb 17 12:16:28 tavla sudo[961]: pam_unix(sudo:session): session opened for user root(uid=0) by tavla(uid=1000) Feb 17 12:16:28 tavla systemd[1]: tavla-display.service: Main process exited, code=exited, status=1/FAILURE

##########

I tried to change tty owner (chown tavla-run:tty /dev/tty7), however, after the service starts the owner is set to "root".

This _does not happen_ in the other image (owner of /dev/tty7 remains "tavla-run" and weston starts as this user). What is going on?

Groups of user "tavla-run": tavla-run tty dialout audio video bluetooth i2c tavla netdev

########## /lib/systemd/system/weston.service

[Unit]
Description=DISPLAY Wayland Service

After=dbus.socket systemd-user-sessions.service
Wants=dbus.socket
Before=tavla-run.service

[Service]
SyslogIdentifier=DISPLAY Wayland

PAMName=login

Environment=DISPLAY=:0

# Grab tty7
UtmpIdentifier=tty7
TTYPath=/dev/tty7
TTYReset=yes
TTYVHangup=yes
TTYVTDisallocate=yes

# Weston does not successfully change VT, nor does systemd place us on
# the VT it just activated for us. Switch manually:
ExecStartPre=/bin/chvt 7
ExecStart=/usr/bin/weston-launch --tty /dev/tty7 --user tavla-run --

IgnoreSIGPIPE=no

[Install]
WantedBy=default.target

##########

Thanks,

Martin

Reply via email to