ValveSoftware / steam-for-linux

Issue tracking for the Steam for Linux beta client
4.23k stars 174 forks source link

Double controller inputs #8132

Open Sanaki opened 3 years ago

Sanaki commented 3 years ago

Your system information

Please describe your issue in as much detail as possible:

In attempting to help track down a bug in a game, I recently installed the new steam deb over my old version. Prior to this, my installation worked perfectly fine. This update did change directory structure a bit, which required manual intervention in a couple places (such as moving ~/.steam/steam to ~/.local/share/Steam). It also resulted in steam installing the following packages:

libxcb-randr0:i386 (1.13-2~ubuntu18.04)
mesa-vulkan-drivers:amd64 (1:20.0~git200108124800.ad4fb7e~b~padoka0)
mesa-vulkan-drivers:i386 (1:20.0~git200108124800.ad4fb7e~b~padoka0)
steam-libs-i386:i386 (1:1.0.0.71)
libxss1:i386 (1:1.2.2-1)
steam-libs-amd64 (1:1.0.0.71)

Of these, I removed the two mesa vulkan driver packages due to them breaking vulkan when present (even vkcube wouldn't render). I have a prime laptop with an nvidia card (470.74 proprietary) with my integrated card disabled, so this part seemed expected. On attempting to start up Persona 4 Golden I noticed control issues in the menu, and checked the steam controller configuration to see why. Apparently every button on each dinput or xinput controller is being sent twice, but it only appears to affect steam. Attempting to rebind my A button for instance will automatically select and confirm that binding. This occurs over both USB and bluetooth. I can't see any sign of this in other software. While this bears resemblance to #3412, LC_ALL is empty on my system and changing it doesn't have any effect. I've attempted system restarts, removal of (decidedly unrelated but also extraneous) dkms modules, etc. It's possible that I bumped kernel revisions from -86 to -87 when this started, but I can't be certain.

Tested controllers: 8bitdo SN30 Pro+ 8bitdo M30

After testing a dualshock 4 (with PlayStation configuration enabled), everything works fine there, so I can at least use that for now. That said, on continuing to test the other two controllers in other modes as I write this issue, steam apparently blacklisted both and now won't register them at all. I see ~4 lines of Hiding blacklisted Device 45e/2e0 on connection now, and no response from either device.

evtest output on button press and release:

Event: time 1633560259.003018, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90001
Event: time 1633560259.003018, type 1 (EV_KEY), code 304 (BTN_SOUTH), value 1
Event: time 1633560259.003018, -------------- SYN_REPORT ------------
Event: time 1633560259.201744, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90001
Event: time 1633560259.201744, type 1 (EV_KEY), code 304 (BTN_SOUTH), value 0
Event: time 1633560259.201744, -------------- SYN_REPORT ------------

Steam console output on controller connection (before blacklist):

Local Device Found
  type: 045e 02e0
  path: sdl://3
  serial_number:  - 0
  Manufacturer: 
  Product:      dev:xb1:Xbox One S Controller
  Release:      903
  Interface:    -1

!! Steam controller device opened for index 0.
Steam Controller reserving XInput slot 0
Controller 0 connected, configuring it now...
Controller has an Invalid or missing unit serial number, setting to '45e-2e0-6665ece'
!! Controller 0 attributes:
  Type: 32
  ProductID: 736
  Serial: 45e-2e0-6665ece
  Capabilities: 001803ff
  Firmware Version: 0
  Firmware Build Time: 2147483647 (Tue, 19 Jan 2038 03:14:07 GMT)
  Bootloader Build Time: 2147483647 (Tue, 19 Jan 2038 03:14:07 GMT)
Loaded Config for Local Selection Path for App ID 413090, Controller 0: /home/ccrowley/.local/share/Steam/steamapps/workshop/content/241100/1689651975/1007024772344596662_legacy.bin
Loaded Config for Local Selection Path for App ID 413090, Controller 0: /home/ccrowley/.local/share/Steam/steamapps/workshop/content/241100/1557881022/956347096063773104_legacy.bin
BYieldingQueryAccountsRegisteredToController
Loaded Config for Local Override Path for App ID 413080, Controller 0: /home/ccrowley/.local/share/Steam//controller_base/empty.vdf
Fetching Config Sets 0
CClientJobFetchPersonalizationFileID
Set Account Config Sets 0 1 1
OnFocusWindowChanged to window type: k_nGameIDControllerConfigs_Desktop, AppID 413080
Loaded Config for Local Override Path for App ID 413080, Controller 0: /home/ccrowley/.local/share/Steam//controller_base/empty.vdf
OnFocusWindowChanged to window type: k_nGameIDControllerConfigs_Desktop, AppID 413080
Loaded Config for Local Override Path for App ID 413080, Controller 0: /home/ccrowley/.local/share/Steam//controller_base/empty.vdf

EDIT: Just noticed today's release included Remote Play updates that may be related. The rest may just be coincidental timing.

Sanaki commented 2 years ago

Just redid my steam install from scratch, then manually moved my steamapps and userdata over to the new install (sans non-shader cache directories). While that fixed the blacklist, it did not fix the double inputs.

D33M0N commented 2 years ago

Your system information

Steam client version (build number or date): 16 Jan 2022 at 17:34:49
Distribution (e.g. Ubuntu): Manjaro, linux kernel 5.16.2
Opted into Steam client beta?: No
Have you checked for system updates?: Yes

Have the same exact problem, with my Xbox One S Wireless (Bluetooth) Controller. Details can be found in the closed/linked ticket above. Games that are/became unplayable for me because of this so far are Jack Axe and TowerFall Ascension. Tried also the blacklisting thing mentioned above, but exactly as for OP, the "blacklisting" makes the phantom controllers only hidden in the Steam menus and settings and doesn't actually disable/blacklist them from the actual games.

sad-goldfish commented 2 years ago

I have the same issue tested with both an aftermarket Xbox 360 controller and an Xbox One controller. I suspect that this is because Steam detects multiple interfaces for the same controller. I am using Xpad. Starting steam with CONFIG_INPUT_JOYDEV set in the kernel seems to produce:

  Local Device Found
  type: 045e 028e
  path: sdl://0
  serial_number:  - 0
  Manufacturer:
  Product:      X360 Controller
  Release:      114
  Interface:    -1

!! Steam controller device opened for index 0.
Steam Controller reserving XInput slot 0
Local Device Found
  type: 045e 028e
  path: sdl://1
  serial_number:  - 1
  Manufacturer:
  Product:      Xbox 360 Controller
  Release:      114
  Interface:    -1

Disabling the option seems to produce only:

  Local Device Found
  type: 045e 028e
  path: sdl://0
  serial_number:  - 0
  Manufacturer:
  Product:      X360 Controller
  Release:      114
  Interface:    -1

I haven't tested this enough to be certain but I'm guessing that a user workaround would be to blacklist the joydev module. Another workaround that seems to work is to unplug the controller, start steam and then plug in the controller afterwards.

D33M0N commented 2 years ago

Another workaround that seems to work is to unplug the controller, start steam and then plug in the controller afterwards.

Does not work with bluetooth controller. Does not matter if I turn the controller on before or after starting Steam.

Also technically we are not talking about "double controller inputs" but "parallel controller inputs from 2 'different' controllers, that actually are 1 controller and it's shadow copy created by steam" -- so for games it seems like 2 different controllers that are handled exactly the same way (shadow controller button mappings may differ a bit). In some games you can unbind the second controller (for example in Spelunky, you can switch second player controller to Keyboard), but several simpler arcade type of games every connected controller is a thing you can't turn off.

sad-goldfish commented 2 years ago

This may be some sort of library/.so issue. On my system, using the (unnoficial) flatpak version of Steam does not show two controllers in the logs.

D33M0N commented 2 years ago

Still an issue on Manjaro (Arch based) official Steam from repos. However not an issue at all on my Steam Deck (SteamOS is also Arch based?). So any hints what they have done differently on Deck, so I can do in Manjaro also?

Sbdsmall commented 1 year ago

Any Updates on this double input issue? I have started to experience the exact same problem with my PS4 Controller both via bluetooth or wired. Many games showing the "XInput Controller" and the "XBOX 360 Controller for windows" as two controllers on one device.

JacobBrownAustin commented 11 months ago

Hi. I was told that your issue might be the same as mine. Please try this workaround. Edit the game properties for games having problems causes by steam input and add this environment variable.

'SDL_GAMECONTROLLER_IGNORE_DEVICES="0x054c/0x0268,0x2dc8/0x3106" %command%

The device ids can easily be found from lsusb. I don't know what it is for non-usb controllers.

yanfali commented 8 months ago

I'm seeing this on debian 12 with an 8bit ultimate 2.4. It's very annoying, some menus are unusable and solasta is unplayable because the triggers double input so I can't select any characters.

Turning off steam inputs fixed this for me.

Halfmystic commented 6 months ago

This seems like a pretty big problem that's been open for nearly 3 years now. It's still an issue. Only Steam Input fixes it.

JacobBrownAustin commented 6 months ago

Only Steam Input fixes it.

What do you mean by that? For me, Steam Input is where the problem is.

D33M0N commented 6 months ago

Turning off steam inputs fixed this for me.

How do you do that?? Can you do this per game or you need to do globally somehow?

yanfali commented 6 months ago

Turning off steam inputs fixed this for me.

How do you do that?? Can you do this per game or you need to do globally somehow?

Per game properties, you can disable it. Look for the cog in the game page.

bjoern-tantau commented 5 months ago

Hi. I was told that your issue might be the same as mine. Please try this workaround. Edit the game properties for games having problems causes by steam input and add this environment variable.

'SDL_GAMECONTROLLER_IGNORE_DEVICES="0x054c/0x0268,0x2dc8/0x3106" %command%

The device ids can easily be found from lsusb. I don't know what it is for non-usb controllers.

On the Steam Deck with OpenSUSE Tumbleweed as the OS this works when the game is started outside of Steam while Steam is still running and providing controller emulation through the Desktop-Profile (where you can toggle between M/KB and controller).

As expected, when I launch my game without Steam this will disable the controller entirely. But funnily enough this also disables the controller when launching the game through Steam as a non-Steam game. Keyboard and mouse input configured through Steam Input work fine. But controller inputs are dropped.

But, when I don't use this ENV variable then I get double inputs when launching through Steam.

Very strange.

bubba169 commented 5 months ago

Also having this issue on some games on Steam Deck with 8bitdo Ultimate Bluetooth in 2.4ghz mode. Plate UP! will see two controllers and will actually create two characters following the same inputs. It also causes issues in Hogwarts Legacy as the A button is unresponsive in menus unless Steam Input is disabled or the command above is used. The second is preferable as it prevents controlling the character while navigating through the Steam overlay.

Is there any way to use the above command on all games by default as a temporary workaround? Copying that long string is pretty tricky on Steam Deck without a keyboard.

eathtespagheti commented 5 months ago

Hi. I was told that your issue might be the same as mine. Please try this workaround. Edit the game properties for games having problems causes by steam input and add this environment variable.

'SDL_GAMECONTROLLER_IGNORE_DEVICES="0x054c/0x0268,0x2dc8/0x3106" %command%

The device ids can easily be found from lsusb. I don't know what it is for non-usb controllers.

This works only for games with SDL support