Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Bug Did 2021.3 LTS break Linux Input?

Discussion in 'Linux' started by zackdpaceomatic, May 6, 2023.

  1. zackdpaceomatic

    zackdpaceomatic

    Joined:
    Apr 4, 2023
    Posts:
    2
    Edit/Update:

    The problem seems to have to do with using X11 on a "windowless" environment.

    That is to say, we launch our game using this line in a shell script:

    /usr/bin/startx /opt/MoveTheCubeGame/MoveTheCube.x86_64 -- vt1 -nolisten tcp &

    ( as opposed to just: ”/opt/MoveTheCubeGame/MoveTheCube.x86_64” )

    and when you reboot the machine, it starts as only a CLI.
    I've also confirmed that this works for both a old Input System and the new Input System Package.

    Original Text:


    We are building a game that runs on Linux, and in order to get a big fix in the engine we upgraded from 2012.3.12 to 2012.3.24.

    However, to my surprise, input broke: no errors, but nothing happens. Things as simple as Input.GetKeyDown(KeyCode.W) broke on Linux builds (only). Btw I've confirmed that this isn't just our game; it reproduces when upgrading extremely simple example projects from .12 to .24. It's broken in .20 too btw, but again not .12.

    We've already tried enabling and disabling Physical Keys.

    I'm surprised that they possibly broke something as important as all input on an entire platform in a LTS version! For multiple versions in a row, too.

    Unless if someone else knows what might need to change in order for this to work again?
     
    Last edited: May 8, 2023
  2. sfjohansson

    sfjohansson

    Joined:
    Mar 12, 2013
    Posts:
    368
    Perhaps it's the active input system setting:

    ProjectSettings->Player->Other Settings->Configuration/Active Input Handling

    Choose option "both" or "InputManager(old)"
     
  3. zackdpaceomatic

    zackdpaceomatic

    Joined:
    Apr 4, 2023
    Posts:
    2
    So that didn't work. However, it would appear that a critical problem is that fact that we are using X11 to launch the game:

    /usr/bin/startx /opt/OurGame/OurGame.x86_64 -- vt1 -nolisten tcp &

    If you don't use this and instead use an standard Ubuntu system, it works fine.

    Also, perhaps the fix that broke us is in 2021.3.15:

    "Linux: Fixed Multi Display mouse/touch input so it now correctly registers on Linux Standalone player. (UUM-1569)"
     
  4. arcade1972

    arcade1972

    Joined:
    May 19, 2023
    Posts:
    2