GithubHelp home page GithubHelp logo

Comments (33)

totaam avatar totaam commented on May 22, 2024

2011-08-18 17:25:50: antoine commented


To those who are experiencing this, can you please post details:

  • svn/version
  • which distro version for both client and server
  • keyboard layout / input method
  • output from setxkbmap -query and setxkbmap -print
  • anything else that might be relevant
    Thanks

from xpra.

totaam avatar totaam commented on May 22, 2024

2011-08-21 17:03:32: lindi commented


  • SVN r135
  • debian squeeze (stable) on amd64
  • finnish keyboard
  • sid setxkbmap -query
rules:      evdev
model:      pc105
layout:     fi,latam
variant:    ,
options:    grp:alts_toggle
  • setxkbmap -print
xkb_keymap {
	xkb_keycodes  { include "evdev+aliases(qwerty)"	};
	xkb_types     { include "complete"	};
	xkb_compat    { include "complete"	};
	xkb_symbols   { include "pc+fi+latam:2+inet(evdev)+level3(ralt_switch_for_alts_toggle):1+level3(ralt_switch_for_alts_toggle):2+group(alts_toggle)"	};
	xkb_geometry  { include "pc(pc105)"	};
};

Steps to reproduce:

  1. xpra start --no-daemon --start-child gnome-terminal --exit-with-children :9 -d all > xpra.server.txt 2>&1
  2. xpra -d all attach :9 > xpra.client.txt 2>&1
  3. wait for gnome-terminal to appear, move mouse over it
  4. type a, b, c, d, e, f
  5. hit alt-tab to switch to some other window
  6. hit alt-tab again to switch back to gnome-terminal
  7. type f

Expected results:
4) & 7) gnome-terminal reads "abcdeff"

Actual results:
4 & 7) gnome-terminal reads "abcdef" and the File menu is open (since alt+F opens it)

More info:

  1. xpra.server.txt and xpra.client.txt are attached.

from xpra.

totaam avatar totaam commented on May 22, 2024

2011-08-21 17:03:50: lindi uploaded file xpra.server.txt.gz (65.4 KiB)

from xpra.

totaam avatar totaam commented on May 22, 2024

2011-08-21 17:03:59: lindi uploaded file xpra.client.txt.gz (36.4 KiB)

from xpra.

totaam avatar totaam commented on May 22, 2024

2011-08-21 17:06:51: lindi commented


Oh and yes, I'm using gnome.

Also, keys getting stuck cause a lot of weird effects. For example starting xpra can take minutes. Apparently this is because of xmodmap:

$ xpra start --no-daemon --use-display :7
found /home/lindi/xpra-install/amd64/v0.0.7.22-60-ga4aabe0/
Xlib:  extension "RANDR" missing on display ":7.0".
Xlib:  extension "RANDR" missing on display ":7.0".
Xlib:  extension "RANDR" missing on display ":7.0".
Missing window or missing property or wrong property type WM_TRANSIENT_FOR (window)
Missing window or missing property or wrong property type _NET_WM_STRUT_PARTIAL (strut-partial)
Missing window or missing property or wrong property type _NET_WM_STRUT (strut)
Missing window or missing property or wrong property type _NET_WM_STRUT_PARTIAL (strut-partial)
Missing window or missing property or wrong property type _NET_WM_STRUT (strut)
xmodmap:  please release the following keys within 2 seconds:
    Control_L (keysym 0xffe3, keycode 37)
    d (keysym 0x64, keycode 40)
    KP_Up (keysym 0xff97, keycode 80)
xmodmap:  please release the following keys within 4 seconds:
    Control_L (keysym 0xffe3, keycode 37)
    d (keysym 0x64, keycode 40)
    KP_Up (keysym 0xff97, keycode 80)
xmodmap:  please release the following keys within 8 seconds:
    Control_L (keysym 0xffe3, keycode 37)
    d (keysym 0x64, keycode 40)
    KP_Up (keysym 0xff97, keycode 80)
xmodmap:  please release the following keys within 16 seconds:
    Control_L (keysym 0xffe3, keycode 37)
    d (keysym 0x64, keycode 40)
    KP_Up (keysym 0xff97, keycode 80)
xmodmap:  please release the following keys within 32 seconds:
    Control_L (keysym 0xffe3, keycode 37)
    d (keysym 0x64, keycode 40)
    KP_Up (keysym 0xff97, keycode 80)
xmodmap:  unable to set modifier mapping, keyboard problem
Randr not supported: X server does not support required extension Randr
randr enabled: False

xpra is ready.

from xpra.

totaam avatar totaam commented on May 22, 2024

2011-08-24 22:11:49: lindi commented


$ grep key-action xpra.client.txt 
writing ['key-action', 1, 'a', True, [], 97, 'a', 38]
writing ['key-action', 1, 'a', False, [], 97, 'a', 38]
writing ['key-action', 1, 'b', True, [], 98, 'b', 56]
writing ['key-action', 1, 'b', False, [], 98, 'b', 56]
writing ['key-action', 1, 'c', True, [], 99, 'c', 54]
writing ['key-action', 1, 'c', False, [], 99, 'c', 54]
writing ['key-action', 1, 'd', True, [], 100, 'd', 40]
writing ['key-action', 1, 'd', False, [], 100, 'd', 40]
writing ['key-action', 1, 'e', True, [], 101, 'e', 26]
writing ['key-action', 1, 'e', False, [], 101, 'e', 26]
writing ['key-action', 1, 'f', True, [], 102, 'f', 41]
writing ['key-action', 1, 'f', False, [], 102, 'f', 41]
writing ['key-action', 1, 'Alt_L', True, [], 65513, '', 64]
writing ['key-action', 1, 'Tab', False, [], 65289, '', 23]
writing ['key-action', 1, 'f', True, [], 102, 'f', 41]
writing ['key-action', 1, 'f', False, [], 102, 'f', 41]

shows pretty clearly that the problem is client-side. Client never tells the server that I have released Alt.

from xpra.

totaam avatar totaam commented on May 22, 2024

2011-08-24 23:31:52: lindi uploaded file release-keys-on-unfocus1.diff (2.1 KiB)

proof-of-concept to fix the bug

from xpra.

totaam avatar totaam commented on May 22, 2024

2011-08-24 23:32:48: lindi commented


Since this bug really interferes with my ability to use the computer here's a proof-of-concept that works for me(tm) but definitely needs futher polishing.

from xpra.

totaam avatar totaam commented on May 22, 2024

2011-08-24 23:56:38: lindi commented


Seems this is still not sufficient. At least quassel opens the menu if I press alt, release alt and then hit f. So, sending release event for alt is not enough.

from xpra.

totaam avatar totaam commented on May 22, 2024

2011-08-25 00:01:13: lindi uploaded file release-keys-on-focus1.diff (2.2 KiB)

another prototype to fix the problem

from xpra.

totaam avatar totaam commented on May 22, 2024

2011-08-25 00:01:43: lindi commented


It seems that if I send the release events when the window receives focus again then applications correctly handle this.

from xpra.

totaam avatar totaam commented on May 22, 2024

2011-08-25 02:42:31: antoine changed status from new to accepted

from xpra.

totaam avatar totaam commented on May 22, 2024

2011-08-25 02:42:31: antoine commented


The problem is not solved client-side at the moment (and I'm not sure it should be either).
The code you are looking for is _make_keymask_match in server.py
It fires whenever we get keypresses and is meant to ensure the modifiers set on the server match the ones set in the client. Not sure why it stopped working since the keymap changes but now that I have your keymap details I should be able to reproduce.

from xpra.

totaam avatar totaam commented on May 22, 2024

2011-08-25 09:07:33: lindi commented


Also non-modifiers get stuck so I don't see how that code would help alone?

from xpra.

totaam avatar totaam commented on May 22, 2024

2011-08-25 15:10:29: antoine commented


In fact, the _make_keymask_match must be server-side, as the client has no way of knowing what state the session is in at the moment, so this is the best place to do it.

Can you give me steps for getting non-modifier keys to get stuck? Do you get that often?

from xpra.

totaam avatar totaam commented on May 22, 2024

2011-08-25 15:36:53: antoine commented


We now apply the full keymap, using 'xmodmap -pke' to grab all the raw keyval mappings from the client (if available) - done in r137

We now also clear all modifiers when a new client attaches to a session (r138), this should fix the xmodmap timeout (which I have not seen myself before).

Now, on to the alt-key gets stuck proper...

from xpra.

totaam avatar totaam commented on May 22, 2024

2011-08-25 15:36:53: antoine

from xpra.

totaam avatar totaam commented on May 22, 2024

2011-08-25 16:02:21: lindi commented


Yes, I often have one of the arrow keys stuck. You can imagine that this leads to rather bad behavior in different applications :-)

from xpra.

totaam avatar totaam commented on May 22, 2024

2011-08-25 16:11:39: antoine commented


r139 batches the keymap updates and ensures we don't get the same xmodmap timeouts when keymap-changed fires: we also send the client's current modifiers and set them.

I just can't get the alt-tab to get stuck, despite setting my keyboard to as per comment:2

from xpra.

totaam avatar totaam commented on May 22, 2024

2011-08-25 16:34:32: lindi commented


Here's how the Up arrow gets stuck with r135:

$ xpra start --no-daemon --start-child gnome-terminal --exit-with-children :9 -d all > xpra.server.txt 2>&1
$ xpra -d all attach :9 > xpra.client.txt 2>&1
# hold the up arrow down
#  notice how the shell is going through all your history entries
# hit alt-tab
# hit alt-tab again
$ grep -E "(key-action|focus)" xpra.client.txt
writing ['focus', 1]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Up', True, [], 65362, '', 111]
writing ['key-action', 1, 'Alt_L', True, [], 65513, '', 64]
writing ['key-action', 1, 'Up', True, ['meta'], 65362, '', 111]
writing ['key-action', 1, 'Up', True, ['meta'], 65362, '', 111]
writing ['focus', 0]
writing ['focus', 1]
writing ['key-action', 1, 'Alt_L', True, [], 65513, '', 64]
writing ['focus', 0]

The client never tells the server that I released the up arrow!

from xpra.

totaam avatar totaam commented on May 22, 2024

2011-08-25 18:38:02: antoine commented


r142 ensures that we clear the keys that are currently pressed when we lose focus, we also send the list of modifiers when we gain focus so we can set them correctly again if any are set.
This should fix the problem with "arrow keys get stuck", but probably not "alt gets stuck"...
Please confirm if this is an improvement for you.

from xpra.

totaam avatar totaam commented on May 22, 2024

2011-08-31 19:15:30: antoine uploaded file squeeze-finnish-keyboard-test.png (67.0 KiB)

testing the alt-tab issue on Debian Squeeze (screenshot)
squeeze-finnish-keyboard-test.png

from xpra.

totaam avatar totaam commented on May 22, 2024

2011-08-31 19:17:18: antoine commented


I've just tested on r142 on a fresh install of Debian Squeeze, as you can see on the screenshot the keyboard is set to finnish. I've tried and tried again to reproduce the bug and I just can't do it! :(

Do I need to launch another VM with Debian Sid on it?

from xpra.

totaam avatar totaam commented on May 22, 2024

2011-09-07 10:33:31: antoine commented


Another commit related to stuck keys: clear keys when client disconnects and ensure we don't re-set them by ignoring any packets arriving in the new "closing" state.

from xpra.

totaam avatar totaam commented on May 22, 2024

2011-09-07 10:53:15: antoine commented


Finally, this is for the very unusual case where the server is control-Ced from within the client (via screen) and we end up with the control key stuck:
r159 always clears the modifiers on startup so users can re-attach to an existing display (with -use-display=) and not have xmodmap timeouts.

from xpra.

totaam avatar totaam commented on May 22, 2024

2011-09-23 15:49:41: antoine changed priority from major to minor

from xpra.

totaam avatar totaam commented on May 22, 2024

2011-09-23 15:49:41: antoine

from xpra.

totaam avatar totaam commented on May 22, 2024

2011-09-23 15:49:41: antoine commented


r187 improves this further
Although I have seen the 'C' key getting stuck when I ^C the server from within xpra via screen, this is a unusual scenario and should no longer cause timeouts when re-starting the server.
Lowering priority, please raise again if any of this is wrong.

from xpra.

totaam avatar totaam commented on May 22, 2024

2011-09-23 15:49:41: totaam

from xpra.

totaam avatar totaam commented on May 22, 2024

2011-12-08 13:44:56: totaam changed status from accepted to closed

from xpra.

totaam avatar totaam commented on May 22, 2024

2011-12-08 13:44:56: totaam changed resolution from ** to fixed

from xpra.

totaam avatar totaam commented on May 22, 2024

2011-12-08 13:44:56: totaam commented


Not heard anything for 3 months, closing.

from xpra.

totaam avatar totaam commented on May 22, 2024

2012-02-20 20:13:14: totaam

from xpra.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.