[linux] random key events (build 273/274)

LeeuwLeeuw Join Date: 2013-09-06 Member: 187898Members
edited February 2015 in Technical Support
I already reported this at http://forums.unknownworlds.com/discussion/comment/2230903/#Comment_2230903,
but i think a separate topic would be better to keep an eye on it.
Also player AntiMatter001 reports the same problem: http://forums.unknownworlds.com/discussion/comment/2231204#Comment_2231204

OS: Ubuntu 13.10 64bit (and 14.04, see AntiMatter001)
NS2 settings set to the minimum for all (no GPU accel, SSD low, etc..)
No error/crash or log message to denote the source of the problem.

What I experienced so far is:
- random movements: for example it strafes left like "A" is being pressed. Pressing "D" will not
strafe right anymore, just stop the movement (like "A" and "D" are both pressed).
- periodically key events: for example when standing still every few seconds a "forward" movement happens.
Or I had one time that "tab" seems to be pressed every few seconds to display the player overview.
- the shift state might be enabled randomly.. like a george sliding forever and the state can
not be reset by pressing shift again.. it keeps it in that state indefinetly.
- sometimes every key (even the Esc, F1, ~) only performs forward movement.. but only after
holding them for a few seconds. The forward movement also comes with a stutter.
- sometimes the Esc will not let me go back to the main menu.. until I press it many times over and over.

While playing it takes a while before the problems arise.. when the random events start,
they keep on happening until the executable is stopped. Even a disconnect will not stop it.

I can reproduce it faster by running a GPU heavy program in parallel (like: "vblank_mode=0 optirun glxgears").
This will reduce the FPS in NS2 downto about 1.0, causing lots of stutter in graphics ofcourse.
Stopping the other program will let NS2 have a high FPS again (for me 40FPS is about the highest/normal)
and cause the random key events.. so it seems the low FPS influenced the key event update and causes random
key events?.. In a real game however it also happens if the FPS is still high enough (above 10FPS).

I believe the problem must lie in how the keyboard events are handled,
as the problems are not limited to only movement, etc.. but also the player overview (TAB),
the shift state, Esc, F1, ~ etc..
Also the mouse events behave normally.. no problem there.

I even tried disabling the key repeat feature in Ubuntu's system settings, but that does not fix this.

It happens almost every game since patch 274, but was never a problem before 273
(273 has server connect issues, so I could not test it that time).

So could developers check what is changed in the key event handling since 273/274 that might cause this?

Update (see below comment):
Running "im-config -n xim" and restarting X (simply reboot) the xim is selected.
And then the symptoms seems gone.


  • develdevel Join Date: 2014-09-13 Member: 198444Members
    edited February 2015
    Yes, the input system is a bit fuzzy. (but I never had any big problems ingame, just some auto-walking during gme preparation)

    I've once tried spamming the game with events and it was completely locked in walking as a result (although I didn't spam WASD at all). And every key triggered shooting action...

    This can be a way to reproduce the bug.
  • KariKari Finland Join Date: 2015-02-10 Member: 201294Members
    I have triggered this kind of behaviour by using Steam in game overlay with shift+tab. On some occassions keyboard wont work at all, neither in game or overlay and I can only look around with mouse. In that case only way to exit game is killing it from terminal. Not sure, if this random movements issue and total loss of keyboard is related, but they appeared about same time with updates, that Leeuw mentioned.

    When I find that out and have since alt tabbed to desktop for steam chats, I at least dont remember having problems, only inconvenience for jumping to desktop and then back to game.
  • Perman12Perman12 Campuchia Join Date: 2015-01-31 Member: 201130Members
    Turn off any Unikey program you run on desktop >> problem solved
  • LeeuwLeeuw Join Date: 2013-09-06 Member: 187898Members
    Looking at Perman12 comment.. I tried disabling other Desktop programs,
    but it did not help.

    However.. I looked at that Unikey concept and found out that with im-config on Ubuntu
    one can choose amongst ibus or xim. The default is ibus.

    Running "im-config -n xim" and restarting X (simply reboot) the xim is selected.
    And then the symptoms seems gone.

    What I don't understand is why NS2 is affected by this.. is it a bug in ibus or in NS2?
    I don't have any problems in other games.. maybe they don't use the ibus?

    Also is ibus needed for NS2?
    I read it makes it possible to enter key combinations for chinese, japanese, etc..
    But I don't want to use that.. just simple ASCII US English.
    So is NS2 trying to support these foreign languages?

  • Perman12Perman12 Campuchia Join Date: 2015-01-31 Member: 201130Members
    Unikey is a custom fan-made for Windows OS , to let you type from keyboard difference kind of letters

    maybe Ubuntu not need it , but NS2 are support multi-language >> Yes you can try disable fonts programe ( its make you like want to press W to move forward , but you have to press 2 W key ok?)
Sign In or Register to comment.