Sunshine icon indicating copy to clipboard operation
Sunshine copied to clipboard

Touch input is wrong on multi-monitor configurations on Linux

Open OlegAckbar opened this issue 1 year ago • 3 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Is your issue described in the documentation?

  • [X] I have read the documentation

Is your issue present in the nightly release?

  • [X] This issue is present in the nightly release

Describe the Bug

Touch input is wrong when I have multiple monitors connected. No such issue on a single-monitor configuration

Expected Behavior

No response

Additional Context

sunshine_touch_bug.webm

Host Operating System

Linux

Operating System Version

Arch Linux KDE

Architecture

64 bit

Sunshine commit or version

sunshine-git nightly.dev.r214.g032680c-1

Package

Linux - AUR (Third Party)

GPU Type

AMD

GPU Model

RX 6700XT

GPU Driver/Mesa Version

Mesa 24.0.1-arch1.1

Capture Method (Linux Only)

KMS

Config

resolutions = [
    352x240,
    480x360,
    858x480,
    1280x720,
    1920x1080,
    2560x1080,
    3440x1440,
    1920x1200,
    3860x2160,
    3840x1600,
    1280x800
]
upnp = enabled
nv_preset = default
amd_quality = default
amd_rc = auto
nv_rc = auto
output_name = 2

Apps

No response

Relevant log output

[2024:02:23:19:29:53]: Info: Found display [wayland-0]
[2024:02:23:19:29:53]: Info: Found interface: zxdg_output_manager_v1(32) version 3
[2024:02:23:19:29:53]: Info: Found interface: wl_output(49) version 4
[2024:02:23:19:29:53]: Info: Found interface: wl_output(67) version 4
[2024:02:23:19:29:53]: Info: Found interface: wl_output(70) version 4
[2024:02:23:19:29:53]: Warning: Missing Wayland wire for wlr-export-dmabuf
[2024:02:23:19:29:53]: Info: Found display [wayland-0]
[2024:02:23:19:29:53]: Info: Found display [wayland-0]
[2024:02:23:19:29:53]: Info: Found interface: zxdg_output_manager_v1(32) version 3
[2024:02:23:19:29:53]: Info: Found interface: wl_output(49) version 4
[2024:02:23:19:29:53]: Info: Found interface: wl_output(67) version 4
[2024:02:23:19:29:53]: Info: Found interface: wl_output(70) version 4
[2024:02:23:19:29:53]: Info: Resolution: 1920x1080
[2024:02:23:19:29:53]: Info: Resolution: 1920x1080
[2024:02:23:19:29:53]: Info: Resolution: 1920x1080
[2024:02:23:19:29:53]: Info: Offset: 1920x0
[2024:02:23:19:29:53]: Info: Logical size: 1920x1080
[2024:02:23:19:29:53]: Info: Name: DP-1
[2024:02:23:19:29:53]: Info: Found monitor: ASR PG27FF1A/3394
[2024:02:23:19:29:53]: Info: Offset: 0x0
[2024:02:23:19:29:53]: Info: Logical size: 1920x1080
[2024:02:23:19:29:53]: Info: Name: DP-2
[2024:02:23:19:29:53]: Info: Found monitor: Philips Consumer Electronics Company Philips 226V4/UK81443014262
[2024:02:23:19:29:53]: Info: Offset: 3840x0
[2024:02:23:19:29:53]: Info: Logical size: 1080x1920
[2024:02:23:19:29:53]: Info: Name: HDMI-A-1
[2024:02:23:19:29:53]: Info: Found monitor: Philips Consumer Electronics Company Philips 235PL/DL41103143133
[2024:02:23:19:29:53]: Info: DP-1: ASR PG27FF1A/3394
[2024:02:23:19:29:53]: Info: DP-2: Philips Consumer Electronics Company Philips 226V4/UK81443014262
[2024:02:23:19:29:53]: Info: HDMI-A-1: Philips Consumer Electronics Company Philips 235PL/DL41103143133
[2024:02:23:19:29:53]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2024:02:23:19:29:53]: Info: Trying encoder [nvenc]
[2024:02:23:19:29:53]: Info: Screencasting with KMS
[2024:02:23:19:29:53]: Info: Found monitor for DRM screencasting
[2024:02:23:19:29:53]: Info: Found connector ID [113]
[2024:02:23:19:29:53]: Info: Found cursor plane [88]
[2024:02:23:19:29:53]: Warning: Attempting to use NVENC without CUDA support. Reverting back to GPU -> RAM -> GPU
[2024:02:23:19:29:53]: Info: Found monitor for DRM screencasting
[2024:02:23:19:29:53]: Info: Found connector ID [113]
[2024:02:23:19:29:53]: Info: Found cursor plane [88]
[2024:02:23:19:29:53]: Info: SDR color coding [Rec. 601]
[2024:02:23:19:29:53]: Info: Color depth: 8-bit
[2024:02:23:19:29:53]: Info: Color range: [JPEG]
[2024:02:23:19:29:53]: Error: [AVHWDeviceContext @ 0x6029a7730680] Cannot load libcuda.so.1
[2024:02:23:19:29:53]: Error: [AVHWDeviceContext @ 0x6029a7730680] Could not dynamically load CUDA
[2024:02:23:19:29:53]: Error: Failed to create a CUDA device: Операция не позволена
[2024:02:23:19:29:53]: Info: SDR color coding [Rec. 601]
[2024:02:23:19:29:53]: Info: Color depth: 8-bit
[2024:02:23:19:29:53]: Info: Color range: [JPEG]
[2024:02:23:19:29:53]: Error: [AVHWDeviceContext @ 0x6029a77dd780] Cannot load libcuda.so.1
[2024:02:23:19:29:53]: Error: [AVHWDeviceContext @ 0x6029a77dd780] Could not dynamically load CUDA
[2024:02:23:19:29:53]: Error: Failed to create a CUDA device: Операция не позволена
[2024:02:23:19:29:53]: Info: Encoder [nvenc] failed
[2024:02:23:19:29:53]: Info: Trying encoder [vaapi]
[2024:02:23:19:29:53]: Info: Screencasting with KMS
[2024:02:23:19:29:53]: Info: Found monitor for DRM screencasting
[2024:02:23:19:29:53]: Info: Found connector ID [113]
[2024:02:23:19:29:53]: Info: Found cursor plane [88]
[2024:02:23:19:29:53]: Info: System tray created
[2024:02:23:19:29:53]: Info: SDR color coding [Rec. 601]
[2024:02:23:19:29:53]: Info: Color depth: 8-bit
[2024:02:23:19:29:53]: Info: Color range: [JPEG]
[2024:02:23:19:29:53]: Error: [h264_vaapi @ 0x6029a7683640] No usable encoding entrypoint found for profile VAProfileH264High (7).
[2024:02:23:19:29:53]: Info: Retrying with fallback configuration options for [h264_vaapi] after error: Функция не реализована
[2024:02:23:19:29:53]: Warning: [h264_vaapi @ 0x6029a77de580] Driver does not support some wanted packed headers (wanted 0xd, found 0x1).
[2024:02:23:19:29:53]: Info: SDR color coding [Rec. 601]
[2024:02:23:19:29:53]: Info: Color depth: 8-bit
[2024:02:23:19:29:53]: Info: Color range: [JPEG]
[2024:02:23:19:29:53]: Error: [hevc_vaapi @ 0x7430dc079f80] No usable encoding entrypoint found for profile VAProfileHEVCMain (17).
[2024:02:23:19:29:53]: Info: Retrying with fallback configuration options for [hevc_vaapi] after error: Функция не реализована
[2024:02:23:19:29:53]: Warning: [hevc_vaapi @ 0x6029a7683640] Driver does not support some wanted packed headers (wanted 0xd, found 0x1).
[2024:02:23:19:29:53]: Info: SDR color coding [Rec. 601]
[2024:02:23:19:29:53]: Info: Color depth: 8-bit
[2024:02:23:19:29:53]: Info: Color range: [JPEG]
[2024:02:23:19:29:53]: Error: [av1_vaapi @ 0x7430dc079f80] No usable encoding entrypoint found for profile VAProfileAV1Profile0 (32).
[2024:02:23:19:29:53]: Info: Retrying with fallback configuration options for [av1_vaapi] after error: Функция не реализована
[2024:02:23:19:29:53]: Error: [av1_vaapi @ 0x6029a77de580] No usable encoding entrypoint found for profile VAProfileAV1Profile0 (32).
[2024:02:23:19:29:53]: Error: Could not open codec [av1_vaapi]: Функция не реализована
[2024:02:23:19:29:53]: Info: SDR color coding [Rec. 601]
[2024:02:23:19:29:53]: Info: Color depth: 8-bit
[2024:02:23:19:29:53]: Info: Color range: [JPEG]
[2024:02:23:19:29:53]: Error: [av1_vaapi @ 0x7430dc079f80] No usable encoding entrypoint found for profile VAProfileAV1Profile0 (32).
[2024:02:23:19:29:53]: Info: Retrying with fallback configuration options for [av1_vaapi] after error: Функция не реализована
[2024:02:23:19:29:53]: Error: [av1_vaapi @ 0x6029a813cbc0] No usable encoding entrypoint found for profile VAProfileAV1Profile0 (32).
[2024:02:23:19:29:53]: Error: Could not open codec [av1_vaapi]: Функция не реализована
[2024:02:23:19:29:53]: Info: Screencasting with KMS
[2024:02:23:19:29:53]: Info: Found monitor for DRM screencasting
[2024:02:23:19:29:53]: Info: Found connector ID [113]
[2024:02:23:19:29:53]: Info: Found cursor plane [88]
[2024:02:23:19:29:53]: Info: SDR color coding [Rec. 709]
[2024:02:23:19:29:53]: Info: Color depth: 10-bit
[2024:02:23:19:29:53]: Info: Color range: [JPEG]
[2024:02:23:19:29:53]: Error: [hevc_vaapi @ 0x6029a813cbc0] No usable encoding entrypoint found for profile VAProfileHEVCMain10 (18).
[2024:02:23:19:29:53]: Info: Retrying with fallback configuration options for [hevc_vaapi] after error: Функция не реализована
[2024:02:23:19:29:53]: Warning: [hevc_vaapi @ 0x7430dc079f80] Driver does not support some wanted packed headers (wanted 0xd, found 0x1).
[2024:02:23:19:29:53]: Info: 
[2024:02:23:19:29:53]: Info: // Ignore any errors mentioned above, they are not relevant. //
[2024:02:23:19:29:53]: Info: 
[2024:02:23:19:29:53]: Info: Found H.264 encoder: h264_vaapi [vaapi]
[2024:02:23:19:29:53]: Info: Found HEVC encoder: hevc_vaapi [vaapi]
[2024:02:23:19:29:53]: Info: Adding avahi service Sunshine
[2024:02:23:19:29:53]: Info: Configuration UI available at [https://localhost:47990]
[2024:02:23:19:29:54]: Info: Avahi service Sunshine successfully established.
[2024:02:23:19:29:55]: Info: Completed UPnP port mappings to 192.168.88.200 via http://192.168.88.240:2828/gateway.xml
[2024:02:23:19:29:59]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2024:02:23:19:29:59]: Info: Trying encoder [nvenc]
[2024:02:23:19:29:59]: Info: Screencasting with KMS
[2024:02:23:19:29:59]: Info: Found monitor for DRM screencasting
[2024:02:23:19:29:59]: Info: Found connector ID [113]
[2024:02:23:19:29:59]: Info: Found cursor plane [88]
[2024:02:23:19:29:59]: Warning: Attempting to use NVENC without CUDA support. Reverting back to GPU -> RAM -> GPU
[2024:02:23:19:29:59]: Info: Found monitor for DRM screencasting
[2024:02:23:19:29:59]: Info: Found connector ID [113]
[2024:02:23:19:29:59]: Info: Found cursor plane [88]
[2024:02:23:19:29:59]: Info: SDR color coding [Rec. 601]
[2024:02:23:19:29:59]: Info: Color depth: 8-bit
[2024:02:23:19:29:59]: Info: Color range: [JPEG]
[2024:02:23:19:29:59]: Error: [AVHWDeviceContext @ 0x74309c1ff240] Cannot load libcuda.so.1
[2024:02:23:19:29:59]: Error: [AVHWDeviceContext @ 0x74309c1ff240] Could not dynamically load CUDA
[2024:02:23:19:29:59]: Error: Failed to create a CUDA device: Операция не позволена
[2024:02:23:19:29:59]: Info: Encoder [nvenc] failed
[2024:02:23:19:29:59]: Info: Trying encoder [vaapi]
[2024:02:23:19:29:59]: Info: Screencasting with KMS
[2024:02:23:19:29:59]: Info: Found monitor for DRM screencasting
[2024:02:23:19:29:59]: Info: Found connector ID [113]
[2024:02:23:19:29:59]: Info: Found cursor plane [88]
[2024:02:23:19:29:59]: Info: SDR color coding [Rec. 601]
[2024:02:23:19:29:59]: Info: Color depth: 8-bit
[2024:02:23:19:29:59]: Info: Color range: [JPEG]
[2024:02:23:19:29:59]: Error: [h264_vaapi @ 0x74309c2e6080] No usable encoding entrypoint found for profile VAProfileH264High (7).
[2024:02:23:19:29:59]: Info: Retrying with fallback configuration options for [h264_vaapi] after error: Функция не реализована
[2024:02:23:19:29:59]: Warning: [h264_vaapi @ 0x74309c3ce080] Driver does not support some wanted packed headers (wanted 0xd, found 0x1).
[2024:02:23:19:29:59]: Info: SDR color coding [Rec. 601]
[2024:02:23:19:29:59]: Info: Color depth: 8-bit
[2024:02:23:19:29:59]: Info: Color range: [JPEG]
[2024:02:23:19:29:59]: Error: [hevc_vaapi @ 0x74309c3ce080] No usable encoding entrypoint found for profile VAProfileHEVCMain (17).
[2024:02:23:19:29:59]: Info: Retrying with fallback configuration options for [hevc_vaapi] after error: Функция не реализована
[2024:02:23:19:29:59]: Warning: [hevc_vaapi @ 0x74309cc41d00] Driver does not support some wanted packed headers (wanted 0xd, found 0x1).
[2024:02:23:19:29:59]: Info: SDR color coding [Rec. 601]
[2024:02:23:19:29:59]: Info: Color depth: 8-bit
[2024:02:23:19:29:59]: Info: Color range: [JPEG]
[2024:02:23:19:29:59]: Error: [av1_vaapi @ 0x74309cc41d00] No usable encoding entrypoint found for profile VAProfileAV1Profile0 (32).
[2024:02:23:19:29:59]: Info: Retrying with fallback configuration options for [av1_vaapi] after error: Функция не реализована
[2024:02:23:19:29:59]: Error: [av1_vaapi @ 0x74309cb23c40] No usable encoding entrypoint found for profile VAProfileAV1Profile0 (32).
[2024:02:23:19:29:59]: Error: Could not open codec [av1_vaapi]: Функция не реализована
[2024:02:23:19:29:59]: Info: SDR color coding [Rec. 601]
[2024:02:23:19:29:59]: Info: Color depth: 8-bit
[2024:02:23:19:29:59]: Info: Color range: [JPEG]
[2024:02:23:19:29:59]: Error: [av1_vaapi @ 0x74309cc41d00] No usable encoding entrypoint found for profile VAProfileAV1Profile0 (32).
[2024:02:23:19:29:59]: Info: Retrying with fallback configuration options for [av1_vaapi] after error: Функция не реализована
[2024:02:23:19:29:59]: Error: [av1_vaapi @ 0x74309c3ce080] No usable encoding entrypoint found for profile VAProfileAV1Profile0 (32).
[2024:02:23:19:29:59]: Error: Could not open codec [av1_vaapi]: Функция не реализована
[2024:02:23:19:29:59]: Info: Screencasting with KMS
[2024:02:23:19:29:59]: Info: Found monitor for DRM screencasting
[2024:02:23:19:29:59]: Info: Found connector ID [113]
[2024:02:23:19:29:59]: Info: Found cursor plane [88]
[2024:02:23:19:29:59]: Info: SDR color coding [Rec. 709]
[2024:02:23:19:29:59]: Info: Color depth: 10-bit
[2024:02:23:19:29:59]: Info: Color range: [JPEG]
[2024:02:23:19:29:59]: Error: [hevc_vaapi @ 0x74309c3ce080] No usable encoding entrypoint found for profile VAProfileHEVCMain10 (18).
[2024:02:23:19:29:59]: Info: Retrying with fallback configuration options for [hevc_vaapi] after error: Функция не реализована
[2024:02:23:19:29:59]: Warning: [hevc_vaapi @ 0x74309cc41d00] Driver does not support some wanted packed headers (wanted 0xd, found 0x1).
[2024:02:23:19:29:59]: Info: 
[2024:02:23:19:29:59]: Info: // Ignore any errors mentioned above, they are not relevant. //
[2024:02:23:19:29:59]: Info: 
[2024:02:23:19:29:59]: Info: Found H.264 encoder: h264_vaapi [vaapi]
[2024:02:23:19:29:59]: Info: Found HEVC encoder: hevc_vaapi [vaapi]
[2024:02:23:19:29:59]: Info: Executing Do Cmd: [kscreen-doctor output.DP-1.mode.19]
[2024:02:23:19:29:59]: Info: Executing [Desktop]
[2024:02:23:19:30:00]: Info: CLIENT CONNECTED
[2024:02:23:19:30:00]: Info: Found display [wayland-0]
[2024:02:23:19:30:00]: Info: Found interface: zxdg_output_manager_v1(32) version 3
[2024:02:23:19:30:00]: Info: Found interface: wl_output(49) version 4
[2024:02:23:19:30:00]: Info: Found interface: wl_output(67) version 4
[2024:02:23:19:30:00]: Info: Found interface: wl_output(70) version 4
[2024:02:23:19:30:00]: Info: Resolution: 1280x800
[2024:02:23:19:30:00]: Info: Resolution: 1920x1080
[2024:02:23:19:30:00]: Info: Resolution: 1920x1080
[2024:02:23:19:30:00]: Info: Offset: 1920x0
[2024:02:23:19:30:00]: Info: Logical size: 1280x800
[2024:02:23:19:30:00]: Info: Name: DP-1
[2024:02:23:19:30:00]: Info: Found monitor: ASR PG27FF1A/3394
[2024:02:23:19:30:00]: Info: Offset: 0x0
[2024:02:23:19:30:00]: Info: Logical size: 1920x1080
[2024:02:23:19:30:00]: Info: Name: DP-2
[2024:02:23:19:30:00]: Info: Found monitor: Philips Consumer Electronics Company Philips 226V4/UK81443014262
[2024:02:23:19:30:00]: Info: Offset: 3840x0
[2024:02:23:19:30:00]: Info: Logical size: 1080x1920
[2024:02:23:19:30:00]: Info: Name: HDMI-A-1
[2024:02:23:19:30:00]: Info: Found monitor: Philips Consumer Electronics Company Philips 235PL/DL41103143133
[2024:02:23:19:30:00]: Info: DP-1: ASR PG27FF1A/3394
[2024:02:23:19:30:00]: Info: DP-2: Philips Consumer Electronics Company Philips 226V4/UK81443014262
[2024:02:23:19:30:00]: Info: HDMI-A-1: Philips Consumer Electronics Company Philips 235PL/DL41103143133
[2024:02:23:19:30:00]: Info: Screencasting with KMS
[2024:02:23:19:30:00]: Info: Found monitor for DRM screencasting
[2024:02:23:19:30:00]: Info: Found connector ID [113]
[2024:02:23:19:30:00]: Info: Found cursor plane [88]
[2024:02:23:19:30:00]: Info: SDR color coding [Rec. 601]
[2024:02:23:19:30:00]: Info: Color depth: 8-bit
[2024:02:23:19:30:00]: Info: Color range: [MPEG]
[2024:02:23:19:30:00]: Error: [hevc_vaapi @ 0x7430b42b0c00] No usable encoding entrypoint found for profile VAProfileHEVCMain (17).
[2024:02:23:19:30:00]: Info: Retrying with fallback configuration options for [hevc_vaapi] after error: Функция не реализована
[2024:02:23:19:30:00]: Warning: [hevc_vaapi @ 0x7430b4acabc0] Driver does not support some wanted packed headers (wanted 0xd, found 0x1).
[2024:02:23:19:30:00]: Info: Setting default sink to: [sink-sunshine-stereo]
[2024:02:23:19:30:00]: Info: Found default monitor by name: sink-sunshine-stereo.monitor
[2024:02:23:19:30:41]: Info: CLIENT DISCONNECTED
[2024:02:23:19:30:41]: Info: Setting default sink to: [alsa_output.pci-0000_06_00.0.iec958-dts-surround-51]
[2024:02:23:19:30:46]: Info: Executing Undo Cmd: [kscreen-doctor output.DP-1.mode.1]
[2024:02:23:20:01:05]: Info: Opening UI from system tray
[2024:02:23:20:01:06]: Info: Opened url [https://localhost:47990]

OlegAckbar avatar Feb 23 '24 17:02 OlegAckbar

There appears to be widespread issues with touch mapping on multi-head Wayland systems, so we're removing this from the v0.22.0 milestone. See: https://wiki.archlinux.org/title/touchscreen#Wayland/Weston https://www.reddit.com/r/linuxquestions/comments/uwn7io/map_touchscreen_input_to_correct_screen/

Workaround: Disable the native pen/touch option on the Input tab.

cgutman avatar Mar 04 '24 02:03 cgutman

I found info about how to calibrate libinput touchscreen but couldn't do it: weston-calibrator produces either zeros or some insane calibration matrix values sometimes with inf. https://wiki.archlinux.org/title/Calibrating_Touchscreen#Do_it_automatically_via_a_udev_rule https://wayland.freedesktop.org/libinput/doc/latest/device-configuration-via-udev.html#static-device-configuration-via-udev

Right now I'm using next udev rule (touch input still broken): ATTRS{name}=="Touch passthrough",ENV{WL_OUTPUT}="DP1",ENV{LIBINPUT_CALIBRATION_MATRIX}="1 0 0 0 1 0"

OlegAckbar avatar Mar 04 '24 17:03 OlegAckbar

It seems this issue hasn't had any activity in the past 90 days. If it's still something you'd like addressed, please let us know by leaving a comment. Otherwise, to help keep our backlog tidy, we'll be closing this issue in 10 days. Thanks!

LizardByte-bot avatar Jun 26 '24 10:06 LizardByte-bot

This issue was closed because it has been stalled for 10 days with no activity.

LizardByte-bot avatar Jul 06 '24 10:07 LizardByte-bot