testing Weston Wayland compositor on FreeBSD without Xorg

Denis Polygalov <[email protected]>
Newsgroups gmane.os.freebsd.devel.x11
Message-ID <[email protected]>
I'm trying to run Weston port:

https://reviews.freebsd.org/D10599

on a machine (let's say "host A") with and without using Xorg.
I'm using approach previously described by Greg:

https://lists.freebsd.org/pipermail/freebsd-x11/2018-July/021414.html

It works on the host A if launched under Xorg.
The same approach works on host B (drm-next-kmod, Intel drivers)
from under Xorg *and* via weston-launch.

It does not work on the host A if launched directly i.e. "% weston-launch".

The host A is:

% uname -a
FreeBSD AmaDeuS 11.2-RELEASE-p1 FreeBSD 11.2-RELEASE-p1 #0: Sun Aug 12 
19:40:55 JST 2018     denis@AmaDeuS:/usr/obj/usr/src/sys/AMADEUS  amd64
% pkg info | egrep "drm|gpu|mesa"
drm-next-kmod-4.11.g20180619
gpu-firmware-kmod-g20180319_1
libdrm-2.4.92,1
mesa-dri-18.1.2
mesa-libs-18.1.2

% kldstat -v | grep 0x
  1   83 0xffffffff80200000 203e7f0  kernel (/boot/kernel/kernel)
  2    1 0xffffffff82240000 5e80     ichsmb.ko (/boot/kernel/ichsmb.ko)
  3    3 0xffffffff82246000 2d10     smbus.ko (/boot/kernel/smbus.ko)
  4    1 0xffffffff82249000 2da0     smb.ko (/boot/kernel/smb.ko)
  5    1 0xffffffff82421000 20b2d8   amdgpu.ko (/boot/modules/amdgpu.ko)
  6    1 0xffffffff8262d000 bb4f0    drm.ko (/boot/modules/drm.ko)
  7    4 0xffffffff826e9000 edc8     linuxkpi.ko (/boot/kernel/linuxkpi.ko)
  8    3 0xffffffff826f8000 164a1    linuxkpi_gplv2.ko 
(/boot/modules/linuxkpi_gplv2.ko)
  9    2 0xffffffff8270f000 9e8      debugfs.ko (/boot/modules/debugfs.ko)
10    1 0xffffffff82710000 8158     amdgpu_polaris11_mc_bin.ko 
(/boot/modules/amdgpu_polaris11_mc_bin.ko)
11    1 0xffffffff82719000 4400     amdgpu_polaris11_pfp_bin.ko 
(/boot/modules/amdgpu_polaris11_pfp_bin.ko)
12    1 0xffffffff8271e000 4400     amdgpu_polaris11_me_bin.ko 
(/boot/modules/amdgpu_polaris11_me_bin.ko)
13    1 0xffffffff82723000 2400     amdgpu_polaris11_ce_bin.ko 
(/boot/modules/amdgpu_polaris11_ce_bin.ko)
14    1 0xffffffff82726000 5c10     amdgpu_polaris11_rlc_bin.ko 
(/boot/modules/amdgpu_polaris11_rlc_bin.ko)
15    1 0xffffffff8272c000 40400    amdgpu_polaris11_mec_bin.ko 
(/boot/modules/amdgpu_polaris11_mec_bin.ko)
16    1 0xffffffff8276d000 40400    amdgpu_polaris11_mec2_bin.ko 
(/boot/modules/amdgpu_polaris11_mec2_bin.ko)
17    1 0xffffffff827ae000 3318     amdgpu_polaris11_sdma_bin.ko 
(/boot/modules/amdgpu_polaris11_sdma_bin.ko)
18    1 0xffffffff827b2000 3320     amdgpu_polaris11_sdma1_bin.ko 
(/boot/modules/amdgpu_polaris11_sdma1_bin.ko)
19    1 0xffffffff827b6000 5bc00    amdgpu_polaris11_uvd_bin.ko 
(/boot/modules/amdgpu_polaris11_uvd_bin.ko)
20    1 0xffffffff82812000 28d20    amdgpu_polaris11_vce_bin.ko 
(/boot/modules/amdgpu_polaris11_vce_bin.ko)
21    1 0xffffffff8283b000 1fe18    amdgpu_polaris11_smc_bin.ko 
(/boot/modules/amdgpu_polaris11_smc_bin.ko)
22    1 0xffffffff8285b000 27a0     ums.ko (/boot/kernel/ums.ko)
23    1 0xffffffff8285e000 1780     uhid.ko (/boot/kernel/uhid.ko)
24    1 0xffffffff82860000 3698     ng_ubt.ko (/boot/kernel/ng_ubt.ko)
25    5 0xffffffff82864000 9a20     netgraph.ko (/boot/kernel/netgraph.ko)
26    1 0xffffffff8286e000 8e78     ng_hci.ko (/boot/kernel/ng_hci.ko)
27    3 0xffffffff82877000 95c      ng_bluetooth.ko 
(/boot/kernel/ng_bluetooth.ko)
28    1 0xffffffff82878000 bc0e     ng_l2cap.ko (/boot/kernel/ng_l2cap.ko)
29    1 0xffffffff82884000 176a8    ng_btsocket.ko 
(/boot/kernel/ng_btsocket.ko)
30    1 0xffffffff8289c000 1d40     ng_socket.ko (/boot/kernel/ng_socket.ko)

What exactly happend when I execute "weston-launch":

... skipped
[22:00:05.026] GL ES 2 renderer features:
                read-back format: BGRA
                wl_shm sub-image to texture: yes
                EGL Wayland extension: yes
[22:00:05.037] input device 'System mouse', /dev/input/event0 is tagged 
by udev as: Mouse
[22:00:05.037] input device 'System mouse', /dev/input/event0 is a 
pointer caps
[22:00:05.037] input device 'System keyboard multiplexer', 
/dev/input/event1 is tagged by udev as: Keyboard
[22:00:05.037] input device 'System keyboard multiplexer', 
/dev/input/event1 is a keyboard
[22:00:05.038] input device 'AT keyboard', /dev/input/event2 is tagged 
by udev as: Keyboard
[22:00:05.038] input device 'AT keyboard', /dev/input/event2 is a keyboard
[22:00:05.038] input device 'Dexin Corp. 2.4GHz Keyboardmouse set 
01242013A, class 0/0, rev 1.10/8.2c, addr ', /dev/input/event3 is tagged 
by udev as: Keyboard
[22:00:05.038] input device 'Dexin Corp. 2.4GHz Keyboardmouse set 
01242013A, class 0/0, rev 1.10/8.2c, addr ', /dev/input/event3 is a keyboard
weston-launch: opened /dev/dri/card0: ret: 0, fd: 4
weston-launch: opened /dev/input/event0: ret: 0, fd: 6
weston-launch: opened /dev/input/event1: ret: 0, fd: 7
weston-launch: opened /dev/input/event2: ret: 0, fd: 8
weston-launch: opened /dev/input/event3: ret: 0, fd: 9
handle_signal: SIGCHLD

If I load generated weston.core into debugger I can see that
all threads of weston process stopped by SIGBUS

Xorg works OK on the host A.
If I compare log output of successful launch of weston on the "host B" I 
can guess that something bad happen on the "host A" just before this line:
[22:18:45.420] Registered plugin API 'weston_drm_output_api_v1' of size 24

Question: how to debug this kind of problem?

Regards,
Denis

_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-x11
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.