MissionControl icon indicating copy to clipboard operation
MissionControl copied to clipboard

[Bug Report]: DualSense player LEDs are incorrect

Open lunaneff opened this issue 2 years ago • 13 comments

Switch Firmware Version

14.1.1 (Latest)

Atmosphère Version

1.3.2 (Latest)

Mission Control Version

0.7.0 (Latest)

Boot Method

Hekate

Issue Description

My DualSense's player LEDs are incorrect when it's connected to my Switch:

Player 1: IMG_20220718_124424

Player 2: IMG_20220718_124449

Player 3: IMG_20220718_124530

Player 4: IMG_20220718_124619

It should light up 1/2/3/4 LEDs but instead it lights up 2/4/4/4

Error Report

No response

Additional Context

DS model: CFI-ZCT1W

lunaneff avatar Jul 18 '22 10:07 lunaneff

I only recently got myself a Dualsense controller and also noticed that they seemed incorrect (but I see a lot of weird behaviour during development so didn't think much of it since nobody had complained of it previously).

Do you know which controller firmware you have? Maybe the data format has changed slightly at some point.

@Hydr8gon do your LEDs still behave correctly? I remember discussing how the led patterns should work with you when you implemented support, so I assume they were working correctly at some point.

ndeadly avatar Jul 18 '22 11:07 ndeadly

Do you know which controller firmware you have?

I don't know where I can see that, but I updated it a few weeks ago when I got the controller, so unless there has been an update since then it's the latest version

lunaneff avatar Jul 18 '22 13:07 lunaneff

Ok, probably latest then, or at least a recent one. I'm not sure how you can check either. Thought maybe the PS5 might be able to tell you. There's probably a feature report for it like the DS4, but I don't have a convenient way to fetch that.

ndeadly avatar Jul 18 '22 13:07 ndeadly

I don't actually own a PS5, but I just checked the firmware updater and it says it's version 0297 and that it's up to date

lunaneff avatar Jul 18 '22 14:07 lunaneff

I just tested mine and it's still working fine. I haven't updated the controller since I got it, so I wouldn't be surprised if this is a firmware issue.

Hydr8gon avatar Jul 18 '22 23:07 Hydr8gon

Ok cool, leave it to me and I'll fix it for my controller firmware and work backwards from there if problems are still being reported on earlier firmwares.

ndeadly avatar Jul 19 '22 04:07 ndeadly

Just checked my controller and I'm on version 0282. I modified my code to cycle through the different player LED bitmasks from 0x00 -> 0x1F. Previously, each bit corresponded to which of the 5 LEDs to switch on. Now it looks like it cycles through a bunch of symmetrical presets. This is annoying, because now there aren't enough unique combinations to cover players 5-8.

0x00 -> 00000
0x01 -> 10001
0x02 -> 01010
0x03 -> 11011
0x04 -> 00100
0x05 -> 10101
0x06 -> 01110
0x07 -> 11111
0x08 -> 01010
0x09 -> 11011
0x0a -> 01010
0x0b -> 11011
0x0c -> 01110
0x0d -> 11111
0x0e -> 01110
0x0f -> 11111
0x10 -> 10001
0x11 -> 10001
0x12 -> 11011
0x13 -> 11011
0x14 -> 10101
0x15 -> 10101
0x16 -> 11111
0x17 -> 11111
0x18 -> 11011
0x19 -> 11011
0x1a -> 11011
0x1b -> 11011
0x1c -> 11111
0x1d -> 11111
0x1e -> 11111
0x1f -> 11111

ndeadly avatar Jul 20 '22 11:07 ndeadly

@laurinneff I have updated the code to check the firmware version and do the best we can to mimic the switch player LEDs with the available choices. @Hydr8gon could you also check this version to make sure it still works correctly for your controller too?

The only remaining question is whether to change the older firmwares to output the same limited LED patterns as this, or leave them the way they are...

MissionControl-0.7.0-dualsense-494539e.zip

ndeadly avatar Jul 20 '22 12:07 ndeadly

Sorry, I'm now on vacation and don't have my controller (or switch) with me. I can check when I'm back home on Monday, though.

Maybe merge when Hydr8gon confirms it still works for them, and then I can reopen if it's still broken on my firmware?

lunaneff avatar Jul 20 '22 14:07 lunaneff

@ndeadly the build you posted isn't working right for me. These are the results I'm getting: Player 1 - 00100 Player 2 - 01000 Player 3 - 10100 And so on. It looks like these correlate to indices for the new presets, so I assume the firmware check isn't working properly.

Hydr8gon avatar Jul 20 '22 16:07 Hydr8gon

@Hydr8gon yeah, you're right - off-by-one error. My bad! Try this one. MissionControl-0.7.0-dualsense-bcebf08.zip

Any thoughts on the LED patterns? Keep the old Switch-like pattern for firmwares that can support it, or use the same pattern for all versions for consistency?

ndeadly avatar Jul 21 '22 08:07 ndeadly

Nice, this one works. Regarding the patterns, I'm not really sure. On one hand, I think mimicking the Switch patterns is the better behavior, but on the other hand, the inconsistency might be confusing if someone updates their controller. I think I personally lean a bit more towards keeping the old patterns, mainly because I'm already used to them.

Hydr8gon avatar Jul 21 '22 15:07 Hydr8gon

Just checked, works for me too

lunaneff avatar Jul 25 '22 17:07 lunaneff

This is now merged into the latest release.

ndeadly avatar Oct 05 '22 22:10 ndeadly

I have the exact same issue but i am on 0.9.0

Player 1 - 00100 Player 2 - 01000 Player 3 - 10100

looking at the code the leds are determined by the firmware version. My controller reports on linux hw_version=0x00000313 fw_version=0x01040027 which is a way bigger than the check in in the source so i am not sure if this is the value needed

manujedi avatar Apr 14 '23 14:04 manujedi

Hmm, maybe they've changed the LED behaviour again. It seems to me that it's more likely that 0x313 is the firmware version based on the version numbers I've observed. Sony have a firmware updater for Dualsense available for Windows that will tell you the correct firmware version. I don't know whether there's a version for linux however.

I will try updating my controller and having a look at this over the weekend.

ndeadly avatar Apr 14 '23 14:04 ndeadly

Thanks for the fast reply. I don't have a windows/ps5 system available right now so i can't update. But i would guess that the last update was about 6 months ago.

manujedi avatar Apr 14 '23 14:04 manujedi

I just updated my controller, latest firmware version seems to be 0x356 so I would say 0x313 for yours is likely. Keep it on that firmware so that any updates I make can be tested on a version between the latest and 0x282 or whatever the latest one was when I implemented the changes last time.

ndeadly avatar Apr 14 '23 14:04 ndeadly

Everything is working normally on the latest controller firmware so I'm not sure what's up there. Can you show me the patterns your controller is showing? Might just be easier to update your controller when you get a chance, but if there is an actual issue with your firmware version you could potentally help me to add a fix

ndeadly avatar Apr 14 '23 16:04 ndeadly

photo_2023-04-14_20-13-44 photo_2023-04-14_20-13-49 photo_2023-04-14_20-13-56 photo_2023-04-14_20-13-59

There is no actual issue with my firmware, only the leds are wrong. I am not sure if it is worth fixing it when i simply could update the FW. But if you want i can provide additional info.

Edit: Also this application sets the leds correctly https://github.com/nowrep/dualsensectl

manujedi avatar Apr 14 '23 18:04 manujedi

I just wanted to report that if i use the player_led_flags (not the new one) my leds are correct.

manujedi avatar Apr 17 '23 13:04 manujedi

This info isn't all that useful without knowing which firmware version your controller has. Run this build, connect the controller and post the log it creates (sdmc:/mc-mitm.log)

MissionControl-0.9.0-debug-logging-1a589da.zip

ndeadly avatar Apr 17 '23 13:04 ndeadly

fw: 0x307

mc-mitm.log

manujedi avatar Apr 17 '23 15:04 manujedi