-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Virpil controller support #6839
Comments
Hello @cyb3rd4d, the workaround you've shared is a pretty strong hint that your issue is with libSDL not knowing about your controller, not Proton. Bypassing libSDL is not a practical option to improve support for your device. Instead, take a look at how your controller interacts with SDL's test utilities and maybe a native Linux game that uses SDL for controller input, see how it behaves, and file an upstream issue report with libSDL with your findings. |
Hello @kisak-valve, thank you for your reply! I just installed the packages I also forgot to mention that my joystick works out of the box on Windows in Elite Dangerous. |
Do you guys have VID/PIDs of the Virpil controller so I could add it to my PR ValveSoftware/wine#197? |
Thank you @kakra, I found 3344:412f
|
To make it work, try the following steps (replace
Ensure that you have deployed udev rules for your controller. You should find a file in
(if not, create Now start the game: Your Virpil should now be properly detected. If this works, I'll add your controller to my list of patches. |
Do you have just one stick and this is the right grip? Or is it a compound device having both throttle and joystick combined into a single USB device? |
It's not a compound device, just a base (MongoosT-50CM2) and a grip (Constellation ALPHA-R).
Can you wait until Saturday or Sunday? I don't have a lot of free time during the week. |
OK I followed your procedure, I just uninstall the game and reinstalled it before just to make sure to have a clean environment. The Proton version I used is 8.0-3. The udev rule did not exist so I created the file and I rebooted before launching the game, my Virpil was detected with all its buttons and axes! THANK YOU SO MUCH!!! But isn't it too restrictive to target my product ID to determine if it's a Virpil controller? Shouldn't we only target the vendor ID? |
Yeah it is restrictive but OTOH, what if Virpil made other type of devices, too, which should not be handled in that way? It probably needs a more generic approach, like looking at the HID descriptor itself and identifying some common traits of the controller, i.e., my VKB has 128 buttons in the descriptor. So if it would be the VKB VID with 128 buttons, we could say it's a joystick. This may be oversimplified but I think one gets the idea. For the moment, it would be useful to also know the PID if the left grip. Any chance you could get that from somewhere, maybe a friend? |
Ok I understand. It’s still a great improvement for the Linux gamers!
Le sam. 2 sept. 2023 à 14:13, Kai Krakow ***@***.***(mailto:Le sam. 2 sept. 2023 à 14:13, Kai Krakow <<a href=)> a écrit :
…> But isn't it too restrictive to target my product ID to determine if it's a Virpil controller? Shouldn't we only target the vendor ID?
Yeah it is restrictive but OTOH, what if Virpil makes other type of devices, too, which should not be handled in that way? It probably needs a more generic approach, like looking at the HID descriptor itself and identifying some common traits of the controller, i.e., my VKB has 128 buttons in the descriptor. So if it would be the VKB VID with 128 buttons, we could say it's a joystick. This may be oversimplified but I think one gets the idea.
—
Reply to this email directly, [view it on GitHub](#6839 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AACJOGWKORCLWG7D6U25PFTXYMPIFANCNFSM6AAAAAAZBTMJV4).
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I just received my Constellation Alpha-R and a WarBRD-D Base from Virpil and was following the instuctions here. Creating a udev rule and adding the PROTON_ENABLE_HIDRAW environment variable did the trick, my joystick works perfectly fine with proton 8 in DCS World (haven't tried other games yet). Thank you very much for this info :) Playing around with the virpil software, i noticed something: the device got a new product ID several times. This 32 button split option says that this could help if a game doesn't understand input devices with more than 32 buttons. I'm not sure what it is supposed to do tho. Sounds like it would split the device into several virtual 32 button devices maybe? The Vendor ID stays the same tho (3344). Anyways... since my device did change the PID i doubt that checking the PID is a good option (maybe cyb3rd4d can confirm this change of the product ID if you play around in the virpil software?). I only have this Virpil device but i doubt that Virpil has any devices that should act like an xbox controller. But i also don't know if it would be a good idea to simply enable HIDRAW on all devices with VID 3344. |
See here: ValveSoftware/wine#197 What the split does is creating a compound device of four individual input devices. Linux still sees it as a single device because the kernel doesn't implement compound devices for generic HID drivers but because Proton wine handles the raw HID devices, it should properly pass through to the game which see four joysticks then each with 32 buttons.
I'm not sure where the problem comes from. I think it's SDL which forces wine into making it an XInput device which in turn makes games see it as an Xbox controller. How many buttons does Virpil create? |
It comes with 6 axis and 31 buttons and this is also what is setup in the default profile and also what windows sees. The software allowes to set up 6 more axis and up to 128 buttons in total. If you configure some of those extra buttons, the "Game Controller Settings" of windows shows only one buttons more (then 32, i guess this is just a limitation of that UI tho) but the virpil tester thing sees all extra buttons that are configured. |
Do both show devices show 31 buttons? This makes it a bit difficult to make it generic. I've changed VKB detection now to detect 128 buttons and the VID, and fall back to PID if there are not 128 buttons. But for Virpil? Should we go with 31 buttons? Or 128? |
Yes, with the default profile it shows 31 buttons in both, the virpil tester and the windows controller settings. The actual name of the device can also be changed in the software. Funny thing is: even the VID and PID can be customized in the software (still don't understand why it randomly changes the PID even if i don't touch that field). I doubt that anyone would ever change that but theoretically, not even the vendor ID is a constant thing with this device. I actually do think that checking only for VID 3344 is probably the most "plug and play" way for virpil stuff. I still think that other virpil devices should be tested first. I unfortunately don't know anyone with virpil stuff tho. |
This is useful to detect some devices which do not have a well-known PID set. Link: ValveSoftware/Proton#6839 (comment)
I've changed the logic: ValveSoftware/wine@d4112ed For the udev rules, it should be fine to just compare the VID. |
I tried to enable the "split by 32 buttons" option but that did not change the PID. Changing some other things in the customization tool neither. I'm on the latest firmware version so I could not try to update it. |
This adds generic hidraw support for Thrustmaster because at least T16000m throttle and joystick also need hidraw access. Also it add Virpil and VKB as mentioned here: - ValveSoftware/wine#197 - ValveSoftware/Proton#6839
This is useful to detect some devices which do not have a well-known PID set. Link: ValveSoftware/Proton#6839 (comment)
I think for Elite Dangerous to see the virtual devices, they really need to appear as a different PIDs. So that may be why you can change the PID. I think VKB has a similar thing. If VID/PID is identical, Elite Dangerous sees just one device. People who buy two identical joysticks for twin-stick see the same problem: ED sees just one joystick, and you need to get external tools which can create virtual joysticks. |
This is useful to detect some devices which do not have a well-known PID set. Link: ValveSoftware/Proton#6839 (comment)
@ArsenCross I submitted a series of patches to better support your controllers out-of-the-box. See ValveSoftware/wine#240. |
That's actually a relatively recent change with Elite. Elite is actually the reason my throttle is configured to be a compound device right now so unless they removed functionality when they added support for direct input devices with more than 32 buttons I find it unlikely Elite is the cause. As I was writing this I went on a ramble that caused me to do some further testing and MWO which I've also used the devices in is not seeing the compound devices second set of buttons either. The same was true for the official VPC Tester software when I was trying it last night after I had made my post. I think my solution is going to be to reflash the firmware on the throttle into a single device however I'm roadblocked by the inability to pass through the device through to Wine or my Windows VM. That however is not a problem for this thread. Edit: Didn't see this...
That's amazing and you're awesome @kakra. Edit2: A side note, the compound device's second half tested I mentioned - MWO of course was launched and tested through steam (with the same launch options as Elite) but the VPC Tester software was installed to my machine with Wine and tested without the aid of steam compatibility programming. If that tells you anything useful. |
Some games support a maximum of 32, 50 or 64 buttons specifically, thus we're seeing HOTAS configurations out there which are adjusted to show exactly that amount of buttons. Let's add it as a heuristic for Virpil game controllers. Link: ValveSoftware/Proton#6839 (comment)
@ArsenCross The changes have been merged to bleeding edge Proton, so you can try it out in a few hours by switching your Proton beta choice to bleeding edge. |
Some games support a maximum of 32, 50 or 64 buttons specifically, thus we're seeing HOTAS configurations out there which are adjusted to show exactly that amount of buttons. Let's add it as a heuristic for Virpil game controllers. Link: ValveSoftware/Proton#6839 (comment)
3344:40d4 VPC Constellation ALPHA Prime [R] |
How many buttons does it have according to |
32 buttons
|
Then it should be automatically be detected by ValveSoftware/wine@991ad98. |
When flashing a Virpil device with new firmware, it by default changes the PID to a random value. For example my right CM2 stick is VID:3344 and PID:4138. It wouldn't be caught by the patch because I have it configured as 60 buttons. |
That's correct. I wonder if we can hint something via a udev tag @rbernon? OTOH, @RavenX8 can't you just configure 128 buttons without assigning anything above 60? Or 64 buttons at least... |
@kakra From what I can tell, to set it to 128 buttons, you would actually have to assign all 128 logical buttons to a physical button on the stick before the flashing process would actually report them. Honestly setting up just an extra 30 buttons was a pita since you have to set them manually, I can't imagine doing 96 extra after updating the FW. (the firmware update tool does have the ability to export your button config but I have had trouble using it in the past so I usually just reconfigure my buttons every time I update the FW) |
So this is different from VKB where I set the amount of buttons reported by HID, and then can assign physical buttons to the slots or leave them empty? VKB would report 128 buttons, but would I would only assign part of it. |
Sorry I'm so late chiming in. Was awhile before I could touch games again. I'm running the game in Proton Experimental and my Constellation L & R sticks are both detected in the game, bindable and flyable. This was tested with a fresh installation of Elite to ensure the file tampering was reversed. Thank you for the fix. I do still have 03EB2055 failing to detect by Elite (The other side of the compound device being 03EB2065) which is one of the two compound devices for the CM2 throttle unit in the compound device configuration. I think this ID being included should take care of the throttle in compound device configuration. I've had some other issues with bindings being lost by Elite after several restarts of the game but I'm not sure if it was a device disconnect or a problem with the game itself retaining the files. I've done no actual analysis as to why this happened yet but it did result in my initial rebinding process being wiped. I'll chime in if I have any worthwhile input on it. |
Never ever touch the bindings in game if not all devices that are part of the custom bindings are connected. Otherwise it will wipe the missing devices away. You can copy the
Okay, I can suggest another change. Can you |
Yes, yes I can: Also yeah, I do have several binding files and I copy from backup as needed. I even have a no-stick binding for what I consider to be "standardized" controls for KB/M bringing it more in line with what you'd expect if you came form a background of growing up on space games, shooters and the like. Part of my last response was the result of testing performed with the bindings profiles and matching the entries on a freshly populated "BindingLoadingErrors.log" which let me confirm in writing that Elite wasn't able to detect that device. |
Then the easiest solution would be to set a well-known PID if that is possible. |
Some games support a maximum of 32, 50 or 64 buttons specifically, thus we're seeing HOTAS configurations out there which are adjusted to show exactly that amount of buttons. Let's add it as a heuristic for Virpil game controllers. Link: ValveSoftware/Proton#6839 (comment)
unfortunately, PID is user modifiable on these things, and in many cases, must be modified. VID is user-modifiable too. PID is modified because the factory PID for left/right sticks would be identical (the bases are agnostic, where the brains are), causing issues in some games. Same for identical control panels. VID should not change though, and all virpil devices should report as a generic HID. in theory, if the VID of virpil is seen (which should always be the same (3344) but technically a user could change this, albeit there is no real reason AFAIK to do so other than 'make funny number'.) at 3344, treating it as a 128 button capable device should work the same for all virpil hardware. They do have a mode to split to 32 button block segments for legacy support, but they should still report as VID 3344. part of the issue is how customizable they are. its all user defined by rewriting the firmware EEPROM. you can change the name, VID(you shouldnt do this), PID, and even number of axis/buttons by creating virtual ones in firmware, so at say, 10% of a throttle axis it presses a keystroke to do fingerlifts in a DCS jet. or inverse, doing virtual axis from a rotary encoder. different revisions of the boards will have different outputs, and different users will have different preferences. the only constant is they are all generic up-to-128 button, up-to-8 axis devices. They SHOULD be on VID 3344, but technically, a user can change that too, though no good reason exists to do so, AFAIK. |
This is useful to detect some devices which do not have a well-known PID set. Link: ValveSoftware/Proton#6839 (comment) Link: ValveSoftware/wine#197
Some games support a maximum of 32, 50 or 64 buttons specifically, thus we're seeing HOTAS configurations out there which are adjusted to show exactly that amount of buttons. Let's add it as a heuristic for Virpil game controllers. Link: ValveSoftware/Proton#6839 (comment)
Hello dear Proton community
I recently bought a Virpil controller (a Constellation Alpha) and it was recognized as a game pad by my Steam games (Elite Dangerous and Star Wars Squadrons). I tried a lot of different versions of Proton with those games, official, experimental and also from GE.
I was pretty sure that was a Proton (or at least a Steam) issue, and not a Wine issue, because my controller works in Star Citizen that I run through Lutris. I only had to open the wine control panel for my game, run the game controllers settings and move my controller from the
xinput
section to the "connected" one (the first section of the window settings).But for my Steam games, I tried a lot of things I found on wine forums, Reddit etc... mainly tweeking regedit keys with no luck, until I found this post: https://www.reddit.com/user/xatrekak/comments/12hnz0d/fixing_vkb_and_virpil_hotas_running_on_linux/ which fixed my issue.
Here is the content of the post:
I didn't had to run the game through Lutris though. After applying the regedit changes, my controller axes and buttons became available in the Elite Dangerous settings.
I really hope this feedback will be useful to improve the Proton support of Virpil controllers.
The text was updated successfully, but these errors were encountered: