[Galaxy Note II Android Development] UltimateByte:
Request to fix Input Lag on Note II

​

Hi everyone :D

I just made a video so everyone sees what input lag is, and to have an accurate estimation of how much this is on the Note 2.

http://www.youtube.com/watch?v=_MyfkypkNWk&feature=youtu.be

Update 2013/09/23 : Please also have a look at it (pro measurements of input lag comparing samsung to apple devices) : http://appglimpse.com/blog/touchmarks-i-smart-phone-touch-screen-latencies/

Update 2013/10/08 : A test of 21 smartphones' input lag, very interesting

http://www.digitalversus.com/mobile...st-results-21-smartphones-tablets-n29229.html

HUGE NEWS

This is not input lag, it's mainly display lag ! I'll edit the entire post when i got some time.

How do i know that ?

Because if you activate the touch vibration (for the keyboard) and haptic feedback, you feel like the vibration is in sync with your touches (so less than 50ms for sure, maybe less than 20 or 10ms, i will be able to measure it very precisely with a microphone when i got some time); on the other hand, the display is still 90 to 130ms late... So 2 solutions : laggy video software, or laggy screen/digital analog conversion. Maybe something to do with Pentile ? As SGS 1 and 2 were not Pentile, and way way faster than SGS 2 and 3. I don't know if it's fixable, as android seems to be already unbufferized and as fast as it can. By the way, just spam Samsung about it so they fix it at least for their new phones (unlike SGS4 and Note 3)

Introduction for input lag newbies

If you don't know what display lag is, please read this

http://en.wikipedia.org/wiki/Display_lag

It's about the same as input lag, except it counts your human interface device's response delay

http://en.wikipedia.org/wiki/Input_lag

Just to let you know, Input lag concerns every phone, every input device, because nothing in the electronic world is instantaneous.

.

Some of you may have noticed that all the recent phones released have a non negligeable amount of input lag, even more than the previous generations that were already bad. If you didn't, no problem, you will be able to see it thanks to this topic, and i hope, understand why this is very very important to get rid of the maximum amount of input lag.

The Note 2 and Galaxy S 3 have about 100-170ms input lag wich makes many of you feel the response to your fingers' moves feeling late, slow, smoothed, and unnatural. It's painful to say that, but iphones does better, and for example, when a very good player of Ruzzle i know tried to play on my phone after playing every day on her iphone, that was a huge issue for her, and she decided to stop playing on my phone just because it was too slow for her, she was 2 times faster than the phone's reponsiveness. Yes, when you move fast, 100ms is a lot. Even while typing, unconciously, you're not typing as fast if lettering appears lately, almost if you activated "vibrating on touch" that is late too. I've noticed that i'm a bit faster typing with vibration off because of that.

Just to say it can bother anyone, almost if you have used a more responsive device even once only.

My hope is that we can find a fix to improve responsiveness, in case if it's not only a hardware issue, but also a big part of software. We are pretty sure that the capacitive touchscreen detection (+ refresh rate of the screen which is inevitable) is responsible for at least 80-100ms of this input lag.

The main target of this topic is to call amazing devs here to help trying to make the Note 2 experience even better. All input lag haters here would be really really grateful if anything was done to get rid of at least some of it, and other people would be amazed to see their phones being fast as light.

Never heard about input lag ?​

That's normal, there's a pretty bad communication about it, even if it gets better (see links in beginning of the topic). Gamers are mostly concerned about it with computers, but this is happening on any electronic device.

It's the delay between the input and the output of a device.

It's not about being "laggy" or "choppy", as input lag newbies confuse very often : it's about being late !

It's just a hardware and software treatment, due to several things, as any component introduces input lag (even if it's very small). CPU latency (a few nanoseconds) is negligible. A CPU can't cause latency itself. Refresh rate of the screen (the time to display a new frame), screen input lag (time to analyse images and to send it to the screen) touchscreen analysis (the capacitive detection of your fingers), can result in a delayed experience.The consequence is that when you make a move, the action will follow your move with a little delay. That's what you'll see when looking for it.

But if it's not annoying for everyone, anybody could feel the improvement in responsiveness between a big input lag and a low input lag. It just feels better, even if people can't explain it. It's the same difference for most people between SD and HD, or between a bad MP3 and a good FLAC, or a bad headphone and a good headphone : It's better, but most people doesn't have the ability to explain why.

As electronic and the clocking technique involves input lag, the target is just to make it the lowest possible using good hardware, and avoiding any kind of buffering or averaging that causes delay.

Microsoft made a video about that. They estimate that today, most devices has a around 100ms input lag, and that we would need 1ms input lag to make it feel real, to give you the feeling that you're actualy drawing on your screen, or movig an real object. In practice, as most screens are running at 60fps, 1/60 = 16ms, we could get under 20ms if touchscreen input lag was less than 2ms, with no frame buffering, no averaging on the finger's position while touching the screen, and no screen latency. Of course, it would get to 8ms with 120hz mobile phone screens, but i guess it's a bit too much for now.

Everyone having any doubt about how input lag matters, or wanting to see it in action should watch this video from Microsoft

http://youtu.be/vOvQCPLkPt4 or just simply watch mine (link at the beginning of the topic).

We mostly use to care about input lag :

- On TV or PC Monitors (but it's often heavier on TVs) because of digital/analog conversions, and non real time picture quality improvements. The standard of a TV is between 20 to 300ms (depending on the settings and hardware), some gets lower. Unlike people could think, it doesn't depend of the size of the screen, as electrons are fast enough so you can't notice their latency. The standard of a PC monitor is between 0 to 50ms for the worst ones.

- On keyboard and mices : Most recent mices offers a 1000Hz (1ms) refresh rate, but the normal value is 125Hz (8ms), some keyboards are running at 1000hz too.

- Software delays : Vsync for example, has been created to remove the tearing effect, but it adds delay to sync frames rendering, and screen refresh rate. We can also see "frame buffering" that consist in generating a few frames before displaying it so the overall framerate smoother (less fluctuation), but it adds delay too (we call that input lag too). Frame buffering is usually used to compensate a badly coded game/application.

- For example, in the audio and video recording and broadcasting, converters, buffers, clocks, must be as fast as possible.

The fact is that most people are used to input lag, and think this is the normal response of a device. You just have to watch reviews of recent phones to see that almost nobody talks about it. I'll tell you something : a 1/10s input lag is not a response time you should expect. You should expect a 1/1000s input lag according to Microsoft in the video i just posted, or at least for now, 1/30 to 1/60s. The lower the input lag is, even if you can't quantize it conciously, the most natural it will feel, the most accurate you will be, the fastest you will be, and finally, the more enjoyable will your experience be.

A little comparison, as i'm a sound engineer : As you may know, what you see dominates what you hear. Well, in the music production's world, when you hear the return of your instrument or voice in your headphones while recording it, it HAS to be under a 10ms delay, and you prefer it under 4ms, or if possible, in some systems, you can get it even closer to 0 (about 0,1ms). => The target is always to make it the lowest possible so the feeling or the feedback becomes more natural. So OK, you could record a guitar or drum part while hearing yourself 20ms late, you would just be 20ms less accurate, which is a lot and slightly audible.

The actual input lag on the Note II and SIII​

First of all, how can you see this input lag yourself ?

=> See video in introduction !

You can also

Go to System Settings, Developer Options, and tick "Show touches" (show visual feedback for touches).

=> It will show a dot representing the position of your finger, as the phone senses it.

Now if you make a slow move, the dot will stay under your finger, but if you move faster (for example try to make circles), you will notice that the dot follows actualy follows your finger.

Also see video here http://gigaom.com/2012/01/19/video-android-touch-lag-and-a-possible-solution/

This is what i've tested myself :

- Galaxy S1

- Galaxy S2

- Galaxy S3

- Galaxy Note 2

- Iphone 5

What i can say is the S1 and S2 have about the same input lag, and the S3 and Note 2 have the same at least twice bigger input lag.

Yeah, that's right : the new gen, supposed to be an upgrade, is for sure more powerful, is more expensive but has a lot more input lag. Quite frustrating isn't it ?

In the same time, the iphone 5 is way faster, more like the SGS1 and 2, something around 50ms.

We estimate that the input lag between 100 and 170ms, depending on the situation, and including all sources of input lag (vsync, frames buffering, screen refresh rate, and capacitive detection)

This is 1/10s to 1/6s ! It's just unsuitable for gaming, and comfort.

What To fix & Possible ways to do so

​

Biggest input lag source : The Capacitive Detection

In the Input Lag thread, Chrissssssss made a test : He plugged a mouse to his phone, and made a reaction test. His result was about 80 to 100ms less while using the mouse than while using the touchscreen

=> We can conclude that the capacitive detection of the touchscreen touchscreen takes already at least 80ms.

KurianOfBorg just said :

Maybe a way to tweak ?

We use to see this tweak in ROMs : Disable Scrolling cache. It seems to improve a bit the response time already, but not enough for a real time feeling.

http://xdaforums.com/showthread.php?t=2003062

Here is some work made on the I9003

http://xdaforums.com/showthread.php?t=1587553

About myself / why would you trust me ?​

I'm a drummer, gamer, and sound engineer student. As a gamer, i always tried to have low input lag input and display devices. I got a BenQ XL2420T and Steelseries Sensei Mice : Theorical input lag measured by several tests between 1 to 17ms (excluding refresh rate that is 8ms [MENTION=512813]120[/MENTION]hz and with vsync OFF). So i'm used to input lag close to 0, and i know how a responsive device must feel. I've also measured several input lag delays of screen and mices, so i'm now able to estimate input lag between 1 ans 100ms quite accurately (never had to measure more so it's hard to guess how more it is, you just know if it's over 100ms or not).

As a drummer, and a sound engineer, i'm very sensitive to precision and i can notice any little thing that is not synced.

Finally, I don't know if it's fully fixable, or how much it can be improved, i hope it can get under 50ms by combining display tweak (disable vsync, frame buffering) and input tweak (tweaking the tacile driver so it is direct input, very low buffer, and high refresh rate).

I'll say thank you in advance to anyone trying to improve reponse time.

Please let me know if there's anything to correct in my main post. :)

See also

http://xdaforums.com/showthread.php?t=2120867

http://hardforum.com/showthread.php?t=1730089 (nice example of input lag denial from newbies)