moonlight-stream / moonlight-chrome

GameStream client for ChromeOS
GNU General Public License v3.0
747 stars 165 forks source link

Mouse Lag #132

Closed madwedge closed 6 years ago

madwedge commented 8 years ago

Great app so far. Seems to work well, except there's noticeable mouse lag when moving the pointer around. Is this just the nature of the beast or is there a way to resolve this? Many thanks and keep up the great work.

drasbeck commented 8 years ago

I have noticeable mouse lag as well, which I have not suffered from in earlier versions, but do in the latest release (0.6.1).

It is much worse, as in unplayable, on my low powered MacBook 12" (on an otherwise solid ac WIFI connection), than it is on my MBP (on cabled network).

Both are running macOS 10.12.1. Chrome 54.0.2840.71 (64-bit)

ShadowBullet commented 8 years ago

Can confirm this as well, it has been fine in previous versions, but now it is very prevalent. @raidancampbell any ideas?

Squidpower commented 8 years ago

I'm having serious issues with this as well. I'm not sure if "lag" is exactly the term, but the mouse movement is very erratic, as if the mouse pointer acceleration value is changing randomly, making the pointer alternately fly across the screen or move very slowly. This basically makes key/mouse games unplayable. This is my first attempt at streaming via a Chromebook, but I can moonlight stream on the same network with the same host machine using a less powerful Raspberry Pi 3 with no mouse issues.

ChromeOS Version 54.0.2840.101

jimb0616 commented 7 years ago

For Windows

I've had this issue as well and have tried so many things to fix it. I've made some progress and here's how....

Make sure you're not using a gaming mouse with built-in DPI adjustment. For some reason it causes extreme mouse lag. Use a basic mouse or any mouse without the DPI built-in.

Disable "enhance pointer precision", on host AND client, under Control Panel > Mouse > Point Options. For some reason this option is automatically re-enabled each time you connect so you have to disable it each time. I've noticed huge improvements when disabling that feature.

I've also noticed improvements when I set the point speed to the same exact setting for the host and client.

Lastly, I've noticed improvements when keeping a basic mouse plugged in on the host instead of leaving my gaming mouse plugged in. Same goes with keyboards, if you have keyboard issues chances are Moonlight just doesn't like what you have plugged in on the host side.

If you're wondering how to get to the mouse settings after connecting to the host via Moonlight, just add "mstsc.exe" to your GFE available items to stream. The file "mstsc.exe" is located in "C:\Windows\system32\mstsc.exe". When launching this feature via Moonlight it streams your entire desktop. I always launch mstsc.exe and just launch my games from within the desktop.

One thing to note, just because you notice mouse lag when you're NOT in a game doesn't mean it will lag in the game as well! I've noticed some mouse lag and when launching and entering the game (after the map loads etc..) the lag is completely gone.

I hope this helps!!

fletom commented 7 years ago

I am seeing this issue as well, and it makes realtime games like League of Legends pretty unplayable. I'm using gigabit ethernet with ~0.4 ms ping so it's most likely a software issue. I've tried @jimb0616's tips but sadly none of them seem to improve the situation. If anyone else has ideas I can test them on my end and report back.

ShadowBullet commented 7 years ago

What I did was enabled GPU encoding even if the system did not support it in order to force it to use it. It seemed to improve it greatly, not perfect but better than it was. Much more consistent frame rate as well.

On Dec 6, 2016, at 5:56 PM, Fletcher Tomalty notifications@github.com wrote:

I am seeing this issue as well, and it makes realtime games like League of Legends pretty unplayable. I'm using gigabit ethernet with ~0.4 ms ping so it's most likely a software issue. I've tried @jimb0616's tips but sadly none of them seem to improve the situation. If anyone else has ideas I can test them on my end and report back.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

fletom commented 7 years ago

@ShadowBullet Isn't Nvidia's streaming system by definition GPU encoding? What setting did you change exactly?

ShadowBullet commented 7 years ago

On the client. Not the server. If you go to Chrome flags (client) there should be an option to force GPU rendering. I'm on a Mac so Windows it might be a little bit different. Specifically a normal MacBook so the GPU in there may not be fully supported by chrome as it is merely integrated. Enabling the setting seemed to reduce some lag.

Sent from my iPhone 7 -Max Herman

On Dec 6, 2016, at 9:03 PM, Fletcher Tomalty notifications@github.com wrote:

@ShadowBullet Isn't Nvidia's streaming system by definition GPU encoding? What setting did you change exactly?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

fletom commented 7 years ago

Ah, so you mean decoding then, not encoding. I'm on a MacBook (Air) too.

I checked Chrome's about:flags, and already had "Hardware-accelerated video decode" enabled.

I tried the "Override software rendering list" flag, just in case, but it made no difference.

Thanks for the suggestion, anyways.

ShadowBullet commented 7 years ago

Yeah they're still is noticeable Mouse lag which just needs to be fixed by software. Hopefully within the next few days we can see some of these features and issues to be resolved is there piling up quite quickly. The app has not been updated in over a month. I literally have been waiting for an app like this for such a long time and now that it's here I use it on a daily basis.

Sent from my iPhone 7 -Max Herman

On Dec 6, 2016, at 10:07 PM, Fletcher Tomalty notifications@github.com wrote:

Ah, so you mean decoding then, not encoding. I'm on a MacBook (Air) too.

I checked Chrome's about:flags, and already had "Hardware-accelerated video decode" enabled.

I tried the "Override software rendering list" flag, just in case, but it made no difference.

Thanks for the suggestion, anyways.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

fletom commented 7 years ago

Let's not be presumptuous or demanding about the developers' time considering that it's a free app and they are volunteers who don't owe us anything. I'm sure they're doing as much as they can and we should be grateful that Moonlight exists at all.

Personally, since this mouse lag issue is admittedly pretty bad, I have been using Steam's In-Home Streaming feature temporarily instead. That might work for you too @ShadowBullet.

LeafMountain commented 7 years ago

The problem is still here and makes this software unusable. Just wanted to inform everyone that the problem still exists.

fletom commented 7 years ago

I tested this on latest master. Again everything runs totally smoothly except the mouse is about 500ms behind and often jumpy.

I played with all the settings I could to see if anything might help, and actually discovered something interesting. The resolution setting and the bandwidth setting didn't change anything. But the framerate setting, specifically changing it from 60 fps to 30 fps, mostly eliminated the problem. It's not perfect (since the mouse is still only rendered 30 frames - not enough) but it's way less actual lag.

fletom commented 7 years ago

tested with the newer 0.6.3 release, unfortunately this app remains completely unusable due to this issue

mingchoi commented 7 years ago

Same problem here with 0.6.3 on macbook, trackpad is very good like less than 10ms. But for mouse is terrible with 500ms+.

The-Funk commented 7 years ago

Same issue in 0.7.2, I've found that different mice/clients behave differently. My wireless mouse outperforms my gaming mouse by a mile. However there is still noticable delay depending on the client device. I'd like to note that the video and audio are great, it appears to be just an issue with the mouse.

I can post machine specs if those would be helpful

fletom commented 7 years ago

For anyone still struggling with this, you can also try Parsec, which works excellently on macOS/Windows/Linux and has no mouse lag issues. Highly recommended.

cgutman commented 7 years ago

Please see if this build resolves the mouse lag you're experiencing. https://drive.google.com/open?id=0B_5O1xNt8Q9lSVFXaDBwX3N5Q1E

The-Funk commented 7 years ago

The mouse seems a little smoother but the issue remains. :(

I may try to use the rename hack to disable the dll on the server that handles the mouse and keyboard inputs for now, and then use something like flexihub or virtualhere to pass over my USB devices, but I'm willing to be a test subject at any time if you need.

cgutman commented 7 years ago

@The-Funk interesting, another user reported that this fixed his issue. So you still see a difference between your wireless mouse and gaming mouse with this build? If you sit next to the server PC and watch its screen, can you tell it's definitely lag sending input to the PC and not lag receiving video back?

What OS are you running Moonlight on? What are the specs of your client PC? What resolution and frame rate are you streaming? What version of GeForce Experience is on your server PC?

The-Funk commented 7 years ago

I haven't sat in front of the server but the video is perfectly smooth on the client when I load up Crysis, which leads me to believe it's specifically related to the input.

My server set up is a little weird, but I don't experience the issue at all when I use my old laptop as the client, so my guess is it's the client's fault. The client causing the issues is running Windows 10, has low RAM, and the gpu is Intel hd 400 on a Celeron ha!

Sawyer007 commented 7 years ago

fletom:

Honestly the mouse input delay of parsec is freaking impressive. Its practically not noticable.

I could also play with moonlight just fine today. Well there was a geforce experience update. But dunno. The experience is so random from day to day that I really dont know what to look for when troubleshooting.

The-Funk commented 7 years ago

@cgutman I switched to using an NVIDIA Shield TV and now my mouse is responding perfectly, however I'm using the Moonlight Android app.

I was experiencing some video lag on the old client and didn't even realize it. I have a feeling that the combination of the low RAM and the underpowered HD 400 graphics on the decoding side were contributing to my particular problem.

Next up I'm going to install the developer OS image on the shield and try to script some sort of decently secure "autologin" feature for my Windows VMs. Ideally I want to use the shield with moonlight as a "thin client" for my GPU enabled VMs.

jerom007 commented 6 years ago

I have used advices to set same mouse speed on host and client with no success.

After some weeks, I realized that there was No Mouse Lag when using a laptop with Windows 10, same OS as on host ! (It was Windows 7 before on client...)

So try to use the SAME OS on your client and host machines (be it win7, 8 or 10) !! Best of luck,

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

Heath123 commented 3 years ago

Happens for me using Sunshine on Linux as the host

Heath123 commented 3 years ago

Also with the official Nvidia server on Windows

gdelloiacono commented 3 years ago

Happens for me using Sunshine on Linux as the host

Exactly what happens to me. It's getting me literally stomach sick. Unfortunately it's not a joke. Each time I try to stream my desktop the mouse movements make me almost throw up. Ubuntu 20.04 with Sunshine 0.9.0. Did you solve?

Regards.

Heath123 commented 3 years ago

Happens for me using Sunshine on Linux as the host

Exactly what happens to me. It's getting me literally stomach sick. Unfortunately it's not a joke. Each time I try to stream my desktop the mouse movements make me almost throw up. Ubuntu 20.04 with Sunshine 0.9.0. Did you solve?

Regards.

No, I just use Chrome Remote Desktop if I need to remote into my desktop...

Heath123 commented 3 years ago

I'll try the Android client, the web client and/or the Linux client Edit: Wait, I don't think there is a web client

Heath123 commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

This really should be reopened, it's completely unusable...

Heath123 commented 3 years ago

For anyone still struggling with this, you can also try Parsec, which works excellently on macOS/Windows/Linux and has no mouse lag issues. Highly recommended.

No Linux host support and my Chromebook can't keep up with the decoding...

cgutman commented 3 years ago

There’s not anything we can do. NaCl has been on life support for years. I doubt Google is going to fix any performance problems now.

The other Moonlight clients for Android, iOS, and the native PC client are actively supported and higher performance.

Heath123 commented 3 years ago

There’s not anything we can do. NaCl has been on life support for years. I doubt Google is going to fix any performance problems now.

The other Moonlight clients for Android, iOS, and the native PC client are actively supported and higher performance.

Shouldn’t it be possible fix a simple mouse issue? Or is it more complicated than I think? Android apps run on Chrome OS but it might not be ideal for mouse usage, and Linux programs do too but I’m not sure if video decoding would work (I should try it)

The-Funk commented 3 years ago

Unrelated software developer. I don't work on this project, but I assure you that it is much more difficult than you're thinking. Why can't you switch to one of the modern supported clients?

On Mon, Jul 26, 2021, 7:04 PM circuit10 @.***> wrote:

There’s not anything we can do. NaCl has been on life support for years. I doubt Google is going to fix any performance problems now.

The other Moonlight clients for Android, iOS, and the native PC client are actively supported and higher performance.

Shouldn’t it be possible fix a simple mouse issue? Or is it more complicated than I think? Android apps run on Chrome OS but it might not be ideal for mouse usage, and Linux programs do too but I’m not sure if video decoding would work (I should try it)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/moonlight-stream/moonlight-chrome/issues/132#issuecomment-887084423, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA55UOWEOI7JXRD6UIUJNCLTZXSXVANCNFSM4CUI7NIA .

cgutman commented 3 years ago

Shouldn’t it be possible fix a simple mouse issue? Or is it more complicated than I think?

It's not that simple. NVIDIA GameStream uses server-side cursor rendering which encodes the cursor directly into the video stream. That means the latency on your mouse cursor is exactly the same as the latency of the video stream itself. Other software like Chrome Remote Desktop and Microsoft Remote Desktop use client-side cursor rendering where the cursor is drawn on the client-side. This is a little trick that makes the mouse feel lower latency even though the actual video lags behind the cursor.

Client-side cursor rendering is great for desktop usage because it fools your brain into thinking the stream is lower latency than it really is, but it falls down in gaming applications where the cursor is often drawn by the game engine itself and can't be drawn on the client. Since NVIDIA GameStream is a game streaming optimized protocol, it makes sense that they didn't opt for client-side cursor rendering.

Also remember, Moonlight is just one side of a 2 way communication. If GeForce Experience can't do it, Moonlight can't either.

Heath123 commented 3 years ago

Huh, I thought Moonlight could render the cursor on the client. It seems better on other platforms, is that just a general performance thing?

Heath123 commented 3 years ago

Unrelated software developer. I don't work on this project, but I assure you that it is much more difficult than you're thinking. Why can't you switch to one of the modern supported clients? On Mon, Jul 26, 2021, 7:04 PM circuit10 @.***> wrote: There’s not anything we can do. NaCl has been on life support for years. I doubt Google is going to fix any performance problems now. The other Moonlight clients for Android, iOS, and the native PC client are actively supported and higher performance. Shouldn’t it be possible fix a simple mouse issue? Or is it more complicated than I think? Android apps run on Chrome OS but it might not be ideal for mouse usage, and Linux programs do too but I’m not sure if video decoding would work (I should try it) — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#132 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA55UOWEOI7JXRD6UIUJNCLTZXSXVANCNFSM4CUI7NIA .

I explained above:

Android apps run on Chrome OS but it might not be ideal for mouse usage, and Linux programs do too but I’m not sure if video decoding would work (I should try it)

Heath123 commented 3 years ago

Shouldn’t it be possible fix a simple mouse issue? Or is it more complicated than I think?

It's not that simple. NVIDIA GameStream uses server-side cursor rendering which encodes the cursor directly into the video stream. That means the latency on your mouse cursor is exactly the same as the latency of the video stream itself. Other software like Chrome Remote Desktop and Microsoft Remote Desktop use client-side cursor rendering where the cursor is drawn on the client-side. This is a little trick that makes the mouse feel lower latency even though the actual video lags behind the cursor.

Client-side cursor rendering is great for desktop usage because it fools your brain into thinking the stream is lower latency than it really is, but it falls down in gaming applications where the cursor is often drawn by the game engine itself and can't be drawn on the client. Since NVIDIA GameStream is a game streaming optimized protocol, it makes sense that they didn't opt for client-side cursor rendering.

Also remember, Moonlight is just one side of a 2 way communication. If GeForce Experience can't do it, Moonlight can't either.

https://github.com/loki-47-6F-64/sunshine/issues/145#issuecomment-887646096

pranil60 commented 4 months ago

This problem has been haunting me since very long time. What exact problem for me is changing the mouse. Recent workable mice were zebronics and unlike what people says here, they were inbuild DPI but had limit upto 1600. And what we call the problem, 'stutter giving mice' were upto 2400 dpi.. Also changing dpi using button doesn't has to do anything with this. If anyone knows solution to this specific case please help.