Bug 2166 - (int-89855) Bluetooth keyboard repeat rate control set too fast (duplicating letters)
(int-89855)
: Bluetooth keyboard repeat rate control set too fast (duplicating letters)
Status: RESOLVED WONTFIX
Product: Connectivity
Bluetooth
: 4.1.3 (5.2008.43-7)
: All Maemo
: Low major with 4 votes (vote)
: 5.0 (1.2009.41-10)
Assigned To: Tomas Junnonen
: bluetooth-bugs
:
:
:
:
  Show dependency tree
 
Reported: 2007-10-25 15:32 UTC by Guillermo Narváez
Modified: 2009-09-28 16:40 UTC (History)
10 users (show)

See Also:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description Guillermo Narváez (reporter) 2007-10-25 15:32:25 UTC
EXPECTED OUTCOME: When a given key is held down on the bluetooth keyboard, the
letter or action related to that key should occur once within a normal period,
then start repeating after a certain amount of time (say something like repeat
rate of .3 sec after .5 sec delay, but this should be adjustable!!)

ACTUAL OUTCOME: Repeat rate is set quite fast (not sure, but something like .1
sec) and the delay prior to repeat is quite short and uneven (less than .3
sec). This makes the bluetooth keyboard difficult, if not impossible, to use
(I've tried a number of HID bluetooth keyboards, even the Nokia SU-8W, and all
behave more or less the same--the problem does not seem to be in the input
device).

STEPS TO REPRODUCE THE PROBLEM: 1) pair an HID bluetooth keyboard, 2) start
typing... try something like Notes... yyyyyyoooooouuuu    wwwwilll sssssseeeeee
   wwwwhhhhaatttt          ttttthhhhhheeeee
pppprrrrroooooobbbbbblllllleeeeemmmmm iiiiisssss --- problem is constant and
100% reproducible on my n800 (4.2007.38-2, hardware build 1301)

OTHER COMMENTS: tried xset770, but to no avail. Besides, it is good practice to
use a command line app to control a feature like this?
Comment 1 Guillermo Narváez (reporter) 2007-11-01 09:36:55 UTC
31 Oct. Found that bluetooth keyboards become even more prone to repeats when
using a Nokia LD-1W GPS receiver. The GPS works fine with Maemo Mapper, but the
keyboards (Apple Wireless, Stowaway and Nokia SU-8) become even more difficult
to use.

Why is there such an interaction? How can it be remedied in the current OS?
Comment 2 Guillermo Narváez (reporter) 2007-11-03 00:44:28 UTC
*** This bug has been confirmed by popular vote. ***
Comment 3 Stefano Z. 2007-11-05 00:00:31 UTC
confirmed also using stowaway bt keyb. while connected with a bt phone...
FIX this thanks !
Comment 4 Roope Rainisto nokia 2007-11-05 10:00:42 UTC
Adding CC.
Comment 5 Guillermo Narváez (reporter) 2007-11-15 21:14:37 UTC
from what I have seen in 2008 so far, this still seems like a problem. Any
hints as to where one should look to try to fix this?
Comment 6 Tomas Junnonen nokia 2007-11-16 13:12:34 UTC
In IT2008 you can modify the repeat rate for the BT keyboard through gconf:

"gconftool-2 -s /apps/osso/inputmethod/ext_kb_repeat_delay -t int 800"
This sets the delay (in msec) before key repeat starts

"gconftool-2 -s /apps/osso/inputmethod/ext_kb_repeat_interval -t int 100"
This sets the time interval (in msec) between keys when repeating

However, I'm not so sure this problem is related to the repeat rate itself,
although you can check if bumping the values (for example to 1000/150, or even
much more) helps. Probably the presence of other BT devices is the triggering
factor.
Comment 7 timeless 2007-11-16 13:50:23 UTC
sorry, the Connection status bar applet is for DUN, not generic Bluetooth.
Comment 8 Austin Che 2007-12-03 21:35:02 UTC
Neither setting the gconf value nor disabling X's autorepeat (i.e.
XAutoRepeatOff()) solves this problem. But setting the repeat rate directly on
the event input device does work. evrepeat in initfs appears to work. Running
"chroot /mnt/initfs evrepeat /dev/input/eventN 5000 100" sets the delay to 5s
and eliminates problems with flaky bluetooth connections leading to unwanted
repeats. I made this permanent by adding to /etc/udev/rules.d the file
010_keyboard-repeat.rules with content:
KERNEL=="event[0-9]*", SUBSYSTEMS=="bluetooth", RUN+="/usr/sbin/chroot
/mnt/initfs evrepeat /dev/input/%k 5000 100"
Comment 9 Stefano Z. 2007-12-04 08:35:23 UTC
> KERNEL=="event[0-9]*", SUBSYSTEMS=="bluetooth", RUN+="/usr/sbin/chroot
> /mnt/initfs evrepeat /dev/input/%k 5000 100"

mmm no, it isn't solved , at least on my n800....
still random repeats occurs even if lower than before....
Comment 10 Guillermo Narváez (reporter) 2007-12-04 08:56:13 UTC
Austin, thanks! Works well for me (tested on a N800 running 4.2007.38-2)
Comment 11 Stefano Z. 2007-12-04 11:51:47 UTC
aaargh :)
i've just realized that i've missed the final '"' :)
I'm testing but seems to work well for now :)
Thanks for the great solution !!
Comment 12 James Taji 2007-12-14 22:33:22 UTC
Shouldn't this remain open until it is actually fixed? Seems like evrepeat
should be fixed to a more appropriate value, or there should be a way for a
normal user to adjust it.
Comment 13 Austin Che 2007-12-29 20:38:18 UTC
Thanks to Bob for discovering that the previous method doesn't continually work
due to the lack of dev files under /mnt/initfs. Once a keyboard has been cycled
a few times, there won't be a correct dev file at /mnt/initfs/dev/input/eventN.
There are several solutions to this. One: compile evrepeat or something similar
outside of initfs (would require the source or some hacking). Two: add "mount
--bind /dev /mnt/initfs/dev" somewhere to your startup scripts. Three: modify
the udev run command to copy over the dev file before doing the chroot, e.g. cp
/dev/input/%k /mnt/initfs/dev/input. I've only tested #2.

Also see enhancement request at bug 2670
https://bugs.maemo.org/show_bug.cgi?id=2670
Comment 14 Valtteri Vuorikoski 2008-02-24 13:23:26 UTC
I was attempting to use a Stowaway BT keyboard on a crowded train this weekend
(N800, OS2008 2.2007.50-2), and this bug was neither resolved nor "works for
me". Increasing the repeat rate works around the problem.

I threw together a package to install a workaround automagically (provides an
evrepeat replacement), get it at http://apt.notcom.org/install/btrepeat.install
or http://apt.notcom.org/pool/user/b/btrepeat/ for deb/source. Please test and
report if it works/doesn't work for you.
Comment 15 bobvlm 2008-02-28 15:35:19 UTC
(In reply to comment #14)
> Please test and report if it works/doesn't work for you.

It works for me (latest 51_3 build of os2008 on n800).
Any chance you could add the second parameter, for repeat rate?  ^^
Comment 16 Valtteri Vuorikoski 2008-02-28 19:27:07 UTC
Nice to hear. Unfortunately, trying to change the repeat rate setting appears
to have no effect, so it's not included in the utility.
Comment 17 Frantisek Dufka maemo.org 2008-07-28 10:36:13 UTC
(In reply to comment #13)
> . Three: modify
> the udev run command to copy over the dev file before doing the chroot, e.g. cp
> /dev/input/%k /mnt/initfs/dev/input.

Until Diablo, initfs was not writable, but one can use /tmp which is shared
between rootfs and initfs.

BTW, here is code snippet from http://fanoush.wz.cz/maemo/#kbdd that changes
repeat rate for keyboard named "SerKBD":

#change key repeat rate
cd /sys/class/input
for dev in input* ; do
        if [ "$(cat $dev/name)" = "SerKBD" ] ; then
                cd $dev
                for ev in event* ; do
                        cp -a /dev/input/$ev /tmp/$$-$ev
                        #this works because /tmp is shared with initfs
                        chroot /mnt/initfs evrepeat /tmp/$$-$ev
$KEYREPEAT_DELAY $KEYREPEAT_PERIOD
                        rm /tmp/$$-$ev
                done
        fi
done
Comment 18 Guillermo Narváez (reporter) 2008-10-07 18:48:13 UTC
How long has this issue been open? Previous solutions don't seem to work and if
it wasn't that I've come to rely on the gps for work I do, I would have dumped
this by now as it is next to useless for extended typing unless the repeat rate
is reduced. 

I am using N810 with Diablo 4.2008.36-5. Apple BT keyboard (and have also tried
it with a Stowaway).


Wwwwwwe need a definite solution from Nokia on this. AAll too long they have
been avoiding addressing this.
Comment 19 Andre Klapper maemo.org 2008-10-13 12:47:21 UTC
At least with the Outside/iGo (Stowaway Ultra-Slim) BT keyboard there's a lot
of issues out there, see e.g. bug 3532.
Comment 20 George Fragos 2009-02-03 01:11:34 UTC
N810 with 5.2008.43-7 and SU-8W the instant key repeat problem is still there.
Ubuntu 8.10 has a similar problem with it's USB keyboard that the set kbdrate
is changed during the boot process even when specificaly set by kbdrate. Once X
is started I have to run kbdrate again. I don't know if this is only a
coincidence.
Comment 21 Andre Klapper maemo.org 2009-02-03 01:30:40 UTC
Updating version info; Setting priority to low (sorry, looks like the
developers currently have other priorities)
Comment 22 timeless 2009-06-03 09:28:00 UTC
eero: could you possibly test this w/ a fremantle stack? the internal bug is
currently marked against diablo....
Comment 23 Eero Tamminen nokia 2009-06-03 10:14:43 UTC
(In reply to comment #22)
> eero: could you possibly test this w/ a fremantle stack? the internal bug is
> currently marked against diablo....

Don't have a BT keyboard & not area & no time.
Comment 24 bugzilla 2009-09-08 22:42:32 UTC
(In reply to comment #14)
> I was attempting to use a Stowaway BT keyboard on a crowded train this weekend
> (N800, OS2008 2.2007.50-2), and this bug was neither resolved nor "works for
> me". Increasing the repeat rate works around the problem.
> 
> I threw together a package to install a workaround automagically (provides an
> evrepeat replacement), get it at http://apt.notcom.org/install/btrepeat.install
> or http://apt.notcom.org/pool/user/b/btrepeat/ for deb/source. Please test and
> report if it works/doesn't work for you.
> 

Thank you very much- I installed the deb-Package an it works on my n810 with
OS2008 and a hp-foldable-bt-keyboard. You solved a problem that was driving me
crazy for months now!
Comment 25 Andre Klapper maemo.org 2009-09-28 16:40:29 UTC
This is a WONTFIX for both Maemo5 and Maemo4 as using a Bluetooth keyboard is
not officially supported in Maemo 5 (of course improvements can always be made
by community or third party enhancements).

Please note though that according to
http://wiki.maemo.org/Fremantle_Unsupported_Bluetooth_profiles Maemo5 comes
with the bluetoothd input plugin installed but disabled through
/etc/bluetooth/main.conf.