• For issues you find with the Switch and Console releases, please follow this link and give as much detail as possible. This is the speediest way to get info to Pipeworks and get a hotfix in the works.
  • For issues you find with the Mobile 1.3 update, please follow this link and give as much detail as possible. This is the speediest way to get info to DR Studios to look at your issue. Also, some troubleshooting hints here.

Linux keyboard input bug involving Linux

alessio_110

Terrarian
I am highly proficient using Linux (it's my day job). Anything I can do to help let me know. I will continue to investigate.

Update: found a temporary fix.

  1. From the terminal I can disable key repeat via "xset r off".
  2. Opened Terraria but I still saw the issue. I alt-tabbed away from Terraria and noticed my keyboard repeat was reactivated.
  3. While Terraria is open I alt-tabbed to a terminal and ran "xset r off" again. When I go back to Terraria the issue was resolved.
Hi all,

I can confirm that I also experienced such problem on my Laptop (Linux OS). Apparently I have fixed it using @samrocketman suggestion, only step 1. I have opened Terraria through steam twice and both times I needed to input such code on the terminal and the issue went away. Hope this helps.

Cheers,
Ale
 

Mental Mouse

Terrarian
I am/was getting much the same thing (Ubuntu on a PC, 1.3.5.3 downloaded early this month), but it's fairly clear that there's some kind of queue overflow for keyboard input (but only for movement and jumping); when the avatar stops jittering around, it's liable to finish up with the same movements and jumps that I was trying to do while it was spasming. Weirdly, combat attacks are completely unaffected, and I can attack even while the avatar is stuck jerking around or running through the delayed movements.

I tried the "xset r off" command mentioned above, which gave strictly temporary relief -- I think that's a global X setting which gets overwritten when a new program launches.

What worked for me was to go to the (Gnome) control panel and turn off keyboard repeating altogether. When I do that, the bug goes away and stays away. Obviously, that has some issues for other programs....

ETA: I do have the Marathon Medalist achievement, and have seen the bug since I got it.
 
Last edited:

mbfrog

Terrarian
This issue started for me with 1.3.5. Has input handling changed in that version by any chance? (TL;DR: that's very likely the root cause of the problem)

Fiddling with frame-skip doesn't do anything (steady 60fps, and freaking zombies don't lag!). This is indeed the same issue as https://forums.terraria.org/index.php?threads/1-3-5-holding-spacebar-issue.56772/. @samrocketman 's fix only alleviates the issue: as soon as I disable keyboard repeat, jumps behave properly but left-right character motion is still kinda sluggish.

A few details about my config if that helps:

AMD FX 6300, Nvidia GeForce GTX 1050ti, 8GB RAM.
Ubuntu 16.04 / Unity desktop: Terraria 1.3.4 was working just fine, while Terraria 1.3.5 exhibited the input issues.
Ubuntu 17.04 / Unity desktop: Only tested Terraria 1.3.5, input broken as well.

I also tested Terraria 1.3.4 and 1.3.5 on a laptop (i5/GTX 940m) with Ubuntu 17.04: 1.3.4 ran just fine, as for 1.3.5 mouse input was not working at all, even in the menus. I had to run my GOG version of Terraria through the steam-runtime launcher (which sets-up an Ubuntu 12.10 environment IIRC) to get it to work at all. But in the end, It exhibits the same issue with keyboard repeat.
 

Leinfors

Quality Assurance
Staff member
Moderator
Re-Logic
I updated the title of this thread because this is very distinctly NOT related to the Marathon Medalist conflict, which shares very distinctive symptoms which are completely unlike the Linux input issues.

Continuing to look into this issue, as its been reported somewhat frequently, and does seem exclusive to Linux.
 

Metruption

Terrarian
I am still experiencing this issue on fedora 26. I have tried all of the fixes related to fame skip and found none of them to work. This issue did not exist before Terraria version 1.3.5.
 

Darth_BOR

Terrarian
Quickly pressing 2 movement keys and the second pressed is getting stuck. Sometimes though stucks wrong direction (eg. pressing left and then up, down key gets stuck instead of up).
xset r off, frameskip on/off/subtle and disabling key repeating in kde control panel does not help.

kubuntu 17.10
 

Metruption

Terrarian
When playing VVVVVV (another game that has this issue) I noticed that I would receive a series of phantom inputs after releasing a key if I hold it for too long. During a little searching I found this github issue that has lots of useful information about what this bug might be originating from.

https://github.com/glfw/glfw/issues/747
 

evg-zhabotinsky

Terrarian
I'm pretty sure this is a bug in libSDL2. I replaced `Terraria/lib64/libSDL2-2.0.so.0` with a fresh build of latest release (https://www.libsdl.org/release/SDL2-2.0.7.tar.gz) and now it works like a charm! (Prebuilt one from Ubuntu Xenial repos didn't work, however. For whatever reason it is missing some functions used by Terraria...)
Disabling keyboard autorepeat instead (i.e. `xset r off`) solves the problem too, so this is the same bug.
Googling "SDL repeat bug" yields results that look relevant.
 

agamer569

Terrarian
I am highly proficient using Linux (it's my day job). Anything I can do to help let me know. I will continue to investigate.

Update: found a temporary fix.

  1. From the terminal I can disable key repeat via "xset r off".
  2. Opened Terraria but I still saw the issue. I alt-tabbed away from Terraria and noticed my keyboard repeat was reactivated.
  3. While Terraria is open I alt-tabbed to a terminal and ran "xset r off" again. When I go back to Terraria the issue was resolved.
But if that prevents you from repeating keys, wouldn't you have to spam to keep walking
 

Mental Mouse

Terrarian
But if that prevents you from repeating keys, wouldn't you have to spam to keep walking
In practice, no you don't. I assume that's about where the game is getting "keypress events", as opposed to testing for "key down" conditions. Combining the two methods of keyboard handling can be pretty tricky, and in this case, the devs seem to have fumbled a bit.
 

Metruption

Terrarian
But if that prevents you from repeating keys, wouldn't you have to spam to keep walking
this worked for me to fix the issue (tested in VVVVVV as of this post) I can hold down directions to move and space to V
[doublepost=1518391037,1518390598][/doublepost]running the command `$ xset r off` fixed this issue
 

RedWizard

Terrarian
I'm pretty sure this is a bug in libSDL2. I replaced `Terraria/lib64/libSDL2-2.0.so.0` with a fresh build of latest release (https://www.libsdl.org/release/SDL2-2.0.7.tar.gz) and now it works like a charm! (Prebuilt one from Ubuntu Xenial repos didn't work, however. For whatever reason it is missing some functions used by Terraria...)
Disabling keyboard autorepeat instead (i.e. `xset r off`) solves the problem too, so this is the same bug.
Googling "SDL repeat bug" yields results that look relevant.

This is the actual fix. It fixed the problem and I dont have to deal with a cumbersome repeating key workaround -- Just link to or replace the library in the game with this library and making sure to launch the 64b version of the game - this needs to be done manually because steam will run the 32b version and your downloaded library will not be used. I have a link in my home directory pointing to the 64b binary, I just run it manually after I launch steam.
 

maccam94

Terrarian
Can confirm that I was hitting this bug on Ubuntu 16.04. I downloaded the source for libsdl 2.0.7, extracted it, installed the libraries and headers it wanted (libudev-dev libsamplerate0-dev fcitx-libs-dev), ran ./configure && make && sudo checkinstall. Then copied /usr/local/lib/libSDL2-2.0.so.0.7.0 over the lib64/libSDL2-2.0.so.0 file inside the Terraria game folder. I also edited the Terraria file (a shell script) to make it autodetect the architecture by default instead of using x86. After that, the bug was fixed.

@devs, please update libSDL2 and fix the script in the next version!
 

Poulet rôti

Terrarian
Hello,
I confirm this bug is still present. Here are some details about my system:
- Ubuntu 18.04.1 LTS
- GNOME Shell 3.28.2
- Terraria BuildID: 1780690
Running `xset r off` after lauching the game fixes it for the current instance though.
 

mbfrog

Terrarian
@Poulet rôti : Ubuntu 18.04 comes with SDL 2.0.8, so all you have to do is to delete libSDL2-2.0.so.0 and libSDL2_image-2.0.so.0 from the game/lib and game/lib64 folders. Then if you're on amd64, the start.sh script launches the 32 bit version, whatever your platform/OS. So you'll have to start the game by running game/Terraria.bin.x86_64 directly instead of start.sh.
 
Last edited:

whocares123

Terrarian
ubuntu 16.04
same issue
the way I was able to fix it is:

$ sudo apt update
$ sudo apt install libsdl2-dev

copy /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.4.0
delete /home/USERNAME/.local/share/Steam/steamapps/common/Terraria/lib/libSDL2-2.0.so.0
and
/home/USERNAME/.local/share/Steam/steamapps/common/Terraria/lib64/libSDL2-2.0.so.0

paste libSDL2-2.0.so.0.4.0 to both directories
now the character is moving fine.

and here is a question:
the SDL thing was reported by evg-zhabotinsky Jan 27, 2018
it is 16.08.2018 and still no patch in 6 months?
 
Top Bottom