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

Proton/Wine games make controller vibrate in full force #3

Closed
NTMan opened this issue Dec 21, 2019 · 34 comments
Closed

Proton/Wine games make controller vibrate in full force #3

NTMan opened this issue Dec 21, 2019 · 34 comments
Labels
bug Something isn't working compatibility Compatibility with a certain system/device
Milestone

Comments

@NTMan
Copy link

NTMan commented Dec 21, 2019

Something went wrong. After launching the game, The Surge XBOX Elite Controllers amicably began to vibrate in full force.

Demonstration: https://youtu.be/_VevGQK8jAA

Kernel log

P.S. All games which ran under Proton can only vibrate. Native games didn't see the gamepad.

@alphabitserial
Copy link

The readme states that Elite controllers are currently unsupported.

@medusalix
Copy link
Owner

Yes, that's right. If I remember correctly, the elite controllers use a slightly different protocol than the normal controllers, which is not supported by this driver. I might add support in the future though.

@medusalix medusalix added enhancement New feature or request wontfix labels Dec 21, 2019
@Hielyr
Copy link

Hielyr commented Dec 22, 2019

Yes, that's right. If I remember correctly, the elite controllers use a slightly different protocol than the normal controllers, which is not supported by this driver. I might add support in the future though.

I would love to see support for the elite controllers. I have an Elite v2 controller, so if it would be at all helpful for me to provide any information, I'd be more than happy to do so!

@NTMan
Copy link
Author

NTMan commented Dec 22, 2019

Yes, that's right. If I remember correctly, the elite controllers use a slightly different protocol than the normal controllers, which is not supported by this driver. I might add support in the future though.

Vibro of usual XBOX controller going mad too
Demonstration: https://youtu.be/Drdp2f5xARU

and not working D-Pad was fixed in commit 6b02117

@medusalix
Copy link
Owner

medusalix commented Dec 22, 2019

@NTMan It seems to be an issue with Proton games, I'll take a closer look at this.

@medusalix medusalix changed the title XBOX Elite Controller not working (only vibrate in full force) Proton games make controller vibrate in full force Dec 22, 2019
@medusalix medusalix added bug Something isn't working and removed enhancement New feature or request wontfix labels Dec 22, 2019
@John-Gee
Copy link

John-Gee commented Dec 22, 2019

Hello,

I have the same issue on a 1697 model with pure Wine, not using Proton or Steam, and no issue with native games with or without Steam.

@NoXPhasma
Copy link
Contributor

As I already stated on Reddit, for me the Gamepad rumbles very hard at launch on Proton games as well and then the rumble won't work in the game. This behaviour is not present in native or games running with Wine, in which the gamepad works perfectly fine.

This is with model 1708.

@zypangpang
Copy link

Same here. With proton games, the Gamepad rumbles very hard at launch, but in my case the vibration still works in the game but still in full force.

@NoXPhasma
Copy link
Contributor

I've updated the firmware of my controller to version 4.x and now rumble works in Proton games as well. If anyone else experiences no rumble in Proton games, I suggest to update the controller firmware (a XBOX One console or Windows is required though).

@medusalix medusalix added the compatibility Compatibility with a certain system/device label Dec 25, 2019
@medusalix
Copy link
Owner

I've removed the rumble of the triggers in the latest commit. Rumble in native games (like Broforce) feels very similar to their Windows counterparts now. This is the way xpad treats the rumble.

@NoXPhasma
Copy link
Contributor

This is much better indeed. Maybe you can take a look into the xpadneo code, how the trigger rumble is done in it.

@John-Gee
Copy link

John-Gee commented Dec 26, 2019

Just in case, I tried again, it still rumbles in full force from launch till closing a game in Wine (I've tried with Monster Boy if it matters).

@NoXPhasma
Copy link
Contributor

Have you tried to update the firmware of your controller?

@John-Gee
Copy link

John-Gee commented Dec 26, 2019

I have not.
It's likely the controller never got updated before it was given to me.
Is there a way to do it from Linux? I don't have Windows to try

@NoXPhasma
Copy link
Contributor

You can download a Windows 10 VM image [1] legally for free, then passthrough the gamepad/dongle. Then install the Xbox accessories app with the Windows store and update the firmware. I have not done it this way, but it should work.

[1] https://developer.microsoft.com/windows/downloads/virtual-machines

@NTMan
Copy link
Author

NTMan commented Dec 26, 2019

Screenshot from 2019-12-26 12-01-08

In my case on gamepad model 1708 with firmware 4.8.1923.0 I still observed this issue.
And my XBOX ONE X said that controller already updated to latest firmware.

@John-Gee
Copy link

You can download a Windows 10 VM image [1] legally for free, then passthrough the gamepad/dongle. Then install the Xbox accessories app with the Windows store and update the firmware. I have not done it this way, but it should work.

[1] developer.microsoft.com/windows/downloads/virtual-machines

I had a VM already setup so I tried, but I've spent a couple hours and so far only once did XBox accessories see the controller, and of course it had to fail the update, every other time it asks me to plug in a controller. Not sure what I'm missing, but based on above I don't know if it's worth looking more into that.

@NoXPhasma
Copy link
Contributor

NoXPhasma commented Dec 26, 2019

The firmware Version looks like the latest. It might be actually the different model version which is causing this.

For me it only rumbles when WINE starts and ends for 3 seconds, no matter if it's a game or a WINE application. With Proton it only rumbles on launch. However, with WINE the rumble is stronger than with Proton/Native.

@medusalix medusalix changed the title Proton games make controller vibrate in full force Proton/Wine games make controller vibrate in full force Dec 26, 2019
@medusalix
Copy link
Owner

medusalix commented Dec 26, 2019

I might have fixed this problem (while reading through the source code of ff-memless). Please see if the rumble behaves correctly when running the modified rumble branch.

@NTMan
Copy link
Author

NTMan commented Dec 26, 2019

I might have fixed this problem (while reading through the source code of ff-memless). Please see if the rumble behaves correctly when running the modified rumble branch.

xow now crashes: https://pastebin.com/gmXAPv8e

@NTMan
Copy link
Author

NTMan commented Dec 26, 2019

And yes, controller not rumble, but it does not rumble also at the moments when rumble should be in the game (present when controller connected by wire)

@medusalix
Copy link
Owner

medusalix commented Dec 26, 2019

@NTMan Oops, I made a little logic error (should be fixed now). Not sure about the crash though...

The crash might be caused by selecting on a file descriptor that's bigger than FD_SETSIZE. I'll have to switch to poll/epoll to avoid this issue.

@NoXPhasma
Copy link
Contributor

It works for me in Wine, Proton and Native without any initial rumble. I need to do more testing, as I have currently the feeling that the rumble feels less intense as usual. Also for some reason the rumble won't work in Steam games (Native and Proton) once I exit the game and start a game without reconnect the gamepad. This was not the case with the default branch.

@John-Gee
Copy link

The rumble branch works for me. I quickly compared it with wired, and with a Wii U Pro controller in Monster Boy and it seems about the same.

I've had no issues with restarting a game, it still works fine.

Thank you very much!

@NoXPhasma
Copy link
Contributor

I quickly compared it with wired, and with a Wii U Pro controller in Monster Boy and it seems about the same.

You are right, I compared it wired and wireless as well and it is the same. Most probably I just got used to the intense rumble of the main branch.

@NTMan
Copy link
Author

NTMan commented Dec 27, 2019

@NTMan Oops, I made a little logic error (should be fixed now). Not sure about the crash though...

The crash might be caused by selecting on a file descriptor that's bigger than FD_SETSIZE. I'll have to switch to poll/epoll to avoid this issue.

Good job, the commit d56ce577943e6d0f70710892f1f861b49f592bbe fix problem with not working rumble.

But crash still here.
How reproduce:

  1. Pairing gamepad with xow
  2. Connect wired (here would disconnected wireless connection)
  3. Unplug wired (here expected reconnect wireless connection, but instead we have crash)

@NoXPhasma
Copy link
Contributor

I followed your list and it did not crash for me with model 1708.

@NTMan
Copy link
Author

NTMan commented Dec 27, 2019

I followed your list and it did not crash for me with model 1708.

Demonstration: https://youtu.be/6obtRp7PcLc

Of course, my model is the same.

@John-Gee
Copy link

No crash here following this list either.

@medusalix medusalix added this to the v0.3 milestone Dec 27, 2019
@medusalix
Copy link
Owner

@NTMan Please see if the newest commit fixes your issue.

@NTMan
Copy link
Author

NTMan commented Dec 27, 2019

@NTMan Please see if the newest commit fixes your issue.

yes, no crashes observed on commit 28a51c4e53e37d41d4e39ddc71dd909818963c60

The last problem that I am observed when plug wire on the fly it infinitely reiteration last action.

For example:

  1. Paring gamepad with xow.
  2. Tilt stick to any direction.
  3. Plug wire to the gamepad.

Demonstration: https://youtu.be/BpcJbzHW0UY

@medusalix
Copy link
Owner

medusalix commented Dec 27, 2019

@NTMan Are you running xpad on your machine? I assume it reconnects over USB once you plug it in and xpad doesn't reset its input on connection.


I have implemented support for trigger rumbling (similar to xpadneo). Please let me know if it works correctly (as I couldn't find a game that sets the ff_effect.direction property). I've limited the power of the trigger motors to 1/4 of the main motor power and that seems like a good setting.

@NoXPhasma
Copy link
Contributor

I'm not entirely sure, but I think Ori and the Blind Forest Definitive Edition makes use of ff_effect.direction. At least the rumble feels much stronger now with the latest commit, especially around the triggers, which now even make sound due to the rumble. And it would make sense, as it's a Microsoft Studio game and also was released first on XBOX One.

@medusalix
Copy link
Owner

I've merged the changes into master in 1d44947. Issue seems to be solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compatibility Compatibility with a certain system/device
Projects
None yet
Development

No branches or pull requests

7 participants