-
Notifications
You must be signed in to change notification settings - Fork 2
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
Trigger doesn't always output analog value #21
Comments
How can I repro this? I got as far as running Screencast_20240916_145933.webmNote that due to #13 (comment) I am using Evdev instead of HIDRAW which is completely broken for me. |
Sometimes Wine doesn't detect SC-Controller's output as an XInput device and only shows the output directly from the device itself, In that case you can check the DInput tab to see the axes values for each device, make sure to select "Controller (XBOX 360 For Windows)" from the list in the Input tab: |
I only have that option, are you connecting two controllers? I am trying this on wine-staging 9.10. |
No, Just a single DS4 with Bluetooth, But it's not a DS4 related issue as I first encountered the problem when I was trying to remap my EdgeTX Radio Controller using SC-Controller. |
Aha, I presume you can't repro this over USB? It's broken in BT and works over USB for me with DS4. |
Interesting! I just tried DS4 over USB and triggers output correct analog values in USB mode, However my EdgeTX Radio controller which is a USB only device has the same problem as DS4 in Bluetooth mode and can't output analog values for trigger axes. |
Looks messed up and my right controller trigger does not even register at all over BT in the first place. Annoyingly, the controller takes some time to kick in until this appears and it starts working:
What's your PS4 VID/PID from lsusb?
What's your kernel version? |
Sometimes Both the Right and the Left triggers values are shown in Z axes for some reason and the Rz axes is not showing any value at all, but for me both triggers still work, it just seems like the Z axes shows the sum of the both trigger values, but other times Z shows the left trigger and Rz the right trigger.
Mine is:
I'm on ArchLinux and my kernel is But I don't think it's related to the controller or a specific kernel, since I can reproduce the bug with other controllers as well. |
The problem seems to be that whatever syspath sc-controller gets is mangled, i.e. The fact that majority of the codebase isn't typed and I have to dig through things every time I try to find how something works isn't helping. EDIT: Aha, sys bus hid devices actually has the correct link |
Yeah soo, that's ANOTHER issue.
This indeed gets it to detect my controller properly and I am at a loss where the damn syspath comes from, looks like it might be the libinput C binding but it's really a bit beyond me. Now that it's detected properly with the hack, triggers get detected but they're as broken as described in your OP. Do you have no issues with the PS4 BT sc driver picking your controller up? All connects and you see the PS icons while not having to define the controller as a custom device? Could you post dmesg from controller connect if so? I always have it fail like this without the brutal hack:
Because |
In general I don't have any problems using it over BT, Steam detects it correctly and even when I'm not using Steam Input, for example running games in Bottles with Wine all the games detect the controller and I don't have any issues, But for SC-Controller, I had to add it in the Controllers Tab > Register New Controller, the same is true about my EdgeTX Radio Controller, but when connecting the DS4 over USB, SC-Controller detects it automatically with correct labels.
Sure, Here is my dmesg right after I connect the DS4 over Bluetooth:
|
Ah, I thought it worked for you for some reason, when #22 gets fixed (somehow), it'll show up proper. |
It's not possible to emulate Analog trigger values.
As you can see in the Wine Control Panel screenshot bellow, User 0 is the emulated device by SC Controller and the User 1 is the direct output of the DS4 Controller before going through SC Controller processing:
Here is the output of the emulated device in EVTEST to confirm the issue is not related to Wine:
After further investigation, I found that changing the Analog Output Range Start and End to 128 and 129 resolves the problem, so it seems like the default range of 0 to 255 is causing the problem for some reason.
As a workaround, it is possible to set:
axis(Axes.ABS_Z, 128, 129)
for the Left Trigger Actionand
axis(Axes.ABS_RZ, 128, 129)
for the Right Trigger Actionuntil the bug is fixed.
The text was updated successfully, but these errors were encountered: