libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
9.77k stars 1.77k forks source link

No keyboard or controller input when Xbox One controller connected via Bluetooth #15200

Open someg33zer opened 1 year ago

someg33zer commented 1 year ago

Description

I’ve upgraded my RetroArch from 1.8 to 1.15 using the stable Ubuntu PPA and now when I start it with my Xbox One controller connected through Bluetooth, there’s no keyboard or controller input response in the main menu. Mouse works but nothing else. I’ve tried:

  1. updating core info file, assets, controller profiles and databases
  2. removing .config/retroarch/retroarch.cfg and starting from scratch

but still the same lack of input.

The jstest-gtk program shows the Xbox controller working fine.

If I disconnect the Bluetooth connection to the controller and start RetroArch, the keyboard works.

Expected behavior

Xbox One controller connected through Bluetooth should be recognised and work as a joypad input and should not prevent keyboard input.

Actual behavior

Xbox One controller connected through Bluetooth is recognised but does not work as joypad input and prevents keyboard input.

Steps to reproduce the bug

  1. Connect Xbox One controller through Bluetooth.
  2. Run RetroArch.
  3. Try using the joypad or keyboard.

Version/Commit

Environment information

ichijiyujin commented 1 year ago

I made this account just now, this is my first time using and interacting with the GitHub community. My apologies if I unknowingly break some decorum.

OS: EndeavourOS (Arch Linux) Version: RetroArch 1.15.0 from Arch repositories.

I think I'm experiencing the same issue with a generic bluetooth gamepad, but it seems whatever is going on is a lot more weird. My gamepad is a Trust GXT 590, that Linux and Retroarch sees as Trust-GMP-04. It's a bluetooth device that also has a wireless dongle, through which the computer sees it as a generic Xbox 360 gamepad (this is relevant for later).

I initially found that for me the issue is inconsistent on start. Usually controls would be frozen on first start of Retroarch, but after closing it and restarting once or twice, both the gamepad and keyboard would work fine. After more testing I've found that what determines this inconsistent behavior is whether I touch any of the gamepad controls after connecting it, but before starting Retroarch.

It turns out, when connecting it via bluetooth, Linux initially reads the 4 axes of the 2 thumbsticks stuck on -32767. Screenshot_20230421_135123 Axes 1, 2, 3, 4 are the thumbsticks getting wrong values, 5 and 6 are the triggers that normally report -32767 while not pressed, and 32767 while pressed.

Any input on the gamepad will reset these values. So it seems to me that this incorrect reporting on the 4 axes is what freezes the keyboard and gamepad controls in Retroarch.

Except they don't seem to be frozen entirely. As it was mentioned earlier the mouse still works, and if I use it to start a game, I find that controls work perfectly fine in game. But if I pull up the Quick Menu while in game, the controls once again either work or not depending on whether I tried to input anything on the gamepad prior to launching the game. And if I used the gamepad while in game, and use the mouse to Close Content, the controls revert back to normal. Oh, and yes, F1 to open Quick Menu works at all times, and also the Select+Start combo for menu access.

A consistent way to reproduce the issue seems to be disconnecting and reconnecting the gamepad while in Retroarch. Although I noticed a difference, in that some buttons for menu control, like Ok and Back, or the Esc key are not frozen in these situations, just the navigational up/down/left/right.

Coming back to the dongle adapter I mentioned earlier, if I plug in the adapter, but still connect the gamepad in bluetooth mode, the issue doesn't present itself at all, even though I can confirm the 4 axes still report the wrong values upon connecting.

TL;DR: a workaround for me has been to input anything on the gamepad after connecting via bluetooth, but before opening Retroarch, but if you disconnect/reconnect while in Retroarch the issue will come back.

Igetin commented 1 year ago

I’m having a similar problem, but it seems to be hard to figure out when exactly it occurs. For me, it usually goes like this:

  1. launch Retroarch:
    • mouse, keyboard, and joypad work fine in the menu ✔️
  2. launch a game:
    • keyboard and joypad work fine in the game ✔️
  3. press the configured hotkey on the joypad or keyboard to bring up the RetroArch menu:
    • keyboard and joypad no longer work in the menu, only the mouse does
      • From this point, I can still return to the game via the mouse. When the game is active again, the keyboard and joypad work fine in-game, and I can again bring up the RetroArch menu via the hotkey—after which the keyboard and joypad again won’t do anything in the menu.

This did not happen when I was using RetroArch 1.12 last November. So it seems that the issue arised in RetroArch 1.13, 1.14 or 1.15. It’s also possible that the problem has something to do with my system being newer (I was using Fedora 35 back then).

Current system configuration

ichijiyujin commented 1 year ago

I’m having a similar problem, but it seems to be hard to figure out when exactly it occurs. For me, it usually goes like this:

  1. launch Retroarch:

    • mouse, keyboard, and joypad work fine in the menu heavy_check_mark
  2. launch a game:

    • keyboard and joypad work fine in the game heavy_check_mark
  3. press the configured hotkey on the joypad or keyboard to bring up the RetroArch menu:

    • keyboard and joypad no longer work in the menu, only the mouse does x

      • From this point, I can still return to the game via the mouse. When the game is active again, the keyboard and joypad work fine in-game, and I can again bring up the RetroArch menu via the hotkey—after which the keyboard and joypad again won’t do anything in the menu.

I can get the same behavior if my gamepad disconnects and then reconnects during gameplay. I can install version 1.9.13 of RetroArch through Lutris, and the issue doesn't exist at all for me in that version. So it's either 1.9.14 or 1.9.15 that introduced the problem it seems.

jldelsolare commented 10 months ago

I have the same issue; when I press the right trigger, the Xbox Series controller starts working again, but when pressed down, it's as if the trigger acts as the left analog stick for up and down. I still haven't been able to fix it. Kubuntu 22.04 retroarch 1.16

teeedubb commented 9 months ago

I have the same issue and I'm actually surprised I found others with the issues. Key board works great when no Xbox controller is connected. As soon as the Xbox S controller is connected via bluetooth the keyboard and controller do not work. If I turn the controller off the keyboard begins working.

retroarch 1.16.0 from the stable PPA Ubuntu 22.04

I have tried all 4 controller drivers and I get similar behaviour. I have updated the controller configs to no avail. Controller works fine in steam and games launched from it. It happens on a fresh install with all prior configs removed. The terminal output doesnt show anything between when I connect and disconnect the controller. Is there anyway I can supply more info?

jldelsolare commented 9 months ago

I have noticed that when activating the right trigger, it moves from top to bottom. It seems to be interpreting the trigger as if it were the left analog stick from top to bottom. In other words, it treats button 5 as if it were the analog stick. Here you can see the test I performed: https://www.youtube.com/watch?v=zukrixGRo0k edit: It also happened to me in Quake, run with Proton-GE from Epic Games... edit2: https://github.com/atar-axis/xpadneo/issues/203

nfp0 commented 8 months ago

The https://github.com/libretro/RetroArch/issues/15756 issue was recently fixed on the libdecor library here: https://gitlab.freedesktop.org/libdecor/libdecor/-/merge_requests/132

I'm not sure if that was the source of this controller problem. So please test if this issue still remains after libdecor releases the fix.

Igetin commented 8 months ago

I doubt that’s going to help with this controller problem. Libdecor seems to be Wayland-specific software, but I experience this issue when running RetroArch on X.Org.

nfp0 commented 8 months ago

@Igetin That's right. My bad. Since @cyrilpicard mentioned this issue on the locale issue, I thought they could've been related.

cyrilpicard commented 8 months ago

I am not sure that the bug I have encoutered is exactly the same as this one, but I can confirm that it does'nt occur anymore with the latest libdecor built from git master.

hrzhu commented 7 months ago

Have the same or similar problem on Kubuntu 22.04, with Xbox Series Controller. I've tested Retroarch stable and nightly.

RA 1.16: When connected with Xbox Series Controller via BT, Controller doesn't work properly. keyboard and mouse input doesn't work either.

RA nightly(2023-10-28): When connected with Xbox Series Controller via BT, Controller doesn't work properly and keyboard doesn't work. Mouse works though.

teeedubb commented 7 months ago

I recently got a xbox wireless adapter (off aliexpress, pretty sure its a clone, but it works fine in linux and windows) and am using the xone fork at https://github.com/dlundqvist/xone for the driver. RA now works without issue when using a xbox one controller. I know this isnt an ideal solution, just putting it out there. There is also the xpadneo driver at https://github.com/atar-axis/xpadneo which works with bluetooth and could help. I havent personally tried it.

nfp0 commented 7 months ago

From the last few posts it seems the libdecor issue is related to this somehow, after all. The libdecor problem was also fixed on the RetroArch side here https://github.com/libretro/RetroArch/pull/15782 so people having problems please test with the latest nightly.

And make sure you're using the correct RetroArch driver for your controller. Most should work fine with udev, but I'm not sure if that's the correct one for the Xbox controller or not.

Also, make sure to test on a brand new config file. Your current one could have been corrupted by the libdecor bug.

hrzhu commented 7 months ago

The problem is still reproducible on latest nightly(2023-11-04). Changing input drive from the default x to udev doesn't fix it. The nightly appimage build uses separate config files from the one I installed from ppa.

I have also tried back-porting latest libdecor and sdl to 22.04. It doesn't fix the issue either.

I wonder if this issue effects distros other than Ubuntu.

nfp0 commented 7 months ago

@hrzhu I was talking about the controller driver, not input driver. The default controller driver is udev.

Downgrading to a previous RetroArch version fixes the issue?

hrzhu commented 7 months ago

@nfp0 Sorry, I mistook input driver for controller driver. But that's probably irrelevant.

I just tried multiple old appimage builds. @Igetin was right. The last working version is 1.12(https://buildbot.libretro.com/stable/1.12.0/linux/x86_64/RetroArch.7z). It has been broken since 1.13.

nfp0 commented 7 months ago

@hrzhu I see. Then your issue seems to be unrelated with the libdecor one. :slightly_frowning_face:

Igetin commented 7 months ago

I would like to test the nightly myself as well, but unfortunately I can’t get any of the AppImage
builds to run. They just print the following line and exit:

Setting $HOME to /tmp/2023-11-17_RetroArch/RetroArch-Linux-x86_64/RetroArch-Linux-x86_64.AppImage.home


I wonder if this issue effects distros other than Ubuntu.

I experience the issue on Fedora (currently 38).

hrzhu commented 7 months ago

I did a git biselect. The bug was introduced by @sonninnos commit 1aa258faa0a12f17809524c267f290759c0b6407. Last working version is c4d2788c08ca4b478cbd00334c88691bfcc412f2.

sonninnos commented 7 months ago

I can't replicate in Windows with any controller. 8BitDo Pro 2 is the closest one I have since it uses regular bluetooth and is seen as Xbone controller.

There has been 2 essential related changes after that one, but apparently something is still missing: https://github.com/libretro/RetroArch/pull/15478 https://github.com/libretro/RetroArch/pull/15740

hrzhu commented 7 months ago

I have 8bitdo Ultimate Controller. It just works fine. I have 8Bitdo Pro too but I haven't tested it. Maybe there is something special with Xbox Series X/S controller? The original reporter uses Xbox One controller.

hrzhu commented 7 months ago

Just tested on Windows. The bug is not present on Windows.

cyrilpicard commented 7 months ago

From the last few posts it seems the libdecor issue is related to this somehow, after all. The libdecor problem was also fixed on the RetroArch side here #15782 so people having problems please test with the latest nightly.

And make sure you're using the correct RetroArch driver for your controller. Most should work fine with udev, but I'm not sure if that's the correct one for the Xbox controller or not.

Also, make sure to test on a brand new config file. Your current one could have been corrupted by the libdecor bug.

The fix works for me.

Test environment :

With retroarch 1.16.0.3 :

With retroarch built from git :

hrzhu commented 7 months ago

There's still some issue other than that locale one preventing the Xbox controller to work properly.

My testing procedure:

  1. Compiling Retroarch git master.
  2. Move my entire ~/.config/retroarch to other place.
  3. Start retroarch. Connect my Xbox controller via BT. Keyboard works atm. Contoller doesn't work.
  4. Download controller profiles. Controller doesn't work properly atm. Keyboard doesn't work. Controller doesn't respond to any input other than right trigger. When you press right trigger, cursor moves from top to bottom(or maybe the other way) nonstop. There's a chance you can make it stop but I don't know a reliable way to do it. ATM controller dpad works agains and keyboard works again. If you press trigger agains, cursor moves from top to bottom again. Keyboard doesn't work again.

I have tried an 8bitdo SN30 Pro+ as well, it works fine. It seems only the Xbox controller causing the problem. The last working version is https://github.com/libretro/RetroArch/commit/c4d2788c08ca4b478cbd00334c88691bfcc412f2

eomanis commented 7 months ago

For me, a Bluetooth-connected Sony Dual Shock 4 gamepad appears to be affected; I haven't been able to play anything with RetroArch for some time now.

Any input method becomes completely ineffective. Mouse, keyboard and gamepad.

Here is a screen recording of the current clean-configuration user experience on Arch Linux as of Dec 2, 2023.

https://github.com/libretro/RetroArch/assets/5933155/dc95667e-1cf9-477b-8ee8-7d187a42b67f

nfp0 commented 7 months ago

@eomanis I've noticed the background of the menu turned black upon reopening RetroArch. I might be mistaken but I remember that being a symptom of the config file's decimal separators being replaced with commas. Can you please check if the decimal separator in your config is dots or commas after opening and closing RetroArch for a second time (after the menu turns black and input stops working)?

nfp0 commented 7 months ago

4. Controller doesn't respond to any input other than right trigger. When you press right trigger, cursor moves from top to bottom(or maybe the other way) nonstop. There's a chance you can make it stop but I don't know a reliable way to do it. ATM controller dpad works agains and keyboard works again. If you press trigger agains, cursor moves from top to bottom again. Keyboard doesn't work again.

@hrzhu This totally feels like the controller is spamming a continuous input and preventing the keyboard from taking any action. Could still be related to the whole dots vs commas thing I mentioned in my previous post.

Please open and close RetroArch two times and check the decimal separator on your config file.

eomanis commented 7 months ago

Can you please check if the decimal separator in your config is dots or commas after opening and closing RetroArch for a second time (after the menu turns black and input stops working)?

Spot on, it's commas as decimal separator.

image

I have LANG=en_US as system locale, but some aspects are set to de_DE.

[defaultuser@fledermaus5 retroarch]$ localectl
System Locale: LANG=en_US.utf8
               LC_TIME=de_DE.utf8
               LC_MONETARY=de_DE.utf8
               LC_PAPER=de_DE.utf8
               LC_NAME=de_DE.utf8
               LC_ADDRESS=de_DE.utf8
               LC_TELEPHONE=de_DE.utf8
               LC_MEASUREMENT=de_DE.utf8
               LC_IDENTIFICATION=de_DE.utf8
    VC Keymap: de
   X11 Layout: de
nfp0 commented 7 months ago

@eomanis Great! Then test with the latest RetroArch nightly. This has been fixed there with this PR: https://github.com/libretro/RetroArch/pull/15782

Or if you prefer, you can instead install the git version of libdecor as a fix was also merged there here but not released yet.

hrzhu commented 7 months ago

@nfp0 If you mean ~/.config/retroarch/retroarch.cfg, I don't have commas in that files. All my locales are en_US.

nfp0 commented 7 months ago

@hrzhu Hmm, then that's a different issue. I assume you're not affected by the black background when creating a new config and reopening RetroArch as seen here: https://github.com/libretro/RetroArch/issues/15200#issuecomment-1837240352

hrzhu commented 7 months ago

@nfp0 I'm not affected by the black background issue. I tried starting Retroarch with a new config earlier. It didn't help. I just did the following test. If I manually change some decimal separators in my config from dot to comma. Keyboard doesn't work when I connect any controllers via BT. My problem is more specific. It only affects Xbox Wireless Controller (2020). It doesn't affect my 8bitdo controllers even though they're recognised as Xbox controller by steam as well.

Igetin commented 7 months ago

I’m in the same boat as hrzhu, I don’t have the black screen problem nor the comma problem in my configuration. I only use two controllers in RetroArch, but similarly, the problem only occurs on the Xbox Series X|S controller. I’ve not had the input issue occur on my other joypad (Nintendo Switch Pro Controller).

ichijiyujin commented 7 months ago

It's a different issue than the config thing, and as far as I can tell it has to do with connecting via bluetooth on Linux. As I stated in my earlier post, I have a cheap Trust controller, that can connect either via bluetooth, or via it's own dongle, in which case it presents as an Xbox 360 controller and it works fine 100% of the time. And I remember someone else saying that they solved their issue by using a wireless dongle instead of using bluetooth to connect.

When I first encountered the issue, back in April, I didn't have this config issue people are talking about, no black background problem. I believe I was using X11 at that time. Now I'm using Wayland. I haven't even opened Retroarch in months. Checking now, I did get the config issue, and fixed it by changing locale to en_US. But the original issue still persists as I described it previously.

As I showed via a screenshot earlier, when initially connecting via bluetooth, Linux reads the controller as spamming both thumbsticks with -32767 on all axis, until the user gets to press any input on the controller, after which it shows normal values. This doesn't happen when connecting via a dongle, and this is probably what messes with Retroarch.

I'm not a programmer, and I don't know much about all the config options Retroarch has. I described in my original post the best I can how the issue presents itself for me, how I can easily reproduce it and how I can mitigate the issue for myself. There's only so much I can help with unfortunately.

eomanis commented 7 months ago

Or if you prefer, you can instead install the git version of libdecor as a fix was also merged there here but not released yet.

Oh, now I get it. That library, libdecor, was messing with the application-global locale settings without being told to do any such thing. Rude.

On Arch, installing the libdecor-git AUR package fixed RetroArch for me.

Thanks for fixing my RetroArch installation 👌

nfp0 commented 7 months ago

@eomanis Don't thank me. I just found out what package was the culprit. :slightly_smiling_face:

On Arch, installing the libdecor-git AUR package fixed RetroArch for me.

Yes that's what I did, while the fix doesn't get a release.

nfp0 commented 7 months ago

It's a different issue than the config thing, and as far as I can tell it has to do with connecting via bluetooth on Linux.

@ichijiyujin Yes indeed, your case seems like a completely different issue. The fact that the controller is reporting wrong stick values makes it an issue external to RetroArch. Maybe try observing the joystick bytes flowing from the controller with btmon. If it really is reporting the faulty values there before you input any button, then it's a controller issue and there's nothing much you can do about it other than your workaround.

nfp0 commented 7 months ago

@hrzhu @Igetin I haven't read the whole thread, but have you guys tried observing what the controllers are reporting outside of RetroArch? Just to try and make some sense of what's happening. If you're on KDE you can use the Settings app as seen here.

hrzhu commented 7 months ago

The controller looks good in KDE controller setting and works well in other emulator and steam.

I have a question. How do I know which file in ~/.config/retroarch/autoconfig is in use when I connect the controller? When I start Retroarch 1.12(which is the last working version) and 1.13, the controller is recognised as Xbox One S Wireless Controller. While in latest stable Retroarch, it's recognised as Xbox One Elite Series 2. Apparently they use different configs.

edit: nvm, they use different configs because I have different controller driver settings(udev/sdl2).

nfp0 commented 7 months ago

@hrzhu So RetroArch 1.12 works using the same autoconfig files? Or are you using the config files bundled with 1.12?

hrzhu commented 7 months ago

1.12 works after I updating controller profiles. So I assume they both use the same latest auto-configs.

On Thu, 7 Dec 2023, 3:17 am nfp0, @.***> wrote:

@hrzhu https://github.com/hrzhu So RetroArch 1.12 works using the same autoconfig files? Or are you using the config files bundled with 1.12?

— Reply to this email directly, view it on GitHub https://github.com/libretro/RetroArch/issues/15200#issuecomment-1843542623, or unsubscribe https://github.com/notifications/unsubscribe-auth/AASAJXSCSFG6MP6MVTJ6TNTYIDAFDAVCNFSM6AAAAAAXADDNM2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBTGU2DENRSGM . You are receiving this because you were mentioned.Message ID: @.***>

nfp0 commented 7 months ago

@hrzhu Yes, I think you would be right on that. I'm not using Ubuntu and I don't have an Xbox controller, so there's not much I can test :slightly_frowning_face:

But since you bisected it to this I'm wondering if you might also not be being hit by this issue here: https://github.com/libretro/RetroArch/issues/15200#issuecomment-1517703697

What values do your joysticks read when you initially connect the controller without ever touching the joysticks? It almost feels like your right joystick is spamming inputs and blocking the menus.

hrzhu commented 7 months ago

image I might find the cause of the problem. Retroarch is not using the right config. The controller is reported as Xbox One S Wireless Controller and Retroarch is seemingly using autoconfig /udev/Microsoft_X-Box_One_S_pad_v2.cfg

cat udev/Microsoft_X-Box_One_S_pad_v2.cfg
input_driver = "udev"
input_device = "Xbox Wireless Controller"
input_device_display_name = "Xbox One S Wireless Controller"
input_vendor_id = "1118"
input_product_id = "736"

input_b_btn = "0"
input_y_btn = "2"
input_select_btn = "6"
input_start_btn = "7"
input_up_btn = "h0up"
input_down_btn = "h0down"
input_left_btn = "h0left"
input_right_btn = "h0right"
input_a_btn = "1"
input_x_btn = "3"
input_l_btn = "4"
input_r_btn = "5"
input_l2_axis = "+2"
input_r2_axis = "+5"
input_l3_btn = "8"
input_r3_btn = "9"
input_l_x_plus_axis = "+0"
input_l_x_minus_axis = "-0"
input_l_y_plus_axis = "+1"
input_l_y_minus_axis = "-1"
input_r_x_plus_axis = "+3"
input_r_x_minus_axis = "-3"
input_r_y_plus_axis = "+4"
input_r_y_minus_axis = "-4"

input_b_btn_label = "A"
input_y_btn_label = "X"
input_select_btn_label = "Back"
input_start_btn_label = "Start"
input_up_btn_label = "D-Pad Up"
input_down_btn_label = "D-Pad Down"
input_left_btn_label = "D-Pad Left"
input_right_btn_label = "D-Pad Right"
input_a_btn_label = "B"
input_x_btn_label = "Y"
input_l_btn_label = "LB"
input_r_btn_label = "RB"
input_l2_axis_label = "LT"
input_r2_axis_label = "RT"
input_l3_btn_label = "Left Thumb"
input_r3_btn_label = "Right Thumb"
input_l_x_plus_axis_label = "Left Analog X+"
input_l_x_minus_axis_label = "Left Analog X-"
input_l_y_plus_axis_label = "Left Analog Y+"
input_l_y_minus_axis_label = "Left Analog Y-"
input_r_x_plus_axis_label = "Right Analog X+"
input_r_x_minus_axis_label = "Right Analog X-"
input_r_y_plus_axis_label = "Right Analog Y+"
input_r_y_minus_axis_label = "Right Analog Y-"
input_menu_toggle_btn_label = "Guide"

The mapping is wrong. This is what I do to fix it. Open Retroarch 1.12 appimage which is the version I can use mouse and keyboard. Modify the mapping. Save controller profile. One thing I don't understand is now the controller is magically reported as Xbox Wireless Controller after restarting Retroarch, which I expect it to be, but I didn't change Device Index. It just changes automatically.

One thing I haven't figured out is I don't know where the config is saved. Seemly a Xbox Wireless Controller.cfg file is saved. Move it to ~/.config/retroarch/autoconfig/udev/ doesn't fix the problem.

I have to copy entire RetroArch-Linux-x86_64.AppImage.home/.config/retroarch/ to ~/.config/retroarch/ Now the controller is working in 1.16.

hrzhu commented 7 months ago

So this is an auto-config issue rather than Retroarch's. To use Xbox Wireless Controller 2020 on Retroarch 1.16, you can try the following steps: rm ~/.config/retroarch/autoconfig or make a backup first, and then update controller profiles in Retroarch. I don't know why but seemly Retroarch use this config. Now create Xbox Wireless Controller.cfg under ~/.config/retroarch/autoconfig/udev and fill the file with these contents:

input_driver = "udev"
input_device = "Xbox Wireless Controller"
input_vendor_id = "1118"
input_product_id = "2835"
input_b_btn = "0"
input_y_btn = "3"
input_select_btn = "10"
input_start_btn = "11"
input_up_btn = "h0up"
input_down_btn = "h0down"
input_left_btn = "h0left"
input_right_btn = "h0right"
input_a_btn = "1"
input_x_btn = "4"
input_l_btn = "6"
input_r_btn = "7"
input_l2_axis = "+5"
input_r2_axis = "+4"
input_l3_btn = "13"
input_r3_btn = "14"
input_l_x_plus_axis = "+0"
input_l_x_minus_axis = "-0"
input_l_y_plus_axis = "+1"
input_l_y_minus_axis = "-1"
input_r_x_plus_axis = "+2"
input_r_x_minus_axis = "-2"
input_r_y_plus_axis = "+3"
input_r_y_minus_axis = "-3"
input_menu_toggle_btn = "12"

Now the controller should work properly in Retroarch.

Actually there is a config for this controller. https://github.com/libretro/retroarch-joypad-autoconfig/blob/18b4579ff5ab8ada432dd1fce2b3fca82b075a09/udev/Microsoft_X-Box_Series_XS_pad.cfg#L6 But it use product id 2834 rather than 2835 and its mapping is not the same as the one I have. This config does use 2835 product id but I don't know how to use hid driver.

nfp0 commented 7 months ago

@hrzhu I'm not sure why that's happening but I've never used the AppImage version of RetroArch. I don't know how it's config works.

But regardless, if this is an autoconfig issue, maybe it's better to open an issue here on the autoconfig issue tracker: https://github.com/libretro/retroarch-joypad-autoconfig

sirf commented 6 months ago

If I start Retroarch with a Logitech gamepad connected through USB, neither gamepad nor keyboard works. Mouse works though. If I quit Retroarch, disconnect the gamepad, start Retroarch again, then keyboard and mouse works. And if I connect the gamepad after Retroarch has started, then gamepad, keyboard, and mouse works as expected. The issue happens only if the gamepad is already connected when Retroarch starts. No issue if the gamepad is connected later.

jldelsolare commented 5 months ago

Realize the process described, and the issues persisted. I pointed to nul all the entries, and the keyboard and mouse started working. I began manually assigning the buttons until I reached the x-axis, which is when the keyboard and mouse stopped working. I assigned null to the x-axis in the file, and everything started working again. I lack sufficient knowledge to proceed further. How could I provide more information on this matter? My file ended up like this.

input_l_x_plus_axis = "nul"
input_l_x_minus_axis = "nul"
input_l_y_plus_axis = "+1"
input_l_y_minus_axis = "-1"
input_r_x_plus_axis = "nul"
input_r_x_minus_axis = "nul"
input_r_y_plus_axis = "+3"
input_r_y_minus_axis = "-3"

So this is an auto-config issue rather than Retroarch's. To use Xbox Wireless Controller 2020 on Retroarch 1.16, you can try the following steps: rm ~/.config/retroarch/autoconfig or make a backup first, and then update controller profiles in Retroarch. I don't know why but seemly Retroarch use this config. Now create Xbox Wireless Controller.cfg under ~/.config/retroarch/autoconfig/udev and fill the file with these contents:

input_driver = "udev"
input_device = "Xbox Wireless Controller"
input_vendor_id = "1118"
input_product_id = "2835"
input_b_btn = "0"
input_y_btn = "3"
input_select_btn = "10"
input_start_btn = "11"
input_up_btn = "h0up"
input_down_btn = "h0down"
input_left_btn = "h0left"
input_right_btn = "h0right"
input_a_btn = "1"
input_x_btn = "4"
input_l_btn = "6"
input_r_btn = "7"
input_l2_axis = "+5"
input_r2_axis = "+4"
input_l3_btn = "13"
input_r3_btn = "14"
input_l_x_plus_axis = "+0"
input_l_x_minus_axis = "-0"
input_l_y_plus_axis = "+1"
input_l_y_minus_axis = "-1"
input_r_x_plus_axis = "+2"
input_r_x_minus_axis = "-2"
input_r_y_plus_axis = "+3"
input_r_y_minus_axis = "-3"
input_menu_toggle_btn = "12"

Now the controller should work properly in Retroarch.

Actually there is a config for this controller. https://github.com/libretro/retroarch-joypad-autoconfig/blob/18b4579ff5ab8ada432dd1fce2b3fca82b075a09/udev/Microsoft_X-Box_Series_XS_pad.cfg#L6 But it use product id 2834 rather than 2835 and its mapping is not the same as the one I have. This config does use 2835 product id but I don't know how to use hid driver.

nfp0 commented 5 months ago

@jldelsolare Sorry if this was asked before, but on the Game Controller menu on KDE's settings, do the inputs look normal to you?

jldelsolare commented 5 months ago

@nfp0 Yes, everything seems normal xbox mando Can I provide you with more information?

nfp0 commented 5 months ago

Are those -32767 the triggers? Are those supposed to look like that? And is it normal that the X and Y axis be at absolute zero? Does the Xbox controller have some built-in dead zones? Do those show expected values when you move them?