yashsingh1/xdaforums huggingface dataset:
[Milestone 2 General] alan101:
Thank you very much !

I have loaded the apk and i think my keypad works better now.
[Milestone 2 General] Element79:
Ok, I've been typing for a few days now and the proplem hasn't re-occurred on my M2, where I used to have multiple typo's on every text msg I'd send.

(However, my spelling competencies are a different story... )
[Milestone 2 General] AragornPE:
I really don't know why but it keeps happening on me, and sometimes the keystrokes aren't even being registered. Maybe I have a defective keyboard after all =/
[Milestone 2 General] scottyn:
its think its a software problem. this happens on the hardware keyboard when the stock mulittouch keyboard is set

when i use a different keyboard downloaded from the marketplace is never does it
[Milestone 2 General] hexagram:
Maybe because you're talking about writing in the web browser and he is talking about sms.

I never encountered any problem with the sms part.
[Milestone 2 General] w0ndersp00n:
I think this is true; i replaced the stock multitouch keyboard with Swype and haven't had this issue since... But It's been for less than a day so who knows what will happen...
[Milestone 2 General] RDUKE7777777:
Using "Better Keyboard 8" and still got the issue.
[Milestone 2 General] Element79:
Strange how different users seem to experience different errors.

In my case using swype or other 3rd party software didn't change the issue. Double-pressing kept occurring, no matter if typing sms, web-browser or text document.

I feel the problem itself is definitely software related, having to do with responsiveness of the system, e.g. using stock motoblur rom as we all know, the sytem lags, therefore can't process the input timely (?).

However, having changed to a speedier rom, the error does not re-occur in my case.
[Milestone 2 General] YeRZhong:
I was annoyed by the question,I estimate is hardware problems:mad:
[Milestone 2 General] agent008my:
its funny you mention some lag on the motoblur UI. i seemed to experience a tiny bit more lag )though not particularly noticeable) using ADW and GO compared to motoblur. hence the reason of me using Regina launcher now.

and its also funny how from what i noticed, its the europe retail ROMs which seem to be affected. anybody having problems keyboard problems using the stock AsiaRetail (exc. China's ME722) ROM? to be frank i have not experienced any double pressing whatsoever.
[Milestone 2 General] or.green:
I have a chinese stock ms2 and am seeing the same lag with the hw keyboard.

It doesn't always happen, which leads me to believe it IS software related, it seems like something is hogging the cpu in the background sometimes...
[Milestone 2 General] agent008my:
as i said, apart from the ME722, those having the A953 running the system version marked AsiaRetail havent really complained much. in fact a few mates of mine using the same AsiaRetail versions havent at all complained of an over responsive or non responsive keyboard. :confused:
[Milestone 2 General] Y_Yan_C:
I experience the same ****ed up issue, also, i think the middle of my spacebar is flattened at the middle
[Milestone 2 General] patton82:
two days ago I flashed the new 2.2.2 sbf uk and wipe cache/data

I still have double letters keyboard issue, so I can say it's a hardware issue :(
[Milestone 2 General] SpaceBeest:
Try using Argen2stone it fixed it for me
[Milestone 2 General] hexagram:
Very strange... the upgrade in french 2.2.2 solved this problem
[Milestone 2 General] JackStoreytime:
The 2.4.2 update made my phone start doing this - really annoying
[Milestone 2 General] agent008my:
did you perform a hard reset after installing the update? one of the members quoted in another thread in this forum that a hard reset immediately after installing the update rid him of most of his previous issues, and gave his phone a significant performance boost :)
[Milestone 2 General] lumiden:
I hace a brand new MM2 and the keyboard is working fine. Any suggestions so it keeps that way?
[Milestone 2 General] agent008my:
this is my second QWERTY phone after my xperia X1. the keyboard will eventually give way especially after heavy texting (usually after 2-3 years). there isnt any special care needed, apart from the obvious. :) just make sure u dont expose your phone to any unwanted moisture, and it should serve you well for many tens of thousands of texts :)
[Milestone 2 General] Element79:
Lol, this must be software related. I was using Argen2stone as reported earlier in this thread w/o errors. I'm now quite happy with the 2.4.24 build flashed on my MS2, but the damn eyboard double-press has returned, with a vengeance.

It seems worse than previous builds, guess this is the trade-off for better performance?
[Milestone 2 General] Liori:
Recently I spotted the same issue happening to my MS2 running A2S 1.8... but only occurs to the letter "o". Sometimes it is not responding, while sometimes it got doubled...
[Milestone 2 General] agent008my:
is it possible that a software glitch or bug would cause different people from experiencing over or less sensitivity with different keys? should everybody be experiencing this issue with the same key if this is truly software related?
[Milestone 2 General] AragornPE:
Since Argen2Stone is based on stock ROM, it's not possible to be sure if it's a soft or hardware problem. I reseted my phone (some problems with the touchscreen, had to send it to warranty) and the problem still exists.
[Milestone 2 General] stargo:
The double-pressing is definitely a software-bug, as motorola forgot to enable the generic android gpio debounce code in their keyboard-driver.

If you look at the kernel from Motorola (opensource.motorola.com/sf/projects/milestone) (Milestone-2 2.2.16), kernel.tar.gz, you will find the following code in arch/arm/mach-omap2/board-sholes-keypad.c:

static struct gpio_event_matrix_info sholes_keypad_matrix_info = {
.info.func = gpio_event_matrix_func,
.keymap = sholes_p3_keymap,
.output_gpios = sholes_col_gpios,
.input_gpios = sholes_row_gpios,
.noutputs = ARRAY_SIZE(sholes_col_gpios),
.ninputs = ARRAY_SIZE(sholes_row_gpios),
.settle_time.tv.nsec = 40 * NSEC_PER_USEC,
.poll_time.tv.nsec = 20 * NSEC_PER_MSEC,
.flags = GPIOKPF_LEVEL_TRIGGERED_IRQ | GPIOKPF_REMOVE_PHANTOM_KEYS |
GPIOKPF_PRINT_UNMAPPED_KEYS /*| GPIOKPF_PRINT_MAPPED_KEYS*/
};

But the header defining this struct (include/linux/gpio_event.h) adds another very interesting member:

struct gpio_event_matrix_info {
...
ktime_t debounce_delay;
...
};

This debounce_delay is 0 as it is never initialized, and so the debouncing code in drivers/input/misc/gpio_matrix.c does nothing. The easy fix for this problem would be to recompile the kernel and set this member to the value used in other android handsets (5ms). But "thanks" to the locked bootloader this is impossible.

So the only solution to this is an ugly hack, which searches for the structure in memory and sets debounce_delay to an useful value. I have written a kernel-module which does just that, you can finde the code at: git.zerfleddert.de/cgi-bin/gitweb.cgi/ms2-fixes

As I assume not everybody wants to go through the pain of setting up a toolchain which can be used to compile modules for the motorola kernel, I have also put up a precompiled version of the module at rmdir.de/~michael/ms2-fixes/debounce.ko

This version should work at least on MS2 2.2.16 and MS2 2.4.24 (which I am using), as I have built it against the 2.2.16 kernel sources (which are the only ones I can find...)

To use this module, you need a rooted phone. Copy the module to /tmp and run "insmod /tmp/debounce.ko".

After that, you should see the following output in "dmesg":

<6>[ 1226.493377] Searching for gpio-event...
<6>[ 1226.493804] Found it!
<6>[ 1226.494079] And there is a sholes-keypad connected...
<6>[ 1226.494842] settle_time: 40000
<6>[ 1226.495117] poll_time: 20000000
<6>[ 1226.495391] debounce_delay: 0
<6>[ 1226.495635] Activating debounce!
<6>[ 1226.496917] debounce_delay: 5000000

Please test this module and see if it fixes your keyboard problems. (I have only slight double presses, which are not really reproducible (but I had none since activating the debouncing)). I would be happy to hear that it works for other people, too.

Thanks Motorola for making our lives so easy with a locked bootloader!

Michael

P.S. sorry for the non-clickable-links, but I am not allowed to post outside links...
[Milestone 2 General] dangpzanco:
Milestone 2 Latam is Version 3.12.0 : here

And your Links:

Precompiled

Project

-----------------------------------------------------------------------------------------------------------------------------------------

By the way, since you seem to have some experience with kernels, do you think it's possible for you to create a kexec module for M2? It is a bypass solution for locked bootloader.
[Milestone 2 General] RDUKE7777777:
I knew it was a debouncing error, but i couldnt imagine Moto would make such a noob mistake...
[Milestone 2 General] AdrienC:
would this work for the Latam? I'm also using a Brazilian Milestone...
[Milestone 2 General] stargo:
Thanks for posting the links :-)

Regarding kexec, I don't think that I have the time to work on it, sorry :-(

I just downloaded the kernel sources dangpzanco linked to and they are (nearly) identical to the 2.2.16 sources I used (only missing changelog and gitignore-files). So the module should work on the LATAM version.

I've also updated the module to make sure the debounce-flag is set, but this should already be done by the motorola code. (Which makes the uninitialized debounce_delay even worse, as it causes an immediate rescan of the keyboard matrix when the keystate changes, which is exactly what leads to bouncing.)

Just as a heads-up: I've got no bounced keys since I loaded the module yesterday :-)
[Milestone 2 General] chris0202:
Thanks first!

however, i can use some tutorial. I have a terminal emulator. but everytime i try to insmod, it turned out to be "access denied". I have rooted my device.

Thanks again.
[Milestone 2 General] dangpzanco:
First execute "su" command to enter root.

Sent from my Milestone 2 XDA App
[Milestone 2 General] stargo:
Another problem could be too restrictive permissions on debounce.ko, like when copied from the sdcard. Just a short walkthrough, assuming you have debounce.ko in the root of your sdcard:

$ su
# cp /sdcard/debounce.ko /tmp/
# chmod 644 /tmp/debounce.ko
# insmod /tmp/debounce.ko

When insmod returns without an error, try:

# dmesg

This should produce info from the debounce-module in the last few lines (starting with Searching for gpio-event)

@dangpzanco: I lied ;-) I just tried to compile kexec_mod, but it seems I have toolchain-problems for this module. I'll try to do it on a native ARM system (beagleboard, so no cross-compilation) on the weekend. (If I find the time...)
[Milestone 2 General] santiemanuel:
Works perfectly in 2.2.2 build 3.23, i copied it to system/lib/modules. Thanks!
[Milestone 2 General] patton82:
Many thanks Stargo, works very well for me ^^
[Milestone 2 General] dangpzanco:
Haha, nice! If you get it done then create a new topic and try to compile a ginger kernel for it from android source. Then comes the difficult part: drivers and more devs to code them...

I'm no coder, so, gonna wait...

Good luck!

Sent from my Milestone 2 XDA App
[Milestone 2 General] chris0202:
To dangpzanco and stargo,

It Works! Thank you very much;)
[Milestone 2 General] dangpzanco:
Hey I did nothing!

Sent from my Milestone 2 XDA App
[Milestone 2 General] or.green:
works great! thank you Stargo!!
[Milestone 2 General] SpaceBeest:
thank you stargo! The argen2stone rom temporarily fixed the problem for me, though since a couple of days I had the double keys again. This fix solved it for me thank you!
[Milestone 2 General] stargo:
I've now written a small app which loads the kernel module (optionally on boot) and has a configurable setting for the debounce_delay. It seems that 5ms is too short for some people, so the default is now 10ms but can be changed in the (minimalistic) UI.

You can find the apk at: rmdir.de/~michael/ms2-fixes/MS2Debounce-debug.apk

The app needs a rooted phone.
[Milestone 2 General] dangpzanco:
Nice! Link for mobile viewers:

MS2Debounce-debug.apk

Got any progress on kexec?
[Milestone 2 General] stargo:
Yes, I have a module that loads. Running kexec and loading a new kernel works probably, but as I'm missing the MS2 initrd I haven't tested it any further. You can find everything here: rmdir.de/~michael/ms2-fixes/kexec/

Someone with a known good kernel and initrd should probably test it.
[Milestone 2 General] dangpzanco:
Hey, create a thread about the kexec! Someone could help then.

You can start it on general if dont have enough posts.
[Milestone 2 General] xantoy:
Hi,

I bought my mm2 1 month ago, and i never had a problem with my keyboard. Then I did the kernel update to 2.4, and the issue occured, a hard reset did not help. Yesterday i rooted my device, and now im using Argen2Stone 1.9, but the probem is still there.
[Milestone 2 General] AragornPE:
Argen2Stone doesn't have the fix, yet. Santi will implement this on A2S 2.0. While that, you can try to apply the fix in this post: http://xdaforums.com/showpost.php?p=14019158&postcount=60
[Milestone 2 General] xantoy:
Thanks!

I loaded the apk and i think my keypad works better now. I don't have the problem that letters are doubled, but still the letters "a" and "w" are not typed everytime i press them.
[Milestone 2 General] stargo:
The application can only (try) to fix the "bouncing" double keys. I think your problem keys might have a bigger (electrical) problem. Probably a very small bit of dust got in between the contact in the key, which would lead to exactly this behavior.
[Milestone 2 General] aithnea:
stargo: THANKYOU :)
[Milestone 2 General] Element79:
I would also like to give a big thank you for this.

This was one of the major annoyances I had with my MS2 but it is much better now! I am growing to love my MS2 more and more... thanks to the people who spend time to work on these issues.

( I am especially impressed with GO Dev's Launcher and other SMS + Contacts apps. The customization options are awesome IMO.)

Grtz.
[Milestone 2 General] hygaasd:
Thank you very much !

I have loaded the apk and i think my keypad works better now.
[Milestone 2 General] lumiden:
Thanks a lot! I have milestone 1 and 2. My Milestone 2 works fine, so I won't apply the fix just yet.

But my Milestone 1 has the problem almost constantly, any chance making the same fix for Milestone 1? Many many people would worship you...
[Milestone 2 General] algarues:
Thanks a lot

It really brings everything back to a completely different level
[Milestone 2 General] AragornPE:
This topic should be pinned, since it presents a problem and its solution.
[Milestone 2 General] agent008my:
I have PM'd the forum Moderator and asked requested for him to make this a sticky. :);):D
[Milestone 2 General] SpaceBeest:
Agree, it helped me a lot and I think it will help many others.
[Milestone 2 General] lumiden:
Agree on pin.

Sorry to insist, but any chance anyone making a similar fix for milestone one? The problem is the same.

Enviado desde mi A953 usando Tapatalk
[Milestone 2 General] stargo:
The fix is the same, too. If you have an environment where you can build kernel-modules for the MS1, just get the source from https://git.zerfleddert.de/cgi-bin/gitweb.cgi/ms2-fixes and recompile the kernel module.

As i have no MS1, I don't want to build a module where I can't be sure that it will work on that phone (because I don't know which exact kernel version is running).

I can try to build a module if you give me the exact link to the kernel running on your MS1 (on opensource.motorola.com).

Btw, I have reported the problem to Motorola but haven't got an answer yet.

Regards,

Michael
[Milestone 2 General] mkmck:
Mine's still not working ideally with this fix. I still have this problem with double letters but it's not happening as often as earlier.
[Milestone 2 General] stargo:
Did you try to increase the delay to 15 or 20ms? This should fix the problem for you. Just change the value in the application and hit reload. Also try other values, you can't break anything.
[Milestone 2 General] mkmck:
Yes, I did. On 15 it's still happening but really rarely. The problem is that on 15ms and above sometimes random keys not typing when pressed :rolleyes: I think this issue is more complicated to fix than we think...
[Milestone 2 General] ritap:
This fix worked for the doubled (tripled, etc) typing issue but i had to uninstall it since it caused a more annoying problem: while typing (expecially inside the web browser), i experienced many random insertions of the "left arrow" key.

I don't know if the above describes well my issue (English is not my mother tongue): i mean that if i type on the physical keyboard the letters "d-e-a-r-<blank>-f-r-i-e-n-d" i may get something like "d-e-a-r-<left arrow>-<blank>-f-r-i-e-n-d", thus obtaining "dea friendr".

This happened about once in fifteen keystrokes, quite often then, and disappeared after uninstalling the fix.

Maybe i may work it out by changing the delay settings but to tell the truth i'm a complete noob and can't even guess whether it should be increased or decreased >_>.
[Milestone 2 General] AragornPE:
Ritap, I had the same problem, and I realized it just happens when I'm using heavy websites or apps. It's system lag.
[Milestone 2 General] ritap:
Hello AragornPE, i've decided to give it one more try so installed it again, set it to load at boot, rebooted and waited to load. I just opened the web browser - 132 free ram left - and came here to report.

This time it seldom doubles some characters (most times the -o and escpecially spacebar, as you may see in this post). Sometimes i see the cursor running suddenly to left and then go to place. It all acts anywway weirdly and it's not better than without it, alas :(.
[Milestone 2 General] lumiden:
Thank you for your answer.

I understand what you are saying, but don't really know how to give you what you need. Any chance you get in contact with Cyanogen or FroyoMod team so you tell them about your fix and they apply it in their custom ROM?

Or if you need to know wich kernel to use, could it be the Cyanogen kernel?
[Milestone 2 General] tim_h:
Hi everybody,

my Milestone 2 worked for a few months, then suddenly started exhibiting the poblem of double key presses.

I installed stargo's app (Thanks a lot!) and the double presses are practically gone with a value of 8 ms. (At 7 ms I still have some.)

However, I have now the problem that every now and then, a key press is not registered at all. This was also described by mkmck, so I am not the only one. (The problem seems to get worse with higher delay values, but for me it already happens at 8 ms every now and then, and as written above I cannot lower the value any more.)

My feeling is that we here have a combination of hardware and software problem. At the beginning, the keyboard hardware works flawlessly. After some time, it degrades and starts the double presses. If Motorola had activated the software debouncing, the problem would not pop up immediately. But my fear is that the hardware will continue to degrade, and at some point even the debouncing will not help any more ... :(

One more thing: A friend of mine has a Motorola Droid 2 (US version of Milestone 2). Any reason not to try stargo's app on that one?
[Milestone 2 General] patton82:
I have the same problem, now I have a combination of double letters and no letters. No letters is even worse than double letters problem, I tried to set debounce value to a range of 1 and 10 with no success, even to unload stargo module...

PS. users from Droid 2 and D2G forums seem to have the same keyboard issues
[Milestone 2 General] w0ndersp00n:
Here I was, thinking I was the only one with this issue. It's indeed really, really annoying! I noticed I'm using the multitouch onscreen keyboard more, but that keyboard lags like hell... So now I'm using the original Gingerbread keyboard which works fine.

Anyhow... I also guess this is my final Moto... I'm getting sick off all these issues...
[Milestone 2 General] mkmck:
Multi-touch keybord lags? I am also using the GB Keyboard because of pl dictionary but I am quite sure, that the orig moto keyboard is realy fast or even faster than the GB keyboard ;) and I love how this KB looks like. Pitty that no KB hasn't even similar theme :P

MotoMilestone 2 & TapTalk
[Milestone 2 General] w0ndersp00n:
Yes, I also like the original keyboard. It's just, when you type really fast it's like the phone freezes for a second. After that the text appears. Then you want to type the next word(s), but again, after pressing the first 2 letters or so the device freezes for a moment. Really annoying. And a factory reset doesn't solve this problem ;-) It actually almost doesn't solve anything at all...
[Milestone 2 General] ritap:
that's good to know - and sad, also. I also have got the same issues and was thinking about a factory reset.
[Milestone 2 General] nanava:
After using the debounce app to my satisfaction for abbout one week did I get problems. I restarted the Phone and the doubling was even worse.

Changing the delay did not help.

Now I have removed the app and the doubling is sometimes there but it is better then with the app.

Annyone with the same problem ?
[Milestone 2 General] patton82:
Let us hear on this thread on motorola forum

https://supportforums.motorola.com/thread/51390?start=0&tstart=0
[Milestone 2 General] massimoruiz:
I've tried to use the keyboard with the SD empty... works better. I think the problem is the memory occupied by the SD. Please can everyone try?
[Milestone 2 General] neogeno:
thanks a million
[Milestone 2 General] neogeno:
THANK YOU SO MUCH! I almost threw my phone in the garbage because this bug rendered the hardware keyboard (main reason for purchase) useless. Now I am happy again thanks to this app.
[Milestone 2 General] wangguan:
It is one of the reasons which I hesitate to buy a milestone 2.
[Milestone 2 General] anothadave:
i dont know if it was a coincedence, but my milestone 2 worked perfectly fine for 4months. then i rooted it and thats when i noticed the "double" pressing (sometimes it was 5 or 6 letters appearing with one quick press lol) i had trouble with my xperia X1 keyboard but this seemed different. the xperia gradually got worse and i could feel the keyboard buttons go dead. whereas the milestone 2 keyboard still feels exactly the same as it always has done and the change happened overnight. which is what made me 99% sure it was a software bug and not a hardware problem. i tried the apk and now it seems considerably better. i noticed the debouncing was set to "-1ms" before i changed it to 5ms.

what i find strange is that it worked fine for 4months. so if it is a bug from motorola not debouncing the keyboard then why did it take so long to manifest itself?? surely it would of been there since day one? im wondering if it could be related to rooting it. also, i froze a lot of bloatware using titanium backup after i rooted it. maybe something i considered unecessary is actually required to keep the keyboard working smoothly.