Search Unity

Gamepads not detected on Linux Mint 20

Discussion in 'Input System' started by oxysofts, Oct 27, 2020.

  1. oxysofts

    oxysofts

    Joined:
    Dec 17, 2015
    Posts:
    124
    I have tried 2 different controllers and both are undetected in Unity with the new Input System version 1.0.0. They do show however with the utility `jstest-sdl`, for example:

    Code (csharp):
    1.  
    2. ➜  jstest-sdl --list
    3. Found 1 joystick(s)
    4.  
    5. Joystick Name:     '8Bitdo NES30 Pro'
    6. Joystick GUID:     05000000c82d00002038000000010000
    7. Joystick Number:    0
    8. Number of Axes:     6
    9. Number of Buttons: 16
    10. Number of Hats:     1
    11. Number of Balls:    0
    12. GameController:
    13.   Name:    '8Bitdo NES30 Pro'
    14.   Mapping: '05000000c82d00002038000000010000,8Bitdo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,'
    15.  
    Tried both in Unity 2020.1.7f1 Unity 2020.2.0b7.
    What could be the reason or some starting points to diagnose this?

    Thanks

    edit: Probably worth mentioning that keyboard inputs are busted as well. The keyboard is detected, but keys return completely wrong keycodes like Q instead of an arrow key.
     
  2. Rene-Damm

    Rene-Damm

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    Joysticks detected by SDL should show up in the system. Where that is not the case, recommend filing a ticket with the Unity bug reporter.

    Does the joystick show up under "Devices >> Unrecognized Devices" in the Input Debugger (Window >> Analysis >> Input Debugger)?
     
  3. oxysofts

    oxysofts

    Joined:
    Dec 17, 2015
    Posts:
    124
    Nope, I don't see "Unrecognized Devices" anywhere in the Input Debugger window. Thanks for the fast reply, I will fill a bug report as soon as possible!
     
  4. oxysofts

    oxysofts

    Joined:
    Dec 17, 2015
    Posts:
    124
    Hi, just wanted to update you here since I can't make any updates to the bug I filed with new information.

    It turns out that inputs are now detecting fine! It seems there is an unrelated bug on Linux (either with Unity Hub or a special case with NVMe SSDs) which causes the editor to launch as root or something like of the sort. Unity process has my user on it when investigating with `ps`, so I'm not 100% sure, but my personal GTK preferences were not used which afaik is a typical symptom with this kind of problem. By running Unity directly with no arguments, my own GTK theme and preferences are used and it seems to fix a whole host of issues, including gamepads not detecting. Not sure exactly what's going on but for now I can get inputs by launching Unity directly!
     
    Last edited: Oct 30, 2020