Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] XBox One Series X controller, the "Share" button doesn't works, Linux Mint #4222

Closed
Wohlstand opened this issue Mar 22, 2021 · 16 comments
Assignees
Labels
waiting Waiting on user response

Comments

@Wohlstand
Copy link
Contributor

Wohlstand commented Mar 22, 2021

Hello! I do have the recently bought gamepad of Xbox One Series X model 1914. I run it via USB (USB Type-C <-> PC). The device itself is wireless mainly, but it can be used via USB cable too.

Here are the next specs I got when I run the unit test:

INFO: Joystick device 0 added.
INFO: Joystick
INFO:        name: Xbox One Series X Controller
INFO:        type: Game Controller
INFO:        axes: 6
INFO:       balls: 0
INFO:        hats: 1
INFO:     buttons: 11
INFO: instance id: 0
INFO:        guid: 030000005e040000120b000001050000
INFO:     VID/PID: 0x045e/0x0b12

I had to use SDL 2.0.14, however, I found this commit: a5dba7d

Then, I tried to build the top main state (c12f46b), however, the button is still won't work.

@Wohlstand
Copy link
Contributor Author

Should I try to make the raw HIDAPI input dump and do you have any things on how to make that?

@Wohlstand
Copy link
Contributor Author

Okay, I found that the HIDAPI flag was OFF at me, but when I rebuilt the library with:

cmake -DCMAKE_BUILD_TYPE=Debug -DHIDAPI=ON ..

still the "Share" button won't work

@Wohlstand Wohlstand changed the title [Joysticks]: XBox One Series X controller, the "Share" button doesn't works, Linux Mint [BUG] XBox One Series X controller, the "Share" button doesn't works, Linux Mint Mar 30, 2021
@slouken slouken self-assigned this Jul 23, 2021
@slouken slouken added this to the 2.0.16 milestone Jul 23, 2021
@slouken
Copy link
Collaborator

slouken commented Jul 24, 2021

Did you confirm that the HIDAPI driver actually worked? On many Linux systems you'll need to run as root to directly access the USB devices.

You'll be able to tell if it's actually coming through HIDAPI because the GUID has "68" near the end.

@slouken slouken added the waiting Waiting on user response label Jul 24, 2021
@Wohlstand
Copy link
Contributor Author

Lemme try some... I probably need to add something into the rules.d to allow the non-root usage then...

@Wohlstand
Copy link
Contributor Author

,

The GUID is "030000005e040000120b000001050000" and seems it doesn't appear on the HIDAPI list, something other makes it work in a different way (probably there is some driver I should uninstall?)

Also, I did the test with the latest SDL2 library from the top and demo built, ran under root:
Снимок экрана от 2021-07-24 13-07-14
result is the same

@slouken slouken removed this from the 2.0.16 milestone Jul 24, 2021
@slouken
Copy link
Collaborator

slouken commented Jul 24, 2021

I'm happy to troubleshoot this live with you. Let me know if you're available and the best way to reach you.

@Wohlstand
Copy link
Contributor Author

Wohlstand commented Jul 24, 2021

My time zone is UTC+3, I am usually available the rest of the daylight, and some time in the evening and night (I usually go sleep lately, at 1~2 AM, but I may go sleep earlier if I got very tired). Also, do you use any messengers like Telegram or Discord (Wohlstand#4881)? Or a Keybase and XMPP? (my XMPP is equal to my email)

@cgutman
Copy link
Collaborator

cgutman commented Jul 24, 2021

That GUID doesn’t look like it’s using HIDAPI, so the problem is probably that your Linux kernel doesn’t expose the share button. It was just added recently in v5.14 which is not officially released yet.

torvalds/linux@0b1d6c8

@Wohlstand
Copy link
Contributor Author

I see, at me, the kernel was 5.8, just now I installed the 5.11 (I do install low-latency kernels)

@Wohlstand
Copy link
Contributor Author

Wohlstand commented Jul 24, 2021

Also, on my system, there are 5 hidraw devices listed, and they are:

  • CMedia (my USB headphones)
  • keyboard uses two hidraw devices at once
  • mouse uses two hidraw devices at once

but controller doesn't appear in the hidraw devices list. However, it works in SDL2 (by different interface?)

@Igetin
Copy link

Igetin commented Jan 15, 2022

Hi, it seems like this did not get resolved yet? This seems like a relevant issue, so I’m posting here rather than creating a new one.

I am also having trouble with the share button of this controller via another program, which is using SDL.

I ran the testgamepad command that is provided with the SDL source code. Pressing the share button on the controller gives the following output:

The key you just pressed is not recognized by SDL. To help get this fixed, please report this to the SDL forums/mailing list https://discourse.libsdl.org/ X11 KeyCode 175 (167), X11 KeySym 0x1008FF1C (XF86AudioRecord).

I also ran the controllermap command, this is the mapping I ended up with:

050000005e040000130b000007050000,Xbox Series X Controller,platform:Linux,a:b0,b:b1,x:b3,y:b4,back:b10,guide:b12,start:b11,leftstick:b13,rightstick:b14,leftshoulder:b6,rightshoulder:b7,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,misc1:b15,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a5,righttrigger:a4,

The same error message as above was printed when I pressed the share button while the button was highlighted in the shown layout.

My system information:

$ cat /etc/fedora-release
Fedora release 35 (Thirty Five)
$ uname -r
5.15.12-200.fc35.x86_64

Please tell me if I can provide any more useful information for solving this.

@Igetin
Copy link

Igetin commented Jan 15, 2022

Actually, sorry, seems like my controller is not exactly the same as OP’s:

INFO: Joystick
INFO:           name: Xbox Series X Controller
INFO:           type: Game Controller
INFO:            LED: no
INFO:         rumble: no
INFO: trigger rumble: no
INFO:           axes: 6
INFO:          balls: 0
INFO:           hats: 1
INFO:        buttons: 16
INFO:    instance id: 1
INFO:           guid: 050000005e040000130b000007050000
INFO:        VID/PID: 0x045e/0x0b13

@slouken Should I move this into a new issue?

@slouken
Copy link
Collaborator

slouken commented Sep 27, 2022

@slouken Should I move this into a new issue?

Yes please. X11 interpreting the share button as a record key is a different issue from the original one where the HIDAPI driver wasn't being used.

@slouken
Copy link
Collaborator

slouken commented Nov 7, 2023

The version of kernel you're using doesn't support the Share button. I believe this works on the latest 6.x series kernel.

@slouken slouken closed this as not planned Won't fix, can't repro, duplicate, stale Nov 7, 2023
@Wohlstand
Copy link
Contributor Author

I updated the stuff a while ago and it works now. I forgot to reply here.

@Wohlstand
Copy link
Contributor Author

Forgot to say, my current system is Linux Mint 21.2 (Ubuntu 22.04). Previous was 20.3 (Ubuntu 20.04).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting Waiting on user response
Projects
None yet
Development

No branches or pull requests

4 participants