@ECHO off :: Script by /u/dark_skeleton updated on March 26th, 2021 :: Hey! Thanks for reading. /u/dark_skeleton here, if you notice any bugs contact me on reddit! :: This script will attempt to fix: :: - Broken THX audio. :: - No THX audio output. :: - Muffled THX sound. :: - Extremely bassy THX sound. :: - Greyed out app list in Synapse Mixer tab. :: - Synapse not actually toggling Stereo/Surround on Mixer tab :: - High CPU usage by Windows Audio Device Graph Isolation (as a side-effect lol, might be faster to just kill the task sometimes). :: Please note that this script is not omnipotent and you might have to execute it any time you realize THX breaks :: since Synapse is still buggy and that's probably not going away anytime soon. :: Supported headsets :: - Nari Essential, Nari Wireless, Nari Ultimate :: - Kraken TE, Kraken Ultimate :: - Razer 7.1 Surround standalone app :: Changelog: :: v1.2 - I literally don't remember :: v1.3 - Sped up execution by removing a bunch of delays and skipping restarting Razer Central and other stuff that wasn't affecting audio :: v1.4 - Had to bring back restarting Windows Audio service, as some people (incl. myself) reported mixed results every now and then. Sadly this means all audio will stop for a second and some games might crash :: v1.5 - Added standalone 7.1 Surround app support SC QUERY THXService > NUL IF NOT ERRORLEVEL 0 GOTO SOPHIE :SYNAPSE3 :: Synapse-based THX stuff ECHO Now stopping Synapse services... NET STOP THXService /Y > NUL NET STOP "Razer Synapse Service" /Y > NUL TASKKILL /F /IM "Razer Synapse*" 2> NUL TASKKILL /F /IM THXHelper* 2> NUL :: 051A is THX for Nari Ultimate :: 051C is THX for Nari :: 0520 is THX for Kraken TE :: 0527 is THX for Kraken Ultimate :: 22AD seems common for all headsets except standalone version of the THX Surround app :: For standalone we need to kill RZSurroundHelper.exe, RzSndSrv service, and rzappengine.exe :: If you have a headset that's not listed above, please contact me on reddit! I will need your help to add it so please be prepared to answer some questions TIMEOUT 5 ECHO Now starting Synapse services back up... FOR %%d IN ( 051A 051C 0520 0527 ) DO ( IF EXIST "C:\Program Files (x86)\Razer\APO%%dDrv\Drivers\x64\THXHelper%%d.exe" ( START "" "C:\Program Files (x86)\Razer\APO%%dDrv\Drivers\x64\THXHelper%%d.exe" > NUL ) ) IF EXIST "C:\Program Files (x86)\Razer\THXVAD\Drivers\x64\THXHelper22AD.exe" ( START "" "C:\Program Files (x86)\Razer\THXVAD\Drivers\x64\THXHelper22AD.exe" > NUL ) NET START THXService /Y > NUL :: Synapse likes not starting up within required time window so just ignore all messages altogether NET START "Razer Synapse Service" 1> NUL 2>&1 START "" "C:\Program Files (x86)\Razer\Synapse3\WPFUI\Framework\Razer Synapse 3 Host\Razer Synapse 3.exe" > NUL :SOPHIE :: Standalone THX stuff SC QUERY RzSndSrv > NUL IF NOT ERRORLEVEL 0 GOTO ALL ECHO Now stopping 7.1 Surround services... TASKKILL /F /IM rzappengine.exe* 2> NUL TASKKILL /F /IM RZSurroundHelper.exe* 2> NUL NET STOP RzSndSrv /Y > NUL ECHO Now starting 7.1 Surround services back up... IF EXIST "C:\Windows\System32\RZSurroundHelper.exe" START "" "C:\Windows\System32\RZSurroundHelper.exe" > NUL NET START RzSndSrv /Y > NUL IF EXIST "C:\Program Files\Razer\RzAppEngine\rzappengine.exe" START "" "C:\Program Files\Razer\RzAppEngine\rzappengine.exe" > NUL :ALL ECHO Almost there... Any sound being played will now stop and you'll need to start playback again! This may crash certain games! NET STOP Audiosrv /Y > NUL timeout 3 NET START Audiosrv /Y > NUL ECHO All done - just wait for Synapse to fully restart now. This window will disappear in 3 seconds! TIMEOUT 3 :: Run one last thing, sometimes CPU usage spikes here TASKKILL /F /IM audiodg.exe 2> NUL