'프로그램 사용/wayland'에 해당되는 글 36건

  1. 2023.09.08 wayland hdmi - touch 연결
  2. 2022.08.22 wayland atomic commit 패치?
  3. 2022.08.17 weston screen shooter 뜯어보기
  4. 2022.08.16 wayland glreadpixels 실패
  5. 2022.08.10 sway + wayvnc
  6. 2022.08.09 wayvnc 0.5 릴리즈
  7. 2022.08.08 capture drm screen
  8. 2022.07.07 weston redraw 취소하기
  9. 2022.06.29 weston drm debug
  10. 2022.06.27 libwayland debug 메시지

윈도우와는 다르게 리눅스에서는

HDMI + touch를 연결하면 자꾸 0번 디스플레이와 새로 연결된 터치가 연결된다.

 

윈도우에서 지금까진 안맞는적은 없었는데, 연결방법 글이 있는걸 보면 아주 없진 않나보다.

아무튼 윈도우는 어떤 시나리오로 되길래 외부 모니터와 touch를 잘 매칭해주는진 모르겠지만

[링크 : https://comterman.tistory.com/2738]

 

wayland 나 x.org 에서는 영~ 매칭이 잘 안된다.

화면 찢어짐 때문에 wayland로 해놨는데 그 여파로 따라해봐도 스크린에 터치가 옮겨가진 않는다.

[링크 : https://askubuntu.com/questions/71768/touchscreen-and-additional-external-monitor]

[링크 : https://unix.stackexchange.com/questions/473721/calibrating-a-touch-screen-on-dual-monitors-one-touch-one-not]

 

libinput-device.c를 보면 아래 함수 두개에 associated 용어를 표현하며

입력 장치를 evdev의 이벤트를 통해 연결하는데, 회사에서 시험해볼때는

touch 장치 쪽에서 연결할 스크린 명칭을 넣어주지 않아서인지 제대로 연결되는걸 못 본 듯.

void
evdev_device_set_calibration(struct evdev_device *device)
{
struct udev *udev;
struct udev_device *udev_device = NULL;
const char *sysname = libinput_device_get_sysname(device->device);
const char *calibration_values;
uint32_t width, height;
struct weston_touch_device_matrix calibration;

if (!libinput_device_config_calibration_has_matrix(device->device))
return;

/* If LIBINPUT_CALIBRATION_MATRIX was set to non-identity, we will not
* override it with WL_CALIBRATION. It also means we don't need an
* output to load a calibration. */
if (libinput_device_config_calibration_get_default_matrix(
device->device,
calibration.m) != 0)
return;

/* touch_set_calibration() has updated the values, do not load old
* values from WL_CALIBRATION.
*/
if (device->override_wl_calibration)
return;

if (!device->output) {
weston_log("input device %s has no enabled output associated "
"(%s named), skipping calibration for now.\n",
sysname, device->output_name ?: "none");
return;
}

void
evdev_device_set_output(struct evdev_device *device,
struct weston_output *output)
{
if (device->output == output)
return;

if (device->output_destroy_listener.notify) {
wl_list_remove(&device->output_destroy_listener.link);
device->output_destroy_listener.notify = NULL;
}

if (!output) {
weston_log("output for input device %s removed\n",
libinput_device_get_sysname(device->device));

device->output = NULL;
return;
}

weston_log("associating input device %s with output %s "
"(%s by udev)\n",
libinput_device_get_sysname(device->device),
output->name,
device->output_name ?: "none");

device->output = output;
device->output_destroy_listener.notify = notify_output_destroy;
wl_signal_add(&output->destroy_signal,
&device->output_destroy_listener);
evdev_device_set_calibration(device);
}

'프로그램 사용 > wayland' 카테고리의 다른 글

wayland atomic commit 패치?  (0) 2022.08.22
weston screen shooter 뜯어보기  (0) 2022.08.17
wayland glreadpixels 실패  (0) 2022.08.16
sway + wayvnc  (0) 2022.08.10
wayvnc 0.5 릴리즈  (0) 2022.08.09
Posted by 구차니
프로그램 사용/wayland2022. 8. 22. 18:04

오랫만에 생각난김에 검색했는데 8월 2일 커밋된 따끈한 녀석 발견!

[링크 : https://gitlab.freedesktop.org/wayland/weston/-/commits/main?search=atomic]

 

음.. 잘 해결되면 좋겠네..

backend-drm: improve atomic commit failure handling


When an atomic commit fails then the output will be stuck in
REPAINT_AWAITING_COMPLETION state. It is waiting for a vblank event that was
never scheduled.
If the error is EBUSY then it can be expected to be a transient error. So
propagate the error and schedule a new repaint in the core compositor.

This is necessary because there are some circumstances when the commit can fail
unexpectedly:
- With 'state_invalid == true' one commit will disable all planes. If another
  commit for a different output is triggered immediately afterwards, then this
  commit can temporarily fail with EBUSY because it tries to use the same
  planes.
- At least with i915, if one commit enables an output then a second commit for a
  different output immediately afterwards can temporarily fail with EBUSY. This
  is probably caused by some hardware interdependency.
Signed-off-by: Michael Olbrich's avatarMichael Olbrich <m.olbrich@pengutronix.de>

 

libweston/backend-drm/drm.c의 drm_repaint_flush()와

libweston/compositor.c의 output_repaint_timer_hander() 쪽에 수정이 가해진다.

[링크 : https://gitlab.freedesktop.org/wayland/weston/-/commit/3b3fdc52c31f828ff0fb71d2c6ce7bdcc64f20a1]

[링크 : https://gitlab.freedesktop.org/wayland/weston/-/blob/3b3fdc52c31f828ff0fb71d2c6ce7bdcc64f20a1/libweston/backend-drm/drm.c]

'프로그램 사용 > wayland' 카테고리의 다른 글

wayland hdmi - touch 연결  (0) 2023.09.08
weston screen shooter 뜯어보기  (0) 2022.08.17
wayland glreadpixels 실패  (0) 2022.08.16
sway + wayvnc  (0) 2022.08.10
wayvnc 0.5 릴리즈  (0) 2022.08.09
Posted by 구차니
프로그램 사용/wayland2022. 8. 17. 16:49

weston_screenshooter_shoot()을 따라오는데 영 어딜 파야 나올지 감이 안온다.

아무튼.. libweston의 screenshooter.c가 실제적으로 수행되는 부분 같은데

//git\include\libweston\libweston.h
int
weston_screenshooter_shoot(struct weston_output *output, struct weston_buffer *buffer,
   weston_screenshooter_done_func_t done, void *data);

//git\libweston\screenshooter.c
WL_EXPORT int
weston_screenshooter_shoot(struct weston_output *output,
   struct weston_buffer *buffer,
   weston_screenshooter_done_func_t done, void *data)
{
struct screenshooter_frame_listener *l;

if (!wl_shm_buffer_get(buffer->resource)) {
done(data, WESTON_SCREENSHOOTER_BAD_BUFFER);
return -1;
}

buffer->shm_buffer = wl_shm_buffer_get(buffer->resource);
buffer->width = wl_shm_buffer_get_width(buffer->shm_buffer);
buffer->height = wl_shm_buffer_get_height(buffer->shm_buffer);

if (buffer->width < output->current_mode->width ||
    buffer->height < output->current_mode->height) {
done(data, WESTON_SCREENSHOOTER_BAD_BUFFER);
return -1;
}

l = malloc(sizeof *l);
if (l == NULL) {
done(data, WESTON_SCREENSHOOTER_NO_MEMORY);
return -1;
}

l->buffer = buffer;
l->output = output;
l->done = done;
l->data = data;
l->listener.notify = screenshooter_frame_notify;
wl_signal_add(&output->frame_signal, &l->listener);
weston_output_disable_planes_incr(output);
weston_output_damage(output);

return 0;
}

 

아무튼 추적을 계속해보면 아래와 같이 event_loop에 wl_event_loop_add_idle() 실행해서 추가해주고 끝.

//git\libweston\compositor.c
static void
weston_schedule_surface_protection_update(struct weston_compositor *compositor)
{
struct content_protection *cp = compositor->content_protection;
struct wl_event_loop *loop;

if (!cp || cp->surface_protection_update)
return;
loop = wl_display_get_event_loop(compositor->wl_display);
cp->surface_protection_update = wl_event_loop_add_idle(loop,
       notify_surface_protection_change,
       compositor);
}

WL_EXPORT void
weston_output_disable_planes_incr(struct weston_output *output)
{
output->disable_planes++;
/*
 * If disable_planes changes from 0 to non-zero, it means some type of
 * recording of content has started, and therefore protection level of
 * the protected surfaces must be updated to avoid the recording of
 * the protected content.
 */
if (output->disable_planes == 1)
weston_schedule_surface_protection_update(output->compositor);
}

 

struct content_protection은 누가 만드나 하면서 따라가보니

weston_compositor_enable_content_protection() 함수에서 만들어 주고 해당 함수는

//git\libweston\content-protection.c
WL_EXPORT int
weston_compositor_enable_content_protection(struct weston_compositor *compositor)
{
struct content_protection *cp;

cp = zalloc(sizeof(*cp));
if (cp == NULL)
return -1;
cp->compositor = compositor;

compositor->content_protection = cp;
wl_list_init(&cp->protected_list);
if (wl_global_create(compositor->wl_display,
     &weston_content_protection_interface, 1, cp,
     bind_weston_content_protection) == NULL)
return -1;

cp->destroy_listener.notify = cp_destroy_listener;
wl_signal_add(&compositor->destroy_signal, &cp->destroy_listener);
cp->debug = weston_compositor_add_log_scope(compositor, "content-protection-debug",
    "debug-logs for content-protection",
    NULL, NULL, NULL);
return 0;
}

 

drm_backend_create() 시에 b->atomic_modeset 조건에 의해서 생성된다.

//git\libweston\backend-drm\drm.c
static struct drm_backend *
drm_backend_create(struct weston_compositor *compositor,
   struct weston_drm_backend_config *config)
{
if (b->atomic_modeset)
if (weston_compositor_enable_content_protection(compositor) < 0)
weston_log("Error: initializing content-protection "
   "support failed.\n");
}

 

 

이름이 비슷한건지 걸려나오는 다른 녀석.

//protocol\weston-screenshooter-client-protocol.h
#define WESTON_SCREENSHOOTER_SHOOT 0

static inline void
weston_screenshooter_shoot(struct weston_screenshooter *weston_screenshooter, struct wl_output *output, struct wl_buffer *buffer)
{
wl_proxy_marshal((struct wl_proxy *) weston_screenshooter,
 WESTON_SCREENSHOOTER_SHOOT, output, buffer);
}

 

 wl_proxy_marshall()은 또 멀까해서 따라가 보지만.. 답이 안나온다 -_ㅠ

//wayland-main\src\wayland-client.c
WL_EXPORT struct wl_proxy *
wl_proxy_marshal_array_constructor_versioned(struct wl_proxy *proxy,
     uint32_t opcode,
     union wl_argument *args,
     const struct wl_interface *interface,
     uint32_t version)
{
return wl_proxy_marshal_array_flags(proxy, opcode, interface, version, 0, args);
}

WL_EXPORT struct wl_proxy *
wl_proxy_marshal_array_constructor(struct wl_proxy *proxy,
   uint32_t opcode, union wl_argument *args,
   const struct wl_interface *interface)
{
return wl_proxy_marshal_array_constructor_versioned(proxy, opcode,
    args, interface,
    proxy->version);
}


WL_EXPORT void
wl_proxy_marshal(struct wl_proxy *proxy, uint32_t opcode, ...)
{
union wl_argument args[WL_CLOSURE_MAX_ARGS];
va_list ap;

va_start(ap, opcode);
wl_argument_from_va_list(proxy->object.interface->methods[opcode].signature,
 args, WL_CLOSURE_MAX_ARGS, ap);
va_end(ap);

wl_proxy_marshal_array_constructor(proxy, opcode, args, NULL);
}

 

'프로그램 사용 > wayland' 카테고리의 다른 글

wayland hdmi - touch 연결  (0) 2023.09.08
wayland atomic commit 패치?  (0) 2022.08.22
wayland glreadpixels 실패  (0) 2022.08.16
sway + wayvnc  (0) 2022.08.10
wayvnc 0.5 릴리즈  (0) 2022.08.09
Posted by 구차니
프로그램 사용/wayland2022. 8. 16. 17:47

 

C Specification
void glReadPixels( GLint x,
GLint y,
GLsizei width,
GLsizei height,
GLenum format,
GLenum type,
GLvoid * data);
Parameters
x, y
Specify the window coordinates of the first pixel that is read from the frame buffer. This location is the lower left corner of a rectangular block of pixels.

width, height
Specify the dimensions of the pixel rectangle. width and height of one correspond to a single pixel.

[링크 : https://docs.gl/es3/glReadPixels]

 

static void
screenshooter_shoot(struct wl_client *client,
    struct wl_resource *resource,
    struct wl_resource *output_resource,
    struct wl_resource *buffer_resource)
{
struct wlsc_output *output = output_resource->data;
struct wl_buffer *buffer = buffer_resource->data;
if (!wl_buffer_is_shm(buffer))
return;
if (buffer->width < output->current->width ||
    buffer->height < output->current->height)
return;
glPixelStorei(GL_PACK_ALIGNMENT, 1);
glReadPixels(0, 0, output->current->width, output->current->height,
     GL_RGBA, GL_UNSIGNED_BYTE,
     wl_shm_buffer_get_data(buffer));
}

[링크 : https://chromium.googlesource.com/chromiumos/third_party/wayland-demos/+/refs/heads/stabilize/compositor/screenshooter.c]

 

You can't take screenshots with glReadPixels!

[링크 : https://stackoverflow.com/questions/37149068/glreadpixels-function-returning-error-1282-gl-invalid-operation]

[링크 : https://stackoverflow.com/questions/44634621/glreadpixels-with-screen-pixels]

 

대충 짰는데 안되는 듯..

$ cat gl_cap.c
#include <stdio.h>
#include <GLES2/gl2.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>

void main()
{
                GLubyte color[1024*768*4];
                glReadPixels(0,0, 1024, 768, GL_RGBA, GL_UNSIGNED_BYTE, &color);
//              printf("R:%d G:%d B:%d A:%d", color[0], color[1], color[2], color[3]);
for(int y =0 ; y<768;y++)
for(int x =0 ; x < 1024; x++)
                printf("%4d,%3d R:%d G:%d B:%d A:%d\n", x,y
                        ,color[y*1024+x+0]
                        ,color[y*1024+x+1]
                        ,color[y*1024+x+2]
                        ,color[y*1024+x+3]
                );
}

 

링크는 아래와 같이 해주면 되긴 한데...

 -lwayland-egl -lGLESv2

 

흐으으으음...

# head dump
   0,  0 R:0 G:0 B:0 A:0
   1,  0 R:0 G:0 B:0 A:0
   2,  0 R:0 G:0 B:0 A:0
   3,  0 R:0 G:0 B:0 A:0
   4,  0 R:0 G:0 B:0 A:0
   5,  0 R:0 G:0 B:0 A:0
   6,  0 R:0 G:0 B:0 A:0
   7,  0 R:0 G:0 B:0 A:0
   8,  0 R:0 G:0 B:0 A:0
   9,  0 R:0 G:0 B:0 A:0
# tail dump
1014,767 R:0 G:0 B:0 A:0
1015,767 R:0 G:0 B:0 A:0
1016,767 R:0 G:0 B:0 A:0
1017,767 R:0 G:0 B:0 A:0
1018,767 R:0 G:0 B:0 A:0
1019,767 R:0 G:0 B:0 A:0
1020,767 R:0 G:0 B:0 A:0
1021,767 R:0 G:0 B:0 A:0
1022,767 R:0 G:0 B:0 A:0
1023,767 R:0 G:0 B:0 A:0

'프로그램 사용 > wayland' 카테고리의 다른 글

wayland atomic commit 패치?  (0) 2022.08.22
weston screen shooter 뜯어보기  (0) 2022.08.17
sway + wayvnc  (0) 2022.08.10
wayvnc 0.5 릴리즈  (0) 2022.08.09
capture drm screen  (0) 2022.08.08
Posted by 구차니
프로그램 사용/wayland2022. 8. 10. 16:41

 

sway와 wayfire 라는 녀석이 wlroot 기반의 compositor 인 듯.

 

일단~~은 sway 패키지를 설치하고

$ sudo apt install sway

[링크 : https://installati.one/ubuntu/21.04/sway/]


wayvnc 설치(ubuntu 22.04 LTS/x86)

$ sudo apt install wayvnc

 

로그아웃 후에 세션을 sway로 변경

[링크 : https://llandy3d.github.io/sway-on-ubuntu/]

[링크 : https://www.slant.co/topics/11023/versus/~sway_vs_wayfire_vs_weston]

 

"윈 + D" 누르고 terminal 친 후 방향키로 gnome-terminal 선택 + enter

혹은 "윈 + enter"

 

요건 심심해서 htop 실행. i7-3635QM 이긴 한데

sway와 wayvnc가 동일하게 1.3% 씩 먹는 상황. 이걸 낮다고 봐야하나 높다고 봐야하나..

[링크 : https://swaywm.org/]

[링크 : https://wiki.archlinux.org/title/Sway]

 

터미널에서 wayvnc 접속가능하도록 실행

$ wayvnc 0.0.0.0

 

 

+

sway 단축키

super - shift - space (타일/창 전환)
super - e (가로 / 세로 타일 배치 전환)
super - h (창 전환)
super - enter (터미널 열기)
super - d (프로그램 실행?)

 

+

로그아웃

방법을 못 찾아서, sway 프로세스 kill 하고 다시 로그인 함 -_-

'프로그램 사용 > wayland' 카테고리의 다른 글

weston screen shooter 뜯어보기  (0) 2022.08.17
wayland glreadpixels 실패  (0) 2022.08.16
wayvnc 0.5 릴리즈  (0) 2022.08.09
capture drm screen  (0) 2022.08.08
weston redraw 취소하기  (0) 2022.07.07
Posted by 구차니

22.07.10 에 릴리즈 되었는데 H.264 인코딩이 특징인 듯.

wayland도 힘을 못써서 조용히 사라질줄 알았는데, 조용히 부활하고 있었던 건가.. -_-

[링크 : https://www.phoronix.com/forums/forum/linux-graphics-x-org-drivers/wayland-display-server/1333848-wayvnc-0-5-vnc-server-for-wlroots-based-wayland-compositors-released]

[링크 : https://github.com/any1/wayvnc/releases/tag/v0.5.0]

[링크 : https://github.com/any1/wayvnc]

 

 

그나저나 s390x는 먼가 해서 찾아봤더니 (s로 시작해서 스냅드래곤인가 싶었지만)

[링크 : https://packages.ubuntu.com/jammy/wayvnc]

 

1998년 단종된 IBM System/390 시리즈 인 것 같은데.. 이걸 아직도(?) 지원해주다니..

[링크 : https://en.wikipedia.org/wiki/IBM_System/390]

[링크 : https://en.wikipedia.org/wiki/Linux_on_IBM_Z#Hardware]

'프로그램 사용 > wayland' 카테고리의 다른 글

wayland glreadpixels 실패  (0) 2022.08.16
sway + wayvnc  (0) 2022.08.10
capture drm screen  (0) 2022.08.08
weston redraw 취소하기  (0) 2022.07.07
weston drm debug  (0) 2022.06.29
Posted by 구차니

openGL 컨텍스트를 이용해서 빼내거나

mmap 으로 빼내라고 하는데 어떤 주소값을 복사해야 하는지 이야기가 없네.

 

[링크 : https://stackoverflow.com/questions/47428631/get-screenshot-of-egl-drm-kms-application]

 

+

22.08.09

void glReadPixels( GLint x,
  GLint y,
  GLsizei width,
  GLsizei height,
  GLenum format,
  GLenum type,
  void * data);
 
void glReadnPixels( GLint x,
  GLint y,
  GLsizei width,
  GLsizei height,
  GLenum format,
  GLenum type,
  GLsizei bufSize,
  void * data);

[링크 : https://registry.khronos.org/OpenGL-Refpages/es3/html/glReadPixels.xhtml]

 

[링크 : https://community.nxp.com/t5/i-MX-Processors/Rendering-with-OpenGL-ES-2-x-3-x-to-a-DMA-buffer-physical-memory/m-p/1229007]
  [링크 : https://community.nxp.com/t5/i-MX-Processors/Zero-copy-between-GPU-and-VPU/m-p/1044158]

[링크 : https://stackoverflow.com/questions/3191978/how-to-use-glut-opengl-to-render-to-a-file]

'프로그램 사용 > wayland' 카테고리의 다른 글

sway + wayvnc  (0) 2022.08.10
wayvnc 0.5 릴리즈  (0) 2022.08.09
weston redraw 취소하기  (0) 2022.07.07
weston drm debug  (0) 2022.06.29
libwayland debug 메시지  (0) 2022.06.27
Posted by 구차니

코드 분석하다 보니 아래와 같은 함수를 compositor.c에서 발견함.

weston 에서 호출되는 곳은 3 곳.

 

/** State of the repaint loop */
enum {
REPAINT_NOT_SCHEDULED = 0, /**< idle; no repaint will occur */
REPAINT_BEGIN_FROM_IDLE, /**< start_repaint_loop scheduled */
REPAINT_SCHEDULED, /**< repaint is scheduled to occur */
REPAINT_AWAITING_COMPLETION, /**< last repaint not yet finished */
} repaint_status;

static void
weston_output_schedule_repaint_reset(struct weston_output *output)
{
output->repaint_status = REPAINT_NOT_SCHEDULED;
TL_POINT(output->compositor, "core_repaint_exit_loop",
 TLP_OUTPUT(output), TLP_END);
}

'프로그램 사용 > wayland' 카테고리의 다른 글

wayvnc 0.5 릴리즈  (0) 2022.08.09
capture drm screen  (0) 2022.08.08
weston drm debug  (0) 2022.06.29
libwayland debug 메시지  (0) 2022.06.27
libwayland  (0) 2022.06.27
Posted by 구차니
프로그램 사용/wayland2022. 6. 29. 18:02

 

# echo 0x3 > /sys/module/drm/parameters/debug

[링크 : https://lynxbee.com/how-to-enable-drm-driver-debug-logging-in-linux/#.YrwTKHZBxhE]

 

dmesg 에서 확인이 가능한데.. 0x3 만 해도 dmesg를 넘기는지 금세 라인수 초과..

[28951.482225] [drm:drm_ioctl] comm="weston" pid=1707, dev=0xe201, auth=1, DRM_IOCTL_GET_MAGIC
[28951.482235] [drm:drm_getmagic] 1
[28951.482244] [drm:drm_ioctl] comm="weston" pid=1707, dev=0xe201, auth=1, DRM_IOCTL_AUTH_MAGIC
[28951.482250] [drm:drm_authmagic] 1
[28951.482255] [drm:drm_ioctl] comm="weston", pid=1707, ret=-22
[28951.482263] [drm:drm_ioctl] comm="weston" pid=1707, dev=0xe201, auth=1, DRM_IOCTL_SET_MASTER
[28951.482281] [drm:drm_ioctl] comm="weston" pid=1707, dev=0xe201, auth=1, DRM_IOCTL_MODE_ATOMIC
[28951.482300] [drm:drm_mode_object_get] OBJ ID: 44 (2)
[28951.482308] [drm:drm_mode_object_get] OBJ ID: 46 (2)
[28951.482316] [drm:drm_mode_object_get] OBJ ID: 45 (3)
[28951.482320] [drm:drm_mode_object_put.part.0] OBJ ID: 44 (3)
[28951.482325] [drm:drm_mode_object_put.part.0] OBJ ID: 45 (4)
[28951.482329] [drm:drm_mode_object_put.part.0] OBJ ID: 45 (3)
[28951.482339] [drm:drm_mode_object_put.part.0] OBJ ID: 46 (5)
[28951.482344] [drm:drm_mode_object_put.part.0] OBJ ID: 46 (4)
[28951.482354] [drm:drm_mode_object_get] OBJ ID: 39 (4)
[28951.482358] [drm:drm_mode_object_get] OBJ ID: 39 (5)
[28951.482363] [drm:drm_mode_object_put.part.0] OBJ ID: 39 (6)
[28951.482425] imx-drm display-subsystem: [drm:drm_calc_timestamping_constants] crtc 33: hwmode: htotal 1344, vtotal 806, vdisplay 768
[28951.482433] imx-drm display-subsystem: [drm:drm_calc_timestamping_constants] crtc 33: clock 65000 kHz framedur 16665600 linedur 20676
[28951.485362] imx-drm display-subsystem: [drm:drm_handle_vblank] vblank event on 396086, current 396086
[28951.485368] [drm:drm_mode_object_put.part.0] OBJ ID: 40 (4)
[28951.485379] [drm:drm_mode_object_put.part.0] OBJ ID: 40 (3)
[28951.485385] [drm:drm_mode_object_put.part.0] OBJ ID: 49 (3)
[28951.485394] [drm:drm_mode_object_put.part.0] OBJ ID: 43 (2)

'프로그램 사용 > wayland' 카테고리의 다른 글

capture drm screen  (0) 2022.08.08
weston redraw 취소하기  (0) 2022.07.07
libwayland debug 메시지  (0) 2022.06.27
libwayland  (0) 2022.06.27
weston desktop-shell output destory  (0) 2022.06.08
Posted by 구차니
프로그램 사용/wayland2022. 6. 27. 17:24

export WAYLAND_DEBUG=1 하면 libwayland*.so 들의 디버그 메시지가 출력되는데

대~~~애충 아래와 같은 포맷

[1492172.627] wl_surface@17.leave(wl_output@16)
[1492172.707]  -> wl_surface@17.set_buffer_scale(1)
[1492172.745]  -> wl_surface@17.frame(new id wl_callback@27)
[1492192.837]  -> wl_surface@17.attach(wl_buffer@26, 0, 0)
[1492192.934]  -> wl_surface@17.damage(0, 0, 806, 606)
[1492192.973]  -> wl_surface@17.commit()
[1492208.877] wl_display@1.delete_id(27)
[1492208.938] wl_buffer@26.release()
[1492208.957] wl_callback@27.done(22885913)

 

send와 discard는 상위에서 보내주는 대로 설정되는거고, 해당 내용에 따라 출력이 되는 듯.

@00 식으로 나오는건 인자에 따라 출력되는 값인데.. 함수 인자가 어떤걸 의미하는진 따로 찾아봐야 할 듯..

void wl_closure_print(struct wl_closure *closure, struct wl_object *target,
 int send, int discarded, uint32_t (*n_parse)(union wl_argument *arg))
{
// ...
fprintf(f, "[%7u.%03u] %s%s%s@%u.%s(",
time / 1000, time % 1000,
discarded ? "discarded " : "",
send ? " -> " : "",
target->interface->name, target->id,
closure->message->name);

[링크 : https://gitlab.freedesktop.org/wayland/wayland/-/blob/main/src/connection.c#L1286]

[링크 : https://gitlab.freedesktop.org/wayland/wayland]

'프로그램 사용 > wayland' 카테고리의 다른 글

weston redraw 취소하기  (0) 2022.07.07
weston drm debug  (0) 2022.06.29
libwayland  (0) 2022.06.27
weston desktop-shell output destory  (0) 2022.06.08
weston debug message  (0) 2022.03.18
Posted by 구차니