View previous topic :: View next topic |
Author |
Message |
guyuming Apprentice
Joined: 19 Nov 2020 Posts: 242
|
Posted: Wed Apr 17, 2024 5:48 am Post subject: failed to start weston drm-backend with seatd |
|
|
i am trying to start weston without systemd or elogind, but seatd, what follows is the output of script with bash -x:
Code: |
Script started on 2024-04-17 10:46:23+08:00 [COMMAND="weston.sh" TERM="linux" TTY="/dev/pts/1" COLUMNS="170" LINES="48"]
++ id -u
+ export XDG_RUNTIME_DIR=/tmp/XDG_RUNTIME_DIR_1000_13290
+ XDG_RUNTIME_DIR=/tmp/XDG_RUNTIME_DIR_1000_13290
+ xdg_run_user
+ [[ ! -z /tmp/XDG_RUNTIME_DIR_1000_13290 ]]
++ id -u
+ YOUR_USER=1000
++ id -g
+ YOUR_GROUP=1000
+ rm -rf /tmp/XDG_RUNTIME_DIR_1000_13290
+ mkdir -p /tmp/XDG_RUNTIME_DIR_1000_13290
+ chown 1000:1000 /tmp/XDG_RUNTIME_DIR_1000_13290
+ chmod 700 /tmp/XDG_RUNTIME_DIR_1000_13290
+ export GTK_IM_MODULE=wayland
+ GTK_IM_MODULE=wayland
+ export _JAVA_AWT_WM_NONREPARENTING=1
+ _JAVA_AWT_WM_NONREPARENTING=1
+ export GDK_BACKEND=wayland
+ GDK_BACKEND=wayland
+ export XCURSOR_THEME=BreezeX-Light
+ XCURSOR_THEME=BreezeX-Light
+ export XCURSOR_PATH=/usr/share/cursors/xorg-x11/
+ XCURSOR_PATH=/usr/share/cursors/xorg-x11/
+ echo 'export WLR_NO_HARDWARE_CURSORS=1 # try this if you don'\''t see cursor in dwl'
export WLR_NO_HARDWARE_CURSORS=1 # try this if you don't see cursor in dwl
+ weston
Date: 2024-04-17 CST
[10:46:23.436] weston 11.0.1
https://wayland.freedesktop.org
Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/
Build: 11.0.1
[10:46:23.437] Command line: weston
[10:46:23.437] OS: Linux, 6.1.67-gentoo-x86_64, #2 SMP PREEMPT_DYNAMIC Thu Dec 21 09:34:45 CST 2023, x86_64
[10:46:23.437] Flight recorder: enabled
[10:46:23.437] Starting with no config file.
[10:46:23.437] Output repaint window is 7 ms maximum.
[10:46:23.437] Loading module '/usr/lib64/libweston-11/drm-backend.so'
[10:46:23.440] initializing drm backend
[10:46:23.440] Trying libseat launcher...
[10:46:23.454] [libseat/libseat.c:73] Seat opened with backend 'seatd'
[10:46:23.454] [libseat/backend/seatd.c:212] Enabling seat
[10:46:23.455] libseat: session control granted
[10:46:23.460] no drm device found
[10:46:23.503] fatal: failed to create compositor backend
Internal warning: debug scope 'drm-backend' has not been destroyed.
Script done on 2024-04-17 10:46:23+08:00 [COMMAND_EXIT_CODE="1"]
|
i run start seatd with openrc and can see the socket:
Code: |
guyuming@localhost ~ $ ps -ef|grep seatd
root 2339 1 0 12:07 ? 00:00:00 supervise-daemon seatd --start --stdout /tmp/seatdstdout --stderr /tmp/seatdstderr seatd -- -g video -l debug
root 2340 2339 0 12:07 ? 00:00:00 seatd -g video -l debug
guyuming@localhost ~ $ ls -l /run/seatd.sock
srwxrwx--- 1 root video 0 4月17日 12:07 /run/seatd.sock
guyuming@localhost ~ $ cat /etc/group |grep -e video -e seat
video:x:27:root,guyuming
seat:x:202:guyuming
|
weston can start with the same script on the same machine inside x11, with x11 backend |
|
Back to top |
|
|
CooSee Veteran
Joined: 20 Nov 2004 Posts: 1462 Location: Earth
|
Posted: Wed Apr 17, 2024 7:08 pm Post subject: |
|
|
Code: | export XDG_RUNTIME_DIR=/tmp/XDG_RUNTIME_DIR_1000_13290 |
have you tried with /run/user/1000 ? <<< https://stackoverflow.com/questions/77394122/weston-not-running-from-terminal-no-drm-device-found
i'am not sure if weston also needs dbus entry before start, e.g. dbus-run-session weston.
_________________ " Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier " |
|
Back to top |
|
|
Zucca Moderator
Joined: 14 Jun 2007 Posts: 3639 Location: Rasi, Finland
|
Posted: Wed Apr 17, 2024 10:23 pm Post subject: |
|
|
Make sure seatd is started at boot runlevel.
I've made my own startwayland script, which works on my systems which use seatd too.
I can share it here, if you'd like. I need to clean it up a bit first. _________________ ..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote: | I am NaN! I am a man! |
|
|
Back to top |
|
|
guyuming Apprentice
Joined: 19 Nov 2020 Posts: 242
|
Posted: Thu Apr 18, 2024 12:59 am Post subject: |
|
|
I tried adding dbus-run-session before session, but it does not fix.
I noticed the "no drm device found" message, but i can see the device file in system:
Code: | guyuming@localhost ~ $ ls -lt /dev/dri
总计 0
crw-rw---- 1 root video 226, 0 4月18日 06:10 card0
drwxr-xr-x 2 root root 80 4月18日 06:10 by-path
crw-rw-rw- 1 root render 226, 128 4月18日 06:10 renderD128
|
My script works for DWL, which is based on wlroots, if i simply change weston to dwl.
And for the XDG_RUNTIME_DIR value, which is used by wayland client to communicate with wayland server i think. Does it have any usage before the compositor start? The problem here is that the compositor failed to start. Anyway, weston can start with the same script using x11-backend.
I had tried changed weston to gdb weston in the script to debug. But the system always hang when it calls sendmsg syscall to seatd via the /run/seatd.sock |
|
Back to top |
|
|
Zucca Moderator
Joined: 14 Jun 2007 Posts: 3639 Location: Rasi, Finland
|
Posted: Thu Apr 18, 2024 9:53 am Post subject: |
|
|
From where are you running the script?
Also, Zucca wrote: | Make sure seatd is started at boot runlevel. | , is it? _________________ ..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote: | I am NaN! I am a man! |
|
|
Back to top |
|
|
guyuming Apprentice
Joined: 19 Nov 2020 Posts: 242
|
Posted: Fri Apr 19, 2024 12:59 am Post subject: |
|
|
There is an example in wlroots: wlroots/examples/tablet.c
I build the tablet example and run to find that i get the same error.
By reviewing my script to start DWL, i find that i had solved this issue before with my reply in:
https://github.com/swaywm/sway/issues/7240
And the WLR_DRM_DEVICES=/dev/dri/card0 environment variable setting solve the issue for tablet example too.
But this variable is defined by wlroots, i need to find a similar one used by weston. |
|
Back to top |
|
|
CooSee Veteran
Joined: 20 Nov 2004 Posts: 1462 Location: Earth
|
Posted: Fri Apr 26, 2024 7:19 pm Post subject: |
|
|
Quote: | But this variable is defined by wlroots, i need to find a similar one used by weston. |
man weston-drm - in Options.
Code: | --drm-device=cardN
Use the DRM device cardN for rendering and output instead of the default heuristics based on seat assignments and boot VGA status. For example, use card0. |
i hope this is it !
_________________ " Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier " |
|
Back to top |
|
|
|