maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   OS2008 / Maemo 4 / Chinook - Diablo (https://talk.maemo.org/forumdisplay.php?f=29)
-   -   Bluetooth/USB keyboard slowness/lag consensus? (https://talk.maemo.org/showthread.php?t=81323)

earksiinni 2012-01-03 22:15

Bluetooth/USB keyboard slowness/lag consensus?
 
Is there a consensus about the slow/laggy hardware keyboard problem for the N8x0? I've read a lot of posts and the conclusions I've gleaned are the following:

1. Some (most?) people don't notice the lag because they're not touch typists/it doesn't bother them/they don't talk about it
2. The lag affects USB as well as Bluetooth keyboards, suggesting that the problem is not with bluez
3. Lag is definitely alleviated when the CPU is not under stress, especially by turning off word completion/configuring similar settings
4. The lag may be caused by a bad "driver", whatever that means
5. The lag is apparently not so bad on the 770 using the unofficial bluetooth keyboard plugin
6. Nokia marked the relevant bug(s) as WONTFIX long ago

I'd like to know 1) what is causing this lag, 2) if anyone has been able to get rid of it completely, 3) whether people using Fanoush's kbdd have laggy keyboards or not, and 4) if someone can confirm that even USB keyboards are laggy

NOTE: I own a Thinkoutside Stowaway Ultra-Slim Bluetooth keyboard.

earksiinni 2012-01-04 21:10

Re: Bluetooth/USB keyboard slowness/lag consensus?
 
I just bought a USB female-female gender changer to plug my USB keyboard in on one end and a USB to micro USB cable leading to my N800 on the other end. I hooked everything up, typed "echo host > /sys/devices/platform/musb_hdrc/mode" into the N800's terminal, and everything works perfectly! No lag whatsoever, neither with text mode apps nor with Hildon/X apps, and I"m a very fast typist. Didn't even have to use a powered USB hub as some others were claiming.

So, this means that the lag has to do with bluetooth somehow. I tried building a new version of bluez, but that requires a new version of glib. Believe it or not, I'm almost finished porting glib 2.30 to Diablo (yes, including Nokia's Hildon-related changes), but it needs a new version of gettext to build.

EDIT: The USB keyboard also doesn't rrrrrrrrrrrrrrepeat letters the way that Bluetooth does occasionally, but it still has the messed up layout where an apostrophe becomes a grave accent. That still needs to be fixed by xmodmap, etc.

earksiinni 2012-01-05 09:36

Re: Bluetooth/USB keyboard slowness/lag consensus?
 
Another update. I managed to build and install a new version of glib (2.30.2) and bluez-utils (4.74). Bluetooth is still lagging but slightly less than before. However, Diablo uses bluez-utils 3.x, whose configuration is very different from bluez 4.x, so I had to pair my keyboard via command line to get it to work. This is probably bypassing Maemo's Hildon input layer, which might be what accounts for the speedup as opposed to the new Bluetooth stack being more efficient. Then again, it could be completely illusory. But there is definitely still a slight amount of lag, especially when you compare it to USB. When I pair my keyboard with an iPhone, on the other hand, it works flawlessly.

Perhaps this indicates that there's something wrong with the kernel drivers or some configuration setting. bluez's documentation is practically non-existant. I will keep digging at this...next step, enabling HID debugging in the kernel?

For future reference, to connect to your HID Bluetooth keyboard via the command line using bluez 4.x, you need to change the settings in /etc/bluetooth/main.conf according to the patches in the Diablo source package for hcid.conf (especially I think changing the Class line to "Class = 0x000114"), then you turn on bluetooth with "hciconfig hci0 up", and finally you connect with "hidd --search". There may be some steps between, like the last person's response at http://www.linuxquestions.org/questi...iphone-816003/, which I followed...but I'm not sure whether it did anything.

tso 2012-01-05 16:23

Re: Bluetooth/USB keyboard slowness/lag consensus?
 
Hmm, a new glib version. I wonder if the Maemo maintenance project may find that interesting.

earksiinni 2012-01-05 16:38

Re: Bluetooth/USB keyboard slowness/lag consensus?
 
Is there such a thing? I was only aware of Mer/related efforts that seek to replace our glorious Maemo 4.x with something Maemo 5.x-inspired.

The easy part was porting the Maemo-related functions in the source code, the really hard part was getting the thing to build properly using dpkg-buildpackage inside of Scratchbox, which is by the way a completely insane system to work with.

I will post a deb or two once I fix some important bugs. For some reason, GTK+ now refuses to read well-formed gtkrc files, claiming that there's a syntax error. I.e., themes don't work and the tablet's widgets looks like a stock GNOME install =/ I suspect that it has something to do with a mismatch between such a recent version of glib and such an old version of gtk, but porting gtk will take a bit more time due to dependencies.

tso 2012-01-05 20:31

Re: Bluetooth/USB keyboard slowness/lag consensus?
 
http://talk.maemo.org/showthread.php?t=61117


All times are GMT. The time now is 09:31.

vBulletin® Version 3.8.8