Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
failed to start weston drm-backend with seatd
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
guyuming
Apprentice
Apprentice


Joined: 19 Nov 2020
Posts: 235

PostPosted: Wed Apr 17, 2024 5:48 am    Post subject: failed to start weston drm-backend with seatd Reply with quote

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
View user's profile Send private message
CooSee
Veteran
Veteran


Joined: 20 Nov 2004
Posts: 1444
Location: Earth

PostPosted: Wed Apr 17, 2024 7:08 pm    Post subject: Reply with quote

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.

8)
_________________
" 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
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3349
Location: Rasi, Finland

PostPosted: Wed Apr 17, 2024 10:23 pm    Post subject: Reply with quote

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
View user's profile Send private message
guyuming
Apprentice
Apprentice


Joined: 19 Nov 2020
Posts: 235

PostPosted: Thu Apr 18, 2024 12:59 am    Post subject: Reply with quote

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
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3349
Location: Rasi, Finland

PostPosted: Thu Apr 18, 2024 9:53 am    Post subject: Reply with quote

Quote:
Code:
TTY="/dev/pts/1"
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
View user's profile Send private message
guyuming
Apprentice
Apprentice


Joined: 19 Nov 2020
Posts: 235

PostPosted: Fri Apr 19, 2024 12:59 am    Post subject: Reply with quote

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
View user's profile Send private message
CooSee
Veteran
Veteran


Joined: 20 Nov 2004
Posts: 1444
Location: Earth

PostPosted: Fri Apr 26, 2024 7:19 pm    Post subject: Reply with quote

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 !

8)
_________________
" 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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum