Announcement

Collapse
No announcement yet.

Some hardware configurations are prone to crashes when reWASD is running

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Some hardware configurations are prone to crashes when reWASD is running

    So, let's start with my (relevant) configuration.

    Alienware Aurora R10
    AMD Ryzen 9 5900
    B550A chipset
    Nvidia GeForce RTX (probably, irrelevant)
    Razer Huntsman V2 Analog
    Razer Tartarus Pro
    Microsoft Xbox Elite Wireless Controller Series 2

    Without reWASD running the system is rock solid stable. With reWASD running every now and then (15 minutes, half an hour, several hours) the whole USB subsystem would go offline, Windows (and reWASD) reports all devices disconnected, but all the rest is running smoothly (video, games, etc), just can't be controlled anymore. Sometimes USB recovers in 10-15 seconds with at least some devices recognized again (although, Windows might report finding unknown devices), sometimes it is not, so I have to reboot.

    The culprit here appears to be the aforementioned Razer devices, both employing analog optical switches and representing itself to Windows as both keyboard and Xbox controller. So reWASD is seeing three controllers. When Microsoft controller is removed (turned off) I still see the same destructive behavior, when both Razed devices are removed, everything works fine including Microsoft controller. Furthermore, when Razer devices are connected but their simulated controllers are put in the blocklist, everything seems to work fine too (or, at least, I didn't experience any problems in quite a few hours). But here is a caveat: every time I reboot reWASD recognizes those simulated controllers as brand-new devices, assigns to them new IDs, and, naturally, believes they are not in the blacklist. So now I see a whole bunch of such ghost controllers in the reWASD window. Thus, the suggestion #1:

    Just ignore the simulated Rizer controllers, there is no point remapping them anyway. Windows reports them as Razer Xbox 360 Controller, so they should be recognizable by reWASD as such. Or, if they couldn't be distinguished from the real Razer controller, at least make this configurable, put a "Ignore Razed Devices" checkbox somewhere.

    My second suggestion is (obviously) to fix the problem outright. I'm not sure, however, that can be achieved. But in case you want to try, here is the full story. The first time I encountered this problem when trying to play Cyberpunk 22077 with MS controller. (That's how I wasn't able to evaluate reWASD during the trial period). And after a lot of troubleshooting I found two things:
    1. USB subsystem crashes during the play even without reWASD (I uninstalled it), however, a bit less often.
    2. It crashes just es well when the game is not running but reWASD is installed, albeit even less often than in the first case.
    Further research (google) uncovered two other facts:
    1. Such problems started showing only after Cyberpunk 1.6 update.
    2. It seems they happed only on systems with AMD chipset.
    So, I guess both Cyberpunk and reWASD are injecting some code in the controller stack that, when combined with some other hardware (Razer analog devices) and/or software (Razer Synapse 3) causes errors in AMD implementation of USB. As I said, I (being a software engineer myself) understand it might be impossible to fix in reWASD, but I thought you might still be interested in my findings.

  • #2
    Thanks for the detailed description of the problem.
    If I understand correctly, at the beginning of the post you said that everything was fine without reWASD, but later mentioned that the USB system crashes even after removing reWASD. Right?
    Since from your words, this is due to many third-party factors (different device IDs when rebooting, the Cyberpung update, and AMD chipset), I cannot promise that we will be able to fix something on our part.
    But I will forward your case to the team.​

    Comment


    • #3
      Well, maybe I was too wordy, so the short story is, Razer controller simulating keyboards and reWAST don't mix well. So when any such simulated controller is present and recognized by reWASD things go south.

      As of the different IDs, the thing is reWAST believes any time it sees the same simulated controller, it believes it's a new device. All I see in its window, is multiple controllers of the same type (first number) and consecutive IDs (second number). I don't know, who assigns those IDs, maybe it's Razer Synapse, maybe it's Windows, maybe it's reWASD, but the net result is I can't permanently blocklist the simulated controller because reWASD thinks I every time am connecting a new one.

      So... Maybe reWASD indeed can't tell if that's a new device or a device it already identified once. But what it definitely can do is to ignore any devices of a certain kind. That's my first suggestion and it would solve my problem. (reWASD related, I mean. I would still have to use a different keyboard to play Cyberpunk but at least I won't have to do that playing any other game with a real controller remapped by reWASD.) And that, I believe, should be relatively easy to implement.

      Comment


      • #4
        I got it. Essentially, the query comes down to one thing - make it possible to add an option like "hide all Razer devices"?
        I can't promise anything as it's most likely not a reWASD issue directly, but we'll see what can be done.

        Thanks for the suggestion.​

        Comment


        • #5
          If you say the whole USB subsystem goes offline it cannot be caused by reWASD because it should not affect USB even on driver level - we monitor USB HID devices only. Same is also with Steam filter driver (steamxbox.sys) if you have enabled "Xbox Extended Feature Support " option there. Mostly likely there is some bug in Razer drivers then (especially if it happens even with reWASD uninstalled too). Such thing cannot be fixed from our side, unless you disable their drivers in Device Manager - I would try to do this in the first place so their virtual devices would not be created at all and hiding them in GUI would not be needed too.
          What concerns device Ids we build them depending on device location in system (unless device itself is capable to report its unique Id by design). Looks like Razer devices are created "brand-new" each time, so this is another problem with Razer drivers, because normally, when you connect device to same USB port, Windows uses already installed driver and all Ids should not change.

          Comment


          • #6
            Well, that's why I said you probably won't be able to fix it, too many other software/hardware components are involved and it's likely not reWASD's fault. But what you CAN do, is to ignore those simulated controllers. I just double checked, Windows 11 reports (on my test configuration) the following controllers (Sut up USB game controllers):
            • ​Razer Huntsman V2 Analog keyboard as both
              • Joystick (Razer Huntsman V2 Analog) and
              • Controller (Razer Xbox 360 controller)
            • Razer Tartarus Pro keypad as both
              • Joystick (Razer Tartarus Pro) and
              • Controller (Razer Xbox 360 controller)
            • Razer Sabertooth Elite controller as
              • Controller (Razer Sabertooth Elite)
            Out of those reWASD sees:
            • Keyboard's controller as
              • VID:PID: 046D:0000
            • Keypad's controller as
              • VID:PID: 046D:0000
            • Real controller as
              • VID:PID: 24C6:5D04
            So, you should definitely be able to distinguish those simulated controllers and ignore them just the same as you ignore simulated joysticks. That won't limit reWASD functionality in any way, nobody's going to remap keys mapped to left joystick in Synapse back to keys in reWASD.

            As of disabling Razer drivers, it isn't really a good solution. Razer software is (in)famously buggy but it still serves its purpose. Without it, there is no reason whatsoever to buy Razer hardware. And in most cases, it works just fine (Cyberpunk was the first time I ever had any serious problems with it). It would be a PITA to constantly install/uninstall it (or invent some ways to temporary block parts of it). Besides, some games are better played with both KBM (for fighting) and controller (for driving). In such cases it would be beneficial to have both Synapse (for keypad) and reWASD (for Xbox Elite). Also, I tried to uninstall Synapse so I guess that had to remove Razer drivers (honestly, I didn't check, and now it's installed again so I can't verify). But Windows was still showing my keyboard (that stores profiles) as a controller -- but not the keypad (that has no internal profile support). What means, at least some support for controller simulation is in hardware and incompatibilities might be present there, not just in software. Thus, I still believe the best solution would be to completely isolate Synapse and reWASD so they could coexist peacefully.

            Thank you in advance.

            P.S. Is there a way to completely remove all those ghost devices from reWASD? I mean, not blocklist them, not "hide until reconnect," but completely remove from the list.

            Comment


            • #7
              Above, you were given the answer of a person who is very familiar with the reWASD driver and application code. If the solution you suggested was easy to implement, we would consider it.
              More precisely, I do not discard this option if the development department deems it appropriate and feasible.

              But so far, everything indicates a problem with your devices and their drivers. Many of our users use Razer devices, but we have not received such requests.

              Regarding your question about removing "ghost devices".
              Open → General and click on Clear data. Confirm the action and wait for the GUI to restart.
              Or go to C:\ProgramData\Disc-Soft\reWASD and delete GamepadCollection.json
              Then restart reWASD completely.​

              Comment


              • #8
                Thank you.

                Comment


                • #9
                  I guess hiding these virtual 360 devices helps a bit because reWASD tries to send rumble to them and this causes some problem with Razer drivers.
                  Anyway, even when you hide them in GUI you still have a bigger problem - many games may be confused by lot of "unneeded" 360 controllers in system and may not pick up virtual controller properly. So by hiding them in GUI you do not fix the problem generally, but only hide it. So, I reiterate, your best bet is to hide them on system level.
                  And by disabling Razer driver i did not mean Synapse in general - just Xbox 360 device! Look where it is created in device manager and specify "Disable". Razer Synapse should be running and we understand it is needed for proper work of Razer devices.

                  Comment


                  • #10
                    Well, so far, the only game I encountered problem with is Cyberpunk. I many other games I did use those simulated controllers (usually, in the game pad) to covert WASD keys into left joystick for variable walking/running speed and I'm not inclined to give up that. After all, that's the main feature of Razer analog devices, combining of smooth (pseudo) joystick movement and precise mouse aiming. But I will experiment with disabling controllers as you suggested (I take it, rescanning hardware would restore them). If it works, it might be a much easier solution than physically unplugging both my keyboard and keypad and plugging in a different keyboard. Actually, I even might be able to use the keypad with Cyberpunk, that would be perfect. Thank you.

                    As of hiding virtual controllers in reWASD. I'm not sure what you mean by "hiding them in GUI." Anyway, what I mean, is not just they're not seen in any view, but that reWASD ignores them completely, treats them as unsupported devices when it scans the system for supported hardware, so it would never ever do anything with them.

                    Oh, And one more small suggestion. That "Clear data" action 1ncorrect suggested worked fine but that's obviously not the ideal solution. too nuclear, I would say. It would be nice to have an option in the main reWAST view to "Forget this device." Should be easy to implement.

                    In any case, thank you for your time and paying attention to customers' problems. It's rare these days.

                    Comment


                    • #11
                      It DID work! So, now I can play Cyberpunk with both my Razer keypad AND reWASD remapped Xbox Elite. DevX, thank you very much. (Kinda embarrassing, I didn't think about this solution myself.)

                      Comment


                      • #12
                        Great! By 'hiding them in GUI' i meant the 'Hide' option for Razer 360 devices you suggested us to implement in your first post. All this would do is only prevent reWASD displaying them to user. But still, other games and Windows itself could see them and send some commands (and potentially make your system unstable as you noticed). But by disabling them in Device Manager you solved the problem globally right from the start.
                        EDIT:
                        Well, i have reread you post and understood that you meant Hide physical device option, not Ignore them in GUI. Sorry for confusion.
                        But still, this would require to apply special Hide profile to each Razer 360 controller automatically and it would not happen immediately after connection.
                        So your current solution is better anyway.

                        Comment


                        • #13
                          Sure, disabling those controllers does work -- in terms of preventing a total disaster -- but it's hardly a perfect solution. Simply because I DO use them (well, the one of the Tartarus keypad, mostly) in many games. That's pretty much why I bought this keypad rather than the cheaper non-pro version. They're causing problems with just a single game, Cyberpunk, and only starting with the version 1.6. I will sure be disabling them when playing that game, but I need them enabled playing many other games.

                          Apparently, what happened with Cyberpunk 1.6, the devs implemented some advanced processing of controller input injecting some code into controller stack. And that somehow interferes with the normal operation. It may or may not be CD Projekt's fault. It may be not entirely correct behavior of Razer software or firmware. Or it may be faulty USB implementation in AMD chipset. But it happens. So, for this particular case, while playing Cyberpunk I have no other choice but disabling Razer's 'embedded' controllers. But in all other cases I want tu use them.

                          Not, back to reWASD. It seems it is doing something similar to what Cyberpunk is doing. Injecting code to the controller stack. Causing the same (although, admittedly, not as severe) problems. Still, that means I can't use reWASD for remapping my Xbox Elite paddles and buttons to play (other than Cyberpunk) games where I want to use both a real controller (for driving, flying, running etc) AND keypad (for shooting and other precise operations) in analog mode (for precise moving). What essentially means I need reWASD running and processing real Xbox Elite input but NOT processing Razer simulated controller input. And that IS possible. I tried to add those simulated controllers to the blocklist -- and everything worked fine. And I want to underscore that, USB subsystem crashed when Razer simulated controllers were considered 'remappable' buy reWASD -- even though no actual remapping was defined -- but it didn't crash when they were put in the blocklist. So, apparently blocklisting doesn't just hide the in GUI, it prevents injecting the code into their processing stacks. And that solves the problem.

                          BUT, as I already said, unfortunately, every time I reboot those controllers escape from blacklist because, for some reason, reWASD sees them as new devices. And it's really inconvenient to clear reWASD data and blocklist devices ever time, again and again.

                          Now, one other thing I see is that Raser actually creates two extra devices per analog keyboard, virtual controller and virtual joystick. And the presence of that virtual joystick causes no problems whatsoever. Why? Apparently, because neither Cyberpunk, nor reWASD care about it. Cyberpunk doesn't support joysticks and looks for controllers only as targets for injecting the input processing code. Similarly, reWASD doesn't see those joysticks as supported devices, doesn't show them in GUI, and -- the most important -- doesn't mess with their processing stacks. But it DOES believe Razer virtual controllers are supported and tries to giver the user opportunity to remap them. But it obviously shouldn't -- because, no matter whose fault it is, that doesn't work. (And really, it would be completely pointless to support them.) So, I repeat my proposal:

                          When scanning the system for the supported devices reWASD should treat virtual controllers of analog Razer keyboards (VID:PID: 046D:0000) as UNSUPPORTED and just SKIP them. Not hide, not blocklist, ignore them completely.

                          That certainly won't solve problems caused by other programs (e.g. Cyberpunk), that's up to the developers of those programs. But it would solve problems caused by reWASD while running it alongside games that do support those virtual controllers properly (i.e. pretty much any other modern game).

                          Thank you.

                          Comment


                          • #14
                            Do you know that 046D actually belongs to Logitech, not Razer? So it seems Razer drivers are not only buggy but were created from some Logitech templates (maybe licensed)?
                            So it is not easy to ignore all devices just by VID:PID.
                            Of course we can do what you ask, but we'll need to investigate this issue more, as we don't want to break Logitech devices as well.

                            >Not, back to reWASD. It seems it is doing something similar to what Cyberpunk is doing. Injecting code to the controller stack.

                            I doubt they inject something, because it would require driver. And please reread what I wrote before:

                            >hiding these virtual 360 devices helps a bit because reWASD tries to send rumble to them and this causes some problem with Razer drivers.​

                            Most likely Cyberpunk also sends some rumble patterns which drive Razer crazy.
                            By ignoring device in reWASD GUI you just prevent rumble being sent to it when device is in focus - that's the only difference.

                            Comment


                            • #15
                              >Do you know that 046D actually belongs to Logitech, not Razer?

                              Huh? That's funny. But quite possible they licensed Logi's code indeed.

                              >Of course we can do what you ask, but we'll need to investigate this issue more. Thank you. And sure, I wouldn't want you to rush it. Just my two cents, Windows (11, at least) does report them as Razer devices, so there should be a way to distinguish them from the genuine Logi devices.

                              >I doubt they inject something, because it would require driver.

                              Well, maybe they made it. Otherwise, it's hard to explain, how they managed to whack the whole USB thing, all the devices. As for the rumble theory, I doubt it. You see, you do send rumble to a device when I click it in the reWASD window. And I did that (clicking) for those virtual controllers but that caused no ill effects. The troubles are starting pretty much randomly. In particular, in Cyberpunk I was losing control when gust walking (with Xbox Elite or keyboard), no rumbling on the controller and no reason for rumbling. With reWASD, I was just doing some routine stuff, like browsing the internet -- and suddenly mouse, keyboard got disconnected for several seconds (happened a few times). Never happened without reWASD running and never happened after I disabled virtual controllers. So, it must be something different than simply rumbling bug. Oh, and they (virtual controllers) do work with a bunch of other games that surely send rumbling. It looks like something quite low-level.

                              Comment

                              Working...
                              X