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

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' 카테고리의 다른 글

weston evdev libinput  (0) 2024.03.11
weston 커서 숨기기  (0) 2024.02.26
wayland atomic commit 패치?  (0) 2022.08.22
weston screen shooter 뜯어보기  (0) 2022.08.17
wayland glreadpixels 실패  (0) 2022.08.16
Posted by 구차니