Skip to content

Mouse/Stylus/Touch input is in wrong monitor when using multi-monitor on Linux #3696

Open

Description

@laurorual

Is there an existing issue for this?

  • I have searched the existing issues

Is your issue described in the documentation?

  • I have read the documentation

Is your issue present in the latest beta/pre-release?

This issue is present in the latest pre-release

Describe the Bug

When hosting on my Linux machine with multi-monitor, the main monitor on Sunshine is set as the HDMI one, even if my main monitor is set as the DP one on the OS. After changing the motidor to be displayed in the setting "Display number", i can see the correct display when streaming, but the input continues to be sent to the HDMI monitor when using any kind of touch input (multi touch or absolute touch), forcing me to use trackpad mode to be able to use the mouse on the correct monitor.
This is fine when using an android phone/tablet as client or using a real mouse connected, but when using my LG TV as client, using the TV's remote as a mouse works kinda like absolute touch, making it impossible to use the mouse, since it's in the wrong monitor.

I've seen on another issue someone recommending a workaround, to disable the native pen/touch option on the Input tab, but it doesn't help.

Expected Behavior

Absolute/Multi Touch to be working on the monitor selected on the "Display number" setting in Sunshine.

Additional Context

I'm using KDE Plasma v6.3.1.
Sunshine comes pre-installed on Bazzite builds.

Host Operating System

Linux

Operating System Version

Bazzite 41

Architecture

amd64/x86_64

Sunshine commit or version

2025.221.143652

Package

other (not listed)

GPU Type

NVIDIA

GPU Model

RTX 3060

GPU Driver/Mesa Version

570.86.16

Capture Method

None

Config

Apps

Relevant log output

[2025-03-01 17:39:31.132]: Info: Sunshine version: v2025.221.143652
[2025-03-01 17:39:31.132]: Info: Package Publisher: LizardByte
[2025-03-01 17:39:31.132]: Info: Publisher Website: https://app.lizardbyte.dev
[2025-03-01 17:39:31.132]: Info: Get support: https://app.lizardbyte.dev/support
[2025-03-01 17:39:31.214]: Info: System tray created
[2025-03-01 17:39:31.280]: Error: Failed to create session: 
[2025-03-01 17:39:31.280]: Info: Found display [wayland-0]
[2025-03-01 17:39:31.280]: Info: Found interface: zxdg_output_manager_v1(31) version 3
[2025-03-01 17:39:31.280]: Info: Found interface: wl_output(61) version 4
[2025-03-01 17:39:31.280]: Info: Found interface: wl_output(73) version 4
[2025-03-01 17:39:31.280]: Warning: Missing Wayland wire for wlr-export-dmabuf
[2025-03-01 17:39:31.280]: Info: /dev/dri/card0 -> nvidia-drm
[2025-03-01 17:39:31.281]: Info: Found display [wayland-0]
[2025-03-01 17:39:31.281]: Info: Found display [wayland-0]
[2025-03-01 17:39:31.281]: Info: Found interface: zxdg_output_manager_v1(31) version 3
[2025-03-01 17:39:31.281]: Info: Found interface: wl_output(61) version 4
[2025-03-01 17:39:31.281]: Info: Found interface: wl_output(73) version 4
[2025-03-01 17:39:31.281]: Info: Resolution: 1920x1080
[2025-03-01 17:39:31.281]: Info: Resolution: 1920x1080
[2025-03-01 17:39:31.281]: Info: Offset: 1920x0
[2025-03-01 17:39:31.281]: Info: Logical size: 1920x1080
[2025-03-01 17:39:31.281]: Info: Name: DP-1
[2025-03-01 17:39:31.281]: Info: Found monitor: HKM M238W1F2556/0000000000001
[2025-03-01 17:39:31.281]: Info: Offset: 0x0
[2025-03-01 17:39:31.281]: Info: Logical size: 1920x1080
[2025-03-01 17:39:31.281]: Info: Name: HDMI-A-1
[2025-03-01 17:39:31.281]: Info: Found monitor: Samsung Electric Company HDMI-A-1-T24C310
[2025-03-01 17:39:31.281]: Info: -------- Start of KMS monitor list --------
[2025-03-01 17:39:31.281]: Info: Monitor 1 is DP-1: HKM M238W1F2556/0000000000001
[2025-03-01 17:39:31.281]: Info: Monitor 0 is HDMI-A-1: Samsung Electric Company HDMI-A-1-T24C310
[2025-03-01 17:39:31.281]: Info: --------- End of KMS monitor list ---------
[2025-03-01 17:39:31.322]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2025-03-01 17:39:31.322]: Info: Trying encoder [nvenc]
[2025-03-01 17:39:31.322]: Info: Screencasting with KMS
[2025-03-01 17:39:31.322]: Info: /dev/dri/card0 -> nvidia-drm
[2025-03-01 17:39:31.322]: Info: Found monitor for DRM screencasting
[2025-03-01 17:39:31.322]: Info: Found connector ID [106]
[2025-03-01 17:39:31.323]: Info: Found cursor plane [66]
[2025-03-01 17:39:31.323]: Info: Creating encoder [h264_nvenc]
[2025-03-01 17:39:31.323]: Info: Color coding: SDR (Rec. 601)
[2025-03-01 17:39:31.323]: Info: Color depth: 8-bit
[2025-03-01 17:39:31.323]: Info: Color range: JPEG
[2025-03-01 17:39:31.582]: Info: Streaming bitrate is 1000000
[2025-03-01 17:39:31.862]: Info: Creating encoder [hevc_nvenc]
[2025-03-01 17:39:31.862]: Info: Color coding: SDR (Rec. 601)
[2025-03-01 17:39:31.862]: Info: Color depth: 8-bit
[2025-03-01 17:39:31.862]: Info: Color range: JPEG
[2025-03-01 17:39:31.865]: Info: Streaming bitrate is 1000000
[2025-03-01 17:39:32.140]: Info: Creating encoder [av1_nvenc]
[2025-03-01 17:39:32.140]: Info: Color coding: SDR (Rec. 601)
[2025-03-01 17:39:32.140]: Info: Color depth: 8-bit
[2025-03-01 17:39:32.140]: Info: Color range: JPEG
[2025-03-01 17:39:32.147]: Info: Streaming bitrate is 1000000
[2025-03-01 17:39:32.161]: Warning: [av1_nvenc @ 0x35507d00] Codec not supported
[2025-03-01 17:39:32.162]: Error: [av1_nvenc @ 0x35507d00] Provided device doesn't support required NVENC features
[2025-03-01 17:39:32.412]: Error: Could not open codec [av1_nvenc]: Função não implementada
[2025-03-01 17:39:32.413]: Info: Screencasting with KMS
[2025-03-01 17:39:32.413]: Info: /dev/dri/card0 -> nvidia-drm
[2025-03-01 17:39:32.413]: Info: Found monitor for DRM screencasting
[2025-03-01 17:39:32.413]: Info: Found connector ID [106]
[2025-03-01 17:39:32.414]: Info: Found cursor plane [66]
[2025-03-01 17:39:32.414]: Info: Creating encoder [hevc_nvenc]
[2025-03-01 17:39:32.414]: Info: Color coding: SDR (Rec. 709)
[2025-03-01 17:39:32.414]: Info: Color depth: 10-bit
[2025-03-01 17:39:32.414]: Info: Color range: JPEG
[2025-03-01 17:39:32.417]: Info: Streaming bitrate is 1000000
[2025-03-01 17:39:32.691]: Info: 
[2025-03-01 17:39:32.691]: Info: // Ignore any errors mentioned above, they are not relevant. //
[2025-03-01 17:39:32.691]: Info: 
[2025-03-01 17:39:32.691]: Info: Found H.264 encoder: h264_nvenc [nvenc]
[2025-03-01 17:39:32.691]: Info: Found HEVC encoder: hevc_nvenc [nvenc]
[2025-03-01 17:39:32.693]: Info: Adding avahi service MiWiFi-RD18-srv
[2025-03-01 17:39:32.694]: Info: Configuration UI available at [https://localhost:47990]
[2025-03-01 17:39:33.627]: Info: Avahi service MiWiFi-RD18-srv successfully established.
[2025-03-01 17:48:25.125]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2025-03-01 17:48:25.125]: Info: Trying encoder [nvenc]
[2025-03-01 17:48:25.125]: Info: Screencasting with KMS
[2025-03-01 17:48:25.125]: Info: /dev/dri/card0 -> nvidia-drm
[2025-03-01 17:48:25.125]: Info: Found monitor for DRM screencasting
[2025-03-01 17:48:25.125]: Info: Found connector ID [106]
[2025-03-01 17:48:25.126]: Info: Found cursor plane [66]
[2025-03-01 17:48:25.126]: Info: Creating encoder [h264_nvenc]
[2025-03-01 17:48:25.126]: Info: Color coding: SDR (Rec. 601)
[2025-03-01 17:48:25.126]: Info: Color depth: 8-bit
[2025-03-01 17:48:25.126]: Info: Color range: JPEG
[2025-03-01 17:48:25.198]: Info: Streaming bitrate is 1000000
[2025-03-01 17:48:25.473]: Info: Creating encoder [hevc_nvenc]
[2025-03-01 17:48:25.473]: Info: Color coding: SDR (Rec. 601)
[2025-03-01 17:48:25.473]: Info: Color depth: 8-bit
[2025-03-01 17:48:25.473]: Info: Color range: JPEG
[2025-03-01 17:48:25.477]: Info: Streaming bitrate is 1000000
[2025-03-01 17:48:25.745]: Info: Creating encoder [av1_nvenc]
[2025-03-01 17:48:25.745]: Info: Color coding: SDR (Rec. 601)
[2025-03-01 17:48:25.745]: Info: Color depth: 8-bit
[2025-03-01 17:48:25.745]: Info: Color range: JPEG
[2025-03-01 17:48:25.750]: Info: Streaming bitrate is 1000000
[2025-03-01 17:48:25.758]: Warning: [av1_nvenc @ 0x7f867c3cf080] Codec not supported
[2025-03-01 17:48:25.758]: Error: [av1_nvenc @ 0x7f867c3cf080] Provided device doesn't support required NVENC features
[2025-03-01 17:48:26.009]: Error: Could not open codec [av1_nvenc]: Função não implementada
[2025-03-01 17:48:26.010]: Info: Screencasting with KMS
[2025-03-01 17:48:26.011]: Info: /dev/dri/card0 -> nvidia-drm
[2025-03-01 17:48:26.011]: Info: Found monitor for DRM screencasting
[2025-03-01 17:48:26.011]: Info: Found connector ID [106]
[2025-03-01 17:48:26.012]: Info: Found cursor plane [66]
[2025-03-01 17:48:26.012]: Info: Creating encoder [hevc_nvenc]
[2025-03-01 17:48:26.012]: Info: Color coding: SDR (Rec. 709)
[2025-03-01 17:48:26.012]: Info: Color depth: 10-bit
[2025-03-01 17:48:26.012]: Info: Color range: JPEG
[2025-03-01 17:48:26.018]: Info: Streaming bitrate is 1000000
[2025-03-01 17:48:26.286]: Info: 
[2025-03-01 17:48:26.286]: Info: // Ignore any errors mentioned above, they are not relevant. //
[2025-03-01 17:48:26.286]: Info: 
[2025-03-01 17:48:26.286]: Info: Found H.264 encoder: h264_nvenc [nvenc]
[2025-03-01 17:48:26.286]: Info: Found HEVC encoder: hevc_nvenc [nvenc]
[2025-03-01 17:48:26.286]: Info: Executing [Desktop]
[2025-03-01 17:48:26.347]: Info: New streaming session started [active sessions: 1]
[2025-03-01 17:48:26.423]: Info: CLIENT CONNECTED
[2025-03-01 17:48:26.592]: Info: /dev/dri/card0 -> nvidia-drm
[2025-03-01 17:48:26.593]: Info: Found display [wayland-0]
[2025-03-01 17:48:26.593]: Info: Found interface: zxdg_output_manager_v1(31) version 3
[2025-03-01 17:48:26.593]: Info: Found interface: wl_output(61) version 4
[2025-03-01 17:48:26.593]: Info: Found interface: wl_output(73) version 4
[2025-03-01 17:48:26.595]: Info: Resolution: 1920x1080
[2025-03-01 17:48:26.595]: Info: Resolution: 1920x1080
[2025-03-01 17:48:26.595]: Info: Offset: 1920x0
[2025-03-01 17:48:26.595]: Info: Logical size: 1920x1080
[2025-03-01 17:48:26.595]: Info: Name: DP-1
[2025-03-01 17:48:26.595]: Info: Found monitor: HKM M238W1F2556/0000000000001
[2025-03-01 17:48:26.595]: Info: Offset: 0x0
[2025-03-01 17:48:26.595]: Info: Logical size: 1920x1080
[2025-03-01 17:48:26.595]: Info: Name: HDMI-A-1
[2025-03-01 17:48:26.595]: Info: Found monitor: Samsung Electric Company HDMI-A-1-T24C310
[2025-03-01 17:48:26.595]: Info: -------- Start of KMS monitor list --------
[2025-03-01 17:48:26.595]: Info: Monitor 1 is DP-1: HKM M238W1F2556/0000000000001
[2025-03-01 17:48:26.595]: Info: Monitor 0 is HDMI-A-1: Samsung Electric Company HDMI-A-1-T24C310
[2025-03-01 17:48:26.595]: Info: --------- End of KMS monitor list ---------
[2025-03-01 17:48:26.595]: Info: Screencasting with KMS
[2025-03-01 17:48:26.595]: Info: /dev/dri/card0 -> nvidia-drm
[2025-03-01 17:48:26.595]: Info: Found monitor for DRM screencasting
[2025-03-01 17:48:26.595]: Info: Found connector ID [106]
[2025-03-01 17:48:26.596]: Info: Found cursor plane [66]
[2025-03-01 17:48:26.596]: Info: Creating encoder [hevc_nvenc]
[2025-03-01 17:48:26.596]: Info: Color coding: SDR (Rec. 709)
[2025-03-01 17:48:26.596]: Info: Color depth: 8-bit
[2025-03-01 17:48:26.596]: Info: Color range: MPEG
[2025-03-01 17:48:26.653]: Info: Streaming bitrate is 27788000
[2025-03-01 17:48:26.844]: Info: Setting default sink to: [sink-sunshine-stereo]
[2025-03-01 17:48:26.845]: Info: Found default monitor by name: sink-sunshine-stereo.monitor
[2025-03-01 17:48:26.928]: Info: Opus initialized: 48 kHz, 2 channels, 512 kbps (total), LOWDELAY
[2025-03-01 17:49:37.434]: Info: CLIENT DISCONNECTED
[2025-03-01 17:49:37.435]: Info: Setting default sink to: [alsa_output.pci-0000_00_1b.0.analog-stereo]
[2025-03-01 18:01:18.334]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2025-03-01 18:01:18.334]: Info: Trying encoder [nvenc]
[2025-03-01 18:01:18.334]: Info: Screencasting with KMS
[2025-03-01 18:01:18.335]: Info: /dev/dri/card0 -> nvidia-drm
[2025-03-01 18:01:18.335]: Info: Found monitor for DRM screencasting
[2025-03-01 18:01:18.336]: Info: Found connector ID [106]
[2025-03-01 18:01:18.336]: Info: Found cursor plane [66]
[2025-03-01 18:01:18.336]: Info: Creating encoder [h264_nvenc]
[2025-03-01 18:01:18.336]: Info: Color coding: SDR (Rec. 601)
[2025-03-01 18:01:18.337]: Info: Color depth: 8-bit
[2025-03-01 18:01:18.337]: Info: Color range: JPEG
[2025-03-01 18:01:18.345]: Info: Streaming bitrate is 1000000
[2025-03-01 18:01:18.639]: Info: Creating encoder [hevc_nvenc]
[2025-03-01 18:01:18.639]: Info: Color coding: SDR (Rec. 601)
[2025-03-01 18:01:18.639]: Info: Color depth: 8-bit
[2025-03-01 18:01:18.639]: Info: Color range: JPEG
[2025-03-01 18:01:18.644]: Info: Streaming bitrate is 1000000
[2025-03-01 18:01:18.915]: Info: Creating encoder [av1_nvenc]
[2025-03-01 18:01:18.915]: Info: Color coding: SDR (Rec. 601)
[2025-03-01 18:01:18.915]: Info: Color depth: 8-bit
[2025-03-01 18:01:18.915]: Info: Color range: JPEG
[2025-03-01 18:01:18.921]: Info: Streaming bitrate is 1000000
[2025-03-01 18:01:18.931]: Warning: [av1_nvenc @ 0x7f867c3cf080] Codec not supported
[2025-03-01 18:01:18.931]: Error: [av1_nvenc @ 0x7f867c3cf080] Provided device doesn't support required NVENC features
[2025-03-01 18:01:19.182]: Error: Could not open codec [av1_nvenc]: Função não implementada
[2025-03-01 18:01:19.184]: Info: Screencasting with KMS
[2025-03-01 18:01:19.184]: Info: /dev/dri/card0 -> nvidia-drm
[2025-03-01 18:01:19.184]: Info: Found monitor for DRM screencasting
[2025-03-01 18:01:19.184]: Info: Found connector ID [106]
[2025-03-01 18:01:19.185]: Info: Found cursor plane [66]
[2025-03-01 18:01:19.185]: Info: Creating encoder [hevc_nvenc]
[2025-03-01 18:01:19.185]: Info: Color coding: SDR (Rec. 709)
[2025-03-01 18:01:19.185]: Info: Color depth: 10-bit
[2025-03-01 18:01:19.185]: Info: Color range: JPEG
[2025-03-01 18:01:19.191]: Info: Streaming bitrate is 1000000
[2025-03-01 18:01:19.464]: Info: 
[2025-03-01 18:01:19.464]: Info: // Ignore any errors mentioned above, they are not relevant. //
[2025-03-01 18:01:19.464]: Info: 
[2025-03-01 18:01:19.464]: Info: Found H.264 encoder: h264_nvenc [nvenc]
[2025-03-01 18:01:19.464]: Info: Found HEVC encoder: hevc_nvenc [nvenc]
[2025-03-01 18:01:19.464]: Info: Executing [Desktop]
[2025-03-01 18:01:19.510]: Info: New streaming session started [active sessions: 1]
[2025-03-01 18:01:19.582]: Info: CLIENT CONNECTED
[2025-03-01 18:01:19.666]: Info: /dev/dri/card0 -> nvidia-drm
[2025-03-01 18:01:19.666]: Info: Found display [wayland-0]
[2025-03-01 18:01:19.668]: Info: Found interface: zxdg_output_manager_v1(31) version 3
[2025-03-01 18:01:19.668]: Info: Found interface: wl_output(61) version 4
[2025-03-01 18:01:19.668]: Info: Found interface: wl_output(73) version 4
[2025-03-01 18:01:19.668]: Info: Resolution: 1920x1080
[2025-03-01 18:01:19.668]: Info: Resolution: 1920x1080
[2025-03-01 18:01:19.668]: Info: Offset: 1920x0
[2025-03-01 18:01:19.668]: Info: Logical size: 1920x1080
[2025-03-01 18:01:19.668]: Info: Name: DP-1
[2025-03-01 18:01:19.668]: Info: Found monitor: HKM M238W1F2556/0000000000001
[2025-03-01 18:01:19.668]: Info: Offset: 0x0
[2025-03-01 18:01:19.668]: Info: Logical size: 1920x1080
[2025-03-01 18:01:19.668]: Info: Name: HDMI-A-1
[2025-03-01 18:01:19.668]: Info: Found monitor: Samsung Electric Company HDMI-A-1-T24C310
[2025-03-01 18:01:19.668]: Info: -------- Start of KMS monitor list --------
[2025-03-01 18:01:19.668]: Info: Monitor 1 is DP-1: HKM M238W1F2556/0000000000001
[2025-03-01 18:01:19.668]: Info: Monitor 0 is HDMI-A-1: Samsung Electric Company HDMI-A-1-T24C310
[2025-03-01 18:01:19.668]: Info: --------- End of KMS monitor list ---------
[2025-03-01 18:01:19.668]: Info: Screencasting with KMS
[2025-03-01 18:01:19.668]: Info: /dev/dri/card0 -> nvidia-drm
[2025-03-01 18:01:19.668]: Info: Found monitor for DRM screencasting
[2025-03-01 18:01:19.668]: Info: Found connector ID [106]
[2025-03-01 18:01:19.669]: Info: Found cursor plane [66]
[2025-03-01 18:01:19.669]: Info: Creating encoder [hevc_nvenc]
[2025-03-01 18:01:19.669]: Info: Color coding: SDR (Rec. 709)
[2025-03-01 18:01:19.669]: Info: Color depth: 8-bit
[2025-03-01 18:01:19.669]: Info: Color range: MPEG
[2025-03-01 18:01:19.740]: Info: Streaming bitrate is 27788000
[2025-03-01 18:01:20.014]: Info: Setting default sink to: [sink-sunshine-stereo]
[2025-03-01 18:01:20.015]: Info: Found default monitor by name: sink-sunshine-stereo.monitor
[2025-03-01 18:01:20.071]: Info: Opus initialized: 48 kHz, 2 channels, 512 kbps (total), LOWDELAY
[2025-03-01 18:01:55.776]: Info: CLIENT DISCONNECTED
[2025-03-01 18:01:55.777]: Info: Setting default sink to: [alsa_output.pci-0000_00_1b.0.analog-stereo]

Activity

  1. Dreyk007 commented on Apr 9, 2025

    @Dreyk007

    Exactly same issue for me. Nothing helped.

  2. chopin1998 commented on Apr 26, 2025

    @chopin1998

    i have 3 monitors....

  3. alanjds commented on May 9, 2025

    @alanjds

    Just to spread the info: I opened an issue on Apollo fork, that led me got to this codepaths:


    For the touch issue, could find that:

    • MacOS abs_mouse used the screen offsets to calculate the new mouse position
    • Windows abs_mouse also used touch_port.offset_{x,y} to calculate the final values;
    • but Linux move_abs ignores that. And more, Linux get_location always returns {0,0}, which is clearly a barebones fix.

    However, I would need to dig more to understand if this changes anything on screen touches. Do you have some knowledge about that codepath for touch inputs, even within Windows? I mean, abs_mouse is used during touch event handling?


    If you have some knowledge on what can/should be changed on the Linux handling, I am willing to create a patch PT here (and there on Apollo too)

  4. ReenigneArcher commented on May 9, 2025

    @ReenigneArcher
    Member

    @alanjds a PR would be much appreciated if you come up with a solution.

    This thread may be of interest: games-on-whales/inputtino#6

  5. alanjds commented on May 14, 2025

    @alanjds

    I had dug some options to get 1) the current mouse position 2) the current screen layout.

    Seems that SDL is a nice way to get those.

    Do any or you (@ReenigneArcher or @Hazer maybe?) know if SDL is already being included in Sunshine builds, at least for Linux?
    Asking because a search via Github showed some logs containing SDL but no code imports.

    (and thanks @ReenigneArcher for the GOW link. Was very enlightening 👍)

  6. ReenigneArcher commented on May 14, 2025

    @ReenigneArcher
    Member

    @alanjds We're not currently using SDL, only inputtino on Linux. I'm not against using SDL though.

  7. schillem commented on Jun 20, 2025

    @schillem

    I am having the same issue on Linux. It isn't just touch, it is also stylus inputs that goes to the wrong monitor. I was wondering is this still an active open issue?

  8. alanjds commented on Jun 21, 2025

    @alanjds

    I am having the same issue on Linux. It isn't just touch, it is also stylus inputs that goes to the wrong monitor. I was wondering is this still an active open issue?

    It is. Right now the Linux input does not currently accounts for the multiple monitor offsets, always starting on (0,0) iiuc. So, it depends on you personal config to be "lucky" that your main monitor aligns with the input plane.

    Yes, it is a bug in the sense of "never handled feature".

    The easiest fix I found depends on SDL, yet I had no bandwidth to investigate how to add SDL to the Linux build deps.

  9. changed the title [-]Mouse input is in wrong monitor when using multi-monitor on Linux[/-] [+]Mouse/Stylus/Touch input is in wrong monitor when using multi-monitor on Linux[/+] on Jul 15, 2025
  10. iam-best commented on Jul 15, 2025

    @iam-best

    Same issues. I have a solution tho but I'm not happy with it. In display settings (not in sunshine) I can move the monitor that should get the touch input to the top and that should fix it (at least for me) but moving your windows between monitors is going to be a pain.

    I hope there will be a better solution tho. Also I'm new to Linux and I'm using Steam OS so I'm not sure if this also works on Bazzite.

  11. gschintgen commented on Jul 20, 2025

    @gschintgen
    Contributor

    I noticed this issue too when I temporarily added my Android tablet (with stylus) as second screen (using a dummy dongle) to my Linux laptop. The pen's input went to the primary display instead of the dummy/virtual. There seems to be some offset that is missing.

    (This issue might be of interest to @ABeltramo.)

  12. ABeltramo commented on Jul 21, 2025

    @ABeltramo
    Contributor

    I think there are two separate issues here:
    1- The pen input goes to the "main monitor" and not the one currently streaming
    2- We don't account for monitor offsets in Linux

    I'm not sure these two are actually the same, what we currently do is practically plugging a new virtual pen device. Would a USB device know which monitors it should output no? Probably not, right? That should be the job of the Desktop Environment/Compositor, hence why

    In display settings (not in sunshine) I can move the monitor that should get the touch input to the top and that should fix it (at least for me)

    this works.

    As for using the monitor offset, I guess the result of that would be to just "move" the pen to a monitor, right?
    It feels a bit of a hack (and I wonder if it'll cause any issue) but if it's used both on OSX and Windows I guess that actually works?

    SDL is kind of a beast of a library to pull just for that, it would be better to get the display configuration directly by implementing the required Xorg and Wayland protocols. I'm not too familiar with that code, but we probably already have what's required here and here

  13. Kaizo107 commented on Aug 19, 2025

    @Kaizo107

    Same problem on CachyOS v2025.628.4510-3, behavior is exactly like the video clip in #2166

  14. Quackdoc commented on Aug 26, 2025

    @Quackdoc

    On wayland mapping is up to the compositor, I don't think there is a single way to fix this outside of being compositor aware. for instance on cosmic comp it's set in $HOME/.config/cosmic/com.system76.CosmicComp/v1/input_devices

    "Device": (
        state: Enabled,
        map_to_output: Some("DP-1"),
        acceleration: Some((
            profile: Some(Flat),
            speed: 1.0,
        )),
        )
    

    Sway needs

    input "DEVICE" {
        drag enable
        drag_lock enable
        map_to_output eDP-1
    }
    

    so on and so forth. Perhaps the docs could have a list of known configurations, but in the current state of wayland I don't think it's possible to solve this.

  15. 10 remaining items

  16. Fuwachiro commented on May 14, 2026

    @Fuwachiro

    yep, deffinitely! i was waiting all this time hoping it was "Magically" fixed lol.

    sometimes i lament my inability in specific programming language to help such niche trouble like this

  17. iam-best commented on May 14, 2026

    @iam-best

    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!

    NO DON'T DO THAT!

  18. laurorual commented on May 15, 2026

    @laurorual
    Author

    I'm still having this issue, tho i kinda "fixed" it by using a virtual monitor and deactivating all real monitors when connecting.

  19. DirtFrog commented on May 15, 2026

    @DirtFrog

    Just adding to this thread. I've also been having this issue, tested on linux moonlight clients and iOS moonlight clients. Im also experiencing the same issue as #2166 for both touch and stylus input, there's some offset to my inputs and it grows when moving away from the right corner (Monitor 1, offset -1920x0) or left corner (Monitor 2, 0x0) of then screen.

    OS: 7.0.6-1-cachyos
    Sunshine version: 2025.924.154138 commit: 86188d4

  20. schillem commented on Aug 6, 2026

    @schillem

    I'm still having this issue, tho i kinda "fixed" it by using a virtual monitor and deactivating all real monitors when connecting.

    It isn't fixing the issue. The bug is when you have multiple monitor. If you don't have multiple monitor there is no bug to have.

  21. LizardByte-bot commented on Nov 4, 2026

    @LizardByte-bot
    Member

    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!

  22. Philantrop commented on Nov 4, 2026

    @Philantrop

    Still needs fixing. Be quiet, bot.

  23. Fuwachiro commented on Nov 5, 2026

    @Fuwachiro

    why there is no fix?

  24. iam-best commented on Nov 5, 2026

    @iam-best

    It's been more than a year already and still not fixed? 🥲

  25. Quackdoc commented on Nov 5, 2026

    @Quackdoc

    as far as I know, this is still a wayland limitation. X11 can potentially use map to output, but Wayland has no unified way of handling this that I am aware of.

  26. alanjds commented on Nov 6, 2026

    @alanjds

    as far as I know, this is still a wayland limitation. X11 can potentially use map to output, but Wayland has no unified way of handling this that I am aware of.

    The easiest fix I found depends on SDL, yet I had no bandwidth to investigate how to add SDL to the Linux build deps.

  27. ReenigneArcher commented on Nov 6, 2026

    @ReenigneArcher
    Member

    A candidate fix is available in #6055. Could users affected by this issue test the Linux packages from the PR build artifacts and report whether input now lands on the streamed monitor? Choose the package for your distribution/architecture; GitHub requires signing in to download these artifacts.

    Scope and limitations:

    • These monitor-mapping changes target Linux hosts.
    • Automatic native touch/pen output assignment targets KDE Plasma on Wayland. Plasma 6.5.1 or later is recommended for reliable reassignment when switching outputs. Older Plasma versions, including the 6.3.1 reported here, may still have compositor-side reassignment problems.
    • Other Wayland compositors continue using their existing device mapping settings; the virtual touchscreen/pen tablet must be assigned manually through the compositor's input configuration. Automatic device assignment is also not provided for X11.

    Please try streaming a monitor other than the primary display, then switch the streamed output and reconnect. For native touch/pen testing, leave Sunshine's Native Pen/Touch Support enabled. Results with absolute mouse/TV-remote input are useful too—please identify the input mode, since it follows a different path. Layouts with monitors left of/above the primary display or mixed scaling are especially useful to test.

    Please include your host distribution, desktop/compositor version, Wayland/X11 session, artifact filename, Moonlight client/version, input mode, monitor layout/scaling, and results before/after switching outputs. If it still fails, attach Sunshine logs collected with Configuration → Advanced → Log Level → Debug while reproducing the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions