moonlight-stream / moonlight-chrome

GameStream client for ChromeOS
GNU General Public License v3.0
733 stars 162 forks source link

Input lag #68

Closed fisher51 closed 6 years ago

fisher51 commented 8 years ago

Hi,

There are lag when i move mouse. It was on Java version as well, but now it make keyboard+mouse really unplayable. I'm playing via internet, but latency less than 10ms, but it seemed like more than 0.6s for input.

raidancampbell commented 8 years ago

I've had bad input lag, and just assumed fast-paced games like RPGs and FPSs were not good for remote streaming.

@cgutman anything come to mind?

fisher51 commented 8 years ago

Yeah, but it seems good on android, not bad on java(not openGL version) and with chrome it's really awful

ShadowBullet commented 8 years ago

I can confirm this as well, I thought it was just the way it was but I tested it on my local network and experienced this lag here as well.

On Jun 28, 2016, at 8:33 AM, R. Aidan Campbell notifications@github.com wrote:

I've had bad input lag, and just assumed fast-paced games like RPGs and FPSs were not good for remote streaming.

@cgutman anything come to mind?

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

kitchentiger commented 8 years ago

When I first load everything up, Input lag isn't an issue. In fact, it is impressively responsive. If I need to alt tab out a few times, then things sometimes get dicey. For example, if I alt tab out of Moonlight Chrome for a few minutes and then alt tab back in, there will be a 250ms+ input delay. Sometimes alt tabbing out and back in immediately after that will resolve the issue. Sometimes it will self correct over time. Sometimes I need to close the client and resume the game to resolve it.

This is very vague and must be a pain to troubleshoot. I'll be happy to help provide any further information I can.

raidancampbell commented 8 years ago

@bmaciag can you confirm whether you see this from regular usage, without alt-tabbing? i.e. if you keep a connection open for a few minutes do you eventually see input delay worsen?

kitchentiger commented 8 years ago

@raidancampbell Input delay has never been an issue for me unless I alt tab out. I'm playing WoW from work, streaming from my home PC. When I move the mouse cursor around the screen, it is incredibly responsive under normal conditions. Obviously WoW is far less input sensitive than an FPS. Playing at 1080p/60fps 10mbps.

Connection at home is 100mbps down, 50mbps up. Connection at work is 100mbps down, 100mbps up.

fisher51 commented 8 years ago

@bmm85 I can confirm that without alt-tab input lag not so horrible.

cgutman commented 8 years ago

Partially fixed by 12e34a9f4e7b8211dc4e9cabb061c370dd2bb7f4. The remainder of the fix will be adding an option to force software decoding on hardware with too high decoder latency.

ShadowBullet commented 8 years ago

In the current build, it is much much better than previous builds. I would say it's almost local. @raidancampbell may want to close this.

kitchentiger commented 8 years ago

The current public release? I still have the issue under 0.4. Is anyone hosting a compiled version of the latest commits that I can test?

raidancampbell commented 8 years ago

@ShadowBullet built his own copy of master, There has not been a new github release, and I have not put up a dropbox release.

ShadowBullet commented 8 years ago

I'll host a Dropbox build for as soon as I get the chance

On Sep 1, 2016, at 8:09 AM, Brandon notifications@github.com wrote:

The current public release? I still have the issue under 0.4. Is anyone hosting a compiled version of the latest commits that I can test?

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

raidancampbell commented 8 years ago

Please don't, I'd like to keep the releases as simple as possible and in one place. I'll work on a github release later today

ShadowBullet commented 8 years ago

@raidancampbell Alright I won't host one, totally understandable to keep everything aligned.

kitchentiger commented 8 years ago

So I'm still having the issue I reported in this issue thread, though it is hard to tell if it is exactly the same as the original. Essentially, input lag is completely fine for the most part, but often times if I alt tab and come back after a few minutes, input is delayed by at least 500ms+. I have to close Moonlight and reconnect.

raidancampbell commented 8 years ago

I'm not hopeful that anything can be done about this: it's not uncommon for video decoders to optimize throughput over latency. I'll keep the issue open for the time being in case we stumble across something.

gte692n commented 8 years ago

I'm running into some small cursor lags with the Chrome app as well over my home network. Oddly enough, when using the java version I don't have this problem and can stream 1080p 60fps with no input lag at all. Thoughts or suggestions?

ghost commented 7 years ago

i also have input lag problem no matter which quality i select. 720p 30fps,1080p 30fps, 10 Mbps and 8 Mbps. input lag still happen

Icarus0xff commented 7 years ago

I met this issue too, moonlight-chrome works well over home ac Wifi if I use a xbox 360 controller, but after I switched to mouse it has input lag(I think this lag is very slight, but it greatly affected my experience. I suppose the controller also has lag but it's hard to be felt). My ping from client to game experience host is 1ms in average.

Sawyer007 commented 7 years ago

I'm having the same problem here with the chrome app. My hardware is i7 6700k, 1080GTX. 32GB memory,Win10. Latest official drivers as of today.

When I first login I feel absolute no input mouse lag at all. It is so responsive that you can not tell its streaming at all. After some time the mouse lag starts to appear and it can get as bad as in really bad.

It happens when using it normally. Dont even need to alt tab out. In games like XCom, Mad Max. The screen flashes abit on the edges and the mouse lag kicks in. If it flashes again even more mouse lag. It can happen as much as 5-7 times then its really bad. I can close the game down and the mosue lag will still be on the streamed desktop itself. But it will fully be gone and not come back if I start and play Tomb Raider for example. Well Until I try Xcom and max mad again.

Like if it would resets itself. It can also reset itself after some time during gameplay. Even during Xcom.

If there is anything I can do to help you iron out this problem. Please let me know because gamestreaming is the only way I play games nowdays. Steam inhome streaming also has no mouse lag problems in any game as far as I can tell.

Cant tell you how it was before because I just got the 1080gtx in 3rd of December so if there is any other combination of drivers, geforce exp and chromeapp you want me to try.

ghost commented 7 years ago

@Sawyer007 i'm getting the same issue just now on both my old and new laptop. It's not gaming computer issue.

Sawyer007 commented 7 years ago

What you mean just now? Since yesterday? I would use Steam inhome streaming but the thing keeps minimizing randomly for what ever reason.

ghost commented 7 years ago

Why would you ask. I have the same excat problem today and before and i know the issue is from Moonlight Chrome version.

Sawyer007 commented 7 years ago

sounds just like this. https://github.com/moonlight-stream/moonlight-chrome/issues/116

So I could try his tweak, if it wont work. I shall try the java client and after this the 0.6.1 chrome app. But can not try before Thursday.

ghost commented 7 years ago

This issue happen when i play the game for too long time. Quit the game from Moonlight and relaunch does not fix the issue. Moonlight randomly popout my cursor with some lags during gameplay is super annyoing.

Sawyer007 commented 7 years ago

Today I had no issues with mouse lag on Xcom 1. No screen flashes or anything yet. Which is damn confusing. The only difference from last time is. I do not have my Logitech web cam enabled and before I left home I made sure that dual monitor is turned off in Windows 10 with windows+P key combination. But dual monitor shouldnt really matter as first I have it plugged into the igpu+1080gtx. Secondly its both on HDMI which theoretically means that when the monitor is off , the dual monitor feature turns off by itself.

The mouse lag can still happen if I remove the mouse focus with ctr+alt+shift and refocus. But it hasnt happened just yet during Xcom gameplay by itself.

I believe that the web cam could possible cause some interference because I could not turn it on last time when I was using Gamestream desktop. Had to go into teamviwer to enable it. But can not confirm it now because I physically removed it yesterday. Will test again on Saturday.

Other then that. When the chrome app works as intended. Its the better app. I can feel the difference with input delay between it and the java app. The chrome app has a lesser one. Almost not noticeable when it works ok.

I'm also testing my stuff and playing games over an optical fiber connection with 4ms ping time and 40Mbit upload speed. Using 30Mbit on the chrome app itself.

Sawyer007 commented 7 years ago

Did alot of testing tonight and finally found out why it flashes in xcom and lags the mouse. Has nothing to do with flash player or webcam software as I assumed first. If I start the stream like I usually do with desktop MSTSC.EXE and lunch the games from there most do work normal. Some dont work very well like Xcom. But If i start the game through steam big picture or directly with the Xcom incon in the chrome app it will work just fine with no mouse lag.

So does it maybe use another encoding method this way?

kilka commented 7 years ago

I think I've narrowed down this issue.

In Windows 10 if you go to Mouse and Touchpad settings -> Additonal Mouse Options -> Pointer Options -> Uncheck "Enhance pointer precision".

This completely resolves the input lag issues for me. I have noticed however that every time I launch MSTSC.EXE the "Enhance pointer precision" option gets set back to on.

Upon further testing it seems that if you have a game set to "Exclusive fullscreen" then the mouse options don't get reset and you won't notice any input lag. If you have a game set to "Borderless window" or "windowed" then the option seems to check again and you will have input lag until you correct it.

Either way, does not seem to be an issue with Moonlight but with RDP/ MSTSC.EXE. If anyone knows a way to keep MSTSC.EXE from turning Enhance pointer precision on every connection then please let us know.

Sawyer007 commented 7 years ago

I just have a mouse setting shortcut on my desktop but you could try this. http://jan-glx.github.io/accelSwitch/

I also dont know for sure if it helps. Since a week I use nagle algorithm turned off on my client windows 10 PC. This is a TCP/IP tweak for enhancing faster packet transmission between 2 PCs so client doesnt wait for a full block before it requests another packet. In some games it helps to reduce the lateny. It is also a recommendet tweak for a cloud gaming computer like LiquidSky, Azure or Amazon EC2. Impossible to measure in moonlight but iz kind of feels.

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.