xbox wireless controller - xbox button not working
-
Hi,
i am running retropie on a raspi 4 with emulation station. I use a xbox wireless controller (xbox series x). The controller works perfectly expect that i cannot use the xbox button as a hotkey. I is detected perfectly in the es controller configuration but retroarch seems not to be able to use it. As a driver i use xpadneo. xpad driver has been removed by me.
Any hints what i can do to debug this further?
I have seen the thread with a similar problem but no solution at the end. it looks like for some reason retroarch is the problem here or maybe libretro.https://retropie.org.uk/forum/topic/31194/xbox-one-controller-logo-button-not-working-in-games/3
Kenrel: Linux 5.10.103-v7l+
xpadneo: v0.9.5jstest gets the buttons perfectly
jstest /dev/input/js0 Driver version is 2.1.0. Joystick (Xbox Wireless Controller) has 9 axes (X, Y, Z, Rx, Ry, Rz, Hat0X, Hat0Y, (null)) and 15 buttons (BtnA, BtnB, BtnX, BtnY, BtnTL, BtnTR, BtnSelect, BtnStart, BtnMode, BtnThumbL, BtnThumbR, (null), (null), (null), (null)). Testing ... (interrupt to exit)
press start: Axes: 0: 0 1: 0 2:-32767 3: 0 4: 0 5:-32767 6: 0 7: 0 8: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:on 7:off 8:off 9:off 10:off 11:off 12:off 13:off 14:off Axes: 0: 0 1: 0 2:-32767 3: 0 4: 0 5:-32767 6: 0 7: 0 8: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off 8:off 9:off 10:off 11:off 12:off 13:off 14:off
press select: Axes: 0: 0 1: 0 2:-32767 3: 0 4: 0 5:-32767 6: 0 7: 0 8: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:on 8:off 9:off 10:off 11:off 12:off 13:off 14:off Axes: 0: 0 1: 0 2:-32767 3: 0 4: 0 5:-32767 6: 0 7: 0 8: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off 8:off 9:off 10:off 11:off 12:off 13:off 14:off
press xbox logo: Axes: 0: 0 1: 0 2:-32767 3: 0 4: 0 5:-32767 6: 0 7: 0 8: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off 8:on 9:off 10:off 11:off 12:off 13:off 14:off Axes: 0: 0 1: 0 2:-32767 3: 0 4: 0 5:-32767 6: 0 7: 0 8: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off 8:off 9:off 10:off 11:off 12:off 13:off 14:off
so start is 6, select 7, and xbox 8.
Thanks in advance!
Edit:
here is my
/opt/retropie/configs/all/retroarch/autoconfig/Xbox Wireless Controller.cfg
input_device = "Xbox Wireless Controller" input_driver = "udev" input_enable_hotkey_btn = "7" input_r3_btn = "10" input_r_y_minus_axis = "-4" input_r_y_minus_axis_label = "Right Analog Y-" input_l_btn = "4" input_l_btn_label = "LB" input_load_state_btn = "4" input_r_y_plus_axis = "+4" input_r_y_plus_axis_label = "Right Analog Y+" input_up_btn = "h0up" input_up_btn_label = "D-Pad Up" input_left_btn = "h0left" input_left_btn_label = "D-Pad Left" input_state_slot_decrease_btn = "h0left" input_r_x_minus_axis = "-3" input_r_x_minus_axis_label = "Right Analog X-" input_l_y_plus_axis = "+1" input_l_y_plus_axis_label = "Left Analog Y+" input_l_x_plus_axis = "+0" input_l_x_plus_axis_label = "Left Analog X+" input_right_btn = "h0right" input_right_btn_label = "D-Pad Right" input_state_slot_increase_btn = "h0right" input_l_x_minus_axis = "-0" input_l_x_minus_axis_label = "Left Analog X-" input_r_x_plus_axis = "+3" input_r_x_plus_axis_label = "Right Analog X+" input_l3_btn = "9" input_r_btn = "5" input_r_btn_label = "RB" input_save_state_btn = "5" input_l_y_minus_axis = "-1" input_l_y_minus_axis_label = "Left Analog Y-" input_y_btn = "2" input_y_btn_label = "X" input_x_btn = "3" input_x_btn_label = "Y" input_menu_toggle_btn = "3" input_down_btn = "h0down" input_down_btn_label = "D-Pad Down" input_start_btn = "6" input_exit_emulator_btn = "6" input_b_btn = "0" input_b_btn_label = "A" input_reset_btn = "0" input_a_btn = "1" input_a_btn_label = "B"
This config uses select as hotkey but i need select to insert coin in fbneo.
i modified the config and it does not work:
input_enable_hotkey_btn = "8" input_select_btn = "7"
I can recall that the button worked with the xpad driver but the controls are delayed so i switched to the xpadneo.
-
Please add the details of your installation as requested in https://retropie.org.uk/forum/topic/3/read-this-first.
Is your controller connected by Bluetooth or with an USB dongle ?
As a driver i use xpadneo. xpad driver has been removed by me.
They can both function at the same time, since they handle different devices.
xpadneo
handles exclusively Bluetooth devices, whilexpad
handles the wired ones. You shouldn't removexpad
to makexpadneo
function.I can recall that the button worked with the xpad driver but the controls are delayed so i switched to the xpadneo.
That's strange, I haven't heard of this kind of 'delayed' action with
xpad
.I have seen the thread with a similar problem but no solution at the end. it looks like for some reason retroarch is the problem here or maybe libretro.
The link to the thread points to this same topic - did you mean to point to another similar topic ?
Any hints what i can do to debug this further?
Post the results of the command:
cat /proc/bus/input/devices
and perhaps post a verbose log from RetroArch on pastebin.com.
-
Thanks for your quick reply!
Pi Model or other hardware: Raspberry Pi 4 Modell B; 4 GB
Power Supply used: [Offizielle Standard 5.1V 4A 20.4W] Raspberry Pi 4 Netzteil, iUniker Pi 4 USB C Netzteil mit ON/Off EIN/Aus-Schalter EU-Stecker für Raspberry Pi 4 8GB/ 4GB/ 2GB/ 1GB
RetroPie Version Used: 4.8.2
Built From: Pre made SD Image with RetroPie / running on Raspbian 10 buster
USB Devices connected: USB RF dongle for keyboad and mouse
Controller used: Xbox wireless controller (xbox series x) connceted via bluetooth
Emulator: retroarch (libretro)The controller is connected via bluetooth.
Yes, the link is to a topic with a similar problem but no solution.
I: Bus=0003 Vendor=276d Product=3257 Version=0110 N: Name="2.4G RF Keyboard & Mouse" P: Phys=usb-0000:01:00.0-1.4/input0 S: Sysfs=/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.0/0003:276D:3257.0001/input/input0 U: Uniq= H: Handlers=sysrq kbd leds event0 B: PROP=0 B: EV=120013 B: KEY=10000 7 ff9f207a c14057ff febeffdf ffefffff ffffffff fffffffe B: MSC=10 B: LED=1f I: Bus=0003 Vendor=276d Product=3257 Version=0110 N: Name="2.4G RF Keyboard & Mouse" P: Phys=usb-0000:01:00.0-1.4/input1 S: Sysfs=/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.1/0003:276D:3257.0002/input/input1 U: Uniq= H: Handlers=event1 B: PROP=0 B: EV=9 B: ABS=100 0 I: Bus=0003 Vendor=276d Product=3257 Version=0110 N: Name="2.4G RF Keyboard & Mouse" P: Phys=usb-0000:01:00.0-1.4/input1 S: Sysfs=/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.1/0003:276D:3257.0002/input/input2 U: Uniq= H: Handlers=mouse0 event2 B: PROP=0 B: EV=17 B: KEY=ff0000 0 0 0 0 0 0 0 0 B: REL=1943 B: MSC=10 I: Bus=0003 Vendor=276d Product=3257 Version=0110 N: Name="2.4G RF Keyboard & Mouse Consumer Control" P: Phys=usb-0000:01:00.0-1.4/input1 S: Sysfs=/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.1/0003:276D:3257.0002/input/input3 U: Uniq= H: Handlers=kbd event3 B: PROP=0 B: EV=1f B: KEY=3f 303ff 0 0 0 0 483ffff 17aff32d bfd44446 0 0 1 130ff3 8b17c000 677bfa d9415fed 19ed680 4400 0 10000002 B: REL=1040 B: ABS=1 0 B: MSC=10 I: Bus=0003 Vendor=276d Product=3257 Version=0110 N: Name="2.4G RF Keyboard & Mouse System Control" P: Phys=usb-0000:01:00.0-1.4/input1 S: Sysfs=/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.1/0003:276D:3257.0002/input/input4 U: Uniq= H: Handlers=kbd event4 B: PROP=0 B: EV=13 B: KEY=c000 100000 0 0 0 B: MSC=10 I: Bus=0005 Vendor=045e Product=028e Version=1130 N: Name="Xbox Wireless Controller" P: Phys=D8:3A:DD:81:12:AE S: Sysfs=/devices/virtual/misc/uhid/0005:045E:0B13.0003/input/input7 U: Uniq=0C:35:26:DC:8F:84 H: Handlers=kbd event5 js0 B: PROP=0 B: EV=20001b B: KEY=f0 0 0 0 0 0 0 0 0 0 0 0 0 0 7cdb0000 0 0 0 80 0 0 0 0 0 B: ABS=100 3003f B: MSC=10 B: FF=1 7030000 0 0
I cannot exit the games in the current config so i think the log is not flushed to disk right?
I could use tail to pipe it to some file if this is ok.
i meant this thread (looks like i messed up the link):
https://retropie.org.uk/forum/topic/31194/xbox-one-controller-logo-button-not-working-in-games/12
-
@fnpanic said in xbox wireless controller - xbox button not working:
I cannot exit the games in the current config so i think the log is not flushed to disk right?
Yes, it's saved in RAM, so if you reboot it will be lost.
I could use tail to pipe it to some file if this is ok.
If you have SSH enabled, you can just copy the to file to your PC and post it on pastebin.com or copy it to
$HOME
before rebooting so it's not lost.What's the exact RetroPie version you have installed ?
-
I am running retropie 4.8.2 commit 90f64e6b
Will create a log and post it in a pastebin.
EDIT:
here is the verbose logWhen select is not the hotkey i can use neo geo games but cannot exit. When the hotkey is set to select i cannot start a neo geo game.
Maybe something is not picked up correctly? For me pad0 looks fine
[INFO] [udev]: Keyboard #0: "2.4G RF Keyboard & Mouse" (/dev/input/event0). [INFO] [udev]: Keyboard #1: "2.4G RF Keyboard & Mouse Consumer Control" (/dev/input/event3). [INFO] [udev]: Keyboard #2: "2.4G RF Keyboard & Mouse System Control" (/dev/input/event4). [INFO] [udev]: Keyboard #3: "Xbox Wireless Controller" (/dev/input/event5). [INFO] [udev]: Keyboard #4: "" (/dev/input/js0). [INFO] [udev]: Mouse #0: "2.4G RF Keyboard & Mouse" (REL) /dev/input/event2 [INFO] [udev]: Pad #0 (/dev/input/event5) supports force feedback. [INFO] [udev]: Pad #0 (/dev/input/event5) supports 16 force feedback effects.
Maybe /dev/input/event5 does not send the button press? Maybe a simple udev rule to use js0?
-
@fnpanic said in xbox wireless controller - xbox button not working:
Maybe /dev/input/event5 does not send the button press? Maybe a simple udev rule to use js0?
To me it seems it's the same issue as in the topic you linked: the button is emitting a Keyboard key (F12) and not a button. From the
xpadneo
driver page:Xbox Series X|S Wireless Controller
Full support for the Xbox Series X|S controller is present including the share button. This is currently statically mapped to keyboard event KEY_F12 to take screenshots with Steam. It will be configurable in the future. This controller uses emulated profile switching support (see below).Try adding this
retroarch.cfg
:input_enable_hotkey = "f12" input_osk_toggle = null
and see if the Xbox button works in RetroArch as a hotkey. You should update the RetroPie-Setup and RetroArch (in this order) first.
-
Thanks for the reply.
I added
input_enable_hotkey = "f12" input_osk_toggle = nul
to the end /opt/retropie/emulators/retroarch/retroarch.cfg but it did not have any effect. I tested it with neo geo.
Is this the right place?
-
@fnpanic said in xbox wireless controller - xbox button not working:
to the end /opt/retropie/emulators/retroarch/retroarch.cfg but it did not have any effect. I tested it with neo geo.
Yes, that's the right place. If you already have a
hotkey_enable_btn
in the.cfg
file, remove it. If that doesn't work, then I don't have anymore ideas. -
i removed the hotkey_enable_btn from /opt/retropie/configs/all/retroarch/autoconfig/Xbox Wireless Controller.cfg but it did not help.
i also greped for hotkey_enable_btn in /opt/retropie/emulators/retroarch
Maybe it is mapped somewhere else?
Could i do a double mapping of maybe select with a long press or something?
I saw this in the config
# Adds a delay in frames before the assigned hotkey blocks input. Useful if the the # hotkey input is mapped to another action. # input_hotkey_block_delay = "5"
Can i just map hotkey to select and press it longer?
EDIT:
When i do a grep -v "#" retroarch.cfg everything is default and the only two lines which are not commented out are the ones i added.
I also upgraded the xbox controller to latest firmware.
-
@fnpanic said in xbox wireless controller - xbox button not working:
Maybe it is mapped somewhere else?
No, these are the places where - by default - it would be.
Could i do a double mapping of maybe select with a long press or something?
Yes, you already did this, with Select.
I saw this in the config
# Adds a delay in frames before the assigned hotkey blocks input. Useful if the the # hotkey input is mapped to another action. # input_hotkey_block_delay = "5"
Can i just map hotkey to select and press it longer?
Yes, in fact EmulationStation offers this option if you don't select any hotkey enable button. Lots of users without a dedicated button use it this way and it works fine.
I'm confused as how ES detects the button, but the generated
.cfg
doesn't contain the properhotkey_enable_btn
. You're choosing the Xbox/Share button as 'Hokey Enable' in the mapping dialog and it's correctly read (i.e. Button 8) by EmulationStation ? -
I think there is a misunderstanding from my side. The Xbox button is not the share button according to the docs.
If you have the latest Xbox Wireless Controller, such as the one included with Xbox Series X|S, you’ll notice an additional button nested between the View button and the Menu button . That’s the Share button .
Look at this picture:
I mapped the Xbox button which is proper mapped by es to button 8 but does not work in retroarch for some reason. I did not test the share button set to f12. I will do this tomorrow.
Mapping select to hotkey works so far pretty good.
I will report back and if it works we should put this somewhere in the docs or make it default. I can submit a PR if needed.
quick update:
i tested with the share button but does not work. I now set the select button as hotkey and this works. For me the two buttons do not work in retroarch.
-
@fnpanic said in xbox wireless controller - xbox button not working:
i tested with the share button but does not work. I now set the select button as hotkey and this works. For me the two buttons do not work in retroarch.
Can you post the
.cfg
file produced by EmulationStation when you select the Xbox button ? -
you mean this one?
/opt/retropie/configs/all/retroarch/autoconfig/Xbox\ Wireless\ Controller.cfg
-
-
It is a genuine XBox wireless controller for xbox series X. I updated to the latest firmware.
Here is the config generated by es:
input_device = "Xbox Wireless Controller" input_driver = "udev" input_enable_hotkey_btn = "8" input_r3_btn = "10" input_r_y_minus_axis = "-4" input_r_y_minus_axis_label = "Right Analog Y-" input_l_btn = "4" input_l_btn_label = "LB" input_load_state_btn = "4" input_r_y_plus_axis = "+4" input_r_y_plus_axis_label = "Right Analog Y+" input_up_btn = "h0up" input_up_btn_label = "D-Pad Up" input_left_btn = "h0left" input_left_btn_label = "D-Pad Left" input_state_slot_decrease_btn = "h0left" input_select_btn = "7" input_r2_axis = "+5" input_r2_axis_label = "RT" input_r_x_minus_axis = "-3" input_r_x_minus_axis_label = "Right Analog X-" input_l_y_plus_axis = "+1" input_l_y_plus_axis_label = "Left Analog Y+" input_l_x_plus_axis = "+0" input_l_x_plus_axis_label = "Left Analog X+" input_right_btn = "h0right" input_right_btn_label = "D-Pad Right" input_state_slot_increase_btn = "h0right" input_l2_axis = "+2" input_l2_axis_label = "LT" input_l_x_minus_axis = "-0" input_l_x_minus_axis_label = "Left Analog X-" input_r_x_plus_axis = "+3" input_r_x_plus_axis_label = "Right Analog X+" input_l3_btn = "9" input_r_btn = "5" input_r_btn_label = "RB" input_save_state_btn = "5" input_l_y_minus_axis = "-1" input_l_y_minus_axis_label = "Left Analog Y-" input_y_btn = "2" input_y_btn_label = "X" input_x_btn = "3" input_x_btn_label = "Y" input_menu_toggle_btn = "3" input_down_btn = "h0down" input_down_btn_label = "D-Pad Down" input_start_btn = "6" input_exit_emulator_btn = "6" input_b_btn = "0" input_b_btn_label = "A" input_reset_btn = "0" input_a_btn = "1" input_a_btn_label = "B"
-
..
input_enable_hotkey_btn = "8"
..OK, so the hotkey enable button is saved correctly, just like in the profile that RetroArch has online. I don't understand why it doesn't work in-game, it's correctly configured in the
.cfg
file. -
Me too. Is there a debug mode to see what is loaded and what is pressed?
-
I would guess that the vendor is and the product is do not match any udev rule so only the buttons which are common on all gamepads work.
-
@fnpanic said in xbox wireless controller - xbox button not working:
Me too. Is there a debug mode to see what is loaded and what is pressed?
You can add
libretro_log_level = 0
toretroarch.cfg
and run with verbose logging, but I don't know if there's more debug info shown for the input system in RetroArch.I would guess that the vendor is and the product is do not match any udev rule so only the buttons which are common on all gamepads work.
I don't think
udev
and Prod/Vendor ID have an influence here. RetroArch loads the.cfg
profile based on device name and the Product/Vendor IDs are optional - though you're still running an older version of RetroPie because recent versions add the vend/prod IDs to the.cfg
file. -
Are you sure you have a genuine Xbox controller ?
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.