Xpra: Ticket #36: Cursor left and cursor down do not repeat

The cursor left and cursor down keys are not auto repeating for me. All other keys that I have tried (including cursor up and cursor right) do auto repeat.

I have seen this in 0.0.7.28 and 0.0.7.29.

Cursor left and down were repeating in 0.0.7.23.



Fri, 28 Oct 2011 19:17:29 GMT - Timo Juhani Lindfors:

cursor keys autorepeat here with svn 259


Sat, 29 Oct 2011 06:55:30 GMT - Antoine Martin: status changed

That's quite odd, I'm not seeing this here. Are you still using "My client is on Kubuntu 11.04 and my server is on Ubuntu 10.04." as per #35? Can you post the output of (from the client):


Mon, 31 Oct 2011 13:44:22 GMT - Doug Doole: attachment set


Mon, 31 Oct 2011 13:48:04 GMT - Doug Doole:

Sorry, forgot to mention the client/server config. As you suspected, the client is Kubuntu 11.04 and the server is Ubuntu 10.04.

The requested diagnostics are attached as cursor-111031.tar.bz2.

On my system, setxkbmap -query didn't work. It reported that "-query" wasn't recognized.

(On the off chance that it makes any difference, I have not yet applied the changes suggested in #35.)


Fri, 04 Nov 2011 08:41:30 GMT - Antoine Martin:

I've looked at the data and nothing stands out, I will do a real test using virtual machines.


Sun, 27 Nov 2011 13:34:34 GMT - Antoine Martin:

Something is wrong with the keyboard data you posted: I am running 11.04 and I am getting data for setxkbmap -query:

ubuntu@ubuntu-natty32:~/Downloads$ setxkbmap -query
rules:      evdev
model:      pc105
layout:     gb
ubuntu@ubuntu-natty32:~/Downloads$ setxkbmap -print
xkb_keymap {
	xkb_keycodes  { include "evdev+aliases(qwerty)"	};
	xkb_types     { include "complete"	};
	xkb_compat    { include "complete"	};
	xkb_symbols   { include "pc+gb+inet(evdev)"	};
	xkb_geometry  { include "pc(pc105)"	};
};

Note: you need to run this on the client machine! (not on the server via xpra which amounts to running it directly on the server)


Sun, 27 Nov 2011 15:45:42 GMT - Doug Doole:

Ah, I ran all of those commands on the server. Attached new results.


Sun, 27 Nov 2011 15:46:20 GMT - Doug Doole: attachment set


Sun, 27 Nov 2011 15:46:28 GMT - Doug Doole: attachment set


Sun, 27 Nov 2011 15:46:38 GMT - Doug Doole: attachment set


Sun, 27 Nov 2011 22:01:46 GMT - Antoine Martin:

Confirmed with an Ubuntu 11.04 client and Ubuntu 10.04 server, and ONLY with a 10.04 server. The keymaps are not required, but for reference, here is how you apply them to get the exact same mapping on another client:

setxkbmap -rules evdev -layout us -model pc104 -option "" -option compose:menu
cat xmodmap.client | while read line; do  echo $line | xmodmap -; done

Here is where it gets really interesting:

Since having a different keymap (f16 with UK keymap) or not using keycodes (ms-windows and osx) avoids the problem, I think it is likely to be a duplicate keycode. Also, looking at the debug output, the failing clients are sending both "key-repeat" packets and "key-action", the server correctly detects and ignores the second keypress with:

handle keycode 113: key Left was already pressed/released, ignoring

So I guess that the short answer for now is not to use Ubuntu 10.04 as a server... I have wasted so much time on Ubuntu-only bugs recently that I can't promise I will find the energy to spend more time on this issue right away..


Wed, 30 Nov 2011 17:34:12 GMT - Doug Doole:

Unfortunately, I'm not free to move my server off 10.04 because the powers that be dictate the use of LTS releases on those machines.

Cursor down/left properly auto-repeated in the 0.0.7.23 build. (Hopefully that can help you narrow down the troublesome code.)


Wed, 30 Nov 2011 18:31:19 GMT - Antoine Martin:

There were a number of significant improvements to the keyboard mapping code between 0.0.7.23 and 0.0.7.31 so even if I were able to isolate the changeset that caused this particular regression I am afraid that it is very unlikely that I would be able to revert it as it would break the keymapping for those who are not running broken/outdated versions of Ubuntu - which is simply not an option.. But thanks for pointing that out, maybe it will be useful.


Fri, 02 Dec 2011 17:59:25 GMT - Doug Doole:

I had a few minutes to kill so I played around to narrow down when the troublesome change occurred. 0.0.7.23 worked but 0.0.7.24 does not.

If you think it would be useful to know exactly which change caused the problem, I'm happy to run it down for you. (But you'll have to tell me how to map from 0.0.7.# to a specific r###. I haven't figured out where that is information hidden.)


Fri, 02 Dec 2011 18:38:59 GMT - Antoine Martin:

$ grep svn_revision xpra-0.0.7.24/xpra/__init__.py
svn_revision="132"

the svn revision number was not recorded in versions before that one.

The diffstat is pretty clear, the new raw keycode stuff is the only thing that went in that release. And it is certainly not going to be removed as it fixes a number of foreign keyboard layouts.

Turning off raw keycode mode might work for you - but only for standard us-type keyboards (no time to test, sorry):

Index: xpra/xposix/gui.py
===================================================================
--- xpra/xposix/gui.py	(revision 324)
+++ xpra/xposix/gui.py	(working copy)
@@ -266,6 +266,7 @@
         pass
     def get_keymap_spec(self):
+        return  None,None,None
         def get_keyboard_data(command, arg):
             # Find the client's current keymap so we can send it to the server:
             try:

Or you may even have to be more selective about which attribute is None


Fri, 02 Dec 2011 18:51:51 GMT - Doug Doole:

I wasn't suggesting that the change be undone. However knowing which change caused the problem can sometime be helpful in addressing the issue.

The suggested change to gui.py - is that client or server side?


Fri, 02 Dec 2011 19:13:22 GMT - Antoine Martin:

gui.py is used on the client side, this change *should* make the server fallback to a default keymap as used with osx/ms-windows clients (and both worked ok when I tested)


Fri, 02 Dec 2011 19:39:42 GMT - Doug Doole:

That change does allow cursor down and cursor left to auto-repeat. However it also causes a significant reduction in auto-repeat speed. (0.0.7.23 auto-repeated at the faster speed.)

I tried playing with setting individual fields to "None", but the only way to get cursor left/down to work is to set all three to "None".

If there's anything I can do to help debug this, just let me know.


Fri, 06 Jan 2012 21:10:31 GMT - Antoine Martin:

Please try r406, that seems to have cured the problem for me. (but be aware that there may well still be a few issues to iron out before the next release from trunk)


Fri, 06 Jan 2012 21:25:28 GMT - Antoine Martin:

Sorry, only partially fixed as you will need to use "--no-keyboard-sync" switch on the client... And that will work even before r406. FYI: winswitch 0.12.8 has support for this option in the GUI.


Fri, 06 Jan 2012 21:32:37 GMT - Doug Doole:

LOL It's funny how things can happen simultaneously...

As you note was arriving, I was just testing out xpra after convincing the maintainers of my server to upgrade to Ubuntu 11.10. Since I'm off the troublesome version of Ubuntu, I can no longer reproduce the problem.

If there's something I can do to help you with this problem even though I no longer have a 10.10 server, please let me know. If you just want to close off this ticket, that's fine by me too.


Tue, 10 Jan 2012 20:30:00 GMT - Antoine Martin: status changed; resolution set

with r417, it now also works without the --no-keyboard-sync option


Mon, 20 Feb 2012 19:39:27 GMT - Antoine Martin: version, milestone set


Sat, 23 Jan 2021 04:43:49 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/36