ChrisTitusTech / winutil

Chris Titus Tech's Windows Utility - Install Programs, Tweaks, Fixes, and Updates
MIT License
23.98k stars 1.46k forks source link

Disable Razer Game Manager Service For Those Who Have Razer Products #222

Closed natsudragneelthefiredragon closed 8 months ago

natsudragneelthefiredragon commented 2 years ago

Is your feature request related to a problem? Please describe. Razer makes Mice and Keyboards, I in recent months have gotten a Razer Deathadder V2 Special Edition, the mouse feels nice but Synapse 3 which is required for the mouse to have full functionality, including being able to have any color other than rainbow RGB requires that Razer Game Manager is running in the background as well (Honestly it shouldn't even need Synapse as older Razer mice apparently never needed it to save profiles on the mice but now they require it probably to push analytics)

Describe the solution you'd like There's this guide I follow that has you edit the registry to stop Razer Game Manager being a requirement for Synapse to run at all, normally once you disable Razer Game Manager it puts your mouse back into rainbow RGB mode, this guide shows how to stop it being a requirement: https://www.reddit.com/r/razer/comments/kpp3hu/ysk_how_to_disable_razer_game_manager_service_as/

Other issues do crop up though, it fails to update itself as I think it sets the registry back to requiring Razer Game Manager, and I'm not sure if the registry key (or whatever you call it) exists 100% of the time (I couldn't find it once until later, I guess the program had to add it first or something), this means you have to repeat the process for editing the registry again every time it wants to update which is a pain, I suppose Razer checks file integrity or something to make sure the registry is as they like, but that is my guess

Some automation in doing that registry edit would be appreciated for sure

tamckenna commented 2 years ago

Yeah noticed that anytime Razer updates it seems to reenable it's previous settings. Here are my powershell notes plus added your want for Synapse service to startup still. I just set them all to manual usually.

# Get List of Razer Services before changes
Get-Service -ErrorAction SilentlyContinue | Where-Object {$_.DisplayName.ToLower() -like "*razer*"} -ErrorAction SilentlyContinue | Format-Table -AutoSize -Property ServiceName,DisplayName,StartupType,Status,ServicesDependedOn

# Get Razer Services
$razerServices=Get-Service -ErrorAction SilentlyContinue | Where-Object {$_.DisplayName.ToLower() -like "*razer*"} -ErrorAction SilentlyContinue
$razerServiceNames = [System.Collections.ArrayList]::new()
foreach($razerService in $razerServices){ $razerServiceNames.Add($razerService.ServiceName) > $null }

# Remove Razer Synapse Service Dependencies
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Razer Synapse Service" -Name DependOnService -Value @()

# # Revert back Razer Synapse Service Dependencies
# Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Razer Synapse Service" -Name DependOnService -Value @("RzActionSvc", "Razer Game Manager Service")

# Set Razer Services to Manual
foreach($serviceName in $razerServiceNames){
    Get-Service -Name $serviceName -ErrorAction SilentlyContinue | Set-Service -StartupType Manual
}

# Set Razer Synapse Service back to Automatic
Get-Service -Name "Razer Synapse Service" | Set-Service -StartupType Automatic

# Get List of Razer Services after changes
Get-Service -ErrorAction SilentlyContinue | Where-Object {$_.DisplayName.ToLower() -like "*razer*"} -ErrorAction SilentlyContinue | Format-Table -AutoSize -Property ServiceName,DisplayName,StartupType,Status,ServicesDependedOn
couleurm commented 1 year ago

hey, just tossing my little function🕵️‍♀️

i'd appreciate if more people test it, synapse hasn't ever came back since so it's hard for me to judge if that even blocks it at all

function Block-RazerSynapse {
    Try {
        Remove-Item "$env:WINDIR\Installer\Razer" -Force -Recurse -ErrorAction Stop
    } Catch {
        "Failed to remove Razer installer folder"
        $_.Exception.Message
    }
    New-Item -ItemType File -Path "C:\Windows\Installer\Razer" -Force -ErrorAction Stop
    Write-Host "An empty file called 'Razer' in C:\Windows\Installer has been put to block Razer Synapse's auto installation"
}

and yes if it ends up functioning it can be added to winutil 👍 (originates here)

natsudragneelthefiredragon commented 1 year ago

hey, just tossing my little function🕵️‍♀️

i'd appreciate if more people test it, synapse hasn't ever came back since so it's hard for me to judge if that even blocks it at all

function Block-RazerSynapse {
    Try {
        Remove-Item "$env:WINDIR\Installer\Razer" -Force -Recurse -ErrorAction Stop
    } Catch {
        "Failed to remove Razer installer folder"
        $_.Exception.Message
    }
    New-Item -ItemType File -Path "C:\Windows\Installer\Razer" -Force -ErrorAction Stop
    Write-Host "An empty file called 'Razer' in C:\Windows\Installer has been put to block Razer Synapse's auto installation"
}

and yes if it ends up functioning it can be added to winutil 👍 (originates here)

If razer synapse is completely blocked, then my mouse just stays changing colors when I want it off or red, Whenever the installer for razer wants to update it immediately adds game manager back as a requirement in the registry for Razer, and the installer fails because I have game manager set to be disabled or manual startup, so I have to go into registry, remove the dependency, then try to let the installer run

Still would be a nice addition though for those who just don't want razer completely I guess, I don't myself but they force you to have it, or have constantly changing colors

thetredev commented 1 year ago

My experience is that Razer software just sucks. So I moved to OpenRGB for Razer devices (latest master release on their GitLab). The only downside to this is that it doesn't remember the configuration after sleep/wakeup. Reboots are no problem, though. Maybe that was a problem with the specific version I used. Regardless, I hope this is of any help.

Carterpersall commented 1 year ago

A Razer Synapse remover may not be a great idea to add to the script as it is needed for people with Razer laptops (like me). But disabling the game manager service would probably be fine to add.

github-actions[bot] commented 8 months ago

Closed due to inactivity