LizardByte / Sunshine

Self-hosted game stream host for Moonlight.
http://app.lizardbyte.dev/Sunshine/
GNU General Public License v3.0
19.42k stars 943 forks source link

mouse constant skipping, lag #2524

Closed tumo07 closed 1 month ago

tumo07 commented 5 months ago

Is there an existing issue for this?

Is your issue described in the documentation?

Is your issue present in the nightly release?

Describe the Bug

tried both nightly and official release mouse constant lag no matter which setting i use for amf does not affect video playback so i know it;s a mouse problem i link a video of it host: ryzen 5600x rx6700xt latest 24.4.1 driver client: i5 8500 via internet with upnp enabled ipv4 only both system have atleast 250mbps both way fiber internet video link: https://drive.google.com/drive/folders/1VvdMJHMs-aNRdMp84vvTcbYCAgDMeqMb

Expected Behavior

No response

Additional Context

No response

Host Operating System

Windows

Operating System Version

windows 10

Architecture

64 bit

Sunshine commit or version

0.23.1

Package

Windows - installer

GPU Type

AMD

GPU Model

radeon rx 6700xt

GPU Driver/Mesa Version

24.4.1

Capture Method (Linux Only)

No response

Config

amd_coder = cavlc
amd_vbaq = disabled
key_rightalt_to_key_win = enabled
upnp = enabled
fps = [10,30,60,90,120,75]
amd_quality = speed
controller = disabled
motion_as_ds4 = disabled
touchpad_as_ds4 = disabled
always_send_scancodes = disabled
high_resolution_scrolling = disabled
native_pen_touch = disabled

Apps

No response

Relevant log output

[2024:05:12:19:50:34]: Info: Sunshine version: 0.23.1.b4c12cb77c46584775c949d7f3d16f122a1a801b
[2024:05:12:19:50:34]: Info: nvprefs: NvAPI_Initialize() failed, ignore if you don't have NVIDIA video card
[2024:05:12:19:50:34]: Info: Compiling shaders...
[2024:05:12:19:50:34]: Info: System tray created
[2024:05:12:19:50:34]: Info: Compiled shaders
[2024:05:12:19:50:35]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2024:05:12:19:50:35]: Info: Trying encoder [nvenc]
[2024:05:12:19:50:35]: Info: ddprobe.exe [1] [] returned: 0x00000000
[2024:05:12:19:50:35]: Info: Set GPU preference: 1
[2024:05:12:19:50:35]: Info: 
Device Description : AMD Radeon RX 6700 XT
Device Vendor ID   : 0x00001002
Device Device ID   : 0x000073DF
Device Video Mem   : 12242 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 8154 MiB
Feature Level      : 0x0000B100
Capture size       : 1920x1080
Offset             : 0x0
Virtual Desktop    : 1920x1080
[2024:05:12:19:50:35]: Info: Active GPU has HAGS disabled
[2024:05:12:19:50:35]: Info: Using realtime GPU priority
[2024:05:12:19:50:35]: Info: Desktop resolution [1920x1080]
[2024:05:12:19:50:35]: Info: Desktop format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2024:05:12:19:50:35]: Info: Display refresh rate [75Hz]
[2024:05:12:19:50:35]: Info: Requested frame rate [60fps]
[2024:05:12:19:50:35]: Info: 
Colorspace         : DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
Bits Per Color     : 8
Red Primary        : [0.638672,0.333008]
Green Primary      : [0.308594,0.629883]
Blue Primary       : [0.148438,0.0546875]
White Point        : [0.313477,0.329102]
Min Luminance      : 0.5 nits
Max Luminance      : 270 nits
Max Full Luminance : 270 nits
[2024:05:12:19:50:35]: Info: Encoder [nvenc] is not supported on this GPU
[2024:05:12:19:50:35]: Info: Trying encoder [quicksync]
[2024:05:12:19:50:35]: Info: 
Device Description : AMD Radeon RX 6700 XT
Device Vendor ID   : 0x00001002
Device Device ID   : 0x000073DF
Device Video Mem   : 12242 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 8154 MiB
Feature Level      : 0x0000B100
Capture size       : 1920x1080
Offset             : 0x0
Virtual Desktop    : 1920x1080
[2024:05:12:19:50:35]: Info: Active GPU has HAGS disabled
[2024:05:12:19:50:35]: Info: Using realtime GPU priority
[2024:05:12:19:50:35]: Info: Desktop resolution [1920x1080]
[2024:05:12:19:50:35]: Info: Desktop format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2024:05:12:19:50:35]: Info: Display refresh rate [75Hz]
[2024:05:12:19:50:35]: Info: Requested frame rate [60fps]
[2024:05:12:19:50:35]: Info: 
Colorspace         : DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
Bits Per Color     : 8
Red Primary        : [0.638672,0.333008]
Green Primary      : [0.308594,0.629883]
Blue Primary       : [0.148438,0.0546875]
White Point        : [0.313477,0.329102]
Min Luminance      : 0.5 nits
Max Luminance      : 270 nits
Max Full Luminance : 270 nits
[2024:05:12:19:50:35]: Info: Encoder [quicksync] is not supported on this GPU
[2024:05:12:19:50:35]: Info: Trying encoder [amdvce]
[2024:05:12:19:50:35]: Info: 
Device Description : AMD Radeon RX 6700 XT
Device Vendor ID   : 0x00001002
Device Device ID   : 0x000073DF
Device Video Mem   : 12242 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 8154 MiB
Feature Level      : 0x0000B100
Capture size       : 1920x1080
Offset             : 0x0
Virtual Desktop    : 1920x1080
[2024:05:12:19:50:35]: Info: Active GPU has HAGS disabled
[2024:05:12:19:50:35]: Info: Using realtime GPU priority
[2024:05:12:19:50:35]: Info: Desktop resolution [1920x1080]
[2024:05:12:19:50:35]: Info: Desktop format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2024:05:12:19:50:35]: Info: Display refresh rate [75Hz]
[2024:05:12:19:50:35]: Info: Requested frame rate [60fps]
[2024:05:12:19:50:35]: Info: 
Colorspace         : DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
Bits Per Color     : 8
Red Primary        : [0.638672,0.333008]
Green Primary      : [0.308594,0.629883]
Blue Primary       : [0.148438,0.0546875]
White Point        : [0.313477,0.329102]
Min Luminance      : 0.5 nits
Max Luminance      : 270 nits
Max Full Luminance : 270 nits
[2024:05:12:19:50:35]: Info: SDR color coding [Rec. 601]
[2024:05:12:19:50:35]: Info: Color depth: 8-bit
[2024:05:12:19:50:35]: Info: Color range: [JPEG]
[2024:05:12:19:50:35]: Info: SDR color coding [Rec. 601]
[2024:05:12:19:50:35]: Info: Color depth: 8-bit
[2024:05:12:19:50:35]: Info: Color range: [JPEG]
[2024:05:12:19:50:35]: Info: SDR color coding [Rec. 601]
[2024:05:12:19:50:35]: Info: Color depth: 8-bit
[2024:05:12:19:50:35]: Info: Color range: [JPEG]
[2024:05:12:19:50:35]: Error: [av1_amf @ 0000028459df2c40] CreateComponent(AMFVideoEncoderHW_AV1) failed with error 30
[2024:05:12:19:50:35]: Error: Could not open codec [av1_amf]: Encoder not found
[2024:05:12:19:50:35]: Info: 
Device Description : AMD Radeon RX 6700 XT
Device Vendor ID   : 0x00001002
Device Device ID   : 0x000073DF
Device Video Mem   : 12242 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 8154 MiB
Feature Level      : 0x0000B100
Capture size       : 1920x1080
Offset             : 0x0
Virtual Desktop    : 1920x1080
[2024:05:12:19:50:35]: Info: Active GPU has HAGS disabled
[2024:05:12:19:50:35]: Info: Using realtime GPU priority
[2024:05:12:19:50:35]: Info: Desktop resolution [1920x1080]
[2024:05:12:19:50:35]: Info: Desktop format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2024:05:12:19:50:35]: Info: Display refresh rate [75Hz]
[2024:05:12:19:50:35]: Info: Requested frame rate [60fps]
[2024:05:12:19:50:35]: Info: 
Colorspace         : DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
Bits Per Color     : 8
Red Primary        : [0.638672,0.333008]
Green Primary      : [0.308594,0.629883]
Blue Primary       : [0.148438,0.0546875]
White Point        : [0.313477,0.329102]
Min Luminance      : 0.5 nits
Max Luminance      : 270 nits
Max Full Luminance : 270 nits
[2024:05:12:19:50:35]: Info: SDR color coding [Rec. 709]
[2024:05:12:19:50:35]: Info: Color depth: 10-bit
[2024:05:12:19:50:35]: Info: Color range: [JPEG]
[2024:05:12:19:50:35]: Info: 
[2024:05:12:19:50:35]: Info: // Ignore any errors mentioned above, they are not relevant. //
[2024:05:12:19:50:35]: Info: 
[2024:05:12:19:50:35]: Info: Found H.264 encoder: h264_amf [amdvce]
[2024:05:12:19:50:35]: Info: Found HEVC encoder: hevc_amf [amdvce]
[2024:05:12:19:50:35]: Info: Configuration UI available at [https://localhost:47990]
[2024:05:12:19:50:36]: Info: Registered Sunshine mDNS service
[2024:05:12:19:50:38]: Info: Completed UPnP port mappings to 192.168.0.8 via http://192.168.0.1:52869/gatedesc.xml
[2024:05:12:19:50:48]: Info: Encoder reenumeration is required
[2024:05:12:19:50:48]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2024:05:12:19:50:48]: Info: Trying encoder [nvenc]
[2024:05:12:19:50:48]: Info: 
Device Description : AMD Radeon RX 6700 XT
Device Vendor ID   : 0x00001002
Device Device ID   : 0x000073DF
Device Video Mem   : 12242 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 8154 MiB
Feature Level      : 0x0000B100
Capture size       : 1920x1080
Offset             : 0x0
Virtual Desktop    : 1920x1080
[2024:05:12:19:50:48]: Info: Active GPU has HAGS disabled
[2024:05:12:19:50:48]: Info: Using realtime GPU priority
[2024:05:12:19:50:48]: Info: Desktop resolution [1920x1080]
[2024:05:12:19:50:48]: Info: Desktop format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2024:05:12:19:50:48]: Info: Display refresh rate [75Hz]
[2024:05:12:19:50:48]: Info: Requested frame rate [60fps]
[2024:05:12:19:50:48]: Info: 
Colorspace         : DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
Bits Per Color     : 8
Red Primary        : [0.638672,0.333008]
Green Primary      : [0.308594,0.629883]
Blue Primary       : [0.148438,0.0546875]
White Point        : [0.313477,0.329102]
Min Luminance      : 0.5 nits
Max Luminance      : 270 nits
Max Full Luminance : 270 nits
[2024:05:12:19:50:48]: Info: Encoder [nvenc] is not supported on this GPU
[2024:05:12:19:50:48]: Info: Trying encoder [quicksync]
[2024:05:12:19:50:48]: Info: 
Device Description : AMD Radeon RX 6700 XT
Device Vendor ID   : 0x00001002
Device Device ID   : 0x000073DF
Device Video Mem   : 12242 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 8154 MiB
Feature Level      : 0x0000B100
Capture size       : 1920x1080
Offset             : 0x0
Virtual Desktop    : 1920x1080
[2024:05:12:19:50:48]: Info: Active GPU has HAGS disabled
[2024:05:12:19:50:48]: Info: Using realtime GPU priority
[2024:05:12:19:50:48]: Info: Desktop resolution [1920x1080]
[2024:05:12:19:50:48]: Info: Desktop format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2024:05:12:19:50:48]: Info: Display refresh rate [75Hz]
[2024:05:12:19:50:48]: Info: Requested frame rate [60fps]
[2024:05:12:19:50:48]: Info: 
Colorspace         : DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
Bits Per Color     : 8
Red Primary        : [0.638672,0.333008]
Green Primary      : [0.308594,0.629883]
Blue Primary       : [0.148438,0.0546875]
White Point        : [0.313477,0.329102]
Min Luminance      : 0.5 nits
Max Luminance      : 270 nits
Max Full Luminance : 270 nits
[2024:05:12:19:50:48]: Info: Encoder [quicksync] is not supported on this GPU
[2024:05:12:19:50:48]: Info: Trying encoder [amdvce]
[2024:05:12:19:50:48]: Info: 
Device Description : AMD Radeon RX 6700 XT
Device Vendor ID   : 0x00001002
Device Device ID   : 0x000073DF
Device Video Mem   : 12242 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 8154 MiB
Feature Level      : 0x0000B100
Capture size       : 1920x1080
Offset             : 0x0
Virtual Desktop    : 1920x1080
[2024:05:12:19:50:48]: Info: Active GPU has HAGS disabled
[2024:05:12:19:50:48]: Info: Using realtime GPU priority
[2024:05:12:19:50:48]: Info: Desktop resolution [1920x1080]
[2024:05:12:19:50:48]: Info: Desktop format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2024:05:12:19:50:48]: Info: Display refresh rate [75Hz]
[2024:05:12:19:50:48]: Info: Requested frame rate [60fps]
[2024:05:12:19:50:48]: Info: 
Colorspace         : DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
Bits Per Color     : 8
Red Primary        : [0.638672,0.333008]
Green Primary      : [0.308594,0.629883]
Blue Primary       : [0.148438,0.0546875]
White Point        : [0.313477,0.329102]
Min Luminance      : 0.5 nits
Max Luminance      : 270 nits
Max Full Luminance : 270 nits
[2024:05:12:19:50:48]: Info: SDR color coding [Rec. 601]
[2024:05:12:19:50:48]: Info: Color depth: 8-bit
[2024:05:12:19:50:48]: Info: Color range: [JPEG]
[2024:05:12:19:50:48]: Info: SDR color coding [Rec. 601]
[2024:05:12:19:50:48]: Info: Color depth: 8-bit
[2024:05:12:19:50:48]: Info: Color range: [JPEG]
[2024:05:12:19:50:48]: Info: SDR color coding [Rec. 601]
[2024:05:12:19:50:48]: Info: Color depth: 8-bit
[2024:05:12:19:50:48]: Info: Color range: [JPEG]
[2024:05:12:19:50:48]: Error: [av1_amf @ 00000284000841c0] CreateComponent(AMFVideoEncoderHW_AV1) failed with error 30
[2024:05:12:19:50:48]: Error: Could not open codec [av1_amf]: Encoder not found
[2024:05:12:19:50:48]: Info: 
Device Description : AMD Radeon RX 6700 XT
Device Vendor ID   : 0x00001002
Device Device ID   : 0x000073DF
Device Video Mem   : 12242 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 8154 MiB
Feature Level      : 0x0000B100
Capture size       : 1920x1080
Offset             : 0x0
Virtual Desktop    : 1920x1080
[2024:05:12:19:50:48]: Info: Active GPU has HAGS disabled
[2024:05:12:19:50:48]: Info: Using realtime GPU priority
[2024:05:12:19:50:48]: Info: Desktop resolution [1920x1080]
[2024:05:12:19:50:48]: Info: Desktop format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2024:05:12:19:50:48]: Info: Display refresh rate [75Hz]
[2024:05:12:19:50:48]: Info: Requested frame rate [60fps]
[2024:05:12:19:50:48]: Info: 
Colorspace         : DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
Bits Per Color     : 8
Red Primary        : [0.638672,0.333008]
Green Primary      : [0.308594,0.629883]
Blue Primary       : [0.148438,0.0546875]
White Point        : [0.313477,0.329102]
Min Luminance      : 0.5 nits
Max Luminance      : 270 nits
Max Full Luminance : 270 nits
[2024:05:12:19:50:48]: Info: SDR color coding [Rec. 709]
[2024:05:12:19:50:48]: Info: Color depth: 10-bit
[2024:05:12:19:50:48]: Info: Color range: [JPEG]
[2024:05:12:19:50:48]: Info: 
[2024:05:12:19:50:48]: Info: // Ignore any errors mentioned above, they are not relevant. //
[2024:05:12:19:50:48]: Info: 
[2024:05:12:19:50:48]: Info: Found H.264 encoder: h264_amf [amdvce]
[2024:05:12:19:50:48]: Info: Found HEVC encoder: hevc_amf [amdvce]
[2024:05:12:19:50:48]: Info: Executing [Desktop]
[2024:05:12:19:50:50]: Info: nvprefs: NvAPI_Initialize() failed, ignore if you don't have NVIDIA video card
[2024:05:12:19:50:50]: Info: CLIENT CONNECTED
[2024:05:12:19:50:51]: Info: 
Device Description : AMD Radeon RX 6700 XT
Device Vendor ID   : 0x00001002
Device Device ID   : 0x000073DF
Device Video Mem   : 12242 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 8154 MiB
Feature Level      : 0x0000B100
Capture size       : 1920x1080
Offset             : 0x0
Virtual Desktop    : 1920x1080
[2024:05:12:19:50:51]: Info: Active GPU has HAGS disabled
[2024:05:12:19:50:51]: Info: Using realtime GPU priority
[2024:05:12:19:50:51]: Info: Desktop resolution [1920x1080]
[2024:05:12:19:50:51]: Info: Desktop format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2024:05:12:19:50:51]: Info: Display refresh rate [75Hz]
[2024:05:12:19:50:51]: Info: Requested frame rate [75fps]
[2024:05:12:19:50:51]: Info: 
Colorspace         : DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
Bits Per Color     : 8
Red Primary        : [0.638672,0.333008]
Green Primary      : [0.308594,0.629883]
Blue Primary       : [0.148438,0.0546875]
White Point        : [0.313477,0.329102]
Min Luminance      : 0.5 nits
Max Luminance      : 270 nits
Max Full Luminance : 270 nits
[2024:05:12:19:50:51]: Info: Capture format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2024:05:12:19:50:51]: Info: SDR color coding [Rec. 601]
[2024:05:12:19:50:51]: Info: Color depth: 8-bit
[2024:05:12:19:50:51]: Info: Color range: [MPEG]
sambuev commented 5 months ago

I understand you, I use Android Moonligh on my tablet and mouse there always lags, but I found a solution, I use combination of CtrAlt+Shoft+C and it's shows my local mouse, which has no lag, then I press Ctrl+Alt+Shift+N to hide the remote mouse, this way I can work around the lag. It works fine for me.

tumo07 commented 5 months ago

I understand you, I use Android Moonligh on my tablet and mouse there always lags, but I found a solution, I use combination of CtrAlt+Shoft+C and it's shows my local mouse, which has no lag, then I press Ctrl+Alt+Shift+N to hide the remote mouse, this way I can work around the lag. It works fine for me.

thanks but mine didn't fix the lag it's not that the rendered mouse is lagging but the mouse driver that control the host mouse is lagging i can see the mouse lag on host pc too but when i use vnc to control the mouse lag is not there

tumo07 commented 5 months ago

note to dev: i'm using nightly build and i will update to every latest build to test if the problem is resolved if you need anymore info to fix this let me know here or via my email in case i don't check github, trinhkhoa.kt02@gmail.com

R-Bose commented 5 months ago

Is this perhaps because Sunshine does not expect mouse polling rates above 125Hz? Client mouse could go all the way up to 1000Hz for high end gaming mouse and the lag is noticeable.

dannybucksch commented 4 months ago

first of all, this is such an awesome piece of software. thank you very much.

that being said, today i updated my sunshine version from 0.20.0 to 0.23.1 and immediately noticed a way worse mouse experience (stuttering and cursor trailing behind, when i compare the native mouse cursor to the host cursor via ctrl+alt+shift+c). i downgraded again to 0.20.0 and it works perfectly again (the remote cursor sticks to the host cursor, as if it was native).

did anything change between these versions with regards to mouse handling? i use a logitec g305 with 1000hz on an android tablet / moonlight.

ReenigneArcher commented 4 months ago

@dannybucksch There's about a million commits between those two version... maybe you can narrow it down a little further?

Full Changelog: https://github.com/LizardByte/Sunshine/compare/v0.20.0...v0.23.1

ximiTech commented 4 months ago

with the latest build v2024.621.193854, I did some test in the macos sonoma 14.4 intel host, and find that the mouse lags. However if I use a bluetooth mouse to connect directly to the host machine, I still find it lags. So I wish you can find some information from this.

LizardByte-bot commented 1 month ago

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 commented 1 month ago

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